@sisense/sdk-ui 2.31.1 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +9 -9
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +5 -5
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/apply-styled-options-to-query-CE3WQwRs.cjs +1 -0
  8. package/dist/{apply-styled-options-to-query-lFlufwrB.js → apply-styled-options-to-query-TW3CqofD.js} +209 -207
  9. package/dist/{flow-DHowZLKN.cjs → const-BLmTd3gM.cjs} +1 -1
  10. package/dist/{flow-Cs53Uv2Y.js → const-vJfedJf9.js} +15 -15
  11. package/dist/execute-query-CZOWu-Fh.cjs +1 -0
  12. package/dist/{execute-query-4_76L7Ax.js → execute-query-D-gXk-LI.js} +908 -906
  13. package/dist/index-Boixy7N4.cjs +1 -0
  14. package/dist/{index-C2A2EHoh.cjs → index-C6ytYe3A.cjs} +1 -1
  15. package/dist/{index-eIOG6LP6.js → index-Ct7mA7YB.js} +1 -1
  16. package/dist/{index-CyVSfJ-B.js → index-D3DsBxkp.js} +22 -22
  17. package/dist/{index-DCYw3JUB.js → index-DrI_xqvr.js} +14 -0
  18. package/dist/{index-DTvxJdqZ.cjs → index-UssOwVVX.cjs} +1 -1
  19. package/dist/index.cjs +340 -340
  20. package/dist/index.js +12477 -12340
  21. package/dist/index.umd.js +805 -690
  22. package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/utils.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +22 -6
  24. package/dist/packages/sdk-ui/src/domains/query-execution/types.d.ts +2 -0
  25. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/regular-chart/has-no-results.d.ts +12 -0
  26. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/sisense-chart/sisense-chart.d.ts +1 -1
  27. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/sisense-chart/types.d.ts +8 -0
  28. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-chart-on-ready.d.ts +38 -0
  29. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-chart-renderer-props.d.ts +1 -0
  30. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +8 -0
  31. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/helpers/on-ready-state.d.ts +17 -0
  32. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-chart-builder.d.ts +8 -1
  33. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/comparison.d.ts +22 -0
  34. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/data.d.ts +17 -0
  35. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/index.d.ts +4 -0
  36. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/load-data.d.ts +64 -0
  37. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/value-colors.d.ts +27 -0
  38. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data-options/data-options.d.ts +30 -0
  39. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data-options/index.d.ts +1 -0
  40. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/design-options/design-options.d.ts +31 -0
  41. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/design-options/index.d.ts +1 -0
  42. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/kpi-chart-builder.d.ts +9 -0
  43. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/helpers.d.ts +139 -0
  44. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/index.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-card-styles.d.ts +154 -0
  46. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-card.d.ts +41 -0
  47. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-chart-renderer.d.ts +46 -0
  48. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-comparison.d.ts +60 -0
  49. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-sparkline.d.ts +23 -0
  50. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-title.d.ts +28 -0
  51. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-value.d.ts +55 -0
  52. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/on-color.d.ts +70 -0
  53. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/sparkline-options.d.ts +51 -0
  54. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-auto-fit-font-size.d.ts +98 -0
  55. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-element-size.d.ts +26 -0
  56. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-size-tier.d.ts +19 -0
  57. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/types.d.ts +62 -0
  58. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +47 -9
  59. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/types.d.ts +9 -0
  60. package/dist/packages/sdk-ui/src/domains/visualizations/components/kpi-chart.d.ts +23 -0
  61. package/dist/packages/sdk-ui/src/domains/visualizations/core/apply-on-ready-to-highcharts-options.d.ts +11 -0
  62. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/types.d.ts +2 -1
  63. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +108 -2
  64. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +1 -0
  65. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +41 -1
  66. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/types.d.ts +17 -3
  67. package/dist/packages/sdk-ui/src/domains/visualizations/core/highcharts-renderer.d.ts +7 -1
  68. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition-style-constants.d.ts +1 -1
  69. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +1 -2
  70. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -1
  71. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +1 -2
  72. package/dist/packages/sdk-ui/src/domains/widgets/components/filter-widget/filter-widget-dropdown.d.ts +16 -0
  73. package/dist/packages/sdk-ui/src/domains/widgets/components/filter-widget/types.d.ts +17 -23
  74. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +1 -2
  75. package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +18 -4
  76. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +447 -447
  77. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-panel-color-format.d.ts +8 -0
  78. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-filters.d.ts +56 -56
  79. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/categorical-labels-style.d.ts +3 -3
  80. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/series-label-affix-style.d.ts +1 -1
  81. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +11 -2
  82. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +28 -5
  83. package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-fire-on-ready.d.ts +14 -0
  84. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +11 -1
  85. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +9 -2
  86. package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +23 -2
  87. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +6 -3
  88. package/dist/packages/sdk-ui/src/infra/app/types.d.ts +14 -1
  89. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +14 -0
  90. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +14 -0
  91. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +14 -0
  92. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +14 -0
  93. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +14 -0
  94. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +14 -0
  95. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +14 -0
  96. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +14 -0
  97. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +14 -0
  98. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +14 -0
  99. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +14 -0
  100. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +14 -0
  101. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +14 -0
  102. package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +14 -0
  103. package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +28 -0
  104. package/dist/packages/sdk-ui/src/props.d.ts +77 -5
  105. package/dist/packages/sdk-ui/src/public-api/beta.d.ts +4 -0
  106. package/dist/packages/sdk-ui/src/types.d.ts +296 -5
  107. package/dist/query.cjs +1 -1
  108. package/dist/query.js +3 -3
  109. package/dist/quota-notification-CdcItYEO.cjs +665 -0
  110. package/dist/{quota-notification-mCXOSF0U.js → quota-notification-DJPs09UQ.js} +17392 -15866
  111. package/dist/translations/de-de.cjs +1 -1
  112. package/dist/translations/de-de.js +15 -1
  113. package/dist/translations/en-us.cjs +1 -1
  114. package/dist/translations/en-us.js +1 -1
  115. package/dist/translations/es-ar.cjs +1 -1
  116. package/dist/translations/es-ar.js +15 -1
  117. package/dist/translations/es-es.cjs +1 -1
  118. package/dist/translations/es-es.js +15 -1
  119. package/dist/translations/fr-fr.cjs +1 -1
  120. package/dist/translations/fr-fr.js +17 -3
  121. package/dist/translations/it-it.cjs +1 -1
  122. package/dist/translations/it-it.js +15 -1
  123. package/dist/translations/ja-jp.cjs +1 -1
  124. package/dist/translations/ja-jp.js +15 -1
  125. package/dist/translations/ko-kr.cjs +1 -1
  126. package/dist/translations/ko-kr.js +15 -1
  127. package/dist/translations/nl-nl.cjs +1 -1
  128. package/dist/translations/nl-nl.js +15 -1
  129. package/dist/translations/pt-br.cjs +1 -1
  130. package/dist/translations/pt-br.js +15 -1
  131. package/dist/translations/ru-ru.cjs +1 -1
  132. package/dist/translations/ru-ru.js +15 -1
  133. package/dist/translations/tr-tr.cjs +1 -1
  134. package/dist/translations/tr-tr.js +15 -1
  135. package/dist/translations/zh-cn.cjs +1 -1
  136. package/dist/translations/zh-cn.js +15 -1
  137. package/dist/{types-CzQiy3kx.js → types-B60QjE1r.js} +1 -1
  138. package/dist/{types-pkCiWY_S.cjs → types-BAIldf5u.cjs} +1 -1
  139. package/dist/{use-execute-csv-query-DnTVUxCj.cjs → use-execute-csv-query-DAJqBzR5.cjs} +2 -2
  140. package/dist/{use-execute-csv-query-LtQrd2A4.js → use-execute-csv-query-tLJmsnwg.js} +6 -6
  141. package/dist/{utils-Bqaxp0gq.cjs → utils-BIAAcoFt.cjs} +12 -12
  142. package/dist/{utils-DHLPgrHF.js → utils-D2c9kOce.js} +1544 -1541
  143. package/dist/{widget-composer-CSkR-kBh.js → widget-composer-VWvON_Hi.js} +4 -4
  144. package/dist/{widget-composer-BUq7QhlK.cjs → widget-composer-srdW7lV4.cjs} +1 -1
  145. package/package.json +8 -8
  146. package/dist/apply-styled-options-to-query-siyJXPed.cjs +0 -1
  147. package/dist/execute-query-9rwu12er.cjs +0 -1
  148. package/dist/index-BGVJyEgp.cjs +0 -1
  149. package/dist/quota-notification-C49kSTz5.cjs +0 -550
@@ -1,550 +0,0 @@
1
- "use strict";var cP=Object.defineProperty,dP=Object.defineProperties;var hP=Object.getOwnPropertyDescriptors;var zl=Object.getOwnPropertySymbols;var vv=Object.prototype.hasOwnProperty,yv=Object.prototype.propertyIsEnumerable;var bv=Math.pow,oh=(e,t,r)=>t in e?cP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))vv.call(t,r)&&oh(e,r,t[r]);if(zl)for(var r of zl(t))yv.call(t,r)&&oh(e,r,t[r]);return e},H=(e,t)=>dP(e,hP(t));var Ge=(e,t)=>{var r={};for(var n in e)vv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zl)for(var n of zl(e))t.indexOf(n)<0&&yv.call(e,n)&&(r[n]=e[n]);return r};var _t=(e,t,r)=>oh(e,typeof t!="symbol"?t+"":t,r);var pt=(e,t,r)=>new Promise((n,i)=>{var a=u=>{try{s(r.next(u))}catch(c){i(c)}},o=u=>{try{s(r.throw(u))}catch(c){i(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,o);s((r=r.apply(e,t)).next())});const O=require("./flow-DHowZLKN.cjs"),k=require("react"),U=require("./execute-query-9rwu12er.cjs"),y=require("./use-execute-csv-query-DnTVUxCj.cjs"),P=require("./utils-Bqaxp0gq.cjs"),z=require("./apply-styled-options-to-query-siyJXPed.cjs"),_e=require("react/jsx-runtime"),Jn=require("react-dom");function fP(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const de=fP(k);function Bi(e,t){if(typeof e!="string")throw new Error("URL must be a string");if(!e.trim())throw new Error("URL cannot be empty");try{const r=new URL(e);return r.origin+(r.pathname.endsWith("/")?r.pathname:r.pathname+"/")+(t&&r.search?r.search:"")}catch(r){throw new Error(`Connection string ${e} is not a valid URL`)}}function _v(e,t){if(!e)throw new Error("Base URL is required");let r;try{r=new URL(e)}catch(u){throw new Error("Base URL is not valid")}if(!t||t==="/")return r.toString();try{return new URL(t).toString()}catch(u){}const n=new URL(r.toString()),[i="",a=""]=t.split(/\?(.+)/),o=r.pathname.replace(/\/$/,""),s=i.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/+/g,"/");if(n.pathname=s?`${o}/${s}`:o,a){const u=new URLSearchParams(a);for(const[c,d]of u.entries())n.searchParams.set(c,d)}return Bi(n.toString(),!0)}function pP(e){return y.generateUtilityClass("MuiPagination",e)}y.generateUtilityClasses("MuiPagination",["root","ul","outlined","text"]);function Tm({controlled:e,default:t,name:r,state:n="value"}){const{current:i}=de.useRef(e!==void 0),[a,o]=de.useState(t),s=i?e:a;if(process.env.NODE_ENV!=="production"){de.useEffect(()=>{i!==(e!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${n} state of ${r} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
- `))},[n,r,e]);const{current:c}=de.useRef(t);de.useEffect(()=>{!i&&!Object.is(c,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
3
- `))},[JSON.stringify(t)])}const u=de.useCallback(c=>{i||o(c)},[]);return[s,u]}function mP(e={}){const F=e,{boundaryCount:t=1,componentName:r="usePagination",count:n=1,defaultPage:i=1,disabled:a=!1,hideNextButton:o=!1,hidePrevButton:s=!1,onChange:u,page:c,showFirstButton:d=!1,showLastButton:h=!1,siblingCount:p=1}=F,m=Ge(F,["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"]),[v,b]=Tm({controlled:c,default:i,name:r,state:"page"}),_=(B,G)=>{c||b(G),u&&u(B,G)},w=(B,G)=>{const Y=G-B+1;return Array.from({length:Y},($,X)=>B+X)},C=w(1,Math.min(t,n)),S=w(Math.max(n-t+1,t+1),n),T=Math.max(Math.min(v-p,n-t-p*2-1),t+2),M=Math.min(Math.max(v+p,t+p*2+2),n-t-1),E=[...d?["first"]:[],...s?[]:["previous"],...C,...T>t+2?["start-ellipsis"]:t+1<n-t?[t+1]:[],...w(T,M),...M<n-t-1?["end-ellipsis"]:n-t>t?[n-t]:[],...S,...o?[]:["next"],...h?["last"]:[]],D=B=>{switch(B){case"first":return 1;case"previous":return v-1;case"next":return v+1;case"last":return n;default:return null}},N=E.map(B=>typeof B=="number"?{onClick:G=>{_(G,B)},type:"page",page:B,selected:B===v,disabled:a,"aria-current":B===v?"page":void 0}:{onClick:G=>{_(G,D(B))},type:B,page:D(B),selected:!1,disabled:a||!B.includes("ellipsis")&&(B==="next"||B==="last"?v>=n:v<=1)});return R({items:N},m)}function gP(e){return y.generateUtilityClass("MuiPaginationItem",e)}const Qt=y.generateUtilityClasses("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),vP=e=>{var n,i;const t={systemProps:{},otherProps:{}},r=(i=(n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)!=null?i:y.defaultSxConfig;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function G2(e){const o=e,{sx:t}=o,r=Ge(o,["sx"]),{systemProps:n,otherProps:i}=vP(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const u=t(...s);return y.isPlainObject(u)?R(R({},n),u):n}:a=R(R({},n),t),H(R({},i),{sx:a})}function yP(e){return e==null||Object.keys(e).length===0}function q2(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?i=>t(yP(i)?r:i):t;return _e.jsx(y.Global,{styles:n})}process.env.NODE_ENV!=="production"&&(q2.propTypes={defaultTheme:y.PropTypes.object,styles:y.PropTypes.oneOfType([y.PropTypes.array,y.PropTypes.string,y.PropTypes.object,y.PropTypes.func])});function Y2({styles:e,themeId:t,defaultTheme:r={}}){const n=y.useTheme$1(r),i=typeof e=="function"?e(t&&n[t]||n):e;return _e.jsx(q2,{styles:i})}process.env.NODE_ENV!=="production"&&(Y2.propTypes={defaultTheme:y.PropTypes.object,styles:y.PropTypes.oneOfType([y.PropTypes.array,y.PropTypes.func,y.PropTypes.number,y.PropTypes.object,y.PropTypes.string,y.PropTypes.bool]),themeId:y.PropTypes.string});let wv=0;function bP(e){const[t,r]=de.useState(e),n=e||t;return de.useEffect(()=>{t==null&&(wv+=1,r(`mui-${wv}`))},[t]),n}const _P=R({},de),Cv=_P.useId;function gc(e){if(Cv!==void 0){const t=Cv();return e!=null?e:t}return bP(e)}function X2(e){return _e.jsx(Y2,H(R({},e),{defaultTheme:y.defaultTheme,themeId:y.THEME_ID}))}process.env.NODE_ENV!=="production"&&(X2.propTypes={styles:y.PropTypes.oneOfType([y.PropTypes.array,y.PropTypes.func,y.PropTypes.number,y.PropTypes.object,y.PropTypes.string,y.PropTypes.bool])});function wP(e){return function(r){return _e.jsx(X2,{styles:typeof e=="function"?n=>e(R({theme:n},r)):e})}}function CP(){return G2}function xP(e){return typeof e.main=="string"}function TP(e,t=[]){if(!xP(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ri(e=[]){return([,t])=>t&&TP(t,e)}function SP(e){return y.generateUtilityClass("MuiSvgIcon",e)}y.generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const MP=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${y.capitalize(t)}`,`fontSize${y.capitalize(r)}`]};return y.composeClasses(i,SP,n)},EP=y.styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${y.capitalize(r.color)}`],t[`fontSize${y.capitalize(r.fontSize)}`]]}})(y.memoTheme(({theme:e})=>{var t,r,n,i,a,o,s,u,c,d,h,p,m,v,b,_,w,C;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(i=(n=((r=e.vars)!=null?r:e).transitions)==null?void 0:n.duration)==null?void 0:i.shorter}),variants:[{props:S=>!S.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:c.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:h.call(d,35))||"2.1875rem"}},...Object.entries(((p=e.vars)!=null?p:e).palette).filter(([,S])=>S&&S.main).map(([S])=>{var T,M,E;return{props:{color:S},style:{color:(E=(M=((T=e.vars)!=null?T:e).palette)==null?void 0:M[S])==null?void 0:E.main}}}),{props:{color:"action"},style:{color:(b=(v=((m=e.vars)!=null?m:e).palette)==null?void 0:v.action)==null?void 0:b.active}},{props:{color:"disabled"},style:{color:(C=(w=((_=e.vars)!=null?_:e).palette)==null?void 0:w.action)==null?void 0:C.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),zu=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiSvgIcon"}),C=n,{children:i,className:a,color:o="inherit",component:s="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:p="0 0 24 24"}=C,m=Ge(C,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),v=de.isValidElement(i)&&i.type==="svg",b=H(R({},n),{color:o,component:s,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:v}),_={};d||(_.viewBox=p);const w=MP(b);return _e.jsxs(EP,H(R(R(R({as:s,className:y.clsx(w.root,a),focusable:"false",color:c,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:r},_),m),v&&i.props),{ownerState:b,children:[v?i.props.children:i,h?_e.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(zu.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.PropTypes.string]),component:y.PropTypes.elementType,fontSize:y.PropTypes.oneOfType([y.PropTypes.oneOf(["inherit","large","medium","small"]),y.PropTypes.string]),htmlColor:y.PropTypes.string,inheritViewBox:y.PropTypes.bool,shapeRendering:y.PropTypes.string,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),titleAccess:y.PropTypes.string,viewBox:y.PropTypes.string});zu.muiName="SvgIcon";function Ya(e,t){function r(n,i){return _e.jsx(zu,H(R({"data-testid":`${t}Icon`,ref:i},n),{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=zu.muiName,de.memo(de.forwardRef(r))}const PP=Ya(_e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),AP=Ya(_e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),RP=Ya(_e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),DP=Ya(_e.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Z2=(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${y.capitalize(r.size)}`],r.variant==="text"&&t[`text${y.capitalize(r.color)}`],r.variant==="outlined"&&t[`outlined${y.capitalize(r.color)}`],r.shape==="rounded"&&t.rounded,r.type==="page"&&t.page,(r.type==="start-ellipsis"||r.type==="end-ellipsis")&&t.ellipsis,(r.type==="previous"||r.type==="next")&&t.previousNext,(r.type==="first"||r.type==="last")&&t.firstLast]},NP=e=>{const{classes:t,color:r,disabled:n,selected:i,size:a,shape:o,type:s,variant:u}=e,c={root:["root",`size${y.capitalize(a)}`,u,o,r!=="standard"&&`color${y.capitalize(r)}`,r!=="standard"&&`${u}${y.capitalize(r)}`,n&&"disabled",i&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return y.composeClasses(c,gP,t)},kP=y.styled("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Z2})(y.memoTheme(({theme:e})=>H(R({},e.typography.body2),{borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Qt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),LP=y.styled(y.ButtonBase,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Z2})(y.memoTheme(({theme:e})=>H(R({},e.typography.body2),{borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Qt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qt.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:y.alpha(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Qt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:y.alpha(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Qt.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Qt.selected}`]:{[`&.${Qt.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Qt.selected}`]:{[`&.${Qt.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(ri(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Qt.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Qt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Qt.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(ri(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Qt.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:y.alpha(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:y.alpha(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:y.alpha(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:y.alpha(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),OP=y.styled("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(y.memoTheme(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),K2=de.forwardRef(function(t,r){var q,te,Q,J;const n=y.useDefaultProps({props:t,name:"MuiPaginationItem"}),j=n,{className:i,color:a="standard",component:o,components:s={},disabled:u=!1,page:c,selected:d=!1,shape:h="circular",size:p="medium",slots:m={},slotProps:v={},type:b="page",variant:_="text"}=j,w=Ge(j,["className","color","component","components","disabled","page","selected","shape","size","slots","slotProps","type","variant"]),C=H(R({},n),{color:a,disabled:u,selected:d,shape:h,size:p,type:b,variant:_}),S=y.useRtl(),T=NP(C),M={slots:{previous:(q=m.previous)!=null?q:s.previous,next:(te=m.next)!=null?te:s.next,first:(Q=m.first)!=null?Q:s.first,last:(J=m.last)!=null?J:s.last},slotProps:v},[E,D]=y.useSlot("previous",{elementType:RP,externalForwardedProps:M,ownerState:C}),[N,F]=y.useSlot("next",{elementType:DP,externalForwardedProps:M,ownerState:C}),[B,G]=y.useSlot("first",{elementType:PP,externalForwardedProps:M,ownerState:C}),[Y,$]=y.useSlot("last",{elementType:AP,externalForwardedProps:M,ownerState:C}),X=S?{previous:"next",next:"previous",first:"last",last:"first"}[b]:b,V={previous:E,next:N,first:B,last:Y}[X],Z={previous:D,next:F,first:G,last:$}[X];return b==="start-ellipsis"||b==="end-ellipsis"?_e.jsx(kP,{ref:r,ownerState:C,className:y.clsx(T.root,i),children:"…"}):_e.jsxs(LP,H(R({ref:r,ownerState:C,component:o,disabled:u,className:y.clsx(T.root,i)},w),{children:[b==="page"&&c,V?_e.jsx(OP,H(R({},Z),{className:T.icon,as:V})):null]}))});process.env.NODE_ENV!=="production"&&(K2.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["primary","secondary","standard"]),y.PropTypes.string]),component:y.PropTypes.elementType,components:y.PropTypes.shape({first:y.PropTypes.elementType,last:y.PropTypes.elementType,next:y.PropTypes.elementType,previous:y.PropTypes.elementType}),disabled:y.PropTypes.bool,page:y.PropTypes.node,selected:y.PropTypes.bool,shape:y.PropTypes.oneOf(["circular","rounded"]),size:y.PropTypes.oneOfType([y.PropTypes.oneOf(["small","medium","large"]),y.PropTypes.string]),slotProps:y.PropTypes.shape({first:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),last:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),next:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),previous:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({first:y.PropTypes.elementType,last:y.PropTypes.elementType,next:y.PropTypes.elementType,previous:y.PropTypes.elementType}),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),type:y.PropTypes.oneOf(["end-ellipsis","first","last","next","page","previous","start-ellipsis"]),variant:y.PropTypes.oneOfType([y.PropTypes.oneOf(["outlined","text"]),y.PropTypes.string])});const IP=e=>{const{classes:t,variant:r}=e,n={root:["root",r],ul:["ul"]};return y.composeClasses(n,pP,t)},FP=y.styled("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({}),$P=y.styled("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function BP(e,t,r){return e==="page"?`${r?"":"Go to "}page ${t}`:`Go to ${e} page`}const Q2=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiPagination"}),B=n,{boundaryCount:i=1,className:a,color:o="standard",count:s=1,defaultPage:u=1,disabled:c=!1,getItemAriaLabel:d=BP,hideNextButton:h=!1,hidePrevButton:p=!1,onChange:m,page:v,renderItem:b=G=>_e.jsx(K2,R({},G)),shape:_="circular",showFirstButton:w=!1,showLastButton:C=!1,siblingCount:S=1,size:T="medium",variant:M="text"}=B,E=Ge(B,["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"]),{items:D}=mP(H(R({},n),{componentName:"Pagination"})),N=H(R({},n),{boundaryCount:i,color:o,count:s,defaultPage:u,disabled:c,getItemAriaLabel:d,hideNextButton:h,hidePrevButton:p,renderItem:b,shape:_,showFirstButton:w,showLastButton:C,siblingCount:S,size:T,variant:M}),F=IP(N);return _e.jsx(FP,H(R({"aria-label":"pagination navigation",className:y.clsx(F.root,a),ownerState:N,ref:r},E),{children:_e.jsx($P,{className:F.ul,ownerState:N,children:D.map((G,Y)=>_e.jsx("li",{children:b(H(R({},G),{color:o,"aria-label":d(G.type,G.page,G.selected),shape:_,size:T,variant:M}))},Y))})}))});process.env.NODE_ENV!=="production"&&(Q2.propTypes={boundaryCount:y.integerPropType,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["primary","secondary","standard"]),y.PropTypes.string]),count:y.integerPropType,defaultPage:y.integerPropType,disabled:y.PropTypes.bool,getItemAriaLabel:y.PropTypes.func,hideNextButton:y.PropTypes.bool,hidePrevButton:y.PropTypes.bool,onChange:y.PropTypes.func,page:y.integerPropType,renderItem:y.PropTypes.func,shape:y.PropTypes.oneOf(["circular","rounded"]),showFirstButton:y.PropTypes.bool,showLastButton:y.PropTypes.bool,siblingCount:y.integerPropType,size:y.PropTypes.oneOfType([y.PropTypes.oneOf(["small","medium","large"]),y.PropTypes.string]),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),variant:y.PropTypes.oneOfType([y.PropTypes.oneOf(["outlined","text"]),y.PropTypes.string])});const ir={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function Sm(e){return[U.customFormula(ir.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),U.customFormula(ir.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),U.customFormula(ir.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function zP(e){return[...Sm(e),U.customFormula(ir.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),U.customFormula(ir.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),U.customFormula(ir.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function HP(e){return[...Sm(e),U.customFormula(ir.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),U.customFormula(ir.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function WP(e){return[...Sm(e),U.customFormula(ir.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),U.customFormula(ir.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),U.customFormula(ir.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const jP=U.withComposeCodeForAnalytics(e=>{const t=U.cloneDeep(e),r=U.customFormula(ir.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),n=U.customFormula(ir.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:e});return t.name=`${t.name} (Outliers)`,t.jaql=i=>{const a=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?a:{jaql:a}},t},"boxWhiskerIqrOutliers"),UP=U.withComposeCodeForAnalytics(e=>{const t=U.cloneDeep(e),r=U.customFormula(ir.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),n=U.customFormula(ir.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:e});return t.jaql=i=>{const a=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?a:{jaql:a}},t},"boxWhiskerStdDevOutliers"),VP=e=>({type:"boxplot",xValues:[],series:[{name:e,title:e,data:[]}]}),GP=(e,t)=>{const{valueTitle:r}=e,n=e.boxMin&&P.getColumnByName(t,e.boxMin.column.name),i=e.boxMedian&&P.getColumnByName(t,e.boxMedian.column.name),a=e.boxMax&&P.getColumnByName(t,e.boxMax.column.name),o=e.whiskerMin&&P.getColumnByName(t,e.whiskerMin.column.name),s=e.whiskerMax&&P.getColumnByName(t,e.whiskerMax.column.name);if(!n||!i||!a||!o||!s)return VP(r);const u=e.category&&P.getColumnByName(t,e.category.column.name);u&&(u.direction=P.sortDirection(e.category.sortType));const c=P.getOrderedXValues(t,[],u?[u]:[],(u==null?void 0:u.direction)===0?P.rownumColumnName:void 0),d=P.getIndexedRows(t.rows,u?[u]:[]),h=e.outliers&&P.getColumnByName(t,e.outliers.column.name),p=[],m=[];c.forEach((b,_)=>{const w=d[b.key],C=w?w[0]:[],S=u&&!!P.isBlurred(C,u);p.push({q1:n?P.getValue(C,n):0,median:i?P.getValue(C,i):0,q3:a?P.getValue(C,a):0,low:o?P.getValue(C,o):0,high:s?P.getValue(C,s):0,blur:S});const T=h?C[h.index].rawValue.split(",").map(M=>parseFloat(M)):[];m.push(...T.map(M=>({x:_,y:M,blur:S})))});const v=[{name:e.valueTitle,title:e.valueTitle,data:p}];return m.length>0&&v.push({name:e.valueTitle,title:e.valueTitle,data:m}),{type:"boxplot",xValues:c,series:v}};function qP(e){return e.type==="boxplot"}const YP=(e,t,r)=>({width:(t==null?void 0:t.width)||(e==null?void 0:e.width)||r.width,height:(t==null?void 0:t.height)||(e==null?void 0:e.height)||r.height}),vc=({children:e,defaultSize:t,size:r,rerenderOnResize:n=!1,useContentSize:i,onSizeChange:a,debounceMs:o=300})=>{const s=k.useRef(null),[u,c]=k.useState(),d=k.useRef(null),h=k.useCallback(()=>{var E,D;const M={width:(E=s.current)==null?void 0:E.offsetWidth,height:(D=s.current)==null?void 0:D.offsetHeight};c(N=>{const F=(N==null?void 0:N.width)===0&&M.width===t.width,B=(N==null?void 0:N.height)===0&&M.height===t.height,G={width:F?N.width:M.width,height:B?N.height:M.height};return U.isEqual(N,G)?N:G})},[t]),p=k.useCallback(()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{h()},o)},[h,o]);k.useLayoutEffect(()=>{h()},[h]),k.useEffect(()=>{const M=s.current;if(!M)return;const E=new ResizeObserver(()=>{p()});return E.observe(M),()=>{E.disconnect(),d.current&&clearTimeout(d.current)}},[p]);const m=k.useMemo(()=>YP(u,r,t),[u,t,r]),v=!!u;k.useEffect(()=>{v&&a&&a(m)},[m,v,a]);const b={width:r!=null&&r.width&&!(i!=null&&i.width)?`${r.width}px`:"100%",height:r!=null&&r.height&&!(i!=null&&i.height)?`${r.height}px`:"100%"},_=(u==null?void 0:u.width)||(u==null?void 0:u.width)===void 0,w=(u==null?void 0:u.height)||(u==null?void 0:u.width)===void 0,C={width:_||i!=null&&i.width?"100%":`${m.width}px`,height:w||i!=null&&i.height?"100%":`${m.height}px`,position:"relative"},S=i!=null&&i.width||i!=null&&i.height?{position:"static",width:"100%",height:"100%"}:{position:"absolute",top:0,right:0,bottom:0,left:0},T=n?`${m==null?void 0:m.width}${m==null?void 0:m.height}`:"";return O.jsx("div",{style:b,ref:s,children:O.jsx("div",{style:C,children:O.jsx("div",{style:S,children:typeof e=="function"?e(m):e})},T)})},J2=32,e_={width:400,height:500},XP={width:400,height:400},ZP={width:400,height:500},KP={width:200,height:200},yc=e=>z.isTable(e)?ZP:z.isIndicator(e)?KP:XP,t_=(e,{hasHeader:t}={})=>{const r=e==="pivot"?e_:yc(e);return t?{width:r.width,height:r.height+J2}:r},QP=e=>{const{absolute:t,children:r,classes:n,flexItem:i,light:a,orientation:o,textAlign:s,variant:u}=e,c={root:["root",t&&"absolute",u,a&&"light",o==="vertical"&&"vertical",i&&"flexItem",r&&"withChildren",r&&o==="vertical"&&"withChildrenVertical",s==="right"&&o!=="vertical"&&"textAlignRight",s==="left"&&o!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",o==="vertical"&&"wrapperVertical"]};return y.composeClasses(c,y.getDividerUtilityClass,n)},JP=y.styled("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(y.memoTheme(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:y.alpha(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),e4=y.styled("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(y.memoTheme(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Ti=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiDivider"}),w=n,{absolute:i=!1,children:a,className:o,orientation:s="horizontal",component:u=a||s==="vertical"?"div":"hr",flexItem:c=!1,light:d=!1,role:h=u!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth"}=w,v=Ge(w,["absolute","children","className","orientation","component","flexItem","light","role","textAlign","variant"]),b=H(R({},n),{absolute:i,component:u,flexItem:c,light:d,orientation:s,role:h,textAlign:p,variant:m}),_=QP(b);return _e.jsx(JP,H(R({as:u,className:y.clsx(_.root,o),role:h,ref:r,ownerState:b,"aria-orientation":h==="separator"&&(u!=="hr"||s==="vertical")?s:void 0},v),{children:a?_e.jsx(e4,{className:_.wrapper,ownerState:b,children:a}):null}))});Ti&&(Ti.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(Ti.propTypes={absolute:y.PropTypes.bool,children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,component:y.PropTypes.elementType,flexItem:y.PropTypes.bool,light:y.PropTypes.bool,orientation:y.PropTypes.oneOf(["horizontal","vertical"]),role:y.PropTypes.string,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),textAlign:y.PropTypes.oneOf(["center","left","right"]),variant:y.PropTypes.oneOfType([y.PropTypes.oneOf(["fullWidth","inset","middle"]),y.PropTypes.string])});function t4(e){return y.generateUtilityClass("MuiTypography",e)}const r4=y.generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),n4={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},i4=CP(),a4=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:o}=e,s={root:["root",a,e.align!=="inherit"&&`align${y.capitalize(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return y.composeClasses(s,t4,o)},o4=y.styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${y.capitalize(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(y.memoTheme(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(ri()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${y.capitalize(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),xv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},vr=de.forwardRef(function(t,r){const S=y.useDefaultProps({props:t,name:"MuiTypography"}),{color:n}=S,i=Ge(S,["color"]),a=!n4[n],o=i4(R(R({},i),a&&{color:n})),T=o,{align:s="inherit",className:u,component:c,gutterBottom:d=!1,noWrap:h=!1,paragraph:p=!1,variant:m="body1",variantMapping:v=xv}=T,b=Ge(T,["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"]),_=H(R({},o),{align:s,color:n,className:u,component:c,gutterBottom:d,noWrap:h,paragraph:p,variant:m,variantMapping:v}),w=c||(p?"p":v[m]||xv[m])||"span",C=a4(_);return _e.jsx(o4,H(R({as:w,ref:r,className:y.clsx(C.root,u)},b),{ownerState:_,style:R(R({},s!=="inherit"&&{"--Typography-textAlign":s}),b.style)}))});process.env.NODE_ENV!=="production"&&(vr.propTypes={align:y.PropTypes.oneOf(["center","inherit","justify","left","right"]),children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),y.PropTypes.string]),component:y.PropTypes.elementType,gutterBottom:y.PropTypes.bool,noWrap:y.PropTypes.bool,paragraph:y.PropTypes.bool,style:y.PropTypes.object,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),variant:y.PropTypes.oneOfType([y.PropTypes.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),y.PropTypes.string]),variantMapping:y.PropTypes.object});function s4(e){return t=>{var r;t.type==="rule"&&((r=t.root)==null?void 0:r.type)!==O.KEYFRAMES&&(t.props=t.props.map(n=>`${e} ${n}`))}}const Tv=k.createContext(void 0),r_=({children:e,cssSelectorPrefix:t})=>{const r=k.useMemo(()=>y.getNonceFromMetaTag(),[]),n=k.useContext(Tv),i=!n,a=n==null?void 0:n.cssSelectorPrefix,o=k.useMemo(()=>i&&r||t!==a?O.createCache(R(R({key:"css"},r&&{nonce:r}),t&&{stylisPlugins:[O.prefixer,s4(t)]})):null,[i,t,a,r]);return i||o?O.jsx(Tv.Provider,{value:{cssSelectorPrefix:t},children:o?O.jsx(O.CacheProvider,{value:o,children:e}):O.jsx(O.Fragment,{children:e})}):O.jsx(O.Fragment,{children:e})};function Sv(e){return`${e.fontFamily}|${e.fontWeight}|${e.fontStyle}`}function l4(e,t){const[r,n]=k.useState([]),[i,a]=k.useState(!1),o=k.useMemo(()=>e.filter(s=>!t.includes(Sv(s))),[e,t]);return k.useEffect(()=>{if(o.length===0){a(!0);return}let s=!1;const u=o.map(c=>{const d=c.src.map(p=>Object.entries(p).map(([v,b])=>`${v}('${b}')`).join(" ")).join(", ");return new FontFace(c.fontFamily,d,{style:c.fontStyle,weight:c.fontWeight.toString()}).load().then(p=>(s||document.fonts.add(p),Sv(c)))});return Promise.all(u).then(c=>{s||(n(d=>[...d,...c]),a(!0))}).catch(c=>{console.error("Failed to load fonts:",c),a(!0)}),()=>{s=!0}},[o]),{loadedFonts:r,areAllFontsLoaded:i}}const Mv=k.createContext({loadedFonts:[]}),u4=({fonts:e,children:t})=>{var o;const{loadedFonts:r}=k.useContext(Mv),{themeSettings:n}=y.useThemeContext(),{loadedFonts:i,areAllFontsLoaded:a}=l4(e||((o=n.typography.fontsLoader)==null?void 0:o.fonts)||[],r);return O.jsx(Mv.Provider,{value:{loadedFonts:[...r,...i]},children:a&&t})},Go={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function n_(e,t,r){const n={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,hyperlinkColor:e.typography.hyperlinkColor,hyperlinkHoverColor:e.typography.hyperlinkHoverColor,fontsLoader:{fonts:c4(e.typography.fontFamily,r,e.typography.customFontSelected)}},palette:{variantColors:t.colors},general:{brandColor:e.general.brandColor,backgroundColor:e.general.backgroundColor,primaryButtonTextColor:e.general.primaryButtonTextColor,primaryButtonHoverColor:e.general.primaryButtonHoverColor,popover:y.getDefaultThemeSettings().general.popover,buttons:{primary:{backgroundColor:{default:e.general.brandColor,hover:e.general.primaryButtonHoverColor,focus:e.general.primaryButtonHoverColor},textColor:e.general.primaryButtonTextColor},cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:Go[e.dashboards.widgetSpacing],cornerRadius:Go[e.dashboards.widgetCornerRadius],shadow:Go[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:Go[e.dashboards.widgetTitleAlignment],titleFontSize:y.DEFAULT_TITLE_FONT_SIZE,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:y.DEFAULT_DIVIDER_WIDTH,dividerLineColor:y.DEFAULT_DIVIDER_COLOR,borderWidth:y.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:y.DEFAULT_DASHBOARD_BORDER_COLOR,toolbar:{primaryTextColor:e.dashboards.toolbarTextColor,secondaryTextColor:e.dashboards.toolbarSecondaryTextColor,backgroundColor:e.dashboards.toolbarBackgroundColor,dividerLineColor:y.DEFAULT_DASHBOARD_TOOLBAR_DIVIDER_LINE_COLOR,dividerLineWidth:y.DEFAULT_DASHBOARD_TOOLBAR_DIVIDER_LINE_WIDTH}},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,dividerLineColor:y.DEFAULT_FILTER_PANEL_DIVIDER_LINE_COLOR,dividerLineWidth:y.DEFAULT_FILTER_PANEL_DIVIDER_LINE_WIDTH,borderColor:y.DEFAULT_FILTER_PANEL_BORDER_COLOR,borderWidth:y.DEFAULT_FILTER_PANEL_BORDER_WIDTH}}};return P.merge.withOptions({mergeArrays:!1},y.getDefaultThemeSettings(),n)}function i_(e){return e.dashboards.colorPaletteName}function c4(e,t,r){const a=r?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${a}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${a}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${a}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${a}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${a}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${a}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${a}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${a}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${a}${e}-Bold.ttf`,format:"truetype"}]}]}function a_(e,t){return pt(this,null,function*(){const r=yield d4(e,t);if(!r)throw new U.TranslatableError("errors.themeNotFound",{themeOid:e});const n=i_(r),i=yield o_(n,t);return n_(r,i,t.url)})}function d4(e,t){return pt(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new U.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function o_(e,t){return pt(this,null,function*(){const r=yield t.get(`api/palettes/${e}`);if(r&&"status"in r&&r.status==="error")throw new U.TranslatableError("errors.paletteNotFound",{paletteName:e});return r})}var s_=(e=>(e.DEFAULT="default",e.HOVER="hover",e.FOCUS="focus",e))(s_||{});function sh(e){return typeof e=="string"}function h4(e){var u;const t=y.useThemeContext().themeSettings,[r,n]=k.useState(null),[i,a]=k.useState(null),o=(u=y.useSisenseContext().app)==null?void 0:u.httpClient;k.useEffect(()=>{e&&sh(e)&&o&&a_(e,o).then(c=>{n(c)}).catch(a)},[o,e]),k.useEffect(()=>{(!e||!sh(e))&&(n(null),a(null))},[e]);const s=k.useMemo(()=>r?Ev(t,r):e&&!sh(e)?Ev(t,e):t,[r,t,e]);return i?[null,i]:[s,null]}function Ev(e,t){return P.merge.withOptions({mergeArrays:!1},e,t)}const l_=y.asSisenseComponent({componentName:"ThemeProvider",trackingConfig:{skip:e=>!!e.skipTracking,transparent:!0},shouldSkipSisenseContextWaiting:!0})(e=>{var c;const{theme:t,children:r,config:n}=e,[i,a]=h4(t),o=y.useThemeContext().config,s=k.useMemo(()=>n&&o?P.merge.withOptions({mergeArrays:!1},o,n):n||o,[o,n]),u=(c=s==null?void 0:s.cssSelectorPrefix)!=null&&c.enabled?s.cssSelectorPrefix.value:void 0;if(a)throw a;return i?O.jsx(r_,{cssSelectorPrefix:u,children:O.jsx(y.ThemeContext.Provider,{value:{themeSettings:i,config:s},children:O.jsx(u4,{children:r})})}):null}),Pv="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3crect%20x='50.5'%20y='558.5'%20fill='%23E4E4E4'%20width='466'%20height='2'/%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M487.5,531.5h-410v-68.9l0.3-0.3l144-155.7l104.2,88.1l161.6-179.5V531.5z%20M79.5,529.5h406V220.4%20L326.1,397.5l-104.2-88.2l-142.4,154V529.5z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",f4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3crect%20x='64.5'%20y='201.5'%20fill='%23E4E4E4'%20width='2'%20height='381'/%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M447.5,560.5h-357v-60h357V560.5z%20M92.5,558.5h353v-56h-353V558.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M292.5,468.5h-202v-60h202V468.5z%20M92.5,466.5h198v-56h-198V466.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M526.5,377.5h-436v-60h436V377.5z%20M92.5,375.5h432v-56h-432V375.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M368.5,285.5h-278v-59h278V285.5z%20M92.5,283.5h274v-55h-274V283.5z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",p4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='477px'%20height='689px'%20viewBox='0%200%20477%20689'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3c!--%20Generator:%20sketchtool%2040.1%20(33804)%20-%20http://www.bohemiancoding.com/sketch%20--%3e%3ctitle%3eD5222DCB-A5E7-4783-ABD3-E5AAF56D153F%3c/title%3e%3cdesc%3eCreated%20with%20sketchtool.%3c/desc%3e%3cdefs%3e%3crect%20id='path-1'%20x='0.760775862'%20y='88.8671642'%20width='90'%20height='138'%3e%3c/rect%3e%3cmask%20id='mask-2'%20maskContentUnits='userSpaceOnUse'%20maskUnits='objectBoundingBox'%20x='0'%20y='0'%20width='90'%20height='138'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3c/defs%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='box-and-whiskers-plot'%20transform='translate(-1362.000000,%20-6618.000000)'%20stroke='%23E5E5E5'%3e%3cg%20id='boxplot_small'%20transform='translate(1362.000000,%206618.000000)'%3e%3cg%20id='Group-40'%20transform='translate(193.000000,%20187.000000)'%3e%3cg%20id='Group-39'%20transform='translate(0.239224,%200.132836)'%3e%3cuse%20id='Rectangle-32'%20mask='url(%23mask-2)'%20stroke-width='2'%20xlink:href='%23path-1'%3e%3c/use%3e%3cpath%20d='M0.760775862,185.367164%20L90.7607759,185.367164'%20id='Path-63'%20fill='%23D8D8D8'%3e%3c/path%3e%3cpath%20d='M0.760775862,313.367164%20L90.7607759,313.367164'%20id='Path-63'%20fill='%23D8D8D8'%3e%3c/path%3e%3cpath%20d='M0.760775862,1.36716418%20L90.7607759,1.36716418'%20id='Path-63-Copy'%20fill='%23D8D8D8'%3e%3c/path%3e%3cpath%20d='M46.2607759,0.867164179%20L46.2607759,88.8671642'%20id='Path-64'%20fill='%23D8D8D8'%3e%3c/path%3e%3cpath%20d='M46.2607759,225.867164%20L46.2607759,313.867164'%20id='Path-64'%20fill='%23D8D8D8'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cpath%20fill='%23E4E4E4'%20d='M419,192.5h-2h-88h-2h-88h-2h-92v80H55v246h276v-80h180v-246H419z%20M507,196.5v78h-88v-78H507z%20M327,434.5%20h-88v-78h88V434.5z%20M149,434.5v-78h88v78H149z%20M237,436.5v78h-88v-78H237z%20M147,434.5H59v-78h88V434.5z%20M149,354.5v-78h88v78H149z%20M239,354.5v-78h88v78H239z%20M329,276.5h88v78h-88V276.5z%20M419,276.5h88v78h-88V276.5z%20M417,196.5v78h-88v-78H417z%20M327,196.5v78%20h-88v-78H327z%20M149,196.5h88v78h-88v-2V196.5z%20M145,276.5h2v78H59v-78H145z%20M59,436.5h88v78H59V436.5z%20M327,438.5v76h-88v-78h88%20V438.5z%20M329,434.5v-78h88v78h-86H329z%20M419,434.5v-78h88v78H419z'/%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",g4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3crect%20x='78'%20y='558.5'%20fill='%23E4E4E4'%20width='410'%20height='2'/%3e%3cg%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M463,533.5h-61v-207h61V533.5z%20M404,531.5h57v-203h-57V531.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M363,533.5h-61v-152h61V533.5z%20M304,531.5h57v-148h-57V531.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M263,533.5h-61v-316h61V533.5z%20M204,531.5h57v-312h-57V531.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M163,533.5h-62v-248h62V533.5z%20M103,531.5h58v-244h-58V531.5z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",v4="data:image/svg+xml,%3csvg%20width='616'%20height='559'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill='none'%20stroke='%23E4E4E4'%20id='svg_1'%20stroke-width='2'%20d='m97.44781,156.99998l419.1042,0l-24.42354,59.30477l-370.25707,0l-24.42359,-59.30477zm29.93028,72.6737l359.24347,0l-24.42354,59.30458l-310.39633,0l-24.42361,-59.30458zm54.35357,131.97891l-24.4232,-59.30521l299.38335,0l-24.42422,59.30521l-250.53593,0zm220.60617,72.6737l-190.67573,0l-24.42491,-59.30458l239.52554,0l-24.42491,59.30458zm-3.92305,72.6737l-182.82963,0l1.26325,-59.30458l180.30313,0l1.26325,59.30458z'/%3e%3c/g%3e%3c/svg%3e",y4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M307.6,337.5h-28.6l-3.4,41.7h28.6L307.6,337.5z%20M278.4,376.7l3-36.7h23.5l-3,36.7H278.4z'/%3e%3cpath%20fill='%23E4E4E4'%20d='M262.9,415.9h12l2.4-28.6h23.5l-2.4,28.6h12l2.4-28.6h18.6v-10.5h-17.5l3-36.7h17.7v-10.5h-16.8l2.4-28.6%20h-12l-2.4,28.6h-23.5l2.4-28.6h-12l-2.4,28.6h-18.5V340h17.5l-3,36.7h-17.7v10.5h16.8L262.9,415.9z%20M251.1,384.7v-5.5h17.5%20l3.4-41.7h-17.8V332h18.3l2.4-28.6h7l-2.4,28.6h28.6l2.4-28.6h7l-2.4,28.6h17v5.5h-17.5l-3.4,41.7H329v5.5h-18.4l-2.4,28.6h-7%20l2.4-28.6h-28.6l-2.4,28.6h-7l2.4-28.6H251.1z'/%3e%3cpath%20fill='%23E4E4E4'%20d='M84,269.1v178.8h396.6V269.1H84z%20M478.2,445.4H86.5V271.6h391.6V445.4z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Av="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3crect%20x='25.5'%20y='558.5'%20fill='%23E4E4E4'%20width='516'%20height='2'/%3e%3cpath%20fill='%23E4E4E4'%20d='M518.9,188.1c-18.1,0-32.8,14.7-32.8,32.8c0,10,4.5,19,11.7,25.1l-129,162.8c-5.5-4.1-12.2-6.5-19.6-6.5%20c-10.4,0-19.7,4.9-25.7,12.5l-96.4-71.5c3.7-5.3,5.9-11.8,5.9-18.7c0-18.1-14.7-32.8-32.8-32.8c-18.1,0-32.8,14.7-32.8,32.8%20c0,9.2,3.8,17.5,9.9,23.5L69.5,465.4c-5.8-5-13.2-8-21.4-8c-18.1,0-32.8,14.7-32.8,32.8S30,523,48.1,523s32.8-14.7,32.8-32.8%20c0-9.2-3.8-17.5-9.9-23.5l107.8-117.4c5.8,5,13.2,8,21.4,8c10.4,0,19.7-4.9,25.7-12.5l96.4,71.5c-3.7,5.3-5.9,11.8-5.9,18.7%20c0,18.1,14.7,32.8,32.8,32.8s32.8-14.7,32.8-32.8c0-10-4.5-19-11.7-25.1l129-162.8c5.5,4.1,12.2,6.5,19.6,6.5%20c18.1,0,32.8-14.7,32.8-32.8S537,188.1,518.9,188.1z%20M48.1,521c-17,0-30.8-13.8-30.8-30.8s13.8-30.8,30.8-30.8%20c7.7,0,14.7,2.8,20.1,7.5c0.5,0.4,1,0.9,1.5,1.4c5.7,5.6,9.3,13.4,9.3,22C78.9,507.2,65,521,48.1,521z%20M200.2,355.4%20c-7.7,0-14.7-2.8-20.1-7.5c-0.5-0.4-1-0.9-1.5-1.4c-5.7-5.6-9.3-13.4-9.3-22c0-17,13.8-30.8,30.8-30.8c17,0,30.8,13.8,30.8,30.8%20c0,6.5-2,12.5-5.5,17.5c-0.4,0.5-0.8,1.1-1.2,1.6C218.7,350.8,210,355.4,200.2,355.4z%20M349.3,465.9c-17,0-30.8-13.8-30.8-30.8%20c0-6.5,2-12.5,5.5-17.5c0.4-0.5,0.8-1.1,1.2-1.6c5.6-7.1,14.4-11.7,24.1-11.7c6.9,0,13.2,2.3,18.3,6.1c0.5,0.4,1.1,0.8,1.6,1.2%20c6.7,5.7,10.9,14.1,10.9,23.5C380.1,452,366.3,465.9,349.3,465.9z%20M518.9,251.7c-6.9,0-13.2-2.3-18.3-6.1c-0.5-0.4-1.1-0.8-1.6-1.2%20c-6.7-5.7-10.9-14.1-10.9-23.5c0-17,13.8-30.8,30.8-30.8s30.8,13.8,30.8,30.8S535.9,251.7,518.9,251.7z'/%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",b4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cg%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M480.4,506.2l-162.3-106L509.4,431l-0.2,1c-4.3,26.5-13.8,51.2-28.4,73.4L480.4,506.2z%20M327,403.7%20l152.7,99.8c13.9-21.5,23.1-45.3,27.3-70.8L327,403.7z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M275.3,586.8C170.9,586.8,86,502,86,397.7c0-50.6,19.6-98.1,55.1-133.8c35.6-35.7,83-55.5,133.5-55.5h1%20v188.7l158.3,103.1l-0.5,0.8C398.1,554.8,339.1,586.8,275.3,586.8z%20M273.5,210.7c-49.6,0.3-96.1,19.7-131.1,54.8%20C107.3,300.7,88,347.7,88,397.7c0,103.2,84,187.1,187.4,187.1c62.7,0,120.9-31.4,155.7-83.9L273.5,398.3V210.7z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M482.8,408.7l-1-0.2l-187.3-30V188.5h1c74.8,0,142.7,44.1,173.1,112.2c15.2,34.1,20.2,71.1,14.4,107%20L482.8,408.7z%20M296.5,376.9l184.6,29.5c5.5-35.2,0.5-71.4-14.4-104.9c-29.9-67.1-96.6-110.5-170.2-110.9V376.9z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M298.5,607.2c-12.6,0-25.3-1.1-37.6-3.2l-1-0.2l29.6-198l-27.1,61l-20.3-12.1l45.2-52.6L126.8,524.6%20l-0.6-0.8c-12.1-15.5-21.8-32.7-29-50.9l-0.4-0.9l0.9-0.4l181.4-70.1l-149.6,20.9v-47.1l158.4,22.1L97.5,323.8l0.4-0.9%20c7.3-18,17.1-34.9,29.3-50.4l0.6-0.8L282,389.2l-76.9-89.5l34.5-20.2l49.9,112.2l-29.6-198l1-0.2c12.4-2.1,25-3.2,37.6-3.2%20c8,0,16.1,0.4,23.9,1.3l1,0.1l-0.2,1l-29.7,198.8l83.2-187.1l0.9,0.3c19.5,7.5,37.7,17.7,54.3,30.3l0.8,0.6L301.2,389.2l132.5-101%20l28,44.9l-166,64.2L511.5,367l0.1,1c1.6,10.2,2.4,20.6,2.4,30.8c0,10.2-0.8,20.6-2.4,30.8l-0.1,1l-207.1-29l95.5,36.9l-18.5,28.9%20l-85.5-65.1l108.5,126.3l-45.5,23.8l-65.1-146.5l29.9,199.9l-1,0.1C314.4,606.8,306.4,607.2,298.5,607.2z%20M262.2,602.2%20c12,2,24.2,3,36.3,3c7.4,0,15.1-0.4,22.7-1.2l-29.7-198.5L262.2,602.2z%20M295.3,404.7l64.5,144.9l41.4-21.7L295.3,404.7l0.1,0.1%20L295.3,404.7z%20M99.4,473.1c7,17.4,16.3,33.8,27.8,48.7l158.3-120.6L99.4,473.1z%20M297.8,401.2l83.1,63.3l16-25L297.8,401.2z%20M245.2,454.3l16.3,9.7l26.4-59.4L245.2,454.3z%20M298.8,398.8l211,29.5c1.4-9.8,2.2-19.7,2.2-29.5c0-9.8-0.7-19.7-2.2-29.5%20L298.8,398.8z%20M131.5,377.6V420l152.2-21.2L131.5,377.6z%20M433.2,291.1L297.8,394.2l160.9-62.2L433.2,291.1z%20M100.1,322.6%20l185.2,71.6L128.2,274.5C116.6,289.3,107.2,305.5,100.1,322.6z%20M377.9,207.1L295.3,393l0,0l0,0L430,236.1%20C414,224.1,396.5,214.3,377.9,207.1z%20M287.9,393L287.9,393l-49.2-110.6l-30.5,17.8L287.9,393L287.9,393z%20M262.2,195.3L291.6,392%20l29.6-198.5c-7.5-0.8-15.1-1.2-22.7-1.2C286.4,192.3,274.2,193.4,262.2,195.3z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",w4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cpolygon%20fill='%23E4E4E4'%20points='80,575%2080,233%2078,233%2078,575%2078,577%2080,577%20497,577%20497,575%20'/%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M374.7,480.1c-29.7,0-53.9-24.2-53.9-53.9c0-29.7,24.2-53.9,53.9-53.9s53.9,24.2,53.9,53.9%20C428.6,455.9,404.4,480.1,374.7,480.1z%20M374.7,374.3c-28.6,0-51.9,23.3-51.9,51.9s23.3,51.9,51.9,51.9s51.9-23.3,51.9-51.9%20S403.3,374.3,374.7,374.3z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M264.2,395.2c-22,0-40-17.9-40-40c0-22,17.9-40,40-40s40,17.9,40,40C304.2,377.3,286.2,395.2,264.2,395.2z%20M264.2,317.3c-20.9,0-38,17-38,38c0,20.9,17,38,38,38s38-17,38-38C302.2,334.3,285.1,317.3,264.2,317.3z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M413.7,351.2c-38.8,0-70.3-31.6-70.3-70.3c0-38.8,31.6-70.3,70.3-70.3s70.3,31.5,70.3,70.3%20C484,319.6,452.4,351.2,413.7,351.2z%20M413.7,212.5c-37.7,0-68.3,30.7-68.3,68.3c0,37.7,30.7,68.3,68.3,68.3%20c37.7,0,68.3-30.7,68.3-68.3C482,243.2,451.3,212.5,413.7,212.5z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M228.9,489C228.9,489,228.9,489,228.9,489c-15.8,0-29.7-10.1-34.5-25.2c-3-9.2-2.2-19,2.3-27.7%20c4.4-8.6,11.9-15,21.2-18c3.6-1.2,7.4-1.8,11.1-1.8c15.8,0,29.7,10.1,34.5,25.2c3,9.2,2.2,19.1-2.3,27.7c-4.4,8.6-11.9,15-21.2,18%20C236.4,488.4,232.6,489,228.9,489z%20M228.9,418.4c-3.6,0-7.1,0.6-10.5,1.7c-8.7,2.8-15.8,8.8-20,17c-4.2,8.1-4.9,17.4-2.1,26.1%20c4.6,14.2,17.7,23.8,32.6,23.8c3.6,0,7.1-0.6,10.5-1.7c8.7-2.8,15.8-8.8,20-17c4.2-8.1,4.9-17.4,2.1-26.2%20C256.9,428,243.8,418.4,228.9,418.4z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M147.5,548C147.5,548,147.5,548,147.5,548c-9.4,0-17.6-6-20.4-14.9c-3.6-11.3,2.6-23.4,13.9-27%20c2.1-0.7,4.4-1,6.6-1c9.3,0,17.6,6,20.4,14.9c3.6,11.3-2.6,23.3-13.9,27C152,547.7,149.7,548,147.5,548z%20M147.5,507.1%20c-2,0-4,0.3-6,0.9c-10.2,3.3-15.9,14.2-12.6,24.4c2.6,8.1,10,13.5,18.5,13.5c0,0,0,0,0,0c2,0,4-0.3,6-0.9%20c10.2-3.3,15.8-14.3,12.6-24.5C163.4,512.5,156,507.1,147.5,507.1z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",C4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M148.3,490.8l-1-1.3c-25.5-31.2-39.6-70.6-39.6-111c0-40.4,14.1-79.8,39.6-111l1-1.3l26.9,26.9l-0.8,1%20c-38.6,49.6-38.6,118.9,0,168.6l0.8,1L148.3,490.8z%20M148.5,270.8c-24.4,30.4-37.9,68.6-37.9,107.8c0,39.1,13.4,77.4,37.9,107.8%20l22.7-22.7c-38.4-50.3-38.4-119.9,0-170.2L148.5,270.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M368.3,270.8l-1-0.8c-23.9-18.6-53.9-28.9-84.3-28.9c-30.4,0-60.3,10.2-84.3,28.9l-1,0.8l-26.9-26.9%20l1.3-1c31.2-25.5,70.6-39.6,111-39.6c40.4,0,79.8,14.1,111,39.6l1.3,1L368.3,270.8z%20M283,238.1c30.6,0,60.8,10.2,85.1,28.7%20l22.7-22.7c-30.4-24.4-68.6-37.9-107.8-37.9c-39.2,0-77.4,13.4-107.8,37.9l22.7,22.7C222.2,248.3,252.4,238.1,283,238.1z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M417.7,490.8l-26.9-26.9l0.8-1c38.6-49.6,38.6-118.9,0-168.6l-0.8-1l26.9-26.9l1,1.3%20c25.5,31.2,39.6,70.6,39.6,111c0,40.4-14.1,79.8-39.6,111L417.7,490.8z%20M394.8,463.7l22.7,22.7c24.4-30.4,37.9-68.6,37.9-107.8%20c0-39.1-13.4-77.3-37.9-107.8l-22.7,22.7C433.1,343.8,433.1,413.4,394.8,463.7z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M283,553.9L283,553.9c-40.4,0-79.8-14.1-111-39.6l-1.3-1l26.9-26.9l1,0.8c23.9,18.6,53.9,28.9,84.3,28.9%20c30.4,0,60.4-10.2,84.3-28.9l1-0.8l26.9,26.9l-1.3,1C362.8,539.9,323.4,553.9,283,553.9z%20M175.2,513.1%20c30.4,24.4,68.6,37.9,107.7,37.9h0.1c39.1,0,77.3-13.4,107.8-37.9l-22.7-22.7c-24.3,18.5-54.4,28.7-85.1,28.7%20c-30.6,0-60.8-10.2-85.1-28.7L175.2,513.1z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M283,458c-43.8,0-79.4-35.6-79.4-79.4c0-43.8,35.6-79.4,79.4-79.4c43.8,0,79.4,35.6,79.4,79.4%20C362.4,422.4,326.8,458,283,458z%20M283,302.2c-42.1,0-76.4,34.3-76.4,76.4c0,42.1,34.3,76.4,76.4,76.4c42.1,0,76.4-34.3,76.4-76.4%20C359.4,336.5,325.1,302.2,283,302.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M283,493c-63.1,0-114.4-51.3-114.4-114.4S219.9,264.2,283,264.2c63.1,0,114.4,51.3,114.4,114.4%20S346.1,493,283,493z%20M283,267.2c-61.4,0-111.4,50-111.4,111.4S221.6,490,283,490c61.4,0,111.4-50,111.4-111.4%20S344.4,267.2,283,267.2z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",x4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2018.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566.5%20700.5'%20enable-background='new%200%200%20566.5%20700.5'%20xml:space='preserve'%3e%3cg%20id='Layer_2'%3e%3crect%20x='-5057'%20y='-6963'%20fill='transparent'%20stroke='%23000000'%20stroke-miterlimit='10'%20width='16156.4'%20height='16115.1'/%3e%3c/g%3e%3cg%20id='Layer_1'%3e%3cpath%20fill='%23E4E4E4'%20d='M399,207h-2H284h-2H170h-2H53v35v4v31v2v31v2v30v2v31v2v30v2v31v2v31v2v34h115h2h112h2h113h2h116v-34v-2%20v-31v-2v-31v-2v-30v-2v-31v-2v-30v-2v-31v-2v-31v-4v-35H399z%20M397,211v31H284v-31H397z%20M282,279v31H170v-31H282z%20M170,277v-31h112%20v31H170z%20M282,312v30H170v-30H282z%20M282,344v31H170v-31H282z%20M282,377v30H170v-30H282z%20M282,409v31H170v-31H282z%20M282,442v31H170%20v-31H282z%20M284,442h113v31H284V442z%20M284,440v-31h113v31H284z%20M284,407v-30h113v30H284z%20M284,375v-31h113v31H284z%20M284,342v-30h113%20v30H284z%20M284,310v-31h113v31H284z%20M284,277v-31h113v31H284z%20M282,211v31H170v-31H282z%20M57,211h111v31H57V211z%20M57,246h111v31H57%20V246z%20M57,279h111v31H57V279z%20M57,312h111v30H57V312z%20M57,344h111v31H57V344z%20M57,377h111v30H57V377z%20M57,409h111v31H57V409z%20M57,442h111v31H57V442z%20M57,505v-30h111v30H57z%20M170,505v-30h112v30H170z%20M284,505v-30h113v30H284z%20M511,505H399v-30h112V505z%20M511,473H399v-31h112V473z%20M511,440H399v-31h112V440z%20M511,407H399v-30h112V407z%20M511,375H399v-31h112V375z%20M511,342H399v-30h112%20V342z%20M511,310H399v-31h112V310z%20M511,277H399v-31h112V277z%20M399,242v-31h112v31H399z'/%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",T4="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3cpath%20fill='%23E4E4E4'%20d='M52,202.5v200v2v104h462v-306H52z%20M510,402.5H225v-196h285V402.5z%20M56,206.5h167v196H56V206.5z%20M56,404.5%20h298v100H56V404.5z%20M356,504.5v-100h154v100H356z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Rv="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20566%20700'%20enable-background='new%200%200%20566%20700'%20xml:space='preserve'%3e%3cg%20id='Layer_1'%3e%3cg%3e%3cpath%20fill='%23E4E4E4'%20d='M276.8,521.3c-0.5,0-0.9-0.1-1.3-0.2l-0.3-0.1l-0.2-0.2c-0.5-0.6-1-1.3-0.8-1.9c-1-0.6-2.6-0.6-4-0.6%20c-1,0-1.8,0-2.5-0.2l-0.3-0.1l-0.2-0.2c-0.5-0.6-2.8-1.7-4.5-2.5c-1.9-0.9-3.8-1.7-4.8-2.5l-0.2-0.2l-0.1-0.3c-2-5-2.7-6.5-3-7%20c-0.1-0.3-0.2-0.4-0.2-0.6c-0.1-0.6,0-1.1,0.1-1.4c0.1-0.5,0.2-1-1.2-3.5c-0.4-0.6-2.4-2.7-3.6-3.8l-0.2-0.2l-1.1-3%20c-1.8-1.6-3.5-5.2-5.1-8.3c-0.7-1.4-1.3-2.6-1.8-3.5c-1.1-1.6-2-2.4-2.9-3.2c-1.1-1-2.2-2-3.8-4.3c-2.1-0.3-3.7,0-5.3,0.4%20c-2,0.4-3.9,0.8-6-0.3c-0.4,0.5-1.1,1.8-1.6,2.7c-1.6,2.9-3.4,6.3-5.8,5.3c-12.1-4.7-13.8-9.4-14.9-12.4c-0.1-0.3-0.2-0.6-0.3-0.8%20l-0.1-0.2l0-0.2c0.2-2.3,0.1-2.4-0.3-3.1c-0.4-0.7-1-1.7-1.9-4.2c-4.3-2.4-8.1-7.1-10.8-10.5c-1.1-1.3-2-2.5-2.7-3.2%20c-0.1,0-0.2-0.1-0.4-0.1l0,0.2l-0.9-0.1c-2.4-0.3-7.4-0.9-14.7-1.2l-1,4.1l-0.4,0.2c-2.2,1-6.3,1.8-8.9,0.7l0,0l-9.4-1.9%20c-5.6,0.2-10.8-2.5-14.6-4.5l-0.9-0.5c-4.7-2.3-8.4-4.5-11.4-6.3c-1.2-0.7-2.2-1.3-3.2-1.9c-5.5-3.1-9.2-5.2-15.9-8.5l-0.5-0.2%20l-0.1-0.5c-0.1-0.7-0.1-1.2-0.1-1.6c0-0.1,0-0.3,0-0.4l-5.3-0.6c-6-0.7-12.2-1.3-16.2-1.5l-0.1,0.1l-0.7-0.1l0.1-1.1l-0.5-0.7%20c-0.3,0.2-0.4,0.5-0.4,0.6c0.1-1-1.4-8.7-2.7-10.8c-1.4-2.1-3.1-3.5-5.6-4.5l-0.3-0.1l-0.2-0.2c-0.7-0.9-0.8-2.2-0.8-3.1%20c-0.3-0.1-0.6-0.2-1.1-0.3c-1.8-0.6-6.9-4.8-7.6-6.2c-0.8-0.8-2.2-1.9-3.2-1.9c-2.7,0-4.7-0.8-5.8-2.4c-1.7-2.4-0.9-5.9-0.1-8%20c-1.4-2.2-2.9-5.5-4.2-8.4c-1.2-2.7-2.5-5.4-3.2-6.3l-0.2-0.2l0-0.3c-0.2-1.6-0.5-4.7,2.1-6.5c0.1-0.9-0.3-1.2-1.2-1.8%20c-0.9-0.7-2.2-1.6-2.8-3.6c-0.3-0.9-0.1-3.3,0.1-5.1c0,0-0.1,0-0.1,0c-0.2-0.1-0.5-0.4-0.7-0.9l-0.1-0.3l0.1-0.3%20c0.3-0.8,0.4-1.2,0.4-1.4c-0.1-0.1-0.3-0.4-0.4-0.7l-0.1-0.5l0,0c0,0-0.1-0.1-0.1-0.1c-0.6-0.6-1.3-1.2-1.7-2.2l-0.3-0.5l0.4-0.5%20c0.4-0.6,0.3-1.1-0.1-2.5c-0.2-0.6-0.4-1.3-0.5-2c0,0,0,0,0,0c-1.3-0.9-4-2.8-3.1-9.6c0.4-2.6,0.5-4.7,0.6-6.6%20c0.1-0.8,0.1-1.6,0.2-2.5c-0.8-1-2.8-4.1-2.3-7.1c0.3-1.6,1.2-2.9,2.8-3.9c1.5-2.9,3.3-8.8,3.6-12.7c-0.7-1.2-0.5-2.7-0.2-4.7%20c0.1-0.7,0.2-1.5,0.3-2.4c0.4-4.3,2.4-8.3,5.1-10.4c3.3-8.1,7.8-19.4,11.2-28.6l-0.4-0.3l0.3-0.9c-1-0.6-0.9-2-0.9-2.5%20c0.1-1.4,1.1-2.6,1.8-3.4c0,0,0,0,0.1-0.1c-0.6-1.6-0.6-1.9-0.4-3.7c0.2-1,0.9-1.5,1.4-1.7c0-0.9-0.2-2.8-0.3-4.4%20c-0.3-3.2-0.7-7.2-0.5-10.1c0.1-2.1,0.9-3.4,2.2-3.8c3.8-1.2,10.8,7.2,12.9,9.7l0.5,0.6l-0.4,0.6c-1.2,1.7-0.2,6.3,0.8,8.6%20c0.3-1.3,0.9-3.2,2.7-3.7l0.2-3.6l0.1,0c0-0.4-0.1-1.3-0.2-2c-0.4-2.8-0.5-4.3,0-5.1c0-0.3-0.4-1.1-0.6-1.6%20c-0.6-1.1-1.2-2.4-0.8-3.7l0.3-1.1l1,0.4c2.4,1,29.9,7.4,44.2,10.6c2.8,0.3,7.6,1.6,8.4,1.8c0.4,0,1.5,0.2,4.9,0.8%20c7.5,1.3,23.2,4,42.1,6.6c14.2,2,31.3,3.6,47.7,5.1l54.2,1.4c2.1-0.3,4.4-0.4,14.5-0.4v-1c0-2.1,0.8-2.3,2.8-2.8l0.3-0.1%20c1.4-0.2,3.3,2.6,3.6,4c0.1,0.7,0.7,2.1,1.3,2.6c1.1,0.9,1.9,1,2.7,1.1c0.4,0.1,0.8,0.1,1.2,0.2c0.1,0,0.4,0.1,0.7,0.2%20c0.8,0.2,2.8,0.7,3.3,0.6c8.4-1,8.6-0.5,9.1,0c0.1,0.1,0.1,0.4,0.1,0.9v0.2l-0.1,0.3c-0.2,0.2-0.3,0.5-0.4,0.7%20c3.4,0.4,6.8,2.2,8,3c2.4-1.1,4.4-1.3,7.2-1.6c1-0.1,2.2-0.2,3.5-0.4l5.5-0.3c3-1,6.7-2.1,7.8-1.8l0.2,0.1l0.2,0.2%20c0.6,0.5,1.3,2.4,0.5,4.1c-1,2.2-3.8,3.1-8.4,2.6l-0.2,0l-0.2-0.1c-1-0.6-6.7,1.9-8.1,2.9c-0.8,0.6-6.6,6.7-9.9,10.4%20c1.5-0.3,3.2-1,4.7-1.7c1.3-0.6,2.5-1.1,3.4-1.2l0.6-0.1l0.8,1.4c0.2,0.2,0.3,0.4,0.4,0.5c0.2,0.6-0.2,1-0.4,1.2%20c-0.1,0.1-0.1,0.1-0.2,0.2c1,0.2,1.8,0.4,2.4,0.6c0.5-0.1,2.4-0.4,2.6-1.5c0-0.2,0.1-0.5,0.2-0.7l2.1-2.9l-0.2,2.3%20c2.1-0.8,6.4-2.8,8.6-5.2c0.6-1.8,3.7-3.6,4.4-3.9c0.2-0.1,0.4-0.2,0.5-0.3c0.7-0.4,1.8-1,2.7-0.6c0.6,0.2,1,0.7,1.3,1.4l0.1,0.2%20l0,0.2c-0.2,2.4-2.1,2.5-2.8,2.6c-0.1,0-0.2,0-0.2,0c-0.1,0-0.4,0.3-0.7,0.7c0.2,0.7-0.1,1.5-0.5,2.1c2-0.2,4.5,0.4,8.1,3.9%20c0.5-0.1,1.2-0.2,1.9-0.3l0.3,0l0.3,0.2c1.3,0.9,4.8-1.3,6.3-2.2c0.8-0.5,1.2-0.7,1.6-0.8l0.1,0c0.7-0.1,1.4-0.2,2-0.3%20c1.9-0.3,3.4-0.5,4.4-1.1l1.1-0.6l0.4,1.5c0.2,0.8,0.5,1.7,1,1.9c0.6,0.3,1.8,0,3.3-0.7l1.3-0.6l0.1,1.4c0.1,0.5,1.6,2.4,2.4,3.4%20c0.5,0.7,1.1,1.6,1.4,2l1.1,1.8h-1.9c-1.3,0-3.1-0.1-4.7,0c0,0,0-0.1,0-0.1c-0.1,0.1-0.1,0.1-0.3,0.6l11.1,4.2l0.2,0.2%20c0.1,0.1,1.4,1.6,2.3,3.9l0,0.1c0.6,2.6,1.3,7.7,1.3,7.8l0.1,0.9l-0.9,0.2c-0.3,0.1-0.5,0.1-0.6,0.1c0,0,0,0,0,0%20c-0.6,2.3-1.2,3.9-2.8,4.3c-0.5,1.4-0.2,1.9-0.1,2.1c0.2,0.2,0.5,0.3,0.7,0.3l1.6-1.3c0.2-0.9,0.8-2.9,3.5-4.5l0.3-0.2l0.3,0%20c2.8,0.1,4,2.2,4.5,3.1l0.2,0.5c1.2,5.7,3.2,7.3,3.2,7.3l0.4,0.3l0,0.5c-0.1,1.8-0.3,3.9-0.2,4.4c0.2,0.8,0,2.1-0.2,2.6%20c-0.2,0.6-0.4,1-0.7,1.2c0,0.2,0.2,0.3,0.2,0.6v0.7l-0.8,0.3c-0.2,0.1-0.4,0.1-0.5,0.2c0,0,0,0,0,0l0.1,0.5l-0.3,0.4%20c-0.5,0.6-1.1,0.7-1.5,0.9c-0.4,0.1-0.4,0.1-0.5,0.2c-0.1,0.3-0.1,0.4-0.1,0.4c0,0.1,0.2,0.3,0.3,0.5l0.7,0.9l-0.7,0.6%20c-0.6,0.5-2,2.2-2.6,3.7c2.2,0.5,5.9,1.4,7.4,1.7c1.2-1.3,2.6-1.7,3.5-2c0.1,0,0.2-0.1,0.3-0.1l0-0.2l2.8-1.1l1.8-2.1%20c0.1-0.1,2.4-3.3,5.5-4.1l0.3-0.2l2.1-0.7c0.3-0.1,0.8-0.3,1.3-0.4c0.8-0.2,1.7-0.5,2.2-0.8l0.2-0.1l0.2,0c0,0,1-0.2,2.5-0.2%20c0.2-0.3,0.4-0.7,0.7-1.1c1.1-1.6,3.3-4.9,3.6-5.7l0.3-0.8l0.6,0.1c0-0.1,0.1-0.2,0.1-0.3c0.2-0.4,0.4-0.8,0.7-1.4%20c0-0.7-0.3-1.2-0.7-2c-0.4-0.7-0.9-1.4-1.1-2.4c-0.1-0.2-0.3-0.4-0.3-0.5v0c0-0.1,0.2-0.2,0.2-0.2l-0.1-0.1c0-0.3-0.1-0.5-0.1-0.7%20V291l1.6,5.8c0.1-0.1,0.3-0.1,0.5-0.2c1.3-0.5,5-1,9.2-1.5c1.5-0.2,2.8-0.3,3.4-0.4c1.8-0.4,4.6-1.2,5.3-1.7%20c0.8-0.6,1.7-1.8,2.2-2.3c0.1-1.5,0-3.8-0.6-4.4c-0.1-0.1-0.3-0.2-0.6-0.1l-1.1,0.2l-0.1-1.1c-0.1-1.6,0.9-2.8,1.3-3.1%20c5-7.8,9-11.1,9.2-11.2l0.2-0.1l12-3l0-0.4l0.8-0.2c4.5-0.9,8.2-2,11.2-2.8c1-0.3,1.9-0.6,2.7-0.8c0-0.3,0-0.6,0-0.8%20c0.2-1.4,1.6-2.8,3.3-3.3c0.1,0,0.1-0.1,0.2-0.1l1.3-3v-1.5c-0.4-0.5-0.8-1.3-0.5-2c0.2-0.4,0.6-0.9,1.7-0.8%20c0.5-0.6,1-2.9,1.2-10.6c0-0.8,0-1.5,0.1-1.8l0-0.4l0.3-0.3c0.7-0.6,1.2-2.3,1.7-3.7c0.6-2,1.2-3.9,2.6-4.7l0.8-0.4l0.5,0.8%20c0.2,0.4,1.1,1.4,2,1.3c0.9-0.2,1.5-0.7,2.1-1.3c0.8-0.7,1.7-1.5,3-1.5h0.3l0.3,0.2c3.6,2.8,4.2,3.6,4.9,4.9%20c0.2,0.3,0.4,0.7,0.7,1.1l0.1,0.3c0.2,0.6,0.6,2.1,1.1,4c0.8,2.7,1.8,6.3,2.2,7.5c0.2,0.1,0.7,0.1,1.1,0c2-0.2,2.5,1.3,2.8,2.4%20c0.1,0.4,0.3,0.9,0.6,1.4c0.1,0,0.3,0.1,0.4,0.2c0.9,0.6,1.2,2.1,1.5,3.6c0.1,0.5,0.2,1.2,0.3,1.5l0.5,0.4l-0.3,0.7%20c-0.4,0.9-1.5,2.5-2.5,4c-0.2,0.4-0.4,0.6-0.5,0.8c-0.9,2.3-2.9,4-5.4,4.7c-1.3,0.3-2.4,0.3-3.2-0.1c-0.2,1.2-0.4,2.5-0.3,3.2%20l0,0.8l-1.8,0.6c-0.4,2-2.1,4-3.6,4.9c0.1,0.7,0.4,1.6,0.6,2.5c0.6,2.3,1.3,4.7,0.8,6.3l-0.1,0.4l-0.4,0.2%20c-1.8,0.8-3.9,1.4-5.5,1.6c0.3,0.4,0.9,0.8,2,1.4l0.9,0.4l-0.5,0.9c-0.2,0.4,0.1,2.1,0.2,2.9c0.1,0.5,0.1,0.9,0.2,1.2%20c1.7,2.5,3,3.3,3.6,3.1c0.5-0.1,0.9-0.9,0.9-1.3l0.1-0.7l0.7-0.2c2.2-0.5,3.5,1.3,4.2,2.4c0.1,0.2,0.3,0.4,0.4,0.6%20c1.4,0.2,4,0.4,4.9,0.3l1.1-0.2v1.2c0,0.5,0,1.4-4.1,2.5c-1.4,0.3-2.7,0.1-3.8-0.5c-0.6,0.5-1.3,0.7-1.9,0.6%20c-0.5-0.1-0.8-0.3-1.1-0.5c-0.4,0.3-1,0.7-1.5,0.9l-1.7,0.5l0.2-0.8c-0.9-0.1-2.3-0.2-3.8-0.2c0.6,1.1,1.5,2.5,2.1,3.5l0.4,0.6%20l-0.4,0.6c-2.1,2.8-5.7,4.7-5.9,4.8l-0.2,0.1c-3,0.8-14.2,8-19.4,11.4l1.3,0.1l0.2,0.7c0,0.2,1.1,4.6,0,9%20c-1.1,4.2-3.8,8.9-3.9,9.1l-0.9,1.6l-1.5-3l-2-0.4l-2.3-1.3c0.6,1.2,1.3,2.7,1.6,3.3l0.1,0.2c0.4,3.5,1.5,5.4,1.5,5.4l0.2,0.3%20l-0.3,4.6l0.2,0.1l-0.1,0.9c0,0,0,0.2-0.1,0.4l-0.1,1.6h-0.9c-0.1,0.1-0.4,0.4-0.7,0.8c-1.1,1.2-2.5,0.8-3.4,0.4%20c-0.1,0.2-0.3,0.4-0.6,0.5c-0.3,0.1-0.6,0.1-0.8,0.1c0,0,0,0,0,0c-0.6,0.4-1.5,0.2-2.7-0.6c0.2,0.6,0.1,1.2,0,1.7%20c0,0.2-0.1,0.6-0.1,0.7c0.3,0.4,0.4,0.8,0.5,1c0.1,0.2,0.1,0.3,0.4,0.5c0.5,0.4,0.6,0.8,0.6,1.1c0,0.6-0.4,1-0.7,1.2%20c0,0-0.1,0.1-0.1,0.1c0.1,0.1,0.4,0.4,1,0.8c0.4,0.3,1.3,0.9,1.1,1.8c-0.2,0.9-1.1,1-1.9,1.2c-0.2,0-0.5,0.1-0.8,0.2%20c0.2,0.3,0.6,0.8,1.6,1.6c0.9,0.8,1.5,1.9,1.7,2.8h1.1c0.8,0,1.4,0.4,1.7,0.8c2.3-0.2,6.4-0.4,8.7,5.2c1.3,3.1-2.5,8-2.9,8.6%20l-0.1,0.1c-0.7,0.6-1.8,0.5-3,0.5c-0.1,0-0.2,0-0.3,0l0.4,0.3l-0.1,0.6c0,0.2-0.1,0.5-0.2,0.7c-0.1,0.5-0.2,0.8-0.1,1.1%20c0.1,0,0.2,0,0.2,0c0.5-0.1,1.3-0.3,2,0.2c0.5,0.4,0.7,0.9,0.8,1.8c0.2,1-0.8,2.4-1.2,2.9l-0.7,0.9l-0.7-0.7c-0.2,0-1.2,0-4.3,1.7%20c-3.3,1.4-5.3,5.8-6,9.1l-0.1,0.2l-0.2,0.2c-0.6,0.7-1.8,1.5-2,1.5l-0.2,0.1l-0.2,0c-1.7,0.1-2.5,0.5-3.1,0.9%20c-0.3,0.2-0.7,0.4-1.1,0.4c-0.2,0.4-0.6,0.9-1.1,1.5c-0.4,0.5-0.8,1-1.1,1.5c-2.2,5.6-4.7,9.1-4.8,9.3l-0.1,0.2%20c-0.1,0.1-1.3,1.2-2.8,2.1c-0.4,1.3-0.7,2.4-0.7,2.4l-0.2,0.6l-0.6,0.1c-0.8,0.1-1.9,0.5-2.7,0.8c0.6,1.4,0.2,2.4-0.2,2.9%20c-0.7,0.8-1.8,1.2-2.7,1.2c-0.3,0.8-0.7,1.5-1.1,2.1c-1.8,4-3.6,10.4-3.6,15.2c1.1,1.2,1.8,3.4,2.5,5.6c0.3,0.9,0.6,1.9,0.9,2.7%20c1.3,3.1,6.4,11.1,7.5,12.4c0.5,0.1,1.4,0.3,2.2,1.1c1.4,1.3,2.1,3.6,2.1,6.8c0,0.2,0,0.4-0.1,0.6c1.3,2.8,4.1,8.3,7.1,11.1%20l0.2,0.2l0,0.2c1.1,2.9,2.3,11,2.3,13.3v0.5l-0.4,0.3c-1.5,1-1.5,4.8-1.5,6.6c0,1.4,0,1.8-0.5,2.2l-0.4,0.3l-0.5-0.1%20c-0.7-0.2-1.5,0.3-2.3,0.7c-1,0.6-2.4,1.4-3.6,0.1c-0.4-0.4-0.3-0.9-0.3-1.1c0-0.1,0-0.1,0.1-0.2c0-0.1-0.1-0.1-0.1-0.2%20c-0.1-0.1-0.2-0.3-0.2-0.4c-0.1,0-0.4,0.1-0.8,0.5l-1.1,0.8l-0.5-1.3c-1-2.9-4.9-5.2-8.6-7.1l-0.5-0.2l-0.1-0.5%20c-0.2-1.6-1-2.9-2.1-3.5c-1.1-0.6-1.5-1.9-1.7-3c-0.5,0.1-0.9-0.1-1.1-0.2l-0.7-0.2l0-0.5c-2.6-1.4-3.9-4.2-5.2-7.1l-0.1-0.2%20l0-0.3c0.1-0.7,0.4-1.4,0.7-2.2c-0.1,0.1-0.2,0.2-0.3,0.3c-0.4,0.3-1,0.3-1.6,0.1l-0.3-0.1l-0.2-0.2c-0.3-0.3-0.5-0.4-0.6-0.5%20c-0.4-0.3-0.9-0.7-0.7-1.7c0.2-3.5,0.6-6.1,0.6-6.2c0.3-1.7,0.4-4.6-0.5-5.3l-0.1-0.1l-0.1-0.1c-0.7-1.1-1.3-1.8-2.2-2.1%20c-3.3-1-5.5-2.7-6.7-5c-1.3-0.5-2.5-1.8-3.1-2.9c-1.6-0.3-5.1-0.6-6.2,0.8l-0.1,0.1l-0.1,0.1c-1.1,0.7-1.9,1.4-2.6,2%20c-1.6,1.4-2.8,2.4-6.5,2.3c-2.6-0.2-3.3-0.9-4-2c-0.4-0.7-0.9-1.4-3.5-1.9c-1.1-0.2-1.9-0.4-2.4-0.4c0,0.2,0,0.4-0.1,0.6%20c-0.4,0.8-1.3,0.8-1.6,0.9c-2.1,0.2-2.8-0.8-3.2-1.4c-2.9,1-5.4-0.8-7.1-2c0,0-0.1-0.1-0.1-0.1c0,0,0,0-0.1,0.1l-0.2,0.3%20c0,0.1,0,0.1,0,0.2l0,0.4l-0.2,0.3c-1.1,1.3-3.5,1.8-3.7,1.8l-0.8,0.2l-0.3-0.7c-0.2-0.6-0.8-1.7-1.3-2.7c0,0.2-0.1,0.4-0.1,0.6%20c-0.2,1.2-0.3,2.2-1.1,2.6c-0.1,0.1-0.1,0.3-0.2,0.4c-0.1,0.3-0.4,1-1.1,1c-0.4,0-0.7-0.1-0.9-0.3h-0.4c-0.8,0-1-0.6-1.1-1.4%20c-2.4,0.5-7,1.7-10,3.8c0.1,0.1,0.1,0.3,0.1,0.4c0,0.8-0.6,1.2-1.3,1.5c-0.7,0.4-1.4,0.8-1.3,1.2l0,0.3c0,0.1,0,0.2,0,0.2%20c0.3,0.1,0.7,0.4,1.3,0.8l0.1-0.1l0.6,0.2c6,2.4,6.5,3.4,6.6,3.8c0.1,0.2,0.2,0.5,0.2,0.7v0c0,0.5-0.2,1.8-1.4,2.3%20c-1.3,0.6-3.3-0.3-6.3-2.7c-0.2-0.2-0.4-0.2-0.4-0.2c0,0-0.2,0.1-0.3,0.1c-0.3,0.2-1,0.5-1.7,0.2c-0.1,0.7-0.4,1.5-1.2,2.2%20l-0.5,0.4l-0.6-0.3c-3.4-1.6-4.1-1.2-4.1-1.2c0,0.1-0.1,0.3-0.1,0.4c0,0.1,0,0.3,0,0.4l-0.1,0.7l-0.7,0.1%20c-2.3,0.4-4.2,0.3-6.2-1.1l-0.3-0.2l0-0.2c-0.3-0.4-0.8-1-1.3-2.2c-0.3-0.2-0.7-0.3-1.2-0.5c-0.9-0.2-2-0.3-2.6-1.7%20c-0.3-0.1-0.8-0.1-1.2-0.1h-0.3l-0.2-0.3c-0.4-0.2-1.2-0.4-1.5-0.1c-0.2,0.2-0.1,0.5-0.1,0.8l0.2,0.7l-0.6,0.4%20c-2.9,1.9-6.9,0.5-10.8-0.9c-0.9-0.3-1.8-0.6-2.6-0.9c-2,0.7-4.3,1.2-6,1.2l-0.2,0c-0.1,0-0.1,0-0.2-0.1c-1.4,1-5.1,2.4-6.8,3%20c-0.2,0.8-0.6,2-1.8,2.6l-3.8,3.4l-4.1,2.9l-5,2.2c-0.5,0.5-1.1,0.9-1.6,1.3l0.6,0.4l-1.1,0.8c-0.5,0.3-1,0.7-1.7,1.2%20c-1.6,1.1-4,2.7-4.4,3.9l-0.5,1.9l-0.7-1c0.2,0.9-0.5,1.8-0.9,2.5c-0.1,0.2-0.2,0.3-0.3,0.4l-0.3,0.6l-0.7-0.1l-0.3,1.8%20c-0.1,0.5-0.3,2.1-0.3,2.7c0,0.6,0.3,1.8,0.6,3.1c0.6,2.7,1.4,6,1.2,8.2c0.4,0.1,0.7,0.4,0.9,0.6c0.7,0.9,0.2,2.1,0.1,2.4%20l-0.1,0.1c0,0.1-0.1,0.2-0.1,0.3c-0.1,0.3-0.3,0.8-0.9,1.1c-0.4,0.2-0.8,0.1-1.2,0C278.8,521,277.8,521.3,276.8,521.3z%20M274.9,519.6c0.1,0.2,0.3,0.3,0.4,0.3c0.2,0.1,0.4,0,0.5,0l-0.4-0.5L274.9,519.6z%20M275.5,519.3l0.5,0.4l0.2-0.5c0,0,0,0,0,0%20c0-0.1,0-0.2,0-0.3L275.5,519.3z%20M276.3,519.3c0.9,0.1,2.2-0.3,2.6-0.5l0.4-0.2l0.4,0.2c0-0.1,0.1-0.3,0.2-0.4%20c0-0.1,0-0.1,0.1-0.2c-0.1,0-0.2,0-0.3,0l-1.8,0.3l0.7-1.6c0.6-1.6-0.3-5.6-1-8.3c-0.4-1.5-0.7-2.7-0.7-3.5c0-0.3,0-0.7,0.1-1.1%20l-1.4,0.7l2.7-6.3l1,0.1l0,0c0.2-0.3,0.5-0.8,0.6-1c0,0-0.1,0-0.1-0.1l-0.9-0.4l0.4-0.9c0.3-0.7,1.3-1.3,2.2-1.4%20c0.1,0,0.1,0,0.2,0c0.9-1.5,2.9-2.8,4.8-4.1c0.1-0.1,0.3-0.2,0.4-0.3l-0.4-0.7l0.6-0.6c0.2-0.2,0.4-0.3,0.6-0.3%20c0.5-0.3,1.4-0.9,2.3-1.7l0.1-0.1l5.2-2.3l3.8-2.7l4-3.6c0.7-0.3,0.9-1.5,0.9-1.7l0.1-0.6l0.6-0.2c3-1.1,6.5-2.3,7-2.8l0.5,0.8%20h1.2v-1.1c0-0.1-0.3-0.2-0.4-0.2c0.1,0,0.2,0.1,0.3,0.1c1.5,0,3.7-0.5,5.5-1.2l0.3-0.1l0.3,0.1c1,0.3,2,0.7,3,1%20c3.1,1.1,6.3,2.2,8.5,1.3c-0.1-1.2,0.5-1.8,0.9-2.1c1-0.8,2.5-0.7,3.5-0.3c1.1,0.1,2.1,0.6,2.2,0.6l0.4,0.2l0.1,0.4%20c0.2,0.7,0.5,0.8,1.4,1c0.6,0.2,1.4,0.4,2.1,1l0.2,0.2l0.1,0.2c0.6,1.3,1,1.9,1.2,2.1c0,0,0,0,0,0c1.1,0.7,2.1,0.9,3.8,0.7%20c0.1-0.5,0.4-1.1,1-1.4c1.1-0.6,2.7-0.3,5.3,0.8c0.1-0.3,0.1-0.8,0-1.3c-0.1-0.4-0.2-1.2,0.5-1.6c0.7-0.4,1.4,0.2,1.8,0.6%20c0.2,0.2,0.3,0.2,0.3,0.2c0,0,0.1-0.1,0.2-0.1c0.2-0.1,0.6-0.3,1-0.3c-0.2-0.1-0.3-0.3-0.5-0.5c-0.3-0.2-0.5-0.4-0.6-0.5%20c-0.2,0-0.4-0.1-0.6-0.2c-0.7-0.4-0.8-1.2-0.8-1.9c-0.1-0.6-0.1-1.1,0.1-1.5c-0.3,0-0.6,0-0.9-0.1c-0.9-0.3-1.6-1.1-2.2-2.3%20l-0.2-0.4l0.2-0.4c0.3-0.5,0.6-1,0.8-1.4c0-0.1,0.1-0.1,0.1-0.2l-0.1-0.2l0.5-0.6c0.5-0.5,1.1-0.5,2.6,0.1c0.3,0,0.6,0.1,0.9,0.3%20l0.8,0.3l-0.1,0.4c0.1,0.1,0.2,0.2,0.2,0.3c0.2,0.2,0.4,0.5,0.6,0.7c3.7-2.6,9.3-3.9,11.5-4.3l0.6-0.1l0.1,0.5l0.3-0.6%20c-0.3-0.1-0.6-0.1-0.8,0l0.4-0.2l0.5,0.1c0.2,0.1,0.5,0.2,0.7,0.7l0.2,0.5c0.1-0.1,0.2-0.2,0.4-0.3c0.1-0.2,0.2-0.8,0.2-1.3%20c0.2-1.1,0.3-2.4,1.1-3.2l0.7-0.7l0.7,0.7c0.9,0.9,1.9,2.9,2.4,4c0.6-0.2,1-0.4,1.4-0.8c0-0.4,0.1-0.7,0.1-1v-0.3%20c0-0.1,0.1-0.2,0.1-0.3l0-0.1l0-0.1c0-0.2,0-0.4,0-0.5c-0.2-0.6-0.7-1.4-0.9-1.7l1.6-1.2c0.4,0.4,1,1.2,1.3,2.4%20c0.1,0.2,0.1,0.3,0.1,0.5c0.4,0.2,0.8,0.5,1.3,0.8c1.6,1.1,3.5,2.5,5.5,1.7c0.9-0.4,1.7-0.1,2.2,0.9c0.2,0.3,0.3,0.5,0.9,0.5%20c-0.1-0.3-0.1-0.6,0.1-1c0.5-0.7,1.4-0.7,5,0c3.2,0.7,4.1,1.7,4.8,2.8c0.4,0.6,0.6,0.9,2.4,1c2.9,0.2,3.6-0.4,5.1-1.8%20c0.7-0.6,1.5-1.3,2.6-2.1c2.3-2.7,7.9-1.4,8.6-1.3l0.5,0.1l0.2,0.5c0.4,0.9,1.5,2.2,2.5,2.4l0.5,0.1l0.2,0.4%20c0.8,2,2.7,3.4,5.6,4.3l0.1,0c1.2,0.5,2.2,1.4,3.1,2.8c1.9,1.8,1.2,6.2,1,7l0,0c0,0-0.4,2.6-0.6,6c0.1,0.1,0.2,0.2,0.4,0.3%20c0-0.1,0.1-0.2,0.1-0.3c0.1-0.5,0.4-1.3,1.2-1.7c0.8-0.3,1.6,0.1,2.2,0.5c0.3,0.1,0.5,0.3,0.6,0.6c0.4,0.7-0.1,1.6-0.7,2.8%20c-0.3,0.6-0.6,1.3-0.8,1.8c1.2,2.8,2.5,5.1,4.7,6.1l0.4,0.1l0-0.1l1,0l1,0l0,1c0,1,0.3,2.3,0.9,2.7c1.5,0.8,2.6,2.5,3,4.5%20c3.4,1.8,7,4.1,8.6,6.9c0.4-0.2,0.9-0.3,1.4-0.2c0.8,0.2,1.2,0.9,1.5,1.4c0.1,0.2,0.2,0.3,0.3,0.5c0.1,0.1,0.2,0.3,0.3,0.4%20c0.2-0.1,0.4-0.2,0.6-0.3c0.7-0.4,1.6-0.9,2.6-1c0-0.1,0-0.3,0-0.4c0-2.3,0.1-6,2-7.8c-0.1-2.4-1.2-9.2-2.2-11.9%20c-3.4-3.3-6.4-9.6-7.6-12.2l-2.4-5.1l2.4,2.4c-0.2-2-0.9-3-1.4-3.5c-0.6-0.5-1.1-0.6-1.1-0.6l0,0l-0.1,0l-0.1,0%20c-1.7-0.4-8-11.7-8.8-13.6c-0.4-0.9-0.7-1.9-1-2.9c-0.6-1.8-1.3-3.9-2-4.8l-0.5-0.4l0.4-0.5l-0.5,0c-0.1-5.2,1.9-12.1,3.8-16.6%20l0.1-0.2c0.5-0.7,1-1.5,1.1-2.3l0.2-1.3l1.2,0.5c0.2,0.1,1.2,0,1.5-0.4c0.3-0.4-0.2-1.2-0.5-1.5l-0.8-1.1l1.3-0.4%20c0,0,0.2-0.1,0.3-0.1c0.7-0.3,2-0.8,3.2-1.1c0.2-0.5,0.4-1.3,0.6-2.2l0.1-0.4l0.4-0.2c1.2-0.7,2.4-1.7,2.7-2%20c0.4-0.6,2.5-3.9,4.5-8.9l0.1-0.2c0.3-0.5,0.8-1.1,1.2-1.7c0.3-0.4,0.7-0.9,0.9-1.2c-0.2-0.4-0.2-0.8,0.1-1.2%20c0.5-0.6,1.2-0.3,1.6,0c0.1,0,0.1-0.1,0.2-0.1c0.6-0.4,1.7-1,3.7-1.1c0.4-0.2,0.8-0.6,1.1-0.8c0.4-1.9,2.3-8.2,7.1-10.2%20c2.3-1.3,4.2-2,5.4-1.9c0.2-0.4,0.4-0.7,0.4-0.8c0-0.2,0-0.3,0-0.3c-0.1,0-0.2,0-0.3,0.1c-0.5,0.1-1,0.2-1.6,0l-0.3-0.1l-0.2-0.2%20c-0.9-1.2-0.6-2.4-0.4-3.2c0,0,0,0,0-0.1c-0.4-0.5-0.8-1.2-0.7-1.8c0-0.5,0.3-0.9,0.8-1.1l0.3-0.1c0.5-0.1,1.2-0.1,1.9,0%20c0.5,0,1.3,0,1.6,0c1.7-2.2,3.1-5.1,2.5-6.4c-1.8-4.5-4.9-4.2-6.9-4c-0.1,0-0.3,0-0.4,0c-0.3,0.1-0.5,0.1-0.8,0%20c-0.5,0-1-0.2-1.2-0.8l0.1-0.1l-1,0v-2c-1,0-1.1,0.5-1.1,0.8c0-0.3-0.3-1.4-1.1-2.1c-1.9-1.6-2.7-2.7-2.4-3.8%20c0.2-0.9,1-1.2,1.8-1.4c-0.8-0.7-1.3-1.3-1.3-2c0-0.6,0.2-1,0.5-1.3c-0.3-0.4-0.5-0.7-0.6-1c-0.1-0.2-0.1-0.3-0.2-0.5%20c-0.5-0.8-0.4-1.6-0.3-2.2c0-0.2,0.1-0.4,0.1-0.5c-0.6-0.7-0.9-1.3-1.3-1.9l-0.6-1l1.2-0.5c0.6-0.3,1.7-0.7,2.6,0.1%20c0.5,0.4,0.9,0.7,1.2,0.9l0.4-0.3c0.2-0.1,0.4-0.2,0.7-0.1l0-0.1l0.5-0.4c0.6-0.3,1.1-0.1,1.5,0.2c1,0.6,1.4,0.7,1.7,0.4%20c0.5-0.5,0.7-0.8,0.9-0.9l0,0c0.1-0.2,0.2-0.4,0.3-0.7l0.1-1.8l0.2-3c-0.4-0.7-1.3-2.7-1.6-5.8c-0.4-1-2-4-2.5-5.1l-0.7-1.3%20l2.6-0.3l4.2,2.3l2.5,0.5l0.2,0.5c0.9-1.7,2.2-4.5,2.8-6.9c0.7-2.9,0.4-6,0.1-7.3l-2.7-0.2l0.5-2.5l0.3-0.2%20c0.7-0.5,16.6-11,20.9-12.4c0.5-0.3,3-1.7,4.7-3.7c-1.2-1.9-2.6-4.4-2.7-4.5l-0.8-1.5l1.7,0c4.2,0.1,6,0.3,6.8,0.5%20c0.4-0.2,0.9-0.6,1.2-0.9l0.4-0.4c-0.2,0.1-0.4,0.2-0.7,0.3c-1.9,0.5-3.8-1-5.9-4.2l-0.1-0.2l0-0.3c0-0.3-0.1-0.8-0.2-1.3%20c-0.2-1.3-0.4-2.3-0.3-3.1c-1.5-0.8-2.2-1.6-2.5-2.2l-0.2-0.2c-0.2-0.2-0.4-0.6-0.2-1.2c0,0,0,0,0,0c0,0.1-0.1,0.1-0.1,0.1%20c0,0,0-0.2-0.2-0.5c-0.1-0.1-0.9-1.5-0.4-2.3l0.3-0.5l0.6,0.1c0.6,0.1,0.8,0.5,1.4,2c1.1-0.1,3-0.5,4.9-1.3%20c0.1-1.1-0.5-3.1-0.9-4.7c-0.4-1.3-0.7-2.5-0.8-3.5l-0.1-0.9l0.9-0.2c1-0.2,2.9-2.4,3.1-4.1l0-0.7l1.7-0.5%20c0.1-1.6,0.5-3.9,0.7-4.7c0-0.1,0-0.2,0-0.2l0.1-0.6l0.6-0.2l1.6-0.5l-0.3,1.4c0.1,0.1,0.2,0.3,0.5,0.5c0.1,0,1,0.2,2.3-0.3%20c1-0.3,2.7-1.2,3.5-3.2c0-0.2,0.2-0.4,0.7-1.2c0.6-0.9,1.6-2.3,2.1-3.3c-0.2-0.5-0.3-1.1-0.4-1.9c-0.1-0.6-0.3-1.7-0.5-2.1%20l-0.4,0.1l-0.4-0.6c-0.5-0.8-0.8-1.6-1-2.3c-0.4-1.1-0.4-1.1-0.7-1c-0.7,0.1-2.6,0.2-3.1-1c-0.4-1-1.5-4.7-2.4-7.9%20c-0.5-1.7-0.9-3.1-1.1-3.8c-0.3-0.4-0.5-0.8-0.7-1.1c-0.6-1-0.9-1.5-4.1-4.1c-0.4,0.1-0.8,0.4-1.4,0.9c-0.8,0.7-1.7,1.5-3.1,1.8%20c-1.4,0.2-2.5-0.6-3.2-1.3c-0.4,0.7-0.8,1.9-1.1,2.9c-0.5,1.7-1,3.4-2,4.4c0,0.3,0,0.7,0,1.3c-0.1,6.6-0.5,11-2,12.2%20c-0.2,0.1-0.4,0.2-0.6,0.3l0.1,0.1l0,2.6l-3.9,8.7l0.2-3.8c-0.7,0.4-1.1,0.9-1.2,1.3l0.6-0.2l-0.1,0.8l0.4,0.2l-0.4,0.8%20c0,0,0,0,0,0.1c0,0.1,0,0.3,0,0.4c0,0,0,0,0,0.1l-1.1-0.1c-1,0.3-2.2,0.6-3.5,1c-2.8,0.8-6.3,1.9-10.5,2.7c0,0.1,0,0.2,0,0.2l0,0%20c0,0.7-0.2,1-0.9,1.1c-0.5,0-0.8-0.2-0.9-0.5l-11.3,2.8c-0.8,0.7-4.4,4-8.7,10.7l-0.2,0.2c0,0-0.3,0.3-0.6,0.8%20c0.4,0.1,0.7,0.3,1,0.6c1.7,1.6,1.3,5.6,1.2,6.4l0,0.2l-0.1,0.2c-0.1,0.1-1.4,2-2.7,3c-1.3,1-5.4,1.9-6.2,2.1%20c-0.8,0.1-2,0.3-3.6,0.5c-3,0.4-7.5,0.9-8.7,1.4c-0.4,0.2-0.5,0.3-0.5,0.4c0,0,0,0.1,0,0.2c0,0.1,0.1,0.3,0.1,0.4%20c0.1,0.7,0.4,1.3,0.8,1.9c0.5,0.9,1,1.9,0.9,3.3l0,0.3l-0.1,0.2c-0.4,0.5-0.6,1-0.8,1.4c-0.2,0.5-0.6,1.2-1.2,1.4%20c-0.6,1.1-2,3.2-3.5,5.5c0,0,0,0,0,0h0.3l-1.3,1.6c-0.5,0.6-1,0.5-1.3,0.4c-1,0-1.8,0.1-2.1,0.1c-0.7,0.3-1.6,0.6-2.4,0.9%20c-0.5,0.1-0.9,0.3-1.2,0.4l-1.5,0.5v0.1l-0.8,0.2c-2.1,0.4-4.2,2.6-4.8,3.5l-2.2,2.5l-2.5,1c-0.3,0.3-0.8,0.4-1.2,0.6%20c-0.8,0.3-2,0.6-2.9,1.8l-0.3,0.4l-0.6-0.1c-1.3-0.2-7.7-1.7-8.9-2h-1.1l0.1-1.1c0.2-1.9,1.8-4.1,2.9-5.2%20c-0.4-0.6-0.5-1.2-0.1-2.3c0.4-1,1.3-1.2,1.8-1.4c0,0,0,0,0,0c0-0.2,0-0.3,0.1-0.5c0.2-0.4,0.5-0.7,0.9-0.9c-0.2-0.5,0-1,0.4-1.4%20l0.2-0.2l0.3,0c0.2-0.1,0.4-1,0.4-1.5c-0.2-0.5-0.1-1.5,0.1-4.7c-0.8-0.8-2.4-3-3.5-7.9l0-0.1c-0.4-0.8-1-1.9-2.5-2.1%20c-2.2,1.5-2.3,3.1-2.3,3.1l0,0.5l-0.3,0.3l-2.4,2l-0.3,0c-0.2,0-1.8,0.2-2.8-1c-0.8-1-0.8-2.7,0-4.8l0.2-0.8h0.7%20c0.5,0,0.9,0.2,1.7-3.2l0.1-0.4l0.5-0.2c0.2-0.1,0.4-0.1,0.5-0.2c-0.2-1.8-0.7-4.8-1.1-6.6c-0.6-1.5-1.4-2.6-1.7-3.1l-10.5-4%20l-0.3,0.4l-1.2,1.9c0.1,0.5,0.2,1,0.3,1.3l0.3,0.8l-0.8,0.4c-0.7,0.4-1.1,0.9-1.4,1.2c0.1,0.1,0.2,0.2,0.2,0.4%20c0.6,1.2,0.8,3.8-1.4,5.5l-0.2,0.1c-1.4,0.6-2.3,0.3-2.7-0.1c-0.4-0.3-0.6-0.7-0.7-1c-3.1,4.5-2.7,8.2-2.4,10.7%20c0.1,0.5,0.1,0.9,0.1,1.3l0,0.1l0,0.1c-0.1,1.6-0.4,2.2-0.7,2.6c0,0,0,0.1,0,0.1c0.2,0.7,0.7,2,1.3,3.3c0.8,1.9,1.8,4,2.1,5.8%20c0.9,6.1-0.1,9.9-2.7,16.2l-0.3,0.6h-0.7c-0.2,0-5.4,0.3-8.5-0.4l-0.8-0.2v-0.4c-2.2-1.7-3.3-4.9-3.1-9.9h0l-0.2-0.9l0.4-0.2%20c-0.7-2.8-1.3-6-0.8-11.6l0.8-6.6c0,0,0.3-2.3,1.6-7.5c-0.2,0-0.4,0-0.6,0c-0.5,0.7-0.9,1.3-1.2,1.8c-0.5,0.9-1.1,1.9-2.3,1.6%20c-0.7-0.1-1.2-0.4-1.5-1c-0.4-1,0.2-1.9,1-3.2c0.7-1.1,1.6-2.5,1.6-3.7c0,0,0,0,0,0c0,0,0,0,0,0c0-0.1,0-0.1,0-0.2l0.4,0l0.4-0.4%20l-0.3-0.7c0.4-0.3,1.4-2.1,2-3.4c0.6-1.3,1.3-2.6,1.9-3.5l0.4-0.6l0.7,0.1c0.5,0.1,0.6,0.1,0.6,0.1h0c0,0,0.1-0.1,0.1-0.2%20c0.3-0.4,0.8-1,2-1.5l1.7-0.7l-0.2,1.1c1.1-1.6,3.7-2.2,5.3-2.6c0.3-0.1,0.5-0.1,0.7-0.2c0.1-0.1,0.2,0,0.3-0.2%20c0.3-0.4,0.8-0.9,2-0.9c0,0,0,0,0,0c2.8,0,3.9,0.3,5.2,1.2c0.1-0.2,0.2-0.4,0.3-0.6c0.1-0.1,0.1-0.2,0.2-0.3l0.3-0.4l0.5-0.1%20c1.1-0.1,2.3-0.2,3.4-0.2c-0.1-0.1-0.1-0.1-0.2-0.2c-1.2-1.5-1.9-2.5-2.4-3.3c-1.7,0.6-3,0.7-4,0.2c-1.1-0.5-1.6-1.5-1.9-2.4%20c-1.1,0.4-2.4,0.6-3.9,0.8c-0.6,0.1-1.2,0.2-1.9,0.3c-0.2,0.1-0.7,0.4-1.1,0.6c-2.2,1.3-5.7,3.5-8.1,2.3c-0.9,0.1-1.9,0.3-1.9,0.3%20l-0.5,0.1l-0.4-0.4c-4.5-4.6-6.5-4-8.8-3.2l-1.1,0.3l-0.3-1c-0.3-1.1-0.5-1.9,0-2.5c0.2-0.2,0.4-0.3,0.6-0.4l0.9-1.4%20c0.5-0.9,1-1.4,1.4-1.8c-1.3,0.7-2.7,2-2.8,2.5l-0.1,0.3l-0.2,0.2c-2,2.2-7.7,5.6-10.6,6.2c-0.8,2.2-3.9,2.7-4.6,2.7h-0.2%20l-0.2-0.1c-0.8-0.3-1.7-0.5-3.1-0.8l-0.5-0.1l-0.2-0.5c-0.4-1-0.2-1.8,0.1-2.2c-0.6,0.2-1.4,0.5-2.2,0.9c-2.2,1-4.9,2.2-7.3,1.9%20l-0.5,0.5l-1.5-1.3c0.8-1.1,11.6-12.7,12.7-13.3c0,0,7.2-4.4,10.1-3c3.3,0.3,5.4-0.1,6.1-1.3c0.4-0.6,0.3-1.3,0.1-1.7%20c-1.1,0.2-4,1-6.5,1.8l-0.3,0.1l-5.5,0.3c-1.2,0.2-2.4,0.3-3.4,0.4c-2.8,0.3-4.7,0.5-7,1.6l-0.5,0.2l-0.5-0.3c0,0-4.6-3-8.4-3%20c-0.5,0-0.9-0.2-1.1-0.7c-0.1-0.2-0.4-0.7,0.3-1.9c-1,0-2.9,0.1-6.4,0.6c-0.8,0.2-2.2-0.2-4.1-0.6c-0.3-0.1-0.5-0.1-0.7-0.2%20c-0.3-0.1-0.6-0.1-0.9-0.2c-0.9-0.1-2.2-0.3-3.7-1.6c-1.1-1-1.8-2.9-1.9-3.7c-0.2-0.8-1.1-2-1.6-2.3c-0.5,0.1-1,0.2-1.2,0.3%20c0,0.1,0,0.2,0,0.5v2.8h-1c-10.9,0-13.2,0.1-15.2,0.5l-0.1,0.1l-0.1,0l-54.3-1.4c-16.4-1.5-33.6-3.1-47.8-5.1%20c-19-2.7-34.7-5.3-42.2-6.6c-2.5-0.4-4.5-0.8-4.8-0.8l-0.2,0c-0.1,0-5.4-1.6-8.2-1.8l0.1-0.6l-0.1,0.6c-1.6-0.4-35.1-8-43.1-10.3%20c0.1,0.4,0.3,0.8,0.5,1.2c0.5,1.1,1.1,2.2,0.7,3.2l-0.1,0.3c-0.1,0.6,0.1,2.6,0.3,3.8c0.2,1.7,0.3,2.5,0.1,3.1l-0.2,4.6l-0.9,0.1%20c-1.1,0.1-1.4,0.9-1.8,2.7c-0.1,0.7-0.3,1.3-0.6,1.8c-0.2,0.4-0.6,0.6-1,0.6c-0.8,0-1.3-0.8-1.8-1.7c-1.2-2.4-2.7-7.6-1.3-10.6%20c-3.7-4.6-8.6-9.1-10.3-8.6c-0.4,0.1-0.7,0.9-0.8,2c-0.2,2.7,0.2,6.6,0.5,9.7c0.5,4.7,0.5,5.7-0.2,6.2c-0.2,0.1-0.4,0.2-0.5,0.2%20c-0.1,0.1-0.2,0.2-0.2,0.2c-0.2,1.6-0.2,1.6,0.4,3.1l0,0.1c0.2,0.6-0.2,1-0.7,1.5c-0.5,0.5-1.3,1.4-1.3,2.1c0,0.2,0,0.3,0,0.4%20L61,246l-0.9,3.3l0.5,0.4l-0.2,0.7c-3.4,9.5-8.2,21.3-11.6,29.6l-0.1,0.3l-0.2,0.2c-2.4,1.7-4.2,5.3-4.5,9.1%20c-0.1,0.9-0.2,1.7-0.3,2.4c-0.2,1.7-0.4,2.9,0,3.5l-1,0.6l1.3,0.1c-0.2,4.3-2.2,11-4,14.2l-0.1,0.2l-0.2,0.1%20c-1.2,0.7-1.9,1.6-2.1,2.7c-0.5,2.7,2.1,5.8,2.1,5.8l0.3,0.3l0,0.4c-0.1,1-0.1,1.9-0.2,2.8c-0.1,2-0.3,4.1-0.7,6.8%20c-0.7,5.6,1.2,7,2.3,7.7c0.1,0.1,0.3,0.2,0.4,0.3l0.3,0.2l0.1,0.4c0.1,0.8,0.4,1.6,0.5,2.2c0.4,1.3,0.8,2.5,0.2,3.7%20c0.3,0.4,0.7,0.7,1,1.1c0.4,0.4,0.8,0.7,1.1,1.2l0.2,0.2l0.1,0.8l-0.2,0.2c0,0.3,0,0.6-0.1,1.1l1.2-0.2l-0.6,1.6%20c-0.4,1.2-0.7,4.7-0.4,5.4c0.4,1.4,1.1,2,2,2.5c1.1,0.8,2.5,1.7,1.9,4.2l-0.1,0.5l-0.4,0.2c-1.6,0.8-1.8,2.3-1.6,4.5%20c0.9,1.2,2.1,3.7,3.3,6.5c1.4,3,2.9,6.5,4.4,8.5l0.3,0.4l-0.2,0.5c-1.1,2.8-1.3,5.3-0.3,6.6c0.7,1,2.1,1.5,4.1,1.5%20c2.3,0,4.7,2.6,4.9,2.9l1.6,1.8c1.5,1.4,3.8,3.3,4.9,3.6c0.2,0.1,0.3,0.1,0.4,0.1c0.4-0.2,0.9-0.1,1.3-0.1l1,0.2l-0.2,1%20c-0.1,0.7-0.1,2,0.2,2.7c2.7,1.1,4.7,2.7,6.2,5.1c1.1,1.7,2.8,8.1,3,11.1c4.1,0.2,10.1,0.8,16,1.5l6.9,0.8l0.1,0.8%20c0.1,0.6,0.1,1,0.1,1.5c0,0.3,0,0.5,0,0.9c6.5,3.2,10.1,5.3,15.5,8.4c1,0.5,2,1.2,3.2,1.9c2.9,1.8,6.6,4,11.2,6.2l0.9,0.5%20c3.9,2,8.7,4.5,13.8,4.2l0.1,0l9.9,2.1c1.6,0.8,4.8,0.4,7-0.5l1.1-4.7l0.8,0c6.7,0.2,11.6,0.7,14.7,1.1l0-0.2l1,0.2%20c0.7,0,1.3,0.1,1.9,0.3l0.2,0.1l0.2,0.2c0.8,0.8,1.9,2.1,3.1,3.6c2.7,3.4,6.5,8,10.5,10.2l0.4,0.2l0.1,0.4%20c0.8,2.6,1.4,3.6,1.8,4.2c0.7,1.1,0.8,1.6,0.6,4.1c0.1,0.2,0.2,0.4,0.2,0.7c1,2.9,2.5,6.9,13.7,11.3c0.8,0.3,2.6-3,3.4-4.4%20c1.2-2.3,2-3.8,3.2-3.9l0.4,0l0.3,0.2c1.7,1.1,3.1,0.8,5.1,0.4c1.7-0.4,3.8-0.8,6.4-0.3l0.4,0.1l0.2,0.4c1.6,2.4,2.6,3.3,3.7,4.4%20c0.9,0.9,1.9,1.8,3.2,3.6c0.6,1,1.2,2.3,1.9,3.7c1.4,2.9,3.2,6.6,4.8,7.9l0.2,0.2l1.1,3c0.8,0.8,3.2,3.1,3.7,4.1%20c1.7,2.9,1.7,3.8,1.5,4.9c0,0.2-0.1,0.4-0.1,0.7c0,0,0,0.1,0.1,0.1c0.3,0.6,1,2,3,6.9c1,0.7,2.6,1.4,4.2,2.2%20c2.5,1.2,4.2,2,5.1,2.8c0.4,0.1,1,0,1.6,0c2.1,0,5-0.1,6.4,2.2c0,0.1,0.1,0.1,0.1,0.1l-0.5,0.3C276.2,519,276.3,519.2,276.3,519.3%20z%20M358.2,474.6c0.2,0.1,0.5,0.3,0.8,0.5c3.2,2.7,4.1,2.5,4.1,2.5c0-0.1,0-0.5,0-0.6c0,0,0-0.1,0-0.1c-0.7-0.5-2.8-1.5-4.7-2.3%20C358.4,474.6,358.3,474.6,358.2,474.6z%20M353.7,467.1c0.3,0.5,0.6,0.8,0.8,0.8c0.1,0,0.1,0,0.1,0l0.2-0.1l0.2,0%20c0.2,0,0.5-0.1,0.8-0.2c0.1-0.1,0.3-0.1,0.5-0.2c-0.1-0.2-0.3-0.3-0.4-0.5c-0.1-0.2-0.3-0.4-0.4-0.5c-0.4-0.2-0.8-0.3-1-0.3%20c-0.1,0.1-0.1,0.2-0.2,0.3C354,466.6,353.9,466.9,353.7,467.1z%20M365.3,327.2c2.3,0.4,5.4,0.3,6.7,0.3c2.3-5.7,3.1-9.1,2.3-14.5%20c-0.3-1.5-1.2-3.5-2-5.3c-0.7-1.5-1.2-2.8-1.5-3.7c-0.1-0.8,0-1.2,0.3-1.7c0.1-0.1,0.2-0.3,0.3-1.5c0-0.3-0.1-0.7-0.1-1.1%20c-0.3-2.7-0.8-7.1,3-12.4l0.2-0.2l3.3-2.5l-0.3,2.4c-0.1,0.5,0,1.2,0.2,1.3c0,0,0.2,0.1,0.6-0.1c0.7-0.6,0.9-1.3,1-1.7%20c0-0.4,0-0.7-0.1-1l-1.3,0.4l0.5-1.8c0-0.1,0.4-1.5,2-2.7c-0.1-0.6-0.2-1.1-0.3-1.2l-0.1-0.4l2-3.2l-0.1-0.1%20c-1.3-1-1.9-1.4-4.4-1.4c-0.3,0-0.3,0-0.5,0.3c-0.2,0.2-0.4,0.6-0.9,0.9l-0.2,0.1c-0.3,0.1-0.6,0.2-1.1,0.3%20c-1.2,0.3-3.6,0.8-4.2,1.8c0.1,1.4-0.8,2.6-1.9,3.2c-0.3,0.2-0.6,0.3-0.9,0.3l-0.1,0.2l-0.9-0.3l-0.9-0.4l0.4-0.9%20c0,0,0-0.1,0.1-0.1c-0.3,0.2-0.7,0.2-1.3,0.2c-0.5,0.8-1,1.8-1.5,2.8c-0.9,1.8-1.6,3.2-2.3,3.9c0,0.9-0.3,1.7-0.6,2.5l0.3-0.1%20c0.2,0,1.8-0.3,3,0.5l0.6,0.4l-0.2,0.7c-1.4,5.7-1.7,8.1-1.7,8.1l-0.8,6.5c-0.5,5.9,0.2,8.9,1,11.8l0.3,1l-0.7,0.2%20c-0.1,4.2,0.8,7.1,2.6,8.1L365.3,327.2z%20M517,298.6l0.6,1.2c0.1,0.2,0.3,0.4,0.4,0.4c0.1,0,0.4-0.1,0.8-0.5l0.6-0.6l0.5,0.3%20c-0.1-0.2-0.3-0.4-0.4-0.6c-0.6-0.9-1-1.4-1.5-1.6C517.7,297.8,517.4,298.2,517,298.6z%20M356.1,260.5c-0.2,0-0.8,0.3-1.1,0.5%20c-0.1,0.1-0.2,0.1-0.3,0.1c0,0,0.1,0,0.1,0c0.1,0,0.3,0,0.4,0C355.9,261,356.1,261,356.1,260.5%20C356.2,260.5,356.2,260.5,356.1,260.5C356.2,260.5,356.1,260.5,356.1,260.5z'/%3e%3c/g%3e%3c/g%3e%3cg%20id='specctr'%3e%3cg%20id='Dimensions'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Dv={area:Pv,arearange:Pv,line:Av,bar:f4,column:g4,polar:_4,funnel:v4,pie:b4,scatter:w4,indicator:y4,table:x4,treemap:T4,areamap:Rv,scattermap:Rv,boxplot:p4,sunburst:C4,"calendar-heatmap":m4,sankey:Av};function S4(e){var r;return(r=Dv[e])!=null?r:Dv["bar"]}const M4="_wrapper_1lpzp_1",E4="_title_1lpzp_7",P4="_image_1lpzp_17",lh={wrapper:M4,title:E4,image:P4},Mm=({iconType:e})=>{var s,u;const{themeSettings:t}=y.useThemeContext(),r=k.useRef(null),[n,i]=k.useState({width:null,height:null});k.useEffect(()=>{r.current&&i({width:r.current.offsetWidth,height:r.current.offsetHeight})},[]);const a=S4(e),{t:o}=O.useTranslation();return O.jsxs("div",{ref:r,className:lh.wrapper,children:[O.jsx("div",{className:lh.title,style:{fontFamily:(s=t.typography)==null?void 0:s.fontFamily,fontSize:A4(n.width,n.height),color:(u=t.typography)==null?void 0:u.secondaryTextColor},children:o("chartNoData")}),a?O.jsx("img",{className:lh.image,src:a,alt:o("chartNoData")}):null]})};function A4(e,t){return!e||!t?"18px":e<300?`${Math.max(Math.sqrt(e*e+t*t)*.045,18)}px`:`${Math.min(Math.max(t*.09,18),60)}px`}function u_(e,t,r,n){if(!U.isObject(e))return e;t=U.castPath(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var u=U.toKey(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var d=s[u];c=void 0,c===void 0&&(c=U.isObject(d)?d:U.isIndex(t[i+1])?[]:{})}U.assignValue(s,u,c),s=s[u]}return e}function c_(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var o=t[n],s=U.baseGet(e,o);r(s,o)&&u_(a,U.castPath(o,e),s)}return a}function R4(e,t){return c_(e,t,function(r,n){return U.hasIn(e,n)})}var D4=U.flatRest(function(e,t){return e==null?{}:R4(e,t)});const N4={translateDataOptionsToInternal:function(e){return{geo:e.geo&&P.normalizeColumn(e.geo[0]),color:e.color&&P.normalizeMeasureColumn(e.color[0])}},getAttributes:function(e){return[e.geo.column].filter(t=>!P.isMeasureColumn(t))},getMeasures:function(e){var r;const t=(r=e.color)==null?void 0:r.column;return t&&P.isMeasureColumn(t)?[t]:[]},isCorrectDataOptions:function(e){return"geo"in e&&U.isArray(e.geo)},isCorrectDataOptionsInternal:function(e){return"geo"in e&&!!e.geo.column}},k4={errors:{invalidAttribute:"Invalid attribute {{attributeName}}. Hint: attributes for query should be extracted from the data model generated by the CLI tool.",noDimensionsOrMeasures:"Neither dimensions nor measures found. Query should have at least one dimension or measure.",invalidMeasure:'Invalid measure "{{measureName}}". Hint: measures for the query can be constructed using the "measureFactory" functions.',invalidFilter:'Invalid filter "{{filterName}}". Hint: filters for the query can be constructed using the "filterFactory" functions.',invalidHighlight:'Invalid highlight "{{highlightName}}". Hint: highlights for the query can be constructed using the "filterFactory" functions.',invalidCountNegative:'Invalid count "{{count}}" in query. Count should be non-negative.',invalidOffset:'Invalid offset "{{offset}}" in query. Offset should be non-negative.',missingHttpClient:"Query was unable to load httpClient.",missingPostMethod:'httpClient must provide "post" method.',noJaqlResponse:"No jaql response received from the server",invalidCountRowsResponse:"Invalid row count response received from the server.",dataSourceNotFound:'Failed to get fields for data source "{{dataSource}}". Please make sure the data source exists and is accessible.'}},L4={errors:{invalidAttribute:"Недійсний атрибут {{attributeName}}. Підказка: атрибути для запиту повинні бути витягнуті з моделі даних, створеної за допомогою CLI-інструменту.",noDimensionsOrMeasures:"Не знайдено ні вимірів, ні показників. Запит повинен мати щонайменше один вимір або показник.",invalidMeasure:'Недійсний показник "{{measureName}}". Підказка: показники для запиту можна створити за допомогою функцій "measureFactory".',invalidFilter:'Недійсний фільтр "{{filterName}}". Підказка: фільтри для запиту можна створити за допомогою функцій "filterFactory".',invalidHighlight:'Недійсне виділення "{{highlightName}}". Підказка: виділення для запиту можна створити за допомогою функцій "filterFactory".',invalidCountNegative:`Недійсний count "{{count}}". Count повинен бути не від'ємним.`,invalidOffset:`Недійсний offset "{{offset}}". Offset повинен бути не від'ємним.`,missingHttpClient:"Для запиту потрібен httpClient, щоб працювати належним чином.",missingPostMethod:'httpClient повинен мати метод "post".',noJaqlResponse:"Відповіді, що містить jaql, від сервера не отримано",invalidCountRowsResponse:"Від сервера отримано недійсну відповідь із кількістю рядків.",dataSourceNotFound:'Не вдалося отримати поля для джерела даних "{{dataSource}}". Переконайтесь що джерело існує і доступне.'}},d_="sdkQueryClient",O4={en:k4,uk:L4};function I4(){return U.initI18next({resource:O4,language:"en",namespace:d_})}const{i18nextInstance:F4}=I4();var Em={exports:{}},Ra=typeof Reflect=="object"?Reflect:null,Nv=Ra&&typeof Ra.apply=="function"?Ra.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},wu;Ra&&typeof Ra.ownKeys=="function"?wu=Ra.ownKeys:Object.getOwnPropertySymbols?wu=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:wu=function(t){return Object.getOwnPropertyNames(t)};function $4(e){console&&console.warn&&console.warn(e)}var h_=Number.isNaN||function(t){return t!==t};function Qe(){Qe.init.call(this)}Em.exports=Qe;Em.exports.once=W4;Qe.EventEmitter=Qe;Qe.prototype._events=void 0;Qe.prototype._eventsCount=0;Qe.prototype._maxListeners=void 0;var kv=10;function bc(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Qe,"defaultMaxListeners",{enumerable:!0,get:function(){return kv},set:function(e){if(typeof e!="number"||e<0||h_(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");kv=e}});Qe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Qe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||h_(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function f_(e){return e._maxListeners===void 0?Qe.defaultMaxListeners:e._maxListeners}Qe.prototype.getMaxListeners=function(){return f_(this)};Qe.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=a[t];if(u===void 0)return!1;if(typeof u=="function")Nv(u,this,r);else for(var c=u.length,d=y_(u,c),n=0;n<c;++n)Nv(d[n],this,r);return!0};function p_(e,t,r,n){var i,a,o;if(bc(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),o===void 0)o=a[t]=r,++e._eventsCount;else if(typeof o=="function"?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=f_(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,$4(s)}return e}Qe.prototype.addListener=function(t,r){return p_(this,t,r,!1)};Qe.prototype.on=Qe.prototype.addListener;Qe.prototype.prependListener=function(t,r){return p_(this,t,r,!0)};function B4(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m_(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=B4.bind(n);return i.listener=r,n.wrapFn=i,i}Qe.prototype.once=function(t,r){return bc(r),this.on(t,m_(this,t,r)),this};Qe.prototype.prependOnceListener=function(t,r){return bc(r),this.prependListener(t,m_(this,t,r)),this};Qe.prototype.removeListener=function(t,r){var n,i,a,o,s;if(bc(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():z4(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Qe.prototype.off=Qe.prototype.removeListener;Qe.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function g_(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?H4(i):y_(i,i.length)}Qe.prototype.listeners=function(t){return g_(this,t,!0)};Qe.prototype.rawListeners=function(t){return g_(this,t,!1)};Qe.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):v_.call(e,t)};Qe.prototype.listenerCount=v_;function v_(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Qe.prototype.eventNames=function(){return this._eventsCount>0?wu(this._events):[]};function y_(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function z4(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function H4(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function W4(e,t){return new Promise(function(r,n){function i(o){e.removeListener(t,a),n(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}b_(e,t,a,{once:!0}),t!=="error"&&j4(e,i,{once:!0})})}function j4(e,t,r){typeof e.on=="function"&&b_(e,"error",t,r)}function b_(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var U4=Em.exports;const Pm=O.getDefaultExportFromCjs(U4),Re={HEADERS:"headers",METADATA:"metadata",DATA:"data",GRAND:"grand",FINISH:"finish",ERROR:"error",TOTAL_ROWS:"totalRows",DATA_FINISH:"dataFinish",DATABARS:"dataBars",RANGE_MIN_MAX:"rangeMinMax"},V4=[Re.ERROR,Re.HEADERS,Re.GRAND,Re.METADATA,Re.DATA,Re.DATA_FINISH,Re.TOTAL_ROWS,Re.DATABARS,Re.RANGE_MIN_MAX,Re.FINISH];class Hl extends Error{constructor(t="Loading canceled"){super(t),this.name="LoadingCanceledError";const r=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,r)}}class G4{constructor(t,r,n,i){this.childColCells=[],this.childRowCells=[],this.indexInParent=-1,this.siblingCount=0,this.rowIndex=t,this.colIndex=r,this.node=n,this.parent=i}isChild(){return!this.node}hasChildren(){return!!(this.childColCells.length||this.childRowCells.length)}hasColCell(){return this.childColCells.length>0}addColCell(t){this.childColCells.push(t)}getColCell(){return this.childColCells||[]}hasRowCell(){return this.childRowCells.length>0}addRowCell(t){this.childRowCells.push(t)}getRowCell(){return this.childRowCells||[]}getStopRowIndex(){return this.hasRowCell()?this.rowIndex+this.getRowCell().length:this.rowIndex}getStopColIndex(){return this.hasColCell()?this.colIndex+this.getColCell().length:this.colIndex}setIndexInParent(t,r){this.indexInParent=t,this.siblingCount=r}getIndexInParent(){return{indexInParent:this.indexInParent,siblingCount:this.siblingCount}}getParenPosition(){if(!this.parent)return;const t=(this.parent||"").match(/\d+/g)||[];return[Number(t[0]),Number(t[1])]}}const en={FIRST:"first",LAST:"last",EVEN:"even",ODD:"odd"};var q4=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const __=[Date,Error,RegExp,Promise];function w_(e,t=__){return t.some(r=>e instanceof r)}function Lv(e,t=[]){let r=!1;return t.forEach(n=>{e.includes(n)&&(r=!0)}),r}function C_(e=[],t,r){const n=[];return r&&e.forEach(i=>{n.push(`${i}.$`)}),e.length?e.forEach(i=>{n.push(`${i}.${t}`)}):n.push(t),n}function es(e){return!(e===null||typeof e=="undefined"||typeof e!="object")}function Y4(e,t){return es(e)&&e?Array.isArray(e)?!e.length:w_(e,t)?!1:!Object.keys(e).length:e==null}function X4(e=""){const t=e.split(".");return t.length>1?(t.pop(),t.join(".")):t[0]}function Ov(e,t,r){return e.length?Lv(e,r):t.length?!Lv(t,r):!0}function x_(e,t=[],r=[],n=[],i={},a={},o=[],s=[]){if(!es(e))return{commonIncludeKeys:[],commonExcludeKeys:[]};const u=o.indexOf(e);if(u!==-1)return s[u];o.push(e);const c=Object.keys(e),d=Array.isArray(e);let h=[],p=[];const m=[],v=[];if(c.forEach(b=>{const _=e[b],w=C_(n,b,d),C=n[0]||"&";i[C]=i[C]||[],a[C]=a[C]||[],w.forEach(S=>{(t||[]).includes(S)&&(i[C].push(S),h.push(S)),(t||[]).forEach(T=>{const M=X4(T);(`${M}.$`===C||M===C)&&(i[C].includes(T)||i[C].push(T),h.includes(T)||h.push(T))}),(r||[]).includes(S)&&(a[C].push(S),p.push(S))}),es(_)&&x_(_,t,r,w,i,a,o,s)}),es(e)){let b=n[0]||"&";Array.isArray(e)&&(b=`${b}.$`),i[b]=(i[b]||[]).concat(m),h=h.concat(m),a[b]=(a[b]||[]).concat(v),p=h.concat(v)}return s.push({commonIncludeKeys:h,commonExcludeKeys:p}),{commonIncludeKeys:h,commonExcludeKeys:p}}function T_(e,t,r=new WeakMap){const{includeKeys:n,includeKeysObj:i,excludeKeys:a,excludeKeysObj:o,parentKeys:s=[],excludeEmpty:u,referenceClone:c}=t||{};if(!es(e)||w_(e,c))return e;if(r.has(e))return r.get(e);const d=Object.keys(e),h=Array.isArray(e),p=h?[]:{};r.set(e,p);const m=s[0]||"&",v=(i||{})[m]||[],b=(o||{})[m]||[];return d.forEach(_=>{const w=e[_];let C=[],S=!0;if(n||a?S=Ov(n||[],a||[],[_]):(i||o)&&(C=C_(s,_,h),S=Ov(v,b,C)),S){const T=T_(w,Object.assign(Object.assign({},t),{parentKeys:C}),r);(!u||!Y4(T,c))&&(h?p.push(T):p[_]=T)}}),p}function cr(e,t){const r=t||{},{include:n,exclude:i}=r,a=q4(r,["include","exclude"]);let o,s;(n||i)&&(o={},s={},x_(e,n,i,[],o,s));const u=Object.assign(Object.assign({},a),{includeKeysObj:o,excludeKeysObj:s});return T_(e,u)}cr.REFERENCE_CLONE_TYPES=__;function Iv(e,t,r=0){for(let n=r;n<e.length;n+=1){const i=e[n];if(!!t(i,n,e))return n}return-1}const Z4=(e,t)=>{let r,n,i=null;const a=(...o)=>{r?i=o:(e(...o),r=!0,i=null,n=setTimeout(()=>{r=!1,i&&(e(...i),i=null)},t))};return a.cancel=()=>{clearTimeout(n),r=!1},a},hs="$*$root$*$";function K4(e,t,r,n){const i={value:e};return t&&(i.children=t),r&&(i.data=r),typeof n!="undefined"&&(i.index=n),i}function _c(e){return!!(e&&e.children&&e.children.length)}function jr(e){return e&&e.children||[]}function uf(e,t){e&&t&&Array.isArray(t)&&(e.children=t)}function Q4(e,t){e&&(e.level=t)}function J4(e){return e&&typeof e.level!="undefined"?e.level||0:-1}function ga(e){if(!e)return;if(e&&!Array.isArray(e)&&e.value===hs)return e;const t={value:hs,children:[]};return Array.isArray(e)?t.children=e:(t.children||[])[0]=e,t}function S_(e,t,r=0){let n;if(!e||!t)return n;if(t(e,r)&&(n=e),_c(e)){const i=jr(e),a=i.length;for(let o=0;o<a;o+=1){const s=S_(i[o],t,r+1);if(s){n=s;break}}}return n}function eA(e,t){if(!e&&!t)return;if(!e&&t)return ga(t);if(e&&!t)return ga(e);const r=ga(e),n=ga(t),i=r&&r.children||[],a=n&&n.children||[],o=i.concat(a);return ga(o)}const M_=(e,t=0)=>{if(!e||!e.isPart)return;e.level=t;const r=jr(e),n=r[r.length-1];return n&&M_(n,t+1)||e},E_=(e,t,r=0)=>{if(!e||!e.isPart)return;if(e.level=r,e&&t&&e.value===t.value&&e.level===t.level)return e;const i=jr(e)[0];return i&&E_(i,t,r+1)||e};function tA(e,t){let r=M_(e),n=E_(t,r);r&&r.children&&Array.isArray(r.children)&&n&&n.children&&Array.isArray(n.children)&&n.children.length>0&&(r.children=r.children.concat(n.children),n.isHandled=!0);let i=!1;for(r=e,n=t;r&&r.children&&Array.isArray(r.children)&&n&&n.children&&Array.isArray(n.children)&&!n.isHandled;){const a=r.children;r=r.children[r.children.length-1];let o=0;for(n.children[0]&&!i&&(i=!jr(n.children[0]).some(s=>s.isPart),o=1);o<n.children.length;)a.push(n.children[o]),o+=1;n=n.children[0]}return e}function P_(e,t,r){!e||!t||e.forEach(n=>{t(n,r),_c(n)&&P_(jr(n),t,n)})}function A_(e,t=[],r=0,n={maxLevel:0}){return e.forEach(i=>{n.maxLevel<r&&(n.maxLevel=r),_c(i)?A_(jr(i),t,r+1,n):t.push(i)}),t}function wc(e,t={}){if(t||(t={}),typeof t.callCount!="number"?t.callCount=1:t.callCount+=1,!e)return 0;let r=t.clearCache||!1;!Array.isArray(e)&&e.value===hs&&(r=!0);let n=1,i=[];return Array.isArray(e)?(n=0,i=e):e.children&&(i=jr(e)),i&&i.length&&(!r&&!Array.isArray(e)&&typeof e.childCount=="number"?n=e.childCount:(n=0,i.forEach(a=>{n+=wc(a,t)}),Array.isArray(e)||(e.childCount=n))),n}function R_(e,t={}){if(t||(t={}),typeof t.callCount!="number"?t.callCount=1:t.callCount+=1,!e)return 0;let r=t.clearCache||!1;!Array.isArray(e)&&e.value===hs&&(r=!0);let n=0,i=[];if(e&&!Array.isArray(e)&&typeof e.value!="undefined"&&(n=1),Array.isArray(e)?(n=0,i=e):e.children&&(i=jr(e)),i&&i.length)if(!r&&!Array.isArray(e)&&typeof e.childDeep=="number")n+=e.childDeep;else{let a=0;i.forEach(o=>{const s=R_(o,t);s>a&&(a=s)}),n+=a,Array.isArray(e)||(e.childDeep=a)}return n}function D_(e=[],t=0,r){const n=[];let i=0,a=-1,o=-1;const s=e.length;if(typeof t=="number"&&typeof r=="number"&&t>r)throw new Error('Wrong "getNodesByChildCount" diapason');if(typeof t=="number"&&t<0)throw new Error('Wrong "from" index for "getNodesByChildCount"');for(let u=0;u<s;u+=1){const c=e[u],d=wc(c);if(i+d>t&&(a<0&&(a=i),n.push(c),typeof r=="number"&&i+d>=r)){o=i+d;break}o=i+d,i+=d}return{nodes:n,start:a,stop:o}}function rA(e){e.isMapped!==void 0&&(e.isMapped=void 0),e.minLevel!==void 0&&(e.minLevel=void 0),e.childCount!==void 0&&(e.childCount=void 0),e.childDeep!==void 0&&(e.childDeep=void 0)}function cf(e=[],t=0,r,n){const{cloneFn:i=cr}=n||{},a=[],{nodes:o,start:s,stop:u}=D_(e,t,r),c=o.length;let d,h,p=!0;if(s<t){const m=o[0]||{},v=t-s;let b;c===1&&typeof r=="number"&&(b=r-s,p=!1),d=i(m,!0);const _=cf(jr(m),v,b,n);uf(d,_)}if(typeof r=="number"&&u>r&&p){const m=o[c-1]||{},v=0,b=wc(m)-(u-r);h=i(m,!0);const _=cf(jr(m),v,b,n);uf(h,_)}return o.forEach((m,v)=>{if(d&&v===0)a.push(d);else if(h&&v===c-1)a.push(h);else{const b=i(m);a.push(b)}}),a}const ve={ROOT:hs,create:K4,hasChildren:_c,getChildren:jr,setChildren:uf,setLevel:Q4,getLevel:J4,getLastLevelNodes:A_,iterateThroughTree:P_,wrapInRootNode:ga,findNode:S_,merge:eA,deepMerge:tA,getChildLength:wc,getDeepLength:R_,getNodesByChildCount:D_,getCutNodesByChildCount:cf,clearNodeCache:rA},oa=(e,t)=>`${e}-${t}`;class nA{constructor(t,r=!1,n){this.hasGrandTotals=!1,this.isVertical=!1,this.columns=[],this.lastLevel=[],this.map={},this.metadataCache={},this.isVertical=r,this.deep=n,t&&(this.tree=t,this.columns=this.cacheLevels(ve.getChildren(this.tree)))}destroy(){this.tree=void 0,this.columns=[],this.lastLevel=[],this.map={},this.metadataCache={},this.valueNode=void 0,this.grid=void 0}getMainCellWidth(t,r,n,i,a={offsetTop:-1,columnsOffset:0}){const{columnsOffset:o=0}=a,s=this.getItem(t,r),u=s&&s.hasChildren()&&s.hasColCell();let c=Number.NaN,d=!0;if(s&&u){const h=s.getColCell(),p=n({index:r+o});c=h.reduce((m,v)=>{const b=n({index:v.colIndex+o});return b||(d=!1),m+b},p),c-=i,c=Math.ceil(c)}return d?c:Number.NaN}extend(t){t&&(this.grid=void 0,this.tree=ve.merge(this.tree,t),this.columns=this.cacheLevels(ve.getChildren(t),this.columns))}getGrid(){if(this.grid)return this.grid;let t=this.getTreeDeepsLength(),r=this.getTreeChildLength();return this.isVertical?([t,r]=[r,t],this.map=this.fillMapVertical(ve.getChildren(this.tree),r,this.map)):this.map=this.fillMap(ve.getChildren(this.tree),t,this.map),this.grid=Array.from(Array(t)).map((n,i)=>Array.from(Array(r)).map((a,o)=>{const s=oa(i,o),u=this.map[s];if(!u)throw new Error(`Key "${s}" does not found in TreeService`);return u.node?u.node:u.parent})),this.grid}getPartialGrid(t,r){if(!this.isVertical)throw new Error('"getPartialGrid" can only be used for "vertical" tree');const n=this.getTreeDeepsLength(),i=ve.getChildren(this.tree),{nodes:a,start:o,stop:s}=ve.getNodesByChildCount(i,t,r);this.fillMapVertical(a,n,this.map,{parentRowIndex:o,parentColIndex:0,prevChildren:0,parentKey:""});const u=Math.max(o,t),c=Math.min(s,r),d=Math.max(0,c-t);return Array.from(Array(d)).map((h,p)=>Array.from(Array(n)).map((m,v)=>{const b=u+p,_=oa(b,v),w=this.map[_];if(!w)throw new Error(`Key "${_}" does not found in TreeService`);return w.node?w.node:w.parent||""}))}getPartialTree(t,r,n){const i=ve.getChildren(this.tree);return ve.getCutNodesByChildCount(i,t,r,n)}getTreeNode(t,r){const n=this.getItem(t,r);if(n&&n.node)return n.node}isChildren(t,r){const n=this.getItem(t,r);if(n)return n.isChild();if(typeof this.deep=="number"&&(this.isVertical?r:t)<this.deep)return!0;throw new Error(`Item "${t}-${r}" does not found in TreeService`)}hasChildren(t,r){const n=this.getItem(t,r);if(n)return n.hasChildren();throw new Error(`Item "${t}-${r}" does not found in TreeService`)}getMainCellSpans(t,r){const n={},i=this.getItem(t,r);return i&&i.hasColCell()&&(n.colSpan=i.getColCell().length+1),i&&i.hasRowCell()&&(n.rowSpan=i.getRowCell().length+1),n}alignStartIndex(t,r=!1){let n=0,i=t;if(r&&(n=t,i=0),this.isVertical===r){let a=this.getItem(n,i);if(a&&a.isChild()&&(a=this.getItemByKey(a.parent||"")),a)return r?a.rowIndex:a.colIndex}return t}alignStopIndex(t,r=!1){let n=0,i=t;if(r&&(n=t,i=0),this.isVertical===r){let a=this.getItem(n,i);if(a&&a.isChild()&&(a=this.getItemByKey(a.parent||"")),a)return r?a.getStopRowIndex():a.getStopColIndex()}return t}getTreeChildLength(t=ve.getChildren(this.tree),r){return ve.getChildLength(t,r)}getTreeDeepsLength(t=ve.getChildren(this.tree),r){return typeof this.deep!="undefined"&&this.deep!==void 0?this.deep:ve.getDeepLength(t,r)}getLastLevelNodes(){return this.lastLevel}extractData(t){if(!t)return[];const n=t.getLastLevelNodes().map(i=>i.index);return this.getLastLevelNodes().map(i=>typeof i.data=="undefined"?[i.data]:n?n.map(a=>{let o;return typeof a!="undefined"&&i.data&&(o=i.data[a]),o}):i.data)}getMetadata(t,r,n){const i=this.getTreeDeepsLength();t===1/0&&(t=i&&i-1),r===1/0&&(r=i&&i-1);const a=`${t}-${r}`;if(this.metadataCache[a])return this.metadataCache[a];let o=this.getItemByKey(a);if(!o)throw new Error(`Can not find metadata info for ${a} cell`);let s=o?o.node:void 0;if(s||(o=this.getItemByKey(o.parent||"")),!o)throw new Error(`Can not find metadata info for parent ${a} cell`);s=o?o.node:void 0;const u=this.getItemByKey(`${t+1}-${r}`),c=u?u.node:void 0,d=s&&s.level||0,h=this.isVertical?o.getStopColIndex():o.getStopRowIndex();let{indexInParent:p,siblingCount:m}=o.getIndexInParent(),v=p;if(d===0&&(m=this.getTreeChildLength(),p=this.isVertical?o.rowIndex:o.colIndex,v=p+(this.isVertical?o.getRowCell().length:o.getColCell().length)),n){const C=n.to-n.from;m<=C&&v>C-1&&(v=C-1)}const b={levels:[],siblings:[],root:void 0,parent:void 0,valueNode:this.valueNode,nextNode:c},{indexDivergence:_}=s||{};if(typeof _=="number"){const C=_===0?en.EVEN:en.ODD;b.siblings.push(C)}if(d===0&&b.levels.push(en.FIRST),h===i-1&&b.levels.push(en.LAST),p===0&&b.siblings.push(en.FIRST),v===m-1&&b.siblings.push(en.LAST),s&&d!==0){const C=this.isVertical?t:0,S=this.isVertical?0:r;b.root=this.getMetadata(C,S,n)}const w=this.getItemByKey(o.parent||"");if(w&&d!==0&&(b.parent=this.getMetadata(w.rowIndex,w.colIndex,n)),n){const C=this.isVertical?o.rowIndex:o.colIndex,S=this.isVertical?o.getStopRowIndex():o.getStopColIndex();let T;w&&(T=this.isVertical?w.getStopRowIndex():w.getStopColIndex()),T!==void 0&&T>=n.to-n.from&&S>=n.to-n.from-1&&!b.siblings.includes(en.LAST)&&b.siblings.push(en.LAST),C===0&&!b.siblings.includes(en.FIRST)&&b.siblings.push(en.FIRST)}return this.metadataCache[a]=b,b}setValueNode(t){typeof t=="object"&&(this.valueNode=t)}cacheLevels(t,r=[],n={level:0}){const{level:i}=n;return t.forEach(a=>{if(r[i]||(r[i]=[]),ve.setLevel(a,i),r[i].push(a),ve.hasChildren(a)){const o=i+1;this.cacheLevels(ve.getChildren(a),r,{level:o})}else this.lastLevel.push(a)}),r}fillMap(t,r,n={},i){const a=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},o=t.length;return t.forEach((s,u)=>{const{parentRowIndex:c,parentColIndex:d,prevChildren:h,parentKey:p}=a,v=ve.getLevel(s)+c,b=u+d+h,_=oa(v,b),w=this.createTreeCellMap({rowIndex:v,colIndex:b,node:s,parent:p});w.setIndexInParent(u,o),n[_]=w;let C=0,S=0;if(ve.hasChildren(s)?(C=this.getTreeChildLength(s),typeof s.minLevel=="number"&&(S=s.minLevel+1-v||0)):S=(r||0)-(v||0),(C>1||S>1)&&this.fillChildMap(n,_,v,b,S,C),ve.hasChildren(s)){const T=Object.assign(Object.assign({},a),{parentRowIndex:S>1?S-1:0,parentColIndex:u+d,parentKey:_});this.fillMap(ve.getChildren(s),r,n,T),C>1&&(a.prevChildren+=C-1)}}),n}fillMapVertical(t,r,n={},i){const a=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},o=t.length;return t.forEach((s,u)=>{if(s.isMapped){a.parentRowIndex+=ve.getChildLength(s)-1;return}s.isMapped=!0;const{parentRowIndex:c,prevChildren:d,parentKey:h}=a,p=ve.getLevel(s),m=u+c+d,v=oa(m,p),b=this.createTreeCellMap({rowIndex:m,colIndex:p,node:s,parent:h});b.setIndexInParent(u,o),n[v]=b;let _=0,w=0;if(ve.hasChildren(s)?w=this.getTreeChildLength(s):_=(r||0)-(p||0),(_>1||w>1)&&this.fillChildMap(n,v,m,p,w,_),ve.hasChildren(s)){const C=Object.assign(Object.assign({},a),{parentRowIndex:u+c,parentKey:v});this.fillMapVertical(ve.getChildren(s),r,n,C),w>1&&(a.prevChildren+=w-1)}}),n}fillChildMap(t,r,n,i,a,o){const s=t[r],u=Math.max(1,a),c=Math.max(1,o);Array.from(Array(u)).forEach((d,h)=>{Array.from(Array(c)).forEach((p,m)=>{if(h===0&&m===0)return;const v=n+h,b=i+m,_=oa(v,b),w=this.createTreeCellMap({rowIndex:v,colIndex:b,parent:r});t[_]=w,!(h!==0&&m!==0)&&(m===0&&s.addRowCell(w),h===0&&s.addColCell(w))})})}createTreeCellMap({rowIndex:t,colIndex:r,node:n,parent:i}){return new G4(t,r,n,i)}getItemByKey(t){return this.map[t]}getItem(t,r){const n=oa(t,r);return this.getItemByKey(n)}}class gi extends nA{}const De={ROWS:"rows",COLUMNS:"columns",MEASURES:"measures",SCOPE:"scope"},Wl={ASC:"asc",DESC:"desc"},Tt={SUB_TOTAL:"subTotal",GRAND_TOTAL:"grandTotal",MEASURE_TOP:"measureTop",MEASURE_BOTTOM:"measureBottom",CORNER:"corner"},Fv={COLOR:"color",CONDITION:"condition"},Am={DATETIME:"datetime",TEXT:"text",NUMERIC:"numeric"},sa={MEMBER:"member",VALUE:"value",SUB_TOTAL:"subtotal",GRAND_TOTAL:"grandtotal"},Yn={MEMBER:"member",INDEX:"index",TITLE:"title",NAME:"name",AGG:"agg",DIM:"dim"};class $v{constructor(t=[],r){this.divergence=0;const n=r?r.getDivergence():0,i=ve.getLastLevelNodes(t);this.divergence=(n+i.length)%2;for(let a=0;a<i.length;a+=1)i[a].indexDivergence=(a+n)%2}getDivergence(){return this.divergence}}const un=(e,t)=>{const r=e;return t&&(r.metadataType=t),r};function zs(e=[]){const t={};return e.forEach(r=>{const{index:n=1/0}=r.field||{},i=`${n}`;t[i]=r.jaql.datatype||Am.TEXT}),t}function df(e,t){if(e&&t===Am.DATETIME)try{return new Date(e).toISOString()}catch(r){return e}return e}function Bv(e){if(e!==null&&!U.isEqual(e,{}))return e}function Pi(e,t,r={}){const n=Bv(e),i=Bv(t);let a=!1;if(typeof n=="object"&&n!==null&&typeof i=="object"&&i!==null){a=!0;const o=Object.keys(n),s=Object.keys(i);o.length!==s.length?a=!1:o.forEach(u=>{const c=r[u]||"";let d=(n||{})[u],h=(i||{})[u];if(typeof d=="undefined"||typeof h=="undefined"){a=!1;return}c===Am.DATETIME&&(d=df(d,c),h=df(h,c)),d!==h&&(a=!1)})}else a=n===i;return a}function N_(e,t,r=df){if(!e||typeof e!="object")return e;const n={};return Object.keys(e).forEach(i=>{const a=t[i],o=(e||{})[i],s=r(o,a);n[i]=s}),n}const Ur=(e,t)=>{let r=e&&e.metadata||[];return t&&(r=r.filter(n=>n.panel===t)),r.sort((n,i)=>{const a={index:1/0},o=n.field||a,s=i.field||a;return o.index-s.index}),r},zi=(e,t,r)=>typeof t=="undefined"?void 0:Ur(e,r).filter(a=>(a.field||{index:1/0}).index===t)[0],iA=(e,t)=>{const r=e.field||{index:1/0};if(e.panel===De.MEASURES)return!0;if(e.panel===De.ROWS){const n=Ur(t,De.ROWS),a=(n[n.length-1]||{}).field||{index:1/0};if(n.length&&a.index===r.index)return!0;n.length||console.error("Missing rows panel in jaql!")}return!1};function aA(e,t){return!e||typeof e.field!="number"?!1:e.field!==t}const Rm=(e,t=De.ROWS)=>{const n=Ur(e,t).map((i,a)=>{const o=ve.create(i.jaql.title,void 0,void 0,a),s=un(o,t);switch(s.jaqlIndex=i.field?i.field.index:void 0,t){case De.ROWS:{s.measurePath=void 0;const u=aA(i.jaql.sortDetails,s.jaqlIndex);i.jaql.sort&&!u?s.dir=i.jaql.sort:s.dir=null;break}case De.MEASURES:s.databars=i.format?i.format.databars:!1,s.measureJaqlIndex=s.jaqlIndex,Ur(e,De.COLUMNS).length||(s.measurePath=void 0,i.jaql.sortDetails&&i.jaql.sortDetails.measurePath===null?s.dir=i.jaql.sortDetails.dir:s.dir=null);break}return s});return ve.wrapInRootNode(n)},k_=e=>{(e&&e.metadata?e.metadata:[]).forEach(r=>{r&&r.jaql&&r.jaql.sort&&r.jaql.sortDetails&&r.jaql.sortDetails.sortingLastDimension&&(r.jaql.sort=null,delete r.jaql.sortDetails)})},L_=e=>{e&&e.jaql&&(e.jaql.sort=null,delete e.jaql.sortDetails)},O_=e=>{(e&&e.metadata?e.metadata:[]).forEach(r=>L_(r))},oA=e=>(e.metadata||[]).reverse().find(t=>!!t.jaql.sortDetails),sA=e=>(e.metadata||[]).find(t=>!!(t.jaql.sortDetails&&t.jaql.sortDetails.isLastApplied)),lA=e=>{const t=sA(e)||oA(e);if(!t)return;const r=t.field&&t.field.index;(e.metadata||[]).forEach(n=>{(n.field&&n.field.index)!==r&&L_(n)})},I_=(e,t)=>{e.metadata.forEach(r=>{const n=r.field&&r.field.index;if(t.field===n){r.jaql.sortDetails=r.jaql.sortDetails||t,r.jaql.sortDetails.isLastApplied=!0;return}r.jaql.sortDetails&&r.jaql.sortDetails&&delete r.jaql.sortDetails.isLastApplied})},uA=(e,t,r)=>{const{isSingleRowTree:n=!1,formatter:i}=r||{};if(!t){console.warn("jaql is undefined or null!");return}const a=zi(t,e.field);if(a&&a.panel===De.COLUMNS){console.warn('Should not be sorted by "COLUMN" type panels!');return}if(!a)return;const o=iA(a,t);switch(n?O_(t):o&&k_(t),e.dir){case Wl.DESC:case null:a.jaql.sort=Wl.ASC;break;case Wl.ASC:a.jaql.sort=Wl.DESC;break;default:a.jaql.sort=void 0}const s=a.field||{index:1/0};if(a.jaql.sort){let{measurePath:u}=e;if(u){const c=Ur(t),d=zs(c);u=N_(u,d,i)}a.jaql.sortDetails={field:s.index,dir:a.jaql.sort,sortingLastDimension:o,measurePath:u,initialized:!0}}else a.jaql.sortDetails=void 0;t&&t.metadata&&s.index!==void 0&&(t.metadata[s.index]=a),I_(t,e)},cA=(e,t,r)=>{if(!e)return;const n=zi(e,t);n&&(n.format=n.format||{},n.format.width=r)},dA=e=>{const t={};return e&&Ur(e).forEach(n=>{const i=n.field||{index:1/0};n.format&&typeof n.format.width!="undefined"&&typeof i.index!="undefined"&&(t[i.index]=n.format.width)}),t},F_=(e,t)=>{if(typeof t.measureJaqlIndex!="undefined"){const r=Ur(e),n=zs(r),i=r.filter(o=>o.panel===De.ROWS).find(o=>{const s=o.jaql.sortDetails;return!s||!(s.field===t.measureJaqlIndex)?!1:!!Pi(t.measurePath,s.measurePath,n)});if(i){t.dir=i.jaql.sort?i.jaql.sort:null;return}const a=zi(e,t.measureJaqlIndex);if(a&&a.jaql.sortDetails){const o=a.jaql.sortDetails.measurePath,s=t.measurePath;if(Pi(o,s,n)){t.dir=a.jaql.sort||null;return}}}t.dir=null};function hA(e,t,r,n){const{isSingleRowTree:i,formatter:a}=n;i&&O_(e),e.metadata.forEach(o=>{o.jaql.sortDetails&&delete o.jaql.sortDetails.isLastApplied}),t.forEach((o,s)=>{let u;s===t.length-1?(o.selected&&k_(e),u=r.field):u=o.indexInJaql;const c=zi(e,u);if(!c){console.warn(new Error("Panel not found"));return}o.selected&&!o.direction&&console.warn(new Error("Direction should be defined and equal to 'asc' or 'desc'"));const d=Ur(e),h=zs(d);if(!o.direction||!o.selected){const{sortDetails:p}=c.jaql;!!(p&&r.field===p.field&&Pi(r.measurePath,p.measurePath,h))&&(delete c.jaql.sort,delete c.jaql.sortDetails)}if(o.selected&&o.direction){c.jaql.sort=o.direction;let{measurePath:p}=r;p&&(p=N_(p,h,a)),r.measurePath===void 0&&c.field&&c.panel==="rows"&&r.field!==c.field.index&&(p={}),c.jaql.sortDetails={field:r.field,dir:o.direction,sortingLastDimension:!1,measurePath:p,isLastApplied:!0,initialized:!0}}})}function fA(e,t,r,n){return e.jaql.sortDetails?!1:r?Pi(t.measurePath,r.measurePath,n):!1}function hf(e){const t=e&&e.dir;switch(t){case"asc":case"desc":return t;default:return null}}function pA(e,t){var r,n;const i=e.metadata.filter(v=>v.panel==="rows"),a=zi(e,t.field),o=a.jaql.datatype,s=a.jaql.sortDetails,u=zs(Ur(e)),c=[];for(let v=0;v<i.length-1;v+=1){const b=i[v],_=!!(b.jaql.sortDetails&&b.jaql.sortDetails.field===t.field&&Pi(t.measurePath,b.jaql.sortDetails.measurePath,u)),w=hf(b.jaql.sortDetails);c.push({title:b.jaql.title,datatype:o,selected:_,direction:w,indexInJaql:(r=b.field)===null||r===void 0?void 0:r.index})}const d=i[i.length-1],h=fA(d,t,s,u),p=hf(s),m={title:d.jaql.title,datatype:o,selected:h,direction:p,indexInJaql:(n=a.field)===null||n===void 0?void 0:n.index};return c.push(m),c}function mA(e,t,r){return e.filter(i=>i.field&&t.field===i.field.index).map(i=>{const{sortDetails:a}=i.jaql,o=!!(a&&Pi(t.measurePath,a.measurePath,r)),s=o?hf(a):null;return{title:i.jaql.title,datatype:i.jaql.datatype,selected:o,direction:s}})[0]}const la={isMeasurePathEqual:Pi,getDataTypes:zs,updatePanelsSortingMetadata:uA,getMetadataTree:Rm,getMetadataPanels:Ur,getMetadataPanelByIndex:zi,setResizeWidthToJaql:cA,getResizeWidthFromJaql:dA,markSortedNode:F_,normalizeSingleBranchTreeSortDetails:lA,updateLastAppliedSortingFlag:I_,handleComplexSortingSettingsUpdate:hA,mapWidgetJaqlToSimpleSortingSettings:mA,mapWidgetJaqlToComplexSortingSettings:pA};function $_(e,t){if(!ve.hasChildren(e))return!1;let r=!1;t===De.COLUMNS&&e&&e.isPart&&(r=!0);const n=ve.getChildren(e);if(n.length>1||r)return!0;const[i]=n;return $_(i)}function gA(e){return e==null}const Dm=(e,t,r,n,i)=>{const a=[];return e.forEach(o=>{if(a.push(o),ve.hasChildren(o)){const s=ve.getChildren(o),u=Dm(s,t,r,n,i);ve.setChildren(o,u);let c=!1;if((i||$_(o,r))&&(r===De.COLUMNS?typeof o.index!="undefined"&&o.index>-1&&(c=!0):r===De.ROWS&&typeof o.data!="undefined"&&(c=!0)),c){const{value:d,index:h,data:p,jaqlIndex:m,measurePath:v}=o;let b;if(r===De.COLUMNS?b=ve.create(d,void 0,void 0,h):r===De.ROWS&&(b=ve.create(d,void 0,p)),b){const _=un(b,r);_.userType=Tt.SUB_TOTAL,_.jaqlIndex=m,_.measurePath=v,_.master=o,a.push(_)}}}}),a},B_=(e,t)=>{e.userType===Tt.SUB_TOTAL&&e.master&&(e.measurePath=e.master.measurePath)},z_=(e,t,r,n)=>{const i=e;if(r===De.COLUMNS&&t){const a=un(t);if(typeof a.index=="number"){const s=Rm(n,De.MEASURES);ve.getChildren(s).forEach((u,c)=>{const d=Object.assign(Object.assign({},u),{index:(a.index||0)+c}),h=un(d,r);h.userType=Tt.GRAND_TOTAL,h.measureJaqlIndex=h.jaqlIndex,i.push(h)})}}return i},H_=(e,t)=>{e.userType===Tt.GRAND_TOTAL&&(e.measurePath=void 0,e.metadataType===De.ROWS&&(e.parent=void 0,e.jaqlIndex=0))},W_=(e,t,r,n)=>{let i=e;if(r===De.COLUMNS){const a=Rm(n,De.MEASURES),o=ve.getChildLength(a),s={maxLevel:0},u=ve.getLastLevelNodes(i,[],0,s);if(o>1)u.forEach(c=>{if(c.userType===Tt.GRAND_TOTAL)return;const d=ve.getChildren(a),h=[];for(let p=0;p<d.length;p+=1){if(typeof c.maxChilds=="number"&&p>=c.maxChilds)continue;const m=Object.assign(Object.assign({},d[p]),{index:(c.index||0)+p,measurePath:c.measurePath}),v=un(m,De.MEASURES);v.userType=Tt.MEASURE_BOTTOM,v.measureJaqlIndex=v.jaqlIndex,h.push(v)}c.minLevel=s.maxLevel,ve.setChildren(c,h)});else if(o===1){const c=ve.getChildren(a)[0];if(c){const d=Object.assign({},c),h=un(d,De.MEASURES);h.userType=Tt.MEASURE_TOP,ve.setChildren(h,i),i=[h],u.forEach(p=>{p.measureJaqlIndex=c.jaqlIndex})}}}return i},j_=(e,t)=>{!ve.hasChildren(e)&&typeof e.measureJaqlIndex!="undefined"&&F_(t,e)},vA=(e,t,r,n)=>{let i={};if(t.userType===Tt.SUB_TOTAL||t.userType===Tt.GRAND_TOTAL||r.userType===Tt.SUB_TOTAL||r.userType===Tt.GRAND_TOTAL||r.parent&&r.parent.userType===Tt.SUB_TOTAL||r.parent&&r.parent.userType===Tt.GRAND_TOTAL)return;const a=n&&n.format&&n.format.color||null;if(!a)return;const{value:o,cf:s=-1}=e;if(a.type===Fv.COLOR&&a.color&&a.color!=="transparent"&&(i.backgroundColor=a.color),a.type===Fv.CONDITION&&a.conditions&&a.conditions.length)for(let u=0,c=a.conditions.length;u<c&&!gA(o);u+=1){const d=a.conditions||[],{color:h}=d[u]||{};if(h&&s===u){i.backgroundColor=h;break}}Object.keys(i).length>0&&(e.style=e.style||{},Object.assign(e.style,i)),i=void 0},U_=(e,t,r,n)=>{const i=[],{level:a=0,measurePath:o={}}=n||{};let s;Array.isArray(e)?s=e:s=ve.getChildren(e);const c=Ur(r,t)[a],d=c?(c.field||{index:1/0}).index:void 0;return s.forEach(h=>{const p=un(h,t);if(p.jaqlIndex=d,typeof d!="undefined"&&(p.measurePath=Object.assign(Object.assign({},o),{[d]:p.value})),i.push(p),ve.hasChildren(p)){const m=ve.getChildren(p),v={level:a+1,measurePath:p.measurePath},b=U_(m,t,r,v);ve.setChildren(p,b)}}),i},V_=(e,t,r)=>{const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1,iterateFn:a,emitFn:o}=r||{};e.forEach(s=>{if(a&&a(s),(n||!i)&&(B_(s),H_(s),j_(s,t)),o&&(i||!n)){const u=zi(t,s.jaqlIndex,s.metadataType||"");o(s,u,t)}if(ve.hasChildren(s)){const u=ve.getChildren(s);V_(u,t,r)}})},yA=(e,t,r,n)=>{const{originalData:i,applyIndexDivergence:a,subtotalsForSingleRow:o}=n||{};a&&a(e);let s=Dm(e,i,t,r,o);return s=z_(s,i,t,r),s=W_(s,i,t,r),ve.iterateThroughTree(s,(u,c)=>{u.parent=c}),s},No={insertSubTotals:Dm,postProcessSubTotal:B_,insertGrandTotals:z_,postProcessGrandTotal:H_,insertMeasureNodes:W_,postProcessMeasureNode:j_,applyColorFormatting:vA,preProcessTree:U_,modifyTree:yA,postProcessTree:V_};var bA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const _A=(e,t)=>e.metadata.find(r=>r.field&&r.field.index===t),Cu=(e,t,r=[],n=[])=>{if(!t||!e||typeof e.jaqlIndex=="undefined")return{dimensionsMeta:r,type:n};const i=_A(t,e.jaqlIndex);if(i&&i.jaql&&e.metadataType!==De.MEASURES&&r.unshift({title:i.jaql.title,name:i.jaql.dim,member:e.value,index:e.jaqlIndex}),e&&e.userType&&(e.userType===Tt.SUB_TOTAL||e.userType===Tt.GRAND_TOTAL)){const a=e.userType.toLowerCase();n.push(a)}return e.parent&&e.parent.metadataType!==De.MEASURES?Cu(e.parent,t,r,n):{dimensionsMeta:r,type:n}},zv=e=>{let t={};if(e){const r=e.jaql;t=bA(r,["type","datatype","table","column"]),e.field&&(t.index=e.field.index)}return t};function Da(e,t,r){return!t||!t.length?!1:t.some(n=>{let i=!0;return r&&r.fields&&r.fields.length&&r.fields.forEach(a=>{const o=e,s=n;o[a]!==void 0&&s[a]===void 0?i=!1:o[a]!==void 0&&s[a]!==void 0&&(Array.isArray(o[a])?i=i&&o[a].indexOf(s[a])!==-1:i=i&&o[a]===s[a])}),i})}const wA=(e,t=[])=>{let r=!1;return!t||!t.length?!1:e.length===0?!0:(e.forEach(n=>{t.includes(n)&&(r=!0)}),r)},Hv=(e,t)=>{let r=!0;return!t||!t.length?r=!1:e.forEach(n=>{if(n.index){const i=t[t.length-1];r=r&&Da(n,[i],{fields:[Yn.INDEX]})}if(n.dim&&(n.name=n.dim,n.members&&(n.member=n.members),r=r&&Da(n,t,{fields:[Yn.NAME,Yn.MEMBER]})),n.title){const i=t[t.length-1];r=r&&Da(n,[i],{fields:[Yn.TITLE]})}}),r},CA=(e,t)=>{let r=!0;return!t||!t.length?r=!1:e.forEach(n=>{n.index&&(r=r&&Da(n,t,{fields:[Yn.INDEX]})),n.dim&&(n.name=n.dim,r=r&&Da(n,t,{fields:[Yn.DIM,Yn.AGG]})),n.title&&(r=r&&Da(n,t,{fields:[Yn.TITLE]}))}),r},xA=(e,t)=>{let r=!0;if(e.type&&r&&(r=r&&wA(e.type,t.type)),e.rows&&e.rows.length&&r){const n=t.rows?t.rows:[];r=r&&Hv(e.rows,n)}if(e.columns&&r){const n=t.columns?t.columns:[];r=r&&Hv(e.columns,n)}if(e.values&&r){const n=t.measure?[t.measure]:[];r=r&&CA(e.values,n)}return r},TA=e=>{const t={};return Object.keys(e).forEach(r=>{(!r.startsWith("border")||r==="borderColor")&&(t[r]=e[r])}),t},ko="text";class Nm{constructor(t,r,n){this.plugins=[],this.columnsMetadata=[],this.metadataCache=new Map,this.plugins=t,this.jaql=r,this.globalStyles=n,this.indexHelper={measuresLevel:this.getMeasuresLevel(),columnStartFrom:0,rowStartFrom:0},this.globalStyles&&(this.globalStyles=TA(this.globalStyles))}getJaqlPanels(t){if(!this.jaql)throw new Error("No Jaql in Plugin service!");return this.jaql.metadata.filter(r=>r.panel===t)}getMeasuresLevel(){const t=this.getJaqlPanels(De.COLUMNS);return this.getJaqlPanels(De.MEASURES).length>1?t.length:0}getRowsColumnLength(){return this.getJaqlPanels(De.ROWS).length}getTotalTypes(t){const r=t.filter(n=>n===sa.SUB_TOTAL||n===sa.GRAND_TOTAL);return r&&r.length?r.filter((n,i,a)=>a.indexOf(n)===i):[]}getMeasureMetaByIndex(t){const r=this.getJaqlPanels(De.MEASURES);if(r.length===1)return zv(r[0]);const n=t%r.length;return zv(r[n])}resetRowStartFrom(){this.indexHelper.rowStartFrom=1}applyToColumns(t){t.length!==0&&(this.indexHelper.columnStartFrom===0&&(this.indexHelper.columnStartFrom=this.getRowsColumnLength()),this._applyToColumns(t,{row:-1}))}_applyToColumns(t,r){t.forEach((n,i)=>{const{dimensionsMeta:a,type:o}=Cu(n,this.jaql);o.push(sa.MEMBER);let s=r.row>=0?r.row+1:0;s>=this.indexHelper.rowStartFrom&&(this.indexHelper.rowStartFrom=s+1),n.metadataType===De.MEASURES&&(s=this.indexHelper.measuresLevel);let u=i===0?0:1;u+=this.indexHelper.columnStartFrom;const c={type:o,rowIndex:s,colIndex:u,index:n.jaqlIndex,columns:a};n.metadataType===De.MEASURES&&(c.measure=this.getMeasureMetaByIndex(n.index||0));const d={value:n.value||"",content:n.content||"",contentType:n.contentType||ko,style:n.style||{},store:n.store||{},state:n.state};if(this.applyGlobal(d),this.apply(c,d),this.addToMetadata(c,d,c.rowIndex,c.colIndex),Object.assign(n,d),this.indexHelper.columnStartFrom=u,n.children){const h={row:s,column:u};this._applyToColumns(n.children,h)}else this.columnsMetadata.push({type:o,metadata:a});return!0})}applyToHeaders(t){!t||!t.children||t.children.length===0||t.children.forEach(r=>{const{dimensionsMeta:n}=Cu(r,this.jaql),i={type:[sa.MEMBER],rowIndex:0,colIndex:r.index||0,index:r.jaqlIndex,rows:n},a={value:r.value,content:r.content||"",contentType:r.contentType||ko,style:r.style?r.style:{},store:r.store||{},state:r.state};this.applyGlobal(a),this.apply(i,a),this.addToMetadata(i,a,i.rowIndex,i.colIndex),Object.assign(r,a)})}applyToRows(t){if(t.length===0)return;const r=this.getJaqlPanels(De.ROWS),n=this.getJaqlPanels(De.MEASURES),i=this.getJaqlPanels(De.COLUMNS);this.indexHelper.rowStartFrom=Nm.getRowStartFromForPage(r.length,n.length,i.length),this._applyToRows(t)}static getRowStartFromForPage(t,r,n){if(t===0&&n===0)return 0;const i=n+(r===0?0:1);return i===0?1:i}_applyToRows(t){t.forEach((r,n)=>{const{dimensionsMeta:i,type:a}=Cu(r,this.jaql);a.push(sa.MEMBER);const o=r.level?r.level:0,s=n===0?this.indexHelper.rowStartFrom:this.indexHelper.rowStartFrom+1,u={type:a,rowIndex:s,colIndex:o,index:r.jaqlIndex,rows:i},c={value:r.value,content:r.content||"",contentType:r.contentType||ko,style:r.style||{},store:r.store||{},state:r.state};return this.applyGlobal(c),this.apply(u,c),this.addToMetadata(u,c,u.rowIndex,u.colIndex),this.indexHelper.rowStartFrom=s,r.children?this._applyToRows(r.children):r.data&&r.data.length&&this.applyToValues(r.data,{type:a,metadata:i},{rowIndex:s,colIndex:this.getRowsColumnLength()}),Object.assign(r,c),!0})}applyToValues(t,r,n){t.length&&t.forEach((i,a)=>{const o=[sa.VALUE],s=this.columnsMetadata[a];if(!s)return;const u=this.getTotalTypes([...r.type,...s.type]),c=this.getMeasureMetaByIndex(a),d={type:o.concat(u),rows:r.metadata,columns:s.metadata,measure:c,colIndex:a+n.colIndex,rowIndex:n.rowIndex,index:c&&c.index?c.index:0};let h={value:i,content:i,contentType:ko,style:{},store:i&&i.store||{},state:i&&i.state||void 0};i!=null&&typeof i=="object"&&(h={value:i.value?i.value:null,content:i.content||"",contentType:i.contentType||ko,style:i.style||{},store:i.store||{},state:i.state}),this.applyGlobal(h),this.apply(d,h),this.addToMetadata(d,h,d.rowIndex,d.colIndex),t[a]=h})}addToMetadata(t,r,n,i){const a=Object.assign({cellData:{value:r.value,content:r.content}},t);this.metadataCache.set(`${n}-${i}`,a)}applyGlobal(t){const{globalStyles:r}=this;r&&(t.style=Object.assign(Object.assign({},t.style),r))}apply(t,r){this.plugins&&this.plugins.length&&this.plugins.forEach(n=>{if(xA(n.target,t)){const a=n.handler;a(t,r)}})}}var SA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const uh=(e,t)=>{const r=e||{metadata:[],grandTotals:null};let{metadata:n}=r;return n=n.map(i=>{const a=i.field||{},o=t.find(({field:u})=>u&&u.index===a.index),s=o?o.format:null;return s?Object.assign(Object.assign({},i),{format:s}):i}),Object.assign(Object.assign({},r),{metadata:n})},Wv=100,MA="dataLoad",EA="dataChunkLoaded",PA="dataBarChunkLoaded",AA="rangeMinMaxChunkLoaded",RA="grandChunkLoaded",DA="dataFinishChunkLoaded",NA="finishChunkLoaded",kA="progressError",ff="headerCellFormat",G_="dataCellFormat",LA="totalRowsCountLoaded",OA="totalColumnsCountLoaded",jv=1e3,IA=0,FA={throttle:Z4,throttleTime:IA,PluginService:Nm,skipInternalColorFormatting:!1,subtotalsForSingleRow:!1};class gr{constructor(t,r,n){this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.cornerTreeService=void 0,this.pageSize=Wv,this.isPaginated=!1,this.loadedPagesCount=0,this.isLoadInProgress=!1,this.loadAllPromise=void 0,this.loadAllPromiseResolve=void 0,this.loadAllPromiseReject=void 0,this.isWholeDataLoaded=!1,this.hasDataFinishEvent=!1,this.isDataHandlerThrottled=!1,this.metadata=[],this.divergenceComparator=new $v,this.rawJaql=void 0,this.triggeredEventsData={},this.callPlugins=[],this.onMetadataHandler=()=>{const i={metadata:this.getMetadata()};this.isSingleRowTree()&&la.normalizeSingleBranchTreeSortDetails(i)},this.onHeadersHandler=i=>{const a=this.getJaql.bind(this),o=this.getRawJaql.bind(this),s=this.applyIndexDivergence.bind(this),u=(m,v,b)=>this.emit(ff,m,v,b,this.options),d=gr.createColumnsTreeServiceBuilder({getJaql:a,getRawJaql:o,pluginService:this.pluginService,applyIndexDivergence:s},{emitHeaderCellFormatEvent:u})(i);this.columnsTreeService=d.columnsTreeService,this.columnsCount=d.columnsCount,this.totalColumnsCount=d.totalColumnsCount,this.emit(OA,{columnsCount:this.columnsCount||0,totalColumnsCount:this.totalColumnsCount||0});const h=gr.createCornerTreeServiceBuilder({getJaql:a,getRawJaql:o,pluginService:this.pluginService,columnsTreeService:this.columnsTreeService},{emitHeaderCellFormatEvent:u}),{cornerTreeService:p}=h();this.cornerTreeService=p},this.onDataHandler=i=>{this.tempDataChunks=this.tempDataChunks||[],Array.isArray(i)?(i||[]).forEach(a=>{gr.fillDataChunks(this.tempDataChunks,a,this.pageSize)}):gr.fillDataChunks(this.tempDataChunks,i,this.pageSize),this.tempDataChunks.length&&(this.isDataHandlerThrottled=!0,this.onDataHandlerThrottle())},this.onGrandHandler=i=>{const o=this.preProcessTree([i],De.ROWS)[0],s="Rows grand total",u=o?o.data:[],c=ve.create(s,void 0,u),d=un(c,De.ROWS);d.userType=Tt.GRAND_TOTAL,this.postProcessTree([d]),this.postProcessData([d]),this.rowsGrand=d,this.emit(RA,ve.wrapInRootNode(this.rowsGrand))},this.onFinishHandler=()=>{this.emit(NA,{totalRows:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalColumns:typeof this.totalColumnsCount=="number"?this.totalColumnsCount:this.getLoadedColumnsCount()})},this.onTotalRowsHandler=i=>{const{rowsCount:a,queryRowsCount:o,limitReached:s}=i||{};this.totalRowsCount=a,this.totalRecordsCount=o,this.limitReached=s,this.emit(LA,i)},this.onDataBarsHandler=i=>{const{data:a=[]}=i;let o=0;this.cornerTreeService&&(o=this.cornerTreeService.getTreeChildLength()),this.dataBars=[...Array(o),...a],this.emit(PA,this.dataBars)},this.onRangeMinMaxHandler=i=>{const{data:a=[]}=i,o=this.getJaql(),s=la.getMetadataTree(o,De.MEASURES),u=ve.getChildren(s),c=[];u.forEach((d,h)=>{c[d.measureJaqlIndex||0]=a[h]}),this.rangeMinMax=c,this.emit(AA,this.rangeMinMax)},this.onDataFinishHandler=({rowsCount:i}={})=>{if(this.finishRequest(),this.rowsCount=i,this.tempDataChunks.length){const a=this.tempDataChunks[this.tempDataChunks.length-1];a.ready=!0}this.onDataHandlerThrottle(),this.checkLoadPromise(),this.emit(DA,{limitedRows:this.rowsCount,limitedColumns:this.columnsCount})},this.onErrorHandler=i=>{process.env.NODE_ENV!=="production"&&console.warn(`DataService data loading error "${JSON.stringify(i)}"`),!this.isLoadInProgress&&!this.isWholeDataLoaded&&!(i instanceof Hl)&&this.emit(kA,i)},this.loadService=t,this.events=r||new Pm,this.options=Object.assign(Object.assign({},FA),n),this.attachEvent(),this.onDataHandlerThrottle=this.options.throttle(()=>{const i=Iv(this.tempDataChunks,d=>d.ready&&!d.handled,this.lastReadyNotHandledChunkIndex);if(i===-1)return;this.lastReadyNotHandledChunkIndex=i;const a=this.tempDataChunks[i],o=this.preProcessTree(a.list,De.ROWS),s=this.modifyTree(o,De.ROWS);this.postProcessTree(s,{skipFormatEvent:!0}),this.postProcessData(s,{skipFormatEvent:!0});const u=ve.wrapInRootNode(s);this.rowsTreeService?this.rowsTreeService.extend(u):this.rowsTreeService=new gi(u,!0),this.emit(EA,this.getLoadedElementsCount()),a.handled=!0;const c=Iv(this.tempDataChunks,d=>!d.handled,this.lastNotHandledChunkIndex);if(c!==-1?(this.lastNotHandledChunkIndex=c,this.onDataHandlerThrottle()):this.isDataHandlerThrottled=!1,this.hasDataFinishEvent&&this.tempDataChunks.length){const d=this.tempDataChunks[this.tempDataChunks.length-1];d.ready=!0}this.hasDataFinishEvent&&c===-1?(this.finishRequest(),this.checkLoadPromise()):this.checkLoadPromise()},this.options.throttleTime)}destroy(){this.detachEvent(),this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.cornerTreeService=void 0,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.events.removeAllListeners()}on(t,r){this.events.on(t,r),this.triggeredEventsData[t]&&(this.triggeredEventsData[t].forEach(n=>{this.events.emit(t,...n)}),delete this.triggeredEventsData[t])}emit(t,...r){this.events.listeners(t).length===0?(this.triggeredEventsData[t]=this.triggeredEventsData[t]||[],this.triggeredEventsData[t].push(r)):this.events.emit(t,...r)}off(t,r){this.events.removeListener(t,r),this.triggeredEventsData[t]&&delete this.triggeredEventsData[t]}loadData(t,r){const{pageSize:n=Wv,isPaginated:i=!1,cacheResult:a=!1,metadata:o}=r||{},s=this.pageSize===n;if(this.clearLoadAllPromise(),t&&this.clearCache(),this.pageSize=n,this.isPaginated=i,this.emit(MA),this.loadPromiseCache&&s){const c=Promise.resolve(this.loadPromiseCache);return this.loadPromiseCache=void 0,c}this.isLoadInProgress=!0,t&&(this.metadata=o||[],this.rawJaql=uh(t,this.metadata),this.initPluginService(this.rawJaql),this.loadService.load(t).then(c=>{if(c==null)return;const d=!("data"in c);if(c.dataFinish[0]&&d)throw{error:{error:!0,details:"metadata undefined."}}}).catch(c=>{this.loadPromiseReject&&this.loadPromiseReject(c.error)}));const u=new Promise((c,d)=>{this.loadPromiseResolve=c,this.loadPromiseReject=d}).then(c=>this.sendInitPage(c)).then(c=>(a&&(this.loadPromiseCache=c),this.loadedPagesCount=1,c)).catch(c=>{throw c instanceof Hl&&this.clearLoadPromise(),c});return this.checkLoadPromise(),u}loadAllData(){if(this.isWholeDataLoaded){const t={loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax};return this.columnsCount!==0&&this.totalColumnsCount!==0&&(t.columnsCount=this.columnsCount,t.totalColumnsCount=this.totalColumnsCount),Promise.resolve(t)}return this.loadAllPromise||(this.loadAllPromise=new Promise((t,r)=>{this.loadAllPromiseResolve=t,this.loadAllPromiseReject=r}).then(()=>({loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax})).catch(t=>{throw t instanceof Hl&&this.clearLoadAllPromise(),t})),this.loadAllPromise}getSelectedPageData(t,r){return Promise.resolve(this.sendPaginatedPage(t,r))}getIndexedPageData(t,r,n=!1){return Promise.resolve(this.sendPartialPage(t,r,n))}getJaql(){return this.loadService.getJaql()||{metadata:[],grandTotals:null}}isSingleRowTree(){return this.loadService.isSingleRowTree()}setPluginHandlers(t){this.callPlugins=t}setGlobalStyles(t){this.globalStyles=t}getRawJaql(){return this.rawJaql||this.getJaql()}getMetadata(){return this.metadata.length>0?this.metadata:this.getJaql().metadata}preProcessTree(t,r,n){return No.preProcessTree(t,r,this.getJaql(),n)}postProcessTree(t,r){const n=(a,o,s)=>this.emit(ff,a,o,s,this.options),i=Object.assign(Object.assign({},r||{}),{emitFn:n});return No.postProcessTree(t,this.getRawJaql(),i)}postProcessData(t,r){const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1}=r||{},a=this.columnsTreeService?this.columnsTreeService.getLastLevelNodes():[],o=ve.getLastLevelNodes(t),s=this.getRawJaql();n||o.forEach(u=>{const c=un(u);a.forEach(d=>{const h=un(d),p=la.getMetadataPanelByIndex(s,h.measureJaqlIndex,De.MEASURES);if(typeof c.data!="undefined"&&typeof h.index!="undefined"){const{data:m=[]}=c,{index:v}=h,b=m[v],_=typeof b=="object"&&b!==null&&b!==void 0?b:{value:b};if(m[v]=_,i||!n){const{skipInternalColorFormatting:w=!1}=this.options;w||No.applyColorFormatting(_,c,h,p),this.emit(G_,_,c,h,p,s,this.options)}}})})}modifyTree(t,r,n){const i=this.getJaql();return No.modifyTree(t,r,i,{originalData:n,applyIndexDivergence:this.applyIndexDivergence.bind(this),subtotalsForSingleRow:this.options.subtotalsForSingleRow})}applyIndexDivergence(t){this.divergenceComparator=new $v(t,this.divergenceComparator)}initPluginService(t){this.pluginService=new this.options.PluginService(this.callPlugins,t,this.globalStyles)}cancelLoading(){const t=new Hl;this.loadPromiseReject&&typeof this.loadPromiseReject=="function"&&this.loadPromiseReject(t),this.loadAllPromiseReject&&typeof this.loadAllPromiseReject=="function"&&this.loadAllPromiseReject(t),this.detachEvent()}getPageSize(){return this.pageSize}sendInitPage(t){if(this.loadService.hasError()||!this.loadService.hasData())return gr.getEmptyPage();let r,n;const i=this.getPageSize();if(this.rowsTreeService){const s=i>t?t:i,u=gr.cloneTreeNode,c=this.rowsTreeService.getPartialTree(0,s,{cloneFn:u});this.rowsGrand&&c.push(cr(this.rowsGrand)),this.postProcessTree(c,{onlyFormatEvents:!0,iterateFn:ve.clearNodeCache}),this.postProcessData(c,{onlyFormatEvents:!0});const d=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,h=ve.wrapInRootNode(c);this.pluginService&&h&&h.children&&(this.pluginService.applyToRows(h.children),n=this.pluginService.metadataCache),r=new gi(h,!0,d),r.hasGrandTotals=!!this.rowsGrand}const a=this.isWholeDataLoaded&&i>=t;return{rowsTreeService:r,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:a,cellsMetadata:n}}sendPaginatedPage(t,r){if(this.loadService.hasError()||!this.loadService.hasData())return gr.getEmptyPage();r&&(this.pageSize=r);const n=this.getPageSize(),i=this.getLoadedElementsCount();if(t*n>=i)throw new Error("Selected page is out of elements range!");if(t<0)throw new Error("Selected page must be >= 0");let a,o;if(this.rowsTreeService){const s=t>=0?t*n:0,u=(t+1)*n>i?i:(t+1)*n,c=gr.cloneTreeNode,d=this.rowsTreeService.getPartialTree(s,u,{cloneFn:c});this.rowsGrand&&d.push(cr(this.rowsGrand)),this.postProcessTree(d,{onlyFormatEvents:!0,iterateFn:ve.clearNodeCache}),this.postProcessData(d,{onlyFormatEvents:!0});const h=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,p=ve.wrapInRootNode(d);this.pluginService&&p&&p.children&&(this.pluginService.applyToRows(p.children),o=this.pluginService.metadataCache),a=new gi(p,!0,h),a.hasGrandTotals=!!this.rowsGrand}return{rowsTreeService:a,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:o}}sendPartialPage(t,r,n){if(this.loadService.hasError()||!this.loadService.hasData())return gr.getEmptyPage();const i=this.getLoadedElementsCount();let[a,o]=[Math.min(t,r),Math.max(t,r)];a=a>=0?a:0,o=o>=0?o:0,o=o<i?o:i;let s,u;if(a>i)s=void 0;else{let c;if(this.rowsTreeService){const p=gr.cloneTreeNode;c=this.rowsTreeService.getPartialTree(a,o,{cloneFn:p}),n&&this.rowsGrand&&c.push(cr(this.rowsGrand)),this.postProcessTree(c,{onlyFormatEvents:!0,iterateFn:ve.clearNodeCache}),this.postProcessData(c,{onlyFormatEvents:!0})}const d=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,h=ve.wrapInRootNode(c);this.pluginService&&h&&h.children&&(this.pluginService.applyToRows(h.children),u=this.pluginService.metadataCache),s=new gi(h,!0,d),s.hasGrandTotals=!!(n&&this.rowsGrand)}return{rowsTreeService:s,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:u}}getLoadedElementsCount(){return this.rowsTreeService?this.rowsTreeService.getTreeChildLength():0}getTotalItemsCount(){return this.loadService.getTotalItemsCount()}getLoadedColumnsCount(){return this.columnsTreeService?this.columnsTreeService.getTreeChildLength():0}attachEvent(){this.loadService.listenerCount(Re.HEADERS)&&this.loadService.offAll(Re.HEADERS),this.loadService.on(Re.HEADERS,this.onHeadersHandler),this.loadService.on(Re.METADATA,this.onMetadataHandler),this.loadService.on(Re.DATA,this.onDataHandler),this.loadService.on(Re.GRAND,this.onGrandHandler),this.loadService.on(Re.DATA_FINISH,this.onDataFinishHandler),this.loadService.on(Re.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.on(Re.DATABARS,this.onDataBarsHandler),this.loadService.on(Re.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.on(Re.FINISH,this.onFinishHandler),this.loadService.on(Re.ERROR,this.onErrorHandler)}detachEvent(){this.loadService.off(Re.HEADERS,this.onHeadersHandler),this.loadService.off(Re.METADATA,this.onMetadataHandler),this.loadService.off(Re.DATA,this.onDataHandler),this.loadService.off(Re.GRAND,this.onGrandHandler),this.loadService.off(Re.DATA_FINISH,this.onDataFinishHandler),this.loadService.off(Re.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.off(Re.DATABARS,this.onDataBarsHandler),this.loadService.off(Re.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.off(Re.FINISH,this.onFinishHandler),this.loadService.off(Re.ERROR,this.onErrorHandler)}checkLoadPromise(){if(!this.isLoadInProgress)return;const t=this.getLoadedElementsCount();(t>=this.getPageSize()||this.isWholeDataLoaded)&&(this.isLoadInProgress=!1,typeof this.loadPromiseResolve=="function"&&(this.loadPromiseResolve(t),this.clearLoadPromise()))}clearLoadAllPromise(){this.loadAllPromise=void 0,this.loadAllPromiseReject=void 0,this.loadAllPromiseResolve=void 0}clearLoadPromise(){this.loadPromiseReject=void 0,this.loadPromiseResolve=void 0}finishRequest(){this.hasDataFinishEvent=!0,!this.isDataHandlerThrottled&&(this.isWholeDataLoaded=!0,this.loadAllPromiseResolve&&typeof this.loadAllPromiseResolve=="function"&&(this.loadAllPromiseResolve(),this.clearLoadAllPromise()))}clearCache(){this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.loadedPagesCount=0,this.hasDataFinishEvent=!1,this.isWholeDataLoaded=!1,this.isLoadInProgress=!1,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.isDataHandlerThrottled=!1}static getEmptyPage(){return{isLastPage:!0}}static fillDataChunks(t,r,n=jv,i=jv){const o=t.length<2?n:i;let s=t[Math.max(0,t.length-1)],u,c=!s;if(!r||typeof r.children=="undefined"&&typeof r.value=="undefined"&&r.data&&!r.data.length){s&&(s.ready=!0);return}if(s){const d=Math.max(0,s.list.length-1);u=s.list[d];const h=s.size?`${s.size}`:"0",m=parseInt(h,10)+(r.size||1);(s.handled||m>o&&!(u.isPart&&u.value===r.value))&&(c=!0)}r&&r.isPart&&u&&(!u.isPart||u.value!==r.value)&&(c=!0,u.value!==r.value&&(u=void 0)),c&&(s&&(s.ready=!0),s={list:[],size:0,ready:!1,handled:!1},t.push(s)),s&&(u&&u.isPart&&r&&r.isPart?(ve.deepMerge(u,r),s.size+=r.size||1):(s.list.push(r),s.size+=r.size||1))}static cloneTreeNode(t,r){const n=t,{children:i,isMapped:a,minLevel:o,childCount:s,childDeep:u,parent:c,master:d,data:h,state:p,style:m,store:v}=n,b=SA(n,["children","isMapped","minLevel","childCount","childDeep","parent","master","data","state","style","store"]),_=cr(b);return c&&(_.parent=c),d&&(_.master=d),h&&(_.data=cr(h)),p&&(_.state=cr(p)),m&&(_.style=cr(m)),v&&(_.store=cr(v)),!r&&i&&(_.children=i.map(w=>{const C=gr.cloneTreeNode(w);return C.parent=_,C})),_}static createColumnsTreeServiceBuilder(t,r){return n=>{const i=t.getJaql(),a=t.getRawJaql?t.getRawJaql():uh(i,i.metadata||[]),o=la.getMetadataTree(i,De.MEASURES),s=ve.getChildren(o),{preProcessTree:u,modifyTree:c,postProcessTree:d}=No;let h,p,m=0,v=0;if(ve.hasChildren(n)){n.columnsCount&&n.totalColumnsCount&&(m=n.columnsCount,v=n.totalColumnsCount);const b=u(n,De.COLUMNS,i),_=c(b,De.COLUMNS,i,{originalData:n,applyIndexDivergence:t.applyIndexDivergence});d(_,a,{emitFn:r&&r.emitHeaderCellFormatEvent});const w=ve.wrapInRootNode(_);t.pluginService&&w&&w.children&&t.pluginService.applyToColumns(w.children),h=w,p=new gi(w),s.length===1&&p.setValueNode(s[0])}else ve.hasChildren(o)?(n.columnsCount&&n.totalColumnsCount&&(m=n.columnsCount,v=n.totalColumnsCount),typeof n.maxChilds=="number"&&(m=n.maxChilds,o.children=ve.getChildren(o).filter((b,_)=>_<n.maxChilds)),t.pluginService&&o.children&&t.pluginService.applyToColumns(o.children),d(ve.getChildren(o),a,{emitFn:r&&r.emitHeaderCellFormatEvent}),h=o,p=new gi(o)):(t.pluginService&&t.pluginService.resetRowStartFrom(),h=void 0,p=void 0,m=0,v=0);return{columnsTree:h,columnsTreeService:p,columnsCount:m,totalColumnsCount:v}}}static createCornerTreeServiceBuilder(t,r){return()=>{const n=t.getJaql(),i=t.getRawJaql?t.getRawJaql():uh(n,n.metadata||[]),a=la.getMetadataTree(n,De.ROWS);let o;if(ve.hasChildren(a)){ve.iterateThroughTree(ve.getChildren(a),u=>{u.userType=Tt.CORNER;const c=la.getMetadataPanelByIndex(i,u.jaqlIndex,u.metadataType||"");r&&r.emitHeaderCellFormatEvent&&r.emitHeaderCellFormatEvent(u,c,i)});let s;t.columnsTreeService&&(s=t.columnsTreeService.getTreeDeepsLength()),t.pluginService&&t.pluginService.applyToHeaders(a),o=new gi(a,!1,s)}return{cornerTree:a,cornerTreeService:o}}}}const jl={INCLUDE:["metadata.$.jaql","metadata.$.field","metadata.$.panel","metadata.$.hierarchies","metadata.$.format","metadata.$.disabled","metadata.$.distinctTotals"],EXCLUDE:["metadata.$.jaql.title","metadata.$.format.mask","metadata.$.format.width","queryGuid","widget","dashboard","grandTotals.title"]};class $A{constructor(t){this.jaql=void 0,this.data=void 0,this.isLoadInProgress=!1,this.loadPromiseResolve=void 0,this.loadPromiseReject=void 0,this.loadFromCacheState=void 0,this.loadFromCacheInitialTimer=void 0,this.loadFromCacheTimer=void 0,this.isSingleBranchTree=!1,this.loadedItemsCount=0,this.totalItemsCount=0,this.isLimited=!1,this.isFinishEventReceived=!1,this.events=t||new Pm}destroy(){this.data=void 0,this.events.removeAllListeners()}clone(){throw new Error('"AbstractDataLoadService.clone" should be overridden in subclass')}load(t){if(!t)throw new Error('AbstractDataLoadService "jaql" is not defined for "load" method');const r=!!this.data,n=this.jaql;this.jaql=t,r&&n&&(this.jaql.queryGuid=n.queryGuid),this.isLoadInProgress=!0;const i=new Promise((a,o)=>{this.loadPromiseResolve=a,this.loadPromiseReject=o});this.loadFromCacheInitialTimer&&clearTimeout(this.loadFromCacheInitialTimer);try{r?this.loadFromCache():this.loadFromServer()}catch(a){this.notifyAboutDataError(a)}return i}clear(){this.data=void 0}getJaql(){return this.jaql}isSingleRowTree(){return this.isSingleBranchTree}getTotalItemsCount(){return this.totalItemsCount}isFormattingChanges(t){const r=cr(this.jaql,{include:jl.INCLUDE,exclude:jl.EXCLUDE,excludeEmpty:!0}),n=cr(t,{include:jl.INCLUDE,exclude:jl.EXCLUDE,excludeEmpty:!0});return[...(r==null?void 0:r.metadata)||[],...(n==null?void 0:n.metadata)||[]].forEach(i=>{i&&i.panel===De.SCOPE&&delete i.field}),JSON.stringify(r)===JSON.stringify(n)}hasData(){return!!(this.data&&this.data[Re.DATA])}hasError(){return this.data?!!this.data[Re.ERROR]:!1}loadFromServer(){throw new Error('"AbstractDataLoadService.loadFromServer" should be overridden in subclass')}cancelQuery(){const t=new Error('"AbstractDataLoadService.cancelQuery" should be overridden in subclass.');return Promise.reject(t)}isCancelQueryNeeded(){return!this.isFinishEventReceived}loadFromCache(){return Promise.resolve().then(()=>(this.loadFromCacheInitialTimer&&clearTimeout(this.loadFromCacheInitialTimer),new Promise(t=>{this.loadFromCacheInitialTimer=setTimeout(t)}))).then(()=>new Promise(t=>{this.loadFromCacheTimer&&clearImmediate(this.loadFromCacheTimer),this.loadFromCacheState=void 0,this.loadMessageFromCache(()=>{this.loadFromCacheState=void 0,this.loadFromCacheTimer&&clearImmediate(this.loadFromCacheTimer),t()})}))}loadMessageFromCache(t){this.loadFromCacheState=this.loadFromCacheState||{};const r=this.loadFromCacheState;let n="",i=0;if(V4.forEach(a=>{if(n)return;r[a]=r[a]||0,r[a]<((this.data||{})[a]||[]).length&&(n=a,i=r[a])}),n){const a=((this.data||{})[n]||[])[i];this.notifyAboutDataChunk(n||"",a,!0),r[n]=i+1,this.loadMessageFromCache(t)}else t&&t()}cacheData(t,r){this.data=this.data||{};const n=this.data;n&&(n[t]=n[t]||[],n[t].push(r||!0))}notifyAboutDataChunk(t,r,n=!1){const i=r&&r.data&&t===Re.DATA?r.data:r;if(n||this.cacheData(t,r),!n&&this.loadFromCacheState)return;t===Re.METADATA&&(this.isSingleBranchTree=!!(i&&i.isSingleBranchTree)),t===Re.ERROR&&this.notifyAboutDataError(i),t===Re.DATA_FINISH&&(this.loadedItemsCount=i?i.rowsCount:0,this.notifyAboutDataLoaded(this.data)),t===Re.TOTAL_ROWS&&(this.totalItemsCount=i?i.rowsCount:0,this.totalItemsCount!==this.loadedItemsCount&&(this.isLimited=!0)),t===Re.FINISH&&(this.isFinishEventReceived=!0);const a=cr(i);this.events.emit(t,a)}notifyAboutDataLoaded(t){this.isLoadInProgress&&(this.isLoadInProgress=!1,typeof this.loadPromiseResolve=="function"&&this.loadPromiseResolve(t),this.loadPromiseReject=void 0,this.loadPromiseResolve=void 0)}notifyAboutDataError(t){this.isLoadInProgress&&(this.isLoadInProgress=!1,typeof this.loadPromiseReject=="function"&&this.loadPromiseReject(t),this.loadPromiseReject=void 0,this.loadPromiseResolve=void 0)}on(t,r){this.events.on(t,r)}off(t,r){this.events.removeListener(t,r)}offAll(t){this.events.removeAllListeners(t)}listenerCount(t){return this.events.listenerCount(t)}emit(t,...r){this.events.emit(t,...r)}}class km extends $A{constructor(t,r){if(super(r),this.initPromise=void 0,this.isInitInProgress=!1,this.onMessageCancel=void 0,this.onSocketError=n=>{this.emit("error",{error:!0,type:500,details:`Socket error: ${n.message}`})},this.onSocketDisconnect=()=>{this.emit("error",{error:!0,type:500,details:"Socket disconnected"})},!t)throw new Error('DataLoadService "socket" not defined.');this.socket=t,this.socket.on("error",this.onSocketError),this.socket.on("disconnect",this.onSocketDisconnect),this.on(Re.ERROR,n=>{const i=JSON.stringify(n,null,4);process.env.NODE_ENV!=="production"&&console.warn(`DataLoadService error message:
4
- ${i}`)})}destroy(){super.destroy(),this.onMessageCancel&&(this.onMessageCancel(),this.onMessageCancel=void 0),this.socket.off("error",this.onSocketError),this.socket.off("disconnect",this.onSocketDisconnect)}clone(){const t=cr(this.data);t[Re.HEADERS]||(t[Re.HEADERS]=[{}]);const r=new km(this.socket);return r.data=t,r.jaql=this.jaql,r.isFinishEventReceived=this.isFinishEventReceived,r.isSingleBranchTree=this.isSingleBranchTree,r.loadedItemsCount=this.loadedItemsCount,r.totalItemsCount=this.totalItemsCount,r.isLimited=this.isLimited,r}loadFromServer(){this.waitForSocketReady().then(()=>{this.onMessageCancel&&this.onMessageCancel(),this.onMessageCancel=this.socket.onMessage(void 0,void 0,(t,r)=>{this.notifyAboutDataChunk(t,r)}),this.socket.send("pivot",this.jaql)})}cancelQuery(){return this.isCancelQueryNeeded()?this.waitForSocketReady().then(()=>{this.socket.send("pivot/cancel-query",{queryGuid:this.jaql&&this.jaql.queryGuid})}):Promise.resolve()}waitForSocketReady(){return this.socket.isReady()?Promise.resolve():this.isInitInProgress&&this.initPromise?this.initPromise:(this.isInitInProgress=!0,this.initPromise=new Promise((t,r)=>{this.socket.on("open",()=>{this.socket&&this.socket.isReady()?t():r(new Error("Can not open WebSocket connection"))})}),this.initPromise)}}class BA extends km{constructor(t,r,n={}){super(t,r),this.onMessageCancels=[],this.options=n}destroy(){super.destroy(),this.onMessageCancels.length&&(this.onMessageCancels.forEach(t=>{t&&t()}),this.onMessageCancels.length=0)}loadFromServer(){this.waitForSocketReady().then(()=>{const t=Object.assign({queryGuid:U.v4()},this.jaql),{queryGuid:r}=t;this.onMessageCancels.length&&(this.onMessageCancels.forEach(n=>{n&&n()}),this.onMessageCancels.length=0),Object.values(Re).forEach(n=>{const i=this.socket.onMessage(n,r,(a,o)=>{this.notifyAboutDataChunk(a,o)});this.onMessageCancels.push(i)}),this.socket.send("pivot",t)})}waitForSocketReady(){return this.socket.isReady()?Promise.resolve():new Promise(t=>{const{socketRegisterCheckInterval:r=100}=this.options;this.registrationWaitTimer&&clearInterval(this.registrationWaitTimer);const n=()=>{this.socket.isReady()&&(clearInterval(this.registrationWaitTimer),t())};this.registrationWaitTimer=setInterval(n,r)})}}var pf={exports:{}},zA=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,HA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q_=function(t){var r=t,n=t.indexOf("["),i=t.indexOf("]");n!=-1&&i!=-1&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));for(var a=zA.exec(t||""),o={},s=14;s--;)o[HA[s]]=a[s]||"";return n!=-1&&i!=-1&&(o.source=r,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=WA(o,o.path),o.queryKey=jA(o,o.query),o};function WA(e,t){var r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function jA(e,t){var r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}var mf={exports:{}},gf={exports:{}},fs=1e3,ps=fs*60,ms=ps*60,gs=ms*24,UA=gs*365.25,VA=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return GA(e);if(r==="number"&&isNaN(e)===!1)return t.long?YA(e):qA(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function GA(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*UA;case"days":case"day":case"d":return r*gs;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ms;case"minutes":case"minute":case"mins":case"min":case"m":return r*ps;case"seconds":case"second":case"secs":case"sec":case"s":return r*fs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function qA(e){return e>=gs?Math.round(e/gs)+"d":e>=ms?Math.round(e/ms)+"h":e>=ps?Math.round(e/ps)+"m":e>=fs?Math.round(e/fs)+"s":e+"ms"}function YA(e){return Ul(e,gs,"day")||Ul(e,ms,"hour")||Ul(e,ps,"minute")||Ul(e,fs,"second")||e+" ms"}function Ul(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=u,t.disable=o,t.enable=a,t.enabled=s,t.humanize=VA,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(c){var d=0,h;for(h in c)d=(d<<5)-d+c.charCodeAt(h),d|=0;return t.colors[Math.abs(d)%t.colors.length]}function n(c){var d;function h(){if(h.enabled){var p=h,m=+new Date,v=m-(d||m);p.diff=v,p.prev=d,p.curr=m,d=m;for(var b=new Array(arguments.length),_=0;_<b.length;_++)b[_]=arguments[_];b[0]=t.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");var w=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,function(S,T){if(S==="%%")return S;w++;var M=t.formatters[T];if(typeof M=="function"){var E=b[w];S=M.call(p,E),b.splice(w,1),w--}return S}),t.formatArgs.call(p,b);var C=h.log||t.log||console.log.bind(console);C.apply(p,b)}}return h.namespace=c,h.enabled=t.enabled(c),h.useColors=t.useColors(),h.color=r(c),h.destroy=i,typeof t.init=="function"&&t.init(h),t.instances.push(h),h}function i(){var c=t.instances.indexOf(this);return c!==-1?(t.instances.splice(c,1),!0):!1}function a(c){t.save(c),t.names=[],t.skips=[];var d,h=(typeof c=="string"?c:"").split(/[\s,]+/),p=h.length;for(d=0;d<p;d++)h[d]&&(c=h[d].replace(/\*/g,".*?"),c[0]==="-"?t.skips.push(new RegExp("^"+c.substr(1)+"$")):t.names.push(new RegExp("^"+c+"$")));for(d=0;d<t.instances.length;d++){var m=t.instances[d];m.enabled=t.enabled(m.namespace)}}function o(){t.enable("")}function s(c){if(c[c.length-1]==="*")return!0;var d,h;for(d=0,h=t.skips.length;d<h;d++)if(t.skips[d].test(c))return!1;for(d=0,h=t.names.length;d<h;d++)if(t.names[d].test(c))return!0;return!1}function u(c){return c instanceof Error?c.stack||c.message:c}})(gf,gf.exports);var XA=gf.exports;(function(e,t){t=e.exports=XA,t.log=i,t.formatArgs=n,t.save=a,t.load=o,t.useColors=r,t.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:s(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function n(u){var c=this.useColors;if(u[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+u[0]+(c?"%c ":" ")+"+"+t.humanize(this.diff),!!c){var d="color: "+this.color;u.splice(1,0,d,"color: inherit");var h=0,p=0;u[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(h++,m==="%c"&&(p=h))}),u.splice(p,0,d)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(u){try{u==null?t.storage.removeItem("debug"):t.storage.debug=u}catch(c){}}function o(){var u;try{u=t.storage.debug}catch(c){}return!u&&typeof process!="undefined"&&"env"in process&&(u=process.env.DEBUG),u}t.enable(o());function s(){try{return window.localStorage}catch(u){}}})(mf,mf.exports);var Cc=mf.exports,ZA=q_,Uv=Cc("socket.io-client:url"),KA=QA;function QA(e,t){var r=e;t=t||typeof location!="undefined"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(Uv("protocol-less url %s",e),typeof t!="undefined"?e=t.protocol+"//"+e:e="https://"+e),Uv("parse %s",e),r=ZA(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var n=r.host.indexOf(":")!==-1,i=n?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port,r.href=r.protocol+"://"+i+(t&&t.port===r.port?"":":"+r.port),r}var xc={},vf={exports:{}},ch,Vv;function JA(){if(Vv)return ch;Vv=1;var e=1e3,t=e*60,r=t*60,n=r*24,i=n*7,a=n*365.25;ch=function(d,h){h=h||{};var p=typeof d;if(p==="string"&&d.length>0)return o(d);if(p==="number"&&isFinite(d))return h.long?u(d):s(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function o(d){if(d=String(d),!(d.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(h){var p=parseFloat(h[1]),m=(h[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return p*a;case"weeks":case"week":case"w":return p*i;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*r;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(d){var h=Math.abs(d);return h>=n?Math.round(d/n)+"d":h>=r?Math.round(d/r)+"h":h>=t?Math.round(d/t)+"m":h>=e?Math.round(d/e)+"s":d+"ms"}function u(d){var h=Math.abs(d);return h>=n?c(d,h,n,"day"):h>=r?c(d,h,r,"hour"):h>=t?c(d,h,t,"minute"):h>=e?c(d,h,e,"second"):d+" ms"}function c(d,h,p,m){var v=h>=p*1.5;return Math.round(d/p)+" "+m+(v?"s":"")}return ch}function e5(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=a,r.enabled=s,r.humanize=JA(),Object.keys(e).forEach(d=>{r[d]=e[d]}),r.instances=[],r.names=[],r.skips=[],r.formatters={};function t(d){let h=0;for(let p=0;p<d.length;p++)h=(h<<5)-h+d.charCodeAt(p),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=t;function r(d){let h;function p(...m){if(!p.enabled)return;const v=p,b=Number(new Date),_=b-(h||b);v.diff=_,v.prev=h,v.curr=b,h=b,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let w=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,T)=>{if(S==="%%")return S;w++;const M=r.formatters[T];if(typeof M=="function"){const E=m[w];S=M.call(v,E),m.splice(w,1),w--}return S}),r.formatArgs.call(v,m),(v.log||r.log).apply(v,m)}return p.namespace=d,p.enabled=r.enabled(d),p.useColors=r.useColors(),p.color=t(d),p.destroy=n,p.extend=i,typeof r.init=="function"&&r.init(p),r.instances.push(p),p}function n(){const d=r.instances.indexOf(this);return d!==-1?(r.instances.splice(d,1),!0):!1}function i(d,h){const p=r(this.namespace+(typeof h=="undefined"?":":h)+d);return p.log=this.log,p}function a(d){r.save(d),r.names=[],r.skips=[];let h;const p=(typeof d=="string"?d:"").split(/[\s,]+/),m=p.length;for(h=0;h<m;h++)p[h]&&(d=p[h].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.substr(1)+"$")):r.names.push(new RegExp("^"+d+"$")));for(h=0;h<r.instances.length;h++){const v=r.instances[h];v.enabled=r.enabled(v.namespace)}}function o(){const d=[...r.names.map(u),...r.skips.map(u).map(h=>"-"+h)].join(",");return r.enable(""),d}function s(d){if(d[d.length-1]==="*")return!0;let h,p;for(h=0,p=r.skips.length;h<p;h++)if(r.skips[h].test(d))return!1;for(h=0,p=r.names.length;h<p;h++)if(r.names[h].test(d))return!0;return!1}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function c(d){return d instanceof Error?d.stack||d.message:d}return r.enable(r.load()),r}var t5=e5;(function(e,t){t.log=i,t.formatArgs=n,t.save=a,t.load=o,t.useColors=r,t.storage=s(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;c.splice(1,0,d,"color: inherit");let h=0,p=0;c[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(h++,m==="%c"&&(p=h))}),c.splice(p,0,d)}function i(...c){return typeof console=="object"&&console.log&&console.log(...c)}function a(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch(d){}}function o(){let c;try{c=t.storage.getItem("debug")}catch(d){}return!c&&typeof process!="undefined"&&"env"in process&&(c=process.env.DEBUG),c}function s(){try{return localStorage}catch(c){}}e.exports=t5(t);const{formatters:u}=e.exports;u.j=function(c){try{return JSON.stringify(c)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(vf,vf.exports);var r5=vf.exports,Y_={exports:{}};(function(e){e.exports=t;function t(n){if(n)return r(n)}function r(n){for(var i in t.prototype)n[i]=t.prototype[i];return n}t.prototype.on=t.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},t.prototype.once=function(n,i){function a(){this.off(n,a),i.apply(this,arguments)}return a.fn=i,this.on(n,a),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+n];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};var i=[].slice.call(arguments,1),a=this._callbacks["$"+n];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(Y_);var n5=Y_.exports,Tc={},i5={}.toString,X_=Array.isArray||function(e){return i5.call(e)=="[object Array]"},Z_=l5,a5=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",o5=typeof ArrayBuffer=="function",s5=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function l5(e){return a5&&Buffer.isBuffer(e)||o5&&(e instanceof ArrayBuffer||s5(e))}var Lm=X_,K_=Z_,Q_=Object.prototype.toString,u5=typeof Blob=="function"||typeof Blob!="undefined"&&Q_.call(Blob)==="[object BlobConstructor]",c5=typeof File=="function"||typeof File!="undefined"&&Q_.call(File)==="[object FileConstructor]";Tc.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=yf(r,t),n.attachments=t.length,{packet:n,buffers:t}};function yf(e,t){if(!e)return e;if(K_(e)){var r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Lm(e)){for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]=yf(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){var n={};for(var a in e)n[a]=yf(e[a],t);return n}return e}Tc.reconstructPacket=function(e,t){return e.data=bf(e.data,t),e.attachments=void 0,e};function bf(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(Lm(e))for(var r=0;r<e.length;r++)e[r]=bf(e[r],t);else if(typeof e=="object")for(var n in e)e[n]=bf(e[n],t);return e}Tc.removeBlobs=function(e,t){function r(a,o,s){if(!a)return a;if(u5&&a instanceof Blob||c5&&a instanceof File){n++;var u=new FileReader;u.onload=function(){s?s[o]=this.result:i=this.result,--n||t(i)},u.readAsArrayBuffer(a)}else if(Lm(a))for(var c=0;c<a.length;c++)r(a[c],c,a);else if(typeof a=="object"&&!K_(a))for(var d in a)r(a[d],d,a)}var n=0,i=e;r(i),n||t(i)};(function(e){var t=r5("socket.io-parser"),r=n5,n=Tc,i=X_,a=Z_;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=o,e.Decoder=h;function o(){}var s=e.ERROR+'"encode error"';o.prototype.encode=function(_,w){if(t("encoding packet %j",_),e.BINARY_EVENT===_.type||e.BINARY_ACK===_.type)d(_,w);else{var C=u(_);w([C])}};function u(_){var w=""+_.type;if((e.BINARY_EVENT===_.type||e.BINARY_ACK===_.type)&&(w+=_.attachments+"-"),_.nsp&&_.nsp!=="/"&&(w+=_.nsp+","),_.id!=null&&(w+=_.id),_.data!=null){var C=c(_.data);if(C!==!1)w+=C;else return s}return t("encoded %j as %s",_,w),w}function c(_){try{return JSON.stringify(_)}catch(w){return!1}}function d(_,w){function C(S){var T=n.deconstructPacket(S),M=u(T.packet),E=T.buffers;E.unshift(M),w(E)}n.removeBlobs(_,C)}function h(){this.reconstructor=null}r(h.prototype),h.prototype.add=function(_){var w;if(typeof _=="string")w=p(_),e.BINARY_EVENT===w.type||e.BINARY_ACK===w.type?(this.reconstructor=new v(w),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",w)):this.emit("decoded",w);else if(a(_)||_.base64)if(this.reconstructor)w=this.reconstructor.takeBinaryData(_),w&&(this.reconstructor=null,this.emit("decoded",w));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+_)};function p(_){var w=0,C={type:Number(_.charAt(0))};if(e.types[C.type]==null)return b("unknown packet type "+C.type);if(e.BINARY_EVENT===C.type||e.BINARY_ACK===C.type){for(var S=w+1;_.charAt(++w)!=="-"&&w!=_.length;);var T=_.substring(S,w);if(T!=Number(T)||_.charAt(w)!=="-")throw new Error("Illegal attachments");C.attachments=Number(T)}if(_.charAt(w+1)==="/"){for(var S=w+1;++w;){var M=_.charAt(w);if(M===","||w===_.length)break}C.nsp=_.substring(S,w)}else C.nsp="/";var E=_.charAt(w+1);if(E!==""&&Number(E)==E){for(var S=w+1;++w;){var M=_.charAt(w);if(M==null||Number(M)!=M){--w;break}if(w===_.length)break}C.id=Number(_.substring(S,w+1))}if(_.charAt(++w)){var D=m(_.substr(w)),N=D!==!1&&(C.type===e.ERROR||i(D));if(N)C.data=D;else return b("invalid payload")}return t("decoded %s as %j",_,C),C}function m(_){try{return JSON.parse(_)}catch(w){return!1}}h.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function v(_){this.reconPack=_,this.buffers=[]}v.prototype.takeBinaryData=function(_){if(this.buffers.push(_),this.buffers.length===this.reconPack.attachments){var w=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),w}return null},v.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function b(_){return{type:e.ERROR,data:"parser error: "+_}}})(xc);var Om={exports:{}},Sc={},_f={exports:{}};try{_f.exports=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){_f.exports=!1}var d5=_f.exports,Im=function(){return typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")()}(),h5=d5,f5=Im,Fm=function(e){var t=e.xdomain,r=e.xscheme,n=e.enablesXDR;try{if(typeof XMLHttpRequest!="undefined"&&(!t||h5))return new XMLHttpRequest}catch(i){}try{if(typeof XDomainRequest!="undefined"&&!r&&n)return new XDomainRequest}catch(i){}if(!t)try{return new f5[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(i){}},$m={exports:{}},Hi={},p5=Object.keys||function(t){var r=[],n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&r.push(i);return r},m5={}.toString,g5=Array.isArray||function(e){return m5.call(e)=="[object Array]"},v5=g5,J_=Object.prototype.toString,y5=typeof Blob=="function"||typeof Blob!="undefined"&&J_.call(Blob)==="[object BlobConstructor]",b5=typeof File=="function"||typeof File!="undefined"&&J_.call(File)==="[object FileConstructor]",ew=xu;function xu(e){if(!e||typeof e!="object")return!1;if(v5(e)){for(var t=0,r=e.length;t<r;t++)if(xu(e[t]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||y5&&e instanceof Blob||b5&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}var _5=function(e,t,r){var n=e.byteLength;if(t=t||0,r=r||n,e.slice)return e.slice(t,r);if(t<0&&(t+=n),r<0&&(r+=n),r>n&&(r=n),t>=n||t>=r||n===0)return new ArrayBuffer(0);for(var i=new Uint8Array(e),a=new Uint8Array(r-t),o=t,s=0;o<r;o++,s++)a[s]=i[o];return a.buffer},w5=C5;function C5(e,t,r){var n=!1;return r=r||x5,i.count=e,e===0?t():i;function i(a,o){if(i.count<=0)throw new Error("after called too many times");--i.count,a?(n=!0,t(a),t=r):i.count===0&&!n&&t(null,o)}}function x5(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Gn=String.fromCharCode;function tw(e){for(var t=[],r=0,n=e.length,i,a;r<n;)i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n?(a=e.charCodeAt(r++),(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),r--)):t.push(i);return t}function T5(e){for(var t=e.length,r=-1,n,i="";++r<t;)n=e[r],n>65535&&(n-=65536,i+=Gn(n>>>10&1023|55296),n=56320|n&1023),i+=Gn(n);return i}function rw(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function dh(e,t){return Gn(e>>t&63|128)}function S5(e,t){if(!(e&4294967168))return Gn(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=Gn(e>>18&7|240),r+=dh(e,12),r+=dh(e,6)):(rw(e,t)||(e=65533),r=Gn(e>>12&15|224),r+=dh(e,6)):r=Gn(e>>6&31|192),r+=Gn(e&63|128),r}function M5(e,t){t=t||{};for(var r=t.strict!==!1,n=tw(e),i=n.length,a=-1,o,s="";++a<i;)o=n[a],s+=S5(o,r);return s}function ua(){if(Xn>=Wu)throw Error("Invalid byte index");var e=Hu[Xn]&255;if(Xn++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function E5(e){var t,r,n,i,a;if(Xn>Wu)throw Error("Invalid byte index");if(Xn==Wu)return!1;if(t=Hu[Xn]&255,Xn++,!(t&128))return t;if((t&224)==192){if(r=ua(),a=(t&31)<<6|r,a>=128)return a;throw Error("Invalid continuation byte")}if((t&240)==224){if(r=ua(),n=ua(),a=(t&15)<<12|r<<6|n,a>=2048)return rw(a,e)?a:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(r=ua(),n=ua(),i=ua(),a=(t&7)<<18|r<<12|n<<6|i,a>=65536&&a<=1114111))return a;throw Error("Invalid UTF-8 detected")}var Hu,Wu,Xn;function P5(e,t){t=t||{};var r=t.strict!==!1;Hu=tw(e),Wu=Hu.length,Xn=0;for(var n=[],i;(i=E5(r))!==!1;)n.push(i);return T5(n)}var A5={version:"2.1.2",encode:M5,decode:P5},Vl={},Gv;function R5(){return Gv||(Gv=1,function(e){Vl.encode=function(t){var r=new Uint8Array(t),n,i=r.length,a="";for(n=0;n<i;n+=3)a+=e[r[n]>>2],a+=e[(r[n]&3)<<4|r[n+1]>>4],a+=e[(r[n+1]&15)<<2|r[n+2]>>6],a+=e[r[n+2]&63];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},Vl.decode=function(t){var r=t.length*.75,n=t.length,i,a=0,o,s,u,c;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);var d=new ArrayBuffer(r),h=new Uint8Array(d);for(i=0;i<n;i+=4)o=e.indexOf(t[i]),s=e.indexOf(t[i+1]),u=e.indexOf(t[i+2]),c=e.indexOf(t[i+3]),h[a++]=o<<2|s>>4,h[a++]=(s&15)<<4|u>>2,h[a++]=(u&3)<<6|c&63;return d}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),Vl}var hh,qv;function D5(){if(qv)return hh;qv=1;var e=typeof e!="undefined"?e:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:!1,t=function(){try{var s=new Blob(["hi"]);return s.size===2}catch(u){return!1}}(),r=t&&function(){try{var s=new Blob([new Uint8Array([1,2])]);return s.size===2}catch(u){return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function i(s){return s.map(function(u){if(u.buffer instanceof ArrayBuffer){var c=u.buffer;if(u.byteLength!==c.byteLength){var d=new Uint8Array(u.byteLength);d.set(new Uint8Array(c,u.byteOffset,u.byteLength)),c=d.buffer}return c}return u})}function a(s,u){u=u||{};var c=new e;return i(s).forEach(function(d){c.append(d)}),u.type?c.getBlob(u.type):c.getBlob()}function o(s,u){return new Blob(i(s),u||{})}return typeof Blob!="undefined"&&(a.prototype=Blob.prototype,o.prototype=Blob.prototype),hh=function(){return t?r?Blob:o:n?a:void 0}(),hh}(function(e){var t=p5,r=ew,n=_5,i=w5,a=A5,o;typeof ArrayBuffer!="undefined"&&(o=R5());var s=typeof navigator!="undefined"&&/Android/i.test(navigator.userAgent),u=typeof navigator!="undefined"&&/PhantomJS/i.test(navigator.userAgent),c=s||u;e.protocol=3;var d=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=t(d),p={type:"error",data:"parser error"},m=D5();e.encodePacket=function(T,M,E,D){typeof M=="function"&&(D=M,M=!1),typeof E=="function"&&(D=E,E=null);var N=T.data===void 0?void 0:T.data.buffer||T.data;if(typeof ArrayBuffer!="undefined"&&N instanceof ArrayBuffer)return b(T,M,D);if(typeof m!="undefined"&&N instanceof m)return w(T,M,D);if(N&&N.base64)return v(T,D);var F=d[T.type];return T.data!==void 0&&(F+=E?a.encode(String(T.data),{strict:!1}):String(T.data)),D(""+F)};function v(T,M){var E="b"+e.packets[T.type]+T.data.data;return M(E)}function b(T,M,E){if(!M)return e.encodeBase64Packet(T,E);var D=T.data,N=new Uint8Array(D),F=new Uint8Array(1+D.byteLength);F[0]=d[T.type];for(var B=0;B<N.length;B++)F[B+1]=N[B];return E(F.buffer)}function _(T,M,E){if(!M)return e.encodeBase64Packet(T,E);var D=new FileReader;return D.onload=function(){e.encodePacket({type:T.type,data:D.result},M,!0,E)},D.readAsArrayBuffer(T.data)}function w(T,M,E){if(!M)return e.encodeBase64Packet(T,E);if(c)return _(T,M,E);var D=new Uint8Array(1);D[0]=d[T.type];var N=new m([D.buffer,T.data]);return E(N)}e.encodeBase64Packet=function(T,M){var E="b"+e.packets[T.type];if(typeof m!="undefined"&&T.data instanceof m){var D=new FileReader;return D.onload=function(){var Y=D.result.split(",")[1];M(E+Y)},D.readAsDataURL(T.data)}var N;try{N=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch(Y){for(var F=new Uint8Array(T.data),B=new Array(F.length),G=0;G<F.length;G++)B[G]=F[G];N=String.fromCharCode.apply(null,B)}return E+=btoa(N),M(E)},e.decodePacket=function(T,M,E){if(T===void 0)return p;if(typeof T=="string"){if(T.charAt(0)==="b")return e.decodeBase64Packet(T.substr(1),M);if(E&&(T=C(T),T===!1))return p;var N=T.charAt(0);return Number(N)!=N||!h[N]?p:T.length>1?{type:h[N],data:T.substring(1)}:{type:h[N]}}var D=new Uint8Array(T),N=D[0],F=n(T,1);return m&&M==="blob"&&(F=new m([F])),{type:h[N],data:F}};function C(T){try{T=a.decode(T,{strict:!1})}catch(M){return!1}return T}e.decodeBase64Packet=function(T,M){var E=h[T.charAt(0)];if(!o)return{type:E,data:{base64:!0,data:T.substr(1)}};var D=o.decode(T.substr(1));return M==="blob"&&m&&(D=new m([D])),{type:E,data:D}},e.encodePayload=function(T,M,E){typeof M=="function"&&(E=M,M=null);var D=r(T);if(M&&D)return m&&!c?e.encodePayloadAsBlob(T,E):e.encodePayloadAsArrayBuffer(T,E);if(!T.length)return E("0:");function N(B){return B.length+":"+B}function F(B,G){e.encodePacket(B,D?M:!1,!1,function(Y){G(null,N(Y))})}S(T,F,function(B,G){return E(G.join(""))})};function S(T,M,E){for(var D=new Array(T.length),N=i(T.length,E),F=function(G,Y,$){M(Y,function(X,V){D[G]=V,$(X,D)})},B=0;B<T.length;B++)F(B,T[B],N)}e.decodePayload=function(T,M,E){if(typeof T!="string")return e.decodePayloadAsBinary(T,M,E);typeof M=="function"&&(E=M,M=null);var D;if(T==="")return E(p,0,1);for(var N="",F,B,G=0,Y=T.length;G<Y;G++){var $=T.charAt(G);if($!==":"){N+=$;continue}if(N===""||N!=(F=Number(N))||(B=T.substr(G+1,F),N!=B.length))return E(p,0,1);if(B.length){if(D=e.decodePacket(B,M,!1),p.type===D.type&&p.data===D.data)return E(p,0,1);var X=E(D,G+F,Y);if(X===!1)return}G+=F,N=""}if(N!=="")return E(p,0,1)},e.encodePayloadAsArrayBuffer=function(T,M){if(!T.length)return M(new ArrayBuffer(0));function E(D,N){e.encodePacket(D,!0,!0,function(F){return N(null,F)})}S(T,E,function(D,N){var F=N.reduce(function(Y,$){var X;return typeof $=="string"?X=$.length:X=$.byteLength,Y+X.toString().length+X+2},0),B=new Uint8Array(F),G=0;return N.forEach(function(Y){var $=typeof Y=="string",X=Y;if($){for(var j=new Uint8Array(Y.length),V=0;V<Y.length;V++)j[V]=Y.charCodeAt(V);X=j.buffer}$?B[G++]=0:B[G++]=1;for(var Z=X.byteLength.toString(),V=0;V<Z.length;V++)B[G++]=parseInt(Z[V]);B[G++]=255;for(var j=new Uint8Array(X),V=0;V<j.length;V++)B[G++]=j[V]}),M(B.buffer)})},e.encodePayloadAsBlob=function(T,M){function E(D,N){e.encodePacket(D,!0,!0,function(F){var B=new Uint8Array(1);if(B[0]=1,typeof F=="string"){for(var G=new Uint8Array(F.length),Y=0;Y<F.length;Y++)G[Y]=F.charCodeAt(Y);F=G.buffer,B[0]=0}for(var $=F instanceof ArrayBuffer?F.byteLength:F.size,X=$.toString(),V=new Uint8Array(X.length+1),Y=0;Y<X.length;Y++)V[Y]=parseInt(X[Y]);if(V[X.length]=255,m){var Z=new m([B.buffer,V.buffer,F]);N(null,Z)}})}S(T,E,function(D,N){return M(new m(N))})},e.decodePayloadAsBinary=function(T,M,E){typeof M=="function"&&(E=M,M=null);for(var D=T,N=[];D.byteLength>0;){for(var F=new Uint8Array(D),B=F[0]===0,G="",Y=1;F[Y]!==255;Y++){if(G.length>310)return E(p,0,1);G+=F[Y]}D=n(D,2+G.length),G=parseInt(G);var $=n(D,0,G);if(B)try{$=String.fromCharCode.apply(null,new Uint8Array($))}catch(Z){var X=new Uint8Array($);$="";for(var Y=0;Y<X.length;Y++)$+=String.fromCharCode(X[Y])}N.push($),D=n(D,G)}var V=N.length;N.forEach(function(Z,j){E(e.decodePacket(Z,M,!0),j,V)})}})(Hi);var nw={exports:{}};(function(e){e.exports=t;function t(n){if(n)return r(n)}function r(n){for(var i in t.prototype)n[i]=t.prototype[i];return n}t.prototype.on=t.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},t.prototype.once=function(n,i){function a(){this.off(n,a),i.apply(this,arguments)}return a.fn=i,this.on(n,a),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+n];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+n],this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+n],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(nw);var Hs=nw.exports,fh,Yv;function Bm(){if(Yv)return fh;Yv=1;var e=Hi,t=Hs;fh=r;function r(n){this.path=n.path,this.hostname=n.hostname,this.port=n.port,this.secure=n.secure,this.query=n.query,this.timestampParam=n.timestampParam,this.timestampRequests=n.timestampRequests,this.readyState="",this.agent=n.agent||!1,this.socket=n.socket,this.enablesXDR=n.enablesXDR,this.withCredentials=n.withCredentials,this.pfx=n.pfx,this.key=n.key,this.passphrase=n.passphrase,this.cert=n.cert,this.ca=n.ca,this.ciphers=n.ciphers,this.rejectUnauthorized=n.rejectUnauthorized,this.forceNode=n.forceNode,this.isReactNative=n.isReactNative,this.extraHeaders=n.extraHeaders,this.localAddress=n.localAddress}return t(r.prototype),r.prototype.onError=function(n,i){var a=new Error(n);return a.type="TransportError",a.description=i,this.emit("error",a),this},r.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(n){if(this.readyState==="open")this.write(n);else throw new Error("Transport not open")},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(n){var i=e.decodePacket(n,this.socket.binaryType);this.onPacket(i)},r.prototype.onPacket=function(n){this.emit("packet",n)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")},fh}var Xa={};Xa.encode=function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t};Xa.decode=function(e){for(var t={},r=e.split("&"),n=0,i=r.length;n<i;n++){var a=r[n].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t};var Mc=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},iw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ju=64,aw={},Xv=0,Zn=0,Zv;function wf(e){var t="";do t=iw[e%ju]+t,e=Math.floor(e/ju);while(e>0);return t}function N5(e){var t=0;for(Zn=0;Zn<e.length;Zn++)t=t*ju+aw[e.charAt(Zn)];return t}function zm(){var e=wf(+new Date);return e!==Zv?(Xv=0,Zv=e):e+"."+wf(Xv++)}for(;Zn<ju;Zn++)aw[iw[Zn]]=Zn;zm.encode=wf;zm.decode=N5;var ow=zm,Cf={exports:{}},xf={exports:{}},vs=1e3,ys=vs*60,bs=ys*60,_s=bs*24,k5=_s*365.25,L5=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return O5(e);if(r==="number"&&isNaN(e)===!1)return t.long?F5(e):I5(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function O5(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*k5;case"days":case"day":case"d":return r*_s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*bs;case"minutes":case"minute":case"mins":case"min":case"m":return r*ys;case"seconds":case"second":case"secs":case"sec":case"s":return r*vs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function I5(e){return e>=_s?Math.round(e/_s)+"d":e>=bs?Math.round(e/bs)+"h":e>=ys?Math.round(e/ys)+"m":e>=vs?Math.round(e/vs)+"s":e+"ms"}function F5(e){return Gl(e,_s,"day")||Gl(e,bs,"hour")||Gl(e,ys,"minute")||Gl(e,vs,"second")||e+" ms"}function Gl(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=u,t.disable=o,t.enable=a,t.enabled=s,t.humanize=L5,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(c){var d=0,h;for(h in c)d=(d<<5)-d+c.charCodeAt(h),d|=0;return t.colors[Math.abs(d)%t.colors.length]}function n(c){var d;function h(){if(h.enabled){var p=h,m=+new Date,v=m-(d||m);p.diff=v,p.prev=d,p.curr=m,d=m;for(var b=new Array(arguments.length),_=0;_<b.length;_++)b[_]=arguments[_];b[0]=t.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");var w=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,function(S,T){if(S==="%%")return S;w++;var M=t.formatters[T];if(typeof M=="function"){var E=b[w];S=M.call(p,E),b.splice(w,1),w--}return S}),t.formatArgs.call(p,b);var C=h.log||t.log||console.log.bind(console);C.apply(p,b)}}return h.namespace=c,h.enabled=t.enabled(c),h.useColors=t.useColors(),h.color=r(c),h.destroy=i,typeof t.init=="function"&&t.init(h),t.instances.push(h),h}function i(){var c=t.instances.indexOf(this);return c!==-1?(t.instances.splice(c,1),!0):!1}function a(c){t.save(c),t.names=[],t.skips=[];var d,h=(typeof c=="string"?c:"").split(/[\s,]+/),p=h.length;for(d=0;d<p;d++)h[d]&&(c=h[d].replace(/\*/g,".*?"),c[0]==="-"?t.skips.push(new RegExp("^"+c.substr(1)+"$")):t.names.push(new RegExp("^"+c+"$")));for(d=0;d<t.instances.length;d++){var m=t.instances[d];m.enabled=t.enabled(m.namespace)}}function o(){t.enable("")}function s(c){if(c[c.length-1]==="*")return!0;var d,h;for(d=0,h=t.skips.length;d<h;d++)if(t.skips[d].test(c))return!1;for(d=0,h=t.names.length;d<h;d++)if(t.names[d].test(c))return!0;return!1}function u(c){return c instanceof Error?c.stack||c.message:c}})(xf,xf.exports);var $5=xf.exports;(function(e,t){t=e.exports=$5,t.log=i,t.formatArgs=n,t.save=a,t.load=o,t.useColors=r,t.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:s(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function n(u){var c=this.useColors;if(u[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+u[0]+(c?"%c ":" ")+"+"+t.humanize(this.diff),!!c){var d="color: "+this.color;u.splice(1,0,d,"color: inherit");var h=0,p=0;u[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(h++,m==="%c"&&(p=h))}),u.splice(p,0,d)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(u){try{u==null?t.storage.removeItem("debug"):t.storage.debug=u}catch(c){}}function o(){var u;try{u=t.storage.debug}catch(c){}return!u&&typeof process!="undefined"&&"env"in process&&(u=process.env.DEBUG),u}t.enable(o());function s(){try{return window.localStorage}catch(u){}}})(Cf,Cf.exports);var Ec=Cf.exports,sw=Bm(),B5=Xa,lw=Hi,z5=Mc,H5=ow,Hr=Ec("engine.io-client:polling"),uw=vn,W5=function(){var e=Fm,t=new e({xdomain:!1});return t.responseType!=null}();function vn(e){var t=e&&e.forceBase64;(!W5||t)&&(this.supportsBinary=!1),sw.call(this,e)}z5(vn,sw);vn.prototype.name="polling";vn.prototype.doOpen=function(){this.poll()};vn.prototype.pause=function(e){var t=this;this.readyState="pausing";function r(){Hr("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&(Hr("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){Hr("pre-pause polling complete"),--n||r()})),this.writable||(Hr("we are currently writing - waiting to pause"),n++,this.once("drain",function(){Hr("pre-pause writing complete"),--n||r()}))}else r()};vn.prototype.poll=function(){Hr("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};vn.prototype.onData=function(e){var t=this;Hr("polling got data %s",e);var r=function(n,i,a){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};lw.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Hr('ignoring poll - transport state "%s"',this.readyState))};vn.prototype.doClose=function(){var e=this;function t(){Hr("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(Hr("transport open - closing"),t()):(Hr("transport not open - deferring close"),this.once("open",t))};vn.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};lw.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,r)})};vn.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=H5()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=B5.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};var j5=Fm,cw=uw,U5=Hs,V5=Mc,Tf=Ec("engine.io-client:polling-xhr"),G5=Im;$m.exports=Za;$m.exports.Request=St;function Kv(){}function Za(e){if(cw.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location!="undefined"){var t=location.protocol==="https:",r=location.port;r||(r=t?443:80),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}}V5(Za,cw);Za.prototype.supportsBinary=!0;Za.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new St(e)};Za.prototype.doWrite=function(e,t){var r=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:r}),i=this;n.on("success",t),n.on("error",function(a){i.onError("xhr post error",a)}),this.sendXhr=n};Za.prototype.doPoll=function(){Tf("xhr poll");var e=this.request(),t=this;e.on("data",function(r){t.onData(r)}),e.on("error",function(r){t.onError("xhr poll error",r)}),this.pollXhr=e};function St(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}U5(St.prototype);St.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new j5(e),r=this;try{Tf("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch(i){}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{t.setRequestHeader("Accept","*/*")}catch(i){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){r.onLoad()},t.onerror=function(){r.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var i=t.getResponseHeader("Content-Type");(r.supportsBinary&&i==="application/octet-stream"||i==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch(a){}t.readyState===4&&(t.status===200||t.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof t.status=="number"?t.status:0)},0))},Tf("xhr data %s",this.data),t.send(this.data)}catch(i){setTimeout(function(){r.onError(i)},0);return}typeof document!="undefined"&&(this.index=St.requestsCount++,St.requests[this.index]=this)};St.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};St.prototype.onData=function(e){this.emit("data",e),this.onSuccess()};St.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)};St.prototype.cleanup=function(e){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Kv:this.xhr.onreadystatechange=Kv,e)try{this.xhr.abort()}catch(t){}typeof document!="undefined"&&delete St.requests[this.index],this.xhr=null}};St.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(r){}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)};St.prototype.hasXDR=function(){return typeof XDomainRequest!="undefined"&&!this.xs&&this.enablesXDR};St.prototype.abort=function(){this.cleanup()};St.requestsCount=0;St.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Qv);else if(typeof addEventListener=="function"){var q5="onpagehide"in G5?"pagehide":"unload";addEventListener(q5,Qv,!1)}}function Qv(){for(var e in St.requests)St.requests.hasOwnProperty(e)&&St.requests[e].abort()}var Y5=$m.exports,Hm=uw,X5=Mc,Jv=Im,Z5=Ka,K5=/\n/g,Q5=/\\n/g,ql;function J5(){}function Ka(e){Hm.call(this,e),this.query=this.query||{},ql||(ql=Jv.___eio=Jv.___eio||[]),this.index=ql.length;var t=this;ql.push(function(r){t.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=J5)},!1)}X5(Ka,Hm);Ka.prototype.supportsBinary=!1;Ka.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),Hm.prototype.doClose.call(this)};Ka.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(i){e.onError("jsonp poll error",i)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator!="undefined"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var i=document.createElement("iframe");document.body.appendChild(i),document.body.removeChild(i)},100)};Ka.prototype.doWrite=function(e,t){var r=this;if(!this.form){var n=document.createElement("form"),i=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index,o;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=a,n.method="POST",n.setAttribute("accept-charset","utf-8"),i.name="d",n.appendChild(i),document.body.appendChild(n),this.form=n,this.area=i}this.form.action=this.uri();function s(){u(),t()}function u(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(d){r.onError("jsonp polling iframe removal error",d)}try{var c='<iframe src="javascript:0" name="'+r.iframeId+'">';o=document.createElement(c)}catch(d){o=document.createElement("iframe"),o.name=r.iframeId,o.src="javascript:0"}o.id=r.iframeId,r.form.appendChild(o),r.iframe=o}u(),e=e.replace(Q5,`\\
5
- `),this.area.value=e.replace(K5,"\\n");try{this.form.submit()}catch(c){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){r.iframe.readyState==="complete"&&s()}:this.iframe.onload=s};const eR={},tR=Object.freeze(Object.defineProperty({__proto__:null,default:eR},Symbol.toStringTag,{value:"Module"})),rR=O.getAugmentedNamespace(tR);var Wm=Bm(),nR=Hi,iR=Xa,aR=Mc,oR=ow,sR=Ec("engine.io-client:websocket"),Uu,jm;typeof WebSocket!="undefined"?Uu=WebSocket:typeof self!="undefined"&&(Uu=self.WebSocket||self.MozWebSocket);if(typeof window=="undefined")try{jm=rR}catch(e){}var Na=Uu||jm,lR=kr;function kr(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=Uu&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(Na=jm),Wm.call(this,e)}aR(kr,Wm);kr.prototype.name="websocket";kr.prototype.supportsBinary=!0;kr.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,r={};this.isReactNative||(r.agent=this.agent,r.perMessageDeflate=this.perMessageDeflate,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new Na(e,t):new Na(e):new Na(e,t,r)}catch(n){return this.emit("error",n)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}};kr.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}};kr.prototype.write=function(e){var t=this;this.writable=!1;for(var r=e.length,n=0,i=r;n<i;n++)(function(o){nR.encodePacket(o,t.supportsBinary,function(s){if(!t.usingBrowserWebSocket){var u={};if(o.options&&(u.compress=o.options.compress),t.perMessageDeflate){var c=typeof s=="string"?Buffer.byteLength(s):s.length;c<t.perMessageDeflate.threshold&&(u.compress=!1)}}try{t.usingBrowserWebSocket?t.ws.send(s):t.ws.send(s,u)}catch(d){sR("websocket closed before onclose event")}--r||a()})})(e[n]);function a(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}};kr.prototype.onClose=function(){Wm.prototype.onClose.call(this)};kr.prototype.doClose=function(){typeof this.ws!="undefined"&&this.ws.close()};kr.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",r="";this.port&&(t==="wss"&&Number(this.port)!==443||t==="ws"&&Number(this.port)!==80)&&(r=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=oR()),this.supportsBinary||(e.b64=1),e=iR.encode(e),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};kr.prototype.check=function(){return!!Na&&!("__initialize"in Na&&this.name===kr.prototype.name)};var uR=Fm,cR=Y5,dR=Z5,hR=lR;Sc.polling=fR;Sc.websocket=hR;function fR(e){var t,r=!1,n=!1,i=e.jsonp!==!1;if(typeof location!="undefined"){var a=location.protocol==="https:",o=location.port;o||(o=a?443:80),r=e.hostname!==location.hostname||o!==e.port,n=e.secure!==a}if(e.xdomain=r,e.xscheme=n,t=new uR(e),"open"in t&&!e.forceJSONP)return new cR(e);if(!i)throw new Error("JSONP disabled");return new dR(e)}var pR=[].indexOf,dw=function(e,t){if(pR)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1},mR=Sc,gR=Hs,wt=Ec("engine.io-client:socket"),vR=dw,hw=Hi,e1=q_,yR=Xa,bR=ze;function ze(e,t){if(!(this instanceof ze))return new ze(e,t);t=t||{},e&&typeof e=="object"&&(t=e,e=null),e?(e=e1(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=e1(t.host).host),this.secure=t.secure!=null?t.secure:typeof location!="undefined"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=t.port||(typeof location!="undefined"&&location.port?location.port:this.secure?443:80),this.query=t.query||{},typeof this.query=="string"&&(this.query=yR.decode(this.query)),this.upgrade=t.upgrade!==!1,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=t.jsonp!==!1,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=t.withCredentials!==!1,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=t.perMessageDeflate!==!1?t.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=t.rejectUnauthorized===void 0?!0:t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self=="undefined"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}ze.priorWebsocketSuccess=!1;gR(ze.prototype);ze.protocol=hw.protocol;ze.Socket=ze;ze.Transport=Bm();ze.transports=Sc;ze.parser=Hi;ze.prototype.createTransport=function(e){wt('creating transport "%s"',e);var t=_R(this.query);t.EIO=hw.protocol,t.transport=e;var r=this.transportOptions[e]||{};this.id&&(t.sid=this.id);var n=new mR[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative});return n};function _R(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}ze.prototype.open=function(){var e;if(this.rememberUpgrade&&ze.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch(r){this.transports.shift(),this.open();return}e.open(),this.setTransport(e)};ze.prototype.setTransport=function(e){wt("setting transport %s",e.name);var t=this;this.transport&&(wt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(r){t.onPacket(r)}).on("error",function(r){t.onError(r)}).on("close",function(){t.onClose("transport close")})};ze.prototype.probe=function(e){wt('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;ze.priorWebsocketSuccess=!1;function i(){if(n.onlyBinaryUpgrades){var h=!this.supportsBinary&&n.transport.supportsBinary;r=r||h}r||(wt('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(p){if(!r)if(p.type==="pong"&&p.data==="probe"){if(wt('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;ze.priorWebsocketSuccess=t.name==="websocket",wt('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||n.readyState!=="closed"&&(wt("changing transport and sending upgrade packet"),d(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{wt('probe transport "%s" failed',e);var m=new Error("probe error");m.transport=t.name,n.emit("upgradeError",m)}}))}function a(){r||(r=!0,d(),t.close(),t=null)}function o(h){var p=new Error("probe error: "+h);p.transport=t.name,a(),wt('probe transport "%s" failed because of error: %s',e,h),n.emit("upgradeError",p)}function s(){o("transport closed")}function u(){o("socket closed")}function c(h){t&&h.name!==t.name&&(wt('"%s" works - aborting "%s"',h.name,t.name),a())}function d(){t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",s),n.removeListener("close",u),n.removeListener("upgrading",c)}t.once("open",i),t.once("error",o),t.once("close",s),this.once("close",u),this.once("upgrading",c),t.open()};ze.prototype.onOpen=function(){if(wt("socket open"),this.readyState="open",ze.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){wt("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}};ze.prototype.onPacket=function(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(wt('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}else wt('packet received with socket readyState "%s"',this.readyState)};ze.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};ze.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){t.readyState!=="closed"&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)};ze.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){wt("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)};ze.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})};ze.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};ze.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(wt("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};ze.prototype.write=ze.prototype.send=function(e,t,r){return this.sendPacket("message",e,t,r),this};ze.prototype.sendPacket=function(e,t,r,n){if(typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=null),!(this.readyState==="closing"||this.readyState==="closed")){r=r||{},r.compress=r.compress!==!1;var i={type:e,data:t,options:r};this.emit("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}};ze.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}function t(){e.onClose("forced close"),wt("socket closing - telling transport to close"),e.transport.close()}function r(){e.removeListener("upgrade",r),e.removeListener("upgradeError",r),t()}function n(){e.once("upgrade",r),e.once("upgradeError",r)}return this};ze.prototype.onError=function(e){wt("socket error %j",e),ze.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)};ze.prototype.onClose=function(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){wt('socket close with reason: "%s"',e);var r=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),r.writeBuffer=[],r.prevBufferLen=0}};ze.prototype.filterUpgrades=function(e){for(var t=[],r=0,n=e.length;r<n;r++)~vR(this.transports,e[r])&&t.push(e[r]);return t};Om.exports=bR;Om.exports.parser=Hi;var wR=Om.exports,fw={exports:{}},CR=xR;function xR(e,t){var r=[];t=t||0;for(var n=t||0;n<e.length;n++)r[n-t]=e[n];return r}var pw=TR;function TR(e,t,r){return e.on(t,r),{destroy:function(){e.removeListener(t,r)}}}var t1=[].slice,mw=function(e,t){if(typeof t=="string"&&(t=e[t]),typeof t!="function")throw new Error("bind() requires a function");var r=t1.call(arguments,2);return function(){return t.apply(e,r.concat(t1.call(arguments)))}};(function(e,t){var r=xc,n=Hs,i=CR,a=pw,o=mw,s=Cc("socket.io-client:socket"),u=Xa,c=ew;e.exports=p;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=n.prototype.emit;function p(m,v,b){this.io=m,this.nsp=v,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},b&&b.query&&(this.query=b.query),this.io.autoConnect&&this.open()}n(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var m=this.io;this.subs=[a(m,"open",o(this,"onopen")),a(m,"packet",o(this,"onpacket")),a(m,"close",o(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},p.prototype.send=function(){var m=i(arguments);return m.unshift("message"),this.emit.apply(this,m),this},p.prototype.emit=function(m){if(d.hasOwnProperty(m))return h.apply(this,arguments),this;var v=i(arguments),b={type:(this.flags.binary!==void 0?this.flags.binary:c(v))?r.BINARY_EVENT:r.EVENT,data:v};return b.options={},b.options.compress=!this.flags||this.flags.compress!==!1,typeof v[v.length-1]=="function"&&(s("emitting packet with ack id %d",this.ids),this.acks[this.ids]=v.pop(),b.id=this.ids++),this.connected?this.packet(b):this.sendBuffer.push(b),this.flags={},this},p.prototype.packet=function(m){m.nsp=this.nsp,this.io.packet(m)},p.prototype.onopen=function(){if(s("transport is open - connecting"),this.nsp!=="/")if(this.query){var m=typeof this.query=="object"?u.encode(this.query):this.query;s("sending connect packet with query %s",m),this.packet({type:r.CONNECT,query:m})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(m){s("close (%s)",m),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",m)},p.prototype.onpacket=function(m){var v=m.nsp===this.nsp,b=m.type===r.ERROR&&m.nsp==="/";if(!(!v&&!b))switch(m.type){case r.CONNECT:this.onconnect();break;case r.EVENT:this.onevent(m);break;case r.BINARY_EVENT:this.onevent(m);break;case r.ACK:this.onack(m);break;case r.BINARY_ACK:this.onack(m);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",m.data);break}},p.prototype.onevent=function(m){var v=m.data||[];s("emitting event %j",v),m.id!=null&&(s("attaching ack callback to event"),v.push(this.ack(m.id))),this.connected?h.apply(this,v):this.receiveBuffer.push(v)},p.prototype.ack=function(m){var v=this,b=!1;return function(){if(!b){b=!0;var _=i(arguments);s("sending ack %j",_),v.packet({type:c(_)?r.BINARY_ACK:r.ACK,id:m,data:_})}}},p.prototype.onack=function(m){var v=this.acks[m.id];typeof v=="function"?(s("calling ack %s with %j",m.id,m.data),v.apply(this,m.data),delete this.acks[m.id]):s("bad ack %s",m.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},p.prototype.emitBuffered=function(){var m;for(m=0;m<this.receiveBuffer.length;m++)h.apply(this,this.receiveBuffer[m]);for(this.receiveBuffer=[],m=0;m<this.sendBuffer.length;m++)this.packet(this.sendBuffer[m]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){s("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var m=0;m<this.subs.length;m++)this.subs[m].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(s("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(m){return this.flags.compress=m,this},p.prototype.binary=function(m){return this.flags.binary=m,this}})(fw);var gw=fw.exports,SR=Qa;function Qa(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Qa.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};Qa.prototype.reset=function(){this.attempts=0};Qa.prototype.setMin=function(e){this.ms=e};Qa.prototype.setMax=function(e){this.max=e};Qa.prototype.setJitter=function(e){this.jitter=e};var MR=wR,ER=gw,PR=Hs,AR=xc,Wn=pw,ca=mw,Yt=Cc("socket.io-client:manager"),vw=dw,RR=SR,yw=Object.prototype.hasOwnProperty,r1=Ue;function Ue(e,t){if(!(this instanceof Ue))return new Ue(e,t);e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new RR({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=t.parser||AR;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=t.autoConnect!==!1,this.autoConnect&&this.open()}Ue.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)yw.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)};Ue.prototype.updateSocketIds=function(){for(var e in this.nsps)yw.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))};Ue.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id};PR(Ue.prototype);Ue.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection};Ue.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts};Ue.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay};Ue.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor};Ue.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax};Ue.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout};Ue.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};Ue.prototype.open=Ue.prototype.connect=function(e,t){if(Yt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Yt("opening %s",this.uri),this.engine=MR(this.uri,this.opts);var r=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var i=Wn(r,"open",function(){n.onopen(),e&&e()}),a=Wn(r,"error",function(u){if(Yt("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",u),e){var c=new Error("Connection error");c.data=u,e(c)}else n.maybeReconnectOnOpen()});if(this._timeout!==!1){var o=this._timeout;Yt("connect attempt will timeout after %d",o),o===0&&i.destroy();var s=setTimeout(function(){Yt("connect attempt timed out after %d",o),i.destroy(),r.close(),r.emit("error","timeout"),n.emitAll("connect_timeout",o)},o);this.subs.push({destroy:function(){clearTimeout(s)}})}return this.subs.push(i),this.subs.push(a),this};Ue.prototype.onopen=function(){Yt("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(Wn(e,"data",ca(this,"ondata"))),this.subs.push(Wn(e,"ping",ca(this,"onping"))),this.subs.push(Wn(e,"pong",ca(this,"onpong"))),this.subs.push(Wn(e,"error",ca(this,"onerror"))),this.subs.push(Wn(e,"close",ca(this,"onclose"))),this.subs.push(Wn(this.decoder,"decoded",ca(this,"ondecoded")))};Ue.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")};Ue.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};Ue.prototype.ondata=function(e){this.decoder.add(e)};Ue.prototype.ondecoded=function(e){this.emit("packet",e)};Ue.prototype.onerror=function(e){Yt("error",e),this.emitAll("error",e)};Ue.prototype.socket=function(e,t){var r=this.nsps[e];if(!r){r=new ER(this,e,t),this.nsps[e]=r;var n=this;r.on("connecting",i),r.on("connect",function(){r.id=n.generateId(e)}),this.autoConnect&&i()}function i(){~vw(n.connecting,r)||n.connecting.push(r)}return r};Ue.prototype.destroy=function(e){var t=vw(this.connecting,e);~t&&this.connecting.splice(t,1),!this.connecting.length&&this.close()};Ue.prototype.packet=function(e){Yt("writing packet %j",e);var t=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(r){for(var n=0;n<r.length;n++)t.engine.write(r[n],e.options);t.encoding=!1,t.processPacketQueue()}))};Ue.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}};Ue.prototype.cleanup=function(){Yt("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var r=this.subs.shift();r.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()};Ue.prototype.close=Ue.prototype.disconnect=function(){Yt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()};Ue.prototype.onclose=function(e){Yt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()};Ue.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)Yt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();Yt("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(Yt("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(n){n?(Yt("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",n.data)):(Yt("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}};Ue.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)};(function(e,t){var r=KA,n=xc,i=r1,a=Cc("socket.io-client");e.exports=t=s;var o=t.managers={};function s(u,c){typeof u=="object"&&(c=u,u=void 0),c=c||{};var d=r(u),h=d.source,p=d.id,m=d.path,v=o[p]&&m in o[p].nsps,b=c.forceNew||c["force new connection"]||c.multiplex===!1||v,_;return b?(a("ignoring socket cache for %s",h),_=i(h,c)):(o[p]||(a("new io instance for %s",h),o[p]=i(h,c)),_=o[p]),d.query&&!c.query&&(c.query=d.query),_.socket(d.path,c)}t.protocol=n.protocol,t.connect=s,t.Manager=r1,t.Socket=gw})(pf,pf.exports);var DR=pf.exports;const NR=O.getDefaultExportFromCjs(DR);function kR(e=document.cookie){const t="XSRF-TOKEN",r=e.match(new RegExp(`(^| )${t}=([^;]+)`));return r!==null&&r[2]?r[2]:null}function LR(){const e=kR(),t={};return e&&(t["X-XSRF-TOKEN"]=e),t}class Um{constructor(t,r,n){this.isRegistered=!1,this.isListening=!1,typeof t=="string"?(this.socket=Um.createNewSocket(t,r,n),this.subcribeOnSocketReadiness()):this.socket=t}subcribeOnSocketReadiness(){this.socket.on("register",()=>{this.isRegistered=!0}),this.socket.on("listen",()=>{this.isListening=!0})}isReady(){return this.isRegistered&&this.isListening}on(t,r){this.socket.on(t,r)}off(t,r){this.socket.off(t,r)}send(t,...r){const n=r[0];this.socket.emit(t,JSON.stringify(n))}onMessage(t,r,n){this.onMessageCallback=n;const i=t||"",a=r||"",o=a?`${i}-${a}`:i,s=u=>{let c=null;try{c=JSON.parse(u)}catch(d){throw new Error("Error parsing response message")}n(i,c)};return this.on(o,s),()=>{this.off(o,s)}}trigger(t,r){this.onMessageCallback&&this.onMessageCallback(t,r)}static createNewSocket(t,r,n){const i=new URL("./gateway",new URL(Bi(t))),a=i.origin+(n?`/${n}`:""),o=NR.connect(a,{path:i.pathname,transports:["websocket"],reconnection:!0,query:r});return o.on("connect_error",s=>{console.log(`connect_error due to ${s.message}`)}),o.on("csrf",()=>{o.emit("csrf",LR())}),o.on("listen",()=>{o.emit("register",{})}),o.on("register",()=>{o.emit('{"eventName": "_registerEvent", "data": "pivot2"}')}),o.on("error",s=>{console.warn(`"SisenseSocket" socket error "${s}"`)}),o}}var OR=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};class IR{constructor(t){this.socket=t}destroy(){}prepareRequest(t){return Promise.resolve(t)}prepareLoadService(t,r=!1){return this.dataLoadService&&(r||this.dataLoadService.isFormattingChanges(t))?this.dataLoadService:new BA(this.socket)}prepareDataService(t){const r=new gr(t);return{loadData:(n,i,a)=>{if(!r)throw new Error('No DataService defined during "prepareDataService"');return r.loadData(n,{pageSize:i,isPaginated:a})}}}loadInitData(t){return OR(this,arguments,void 0,function*(r,n=!0,i=100,a=!1){const o=n?i:void 0;try{const s=yield this.prepareRequest(r);this.dataLoadService=this.prepareLoadService(s,a);const{loadData:u}=this.prepareDataService(this.dataLoadService),{rowsTreeService:c,columnsTreeService:d,cornerTreeService:h,isLastPage:p}=yield u(a?void 0:s,o,n);return this.transformTreeStructuresToResultData({rowsTreeService:c,columnsTreeService:d,cornerTreeService:h,isLastPage:p})}catch(s){console.error('Error during loading initial page"',s)}return z.EMPTY_PIVOT_QUERY_RESULT_DATA})}buildColumnsHelper(t,r,n,i){var a;const o=`${n}${n===""?"":" | "}${(a=i.value)===null||a===void 0?void 0:a.toString()}`;i.children?i.children.forEach(s=>{this.buildColumnsHelper(t,r,o,s)}):r.push({name:o,type:t})}transformGridToColumns(t,r){if(!r||r.length===0)return[];const n=[];return r==null||r[0].forEach(i=>{typeof i!="string"&&this.buildColumnsHelper(t,n,"",i)}),n||[]}transformTreeStructuresToResultData(t){const{rowsTreeService:r,columnsTreeService:n,cornerTreeService:i}=t;if(!r&&!n&&!i)return z.EMPTY_PIVOT_QUERY_RESULT_DATA;const a=i?i.getGrid():[],o=n?n.getGrid():[],s=r?r.getGrid():[],u=this.transformGridToColumns("string",a),c=this.transformGridToColumns("number",o),d=[...u,...c],h=r?r.extractData(n):[],p=s.length,m=d.length,v=[];let b=0,_=0;return Array.from(Array(p)).map((w,C)=>{const S=[];Array.from(Array(m)).map((T,M)=>{var E,D;let N;if(M<u.length){b=C,_=M;try{N=s[b][_]}catch(B){throw new Error(`Can't find data item for ${b}-${_}`)}}else{b=C,_=M-u.length;try{N=h[b][_]}catch(B){throw new Error(`Can't find data item for ${b}-${_}`)}}let F;if(typeof N=="string"){const B=N.split("-");if(B.length===2){const G=Number(B[0]),Y=Number(B[1]);N=s[G][Y],F=((E=N.value)===null||E===void 0?void 0:E.toString())||""}else F=""}else F=((D=N.value)===null||D===void 0?void 0:D.toString())||"";S.push({data:F,text:F})}),v.push(S)}),{table:{columns:d,rows:v},grids:{corner:a,rows:s,columns:o,values:h}}}}const FR={errorPrefix:"[request-error]",errors:{networkError:"Network error. Check browser console for further details.",authFailed:"Failed to authenticate.",ssoNotEnabled:"SSO is not enabled on target instance, please choose another authentication method.",ssoNoLoginUrl:"Unable to fetch SSO login URL from target instance. Check SSO settings.",passwordAuthFailed:"$t(errorPrefix) Username and password authentication was not successful. Check credentials.",tokenAuthFailed:"$t(errorPrefix) Token authentication was not successful. Check credentials.",authRedirectLimitExceeded:"SSO redirect limit reached. Authentication may be blocked by browser privacy settings or third-party cookie restrictions. Please check your SSO configuration or try a different browser."}},$R={errorPrefix:"[request-error]",errors:{networkError:"Помилка мережі. Можливо ви забули додати свій домен до «CORS Allowed Origins» в панелі адміністратора Sisense -> Security Settings.",authFailed:"Автентифікація не вдалася.",ssoNotEnabled:"SSO не ввімкнено на цьому сервері, будь ласка, виберіть інший метод аутентифікації",ssoNoLoginUrl:"Неможливо отримати SSO login URL з сервера. Перевірте налаштування SSO.",passwordAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою імені користувача та пароля. Перевірте дані для входу.",tokenAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою токена. Перевірте дані для входу.",authRedirectLimitExceeded:"Досягнуто ліміт перенаправлень SSO. Автентифікацію може блокувати налаштування конфіденційності браузера або обмеження сторонніх cookie. Перевірте конфігурацію SSO або спробуйте інший браузер."}},bw="sdkRestClient",BR={en:FR,uk:$R};function zR(){return U.initI18next({resource:BR,language:"en",namespace:bw})}const{i18nextInstance:HR}=zR();class Ws{constructor(t){this._valid=!0,this._authenticating=!1,this._tried=!1,this._result=new Promise(r=>{this._resolve=r}),this.type=t}isValid(){return this._valid}invalidate(){this._valid=!1}authenticate(){return this._result}isAuthenticating(){return this._authenticating}authenticated(){return this._result}applyHeaders(t){}}const Pc=(e,t)=>{if(Array.isArray(e)){for(const[n,i]of Object.entries(t))e.push([n,i]);return}if(e instanceof Headers){for(const[n,i]of Object.entries(t))e.set(n,i);return}const r=e;for(const[n,i]of Object.entries(t))r[n]=i},_w=(e,t)=>{if(!e||typeof e!="string")return e;const r=new URL(e);for(const[n,i]of Object.entries(t))r.searchParams.set(n,i);return r.toString()},WR=(e,t)=>e===null||t===null,jR=(e,t)=>{if(!e||typeof e!="string")throw new Error("URL must be a non-empty string");let r;try{r=new URL(e)}catch(i){throw new Error(`Invalid URL format: ${e}`)}let n;try{n=new URL(t)}catch(i){throw new Error(`Invalid url origin format: ${t}`)}if(r.origin!==n.origin)throw new Error(`URL origin ${r.origin} does not match allowed origin ${n.origin}. SSRF protection: requests must be to the configured base URL only.`)};class UR extends Ws{constructor(t,r){super("bearer"),this.bearer=r,this._resolve(!0)}applyHeaders(t){const r="Bearer "+this.bearer;Pc(t,{Authorization:r})}authenticate(){return this._result}authenticated(){return this._result}}function ww(e){return e.type==="bearer"}let En=class extends U.AbstractTranslatableError{constructor(t,r){super(bw,{key:t,interpolationOptions:r},HR.t)}get status(){return this.interpolationOptions.status}};var ph=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};const VR="sisense_sso_redirect_attempts_",GR="sisense_sso_redirect_last_at_",qR=3,YR=1e4;class XR extends Ws{constructor(t,r=!1,n="",i=qR,a=YR){super("sso"),this.url=Bi(t,!0),this._enableSilentPreAuth=r,this._alternativeSsoHost=n,this._ssoMaxAuthRedirectAttempts=Math.max(1,i),this._ssoRedirectAttemptsTtlMs=Math.max(0,a)}getRedirectCountStorageKey(){return VR+encodeURIComponent(this.url)}getRedirectLastAtStorageKey(){return GR+encodeURIComponent(this.url)}getRedirectAttempts(){try{if(typeof window=="undefined"||typeof window.localStorage=="undefined")return 0;const t=window.localStorage.getItem(this.getRedirectCountStorageKey()),r=window.localStorage.getItem(this.getRedirectLastAtStorageKey());if(t==null&&r==null)return 0;const n=parseInt(t!=null?t:"",10),i=parseInt(r!=null?r:"",10);return isNaN(n)||isNaN(i)||n<0?(this.clearRedirectAttempts(),0):this._ssoRedirectAttemptsTtlMs>0&&Date.now()-i>this._ssoRedirectAttemptsTtlMs?(this.clearRedirectAttempts(),0):Math.max(0,n)}catch(t){return 0}}clearRedirectAttempts(){try{typeof window!="undefined"&&typeof window.localStorage!="undefined"&&(window.localStorage.removeItem(this.getRedirectCountStorageKey()),window.localStorage.removeItem(this.getRedirectLastAtStorageKey()))}catch(t){}}persistRedirectAttempts(t){try{if(typeof window=="undefined"||typeof window.localStorage=="undefined")return;const r=Date.now();window.localStorage.setItem(this.getRedirectCountStorageKey(),String(t)),window.localStorage.setItem(this.getRedirectLastAtStorageKey(),String(r))}catch(r){}}authenticate(){return ph(this,arguments,void 0,function*(t=!0){var r;try{this._authenticating=!0;const{isAuthenticated:n,loginUrl:i}=yield this.checkAuthentication();if(n)return this.clearRedirectAttempts(),this._resolve(!0),yield this._result;let a="";try{new URL(i),a=i}catch(u){a=_v(this._alternativeSsoHost||this.url,i)}const o=Object.fromEntries(new URL(this.url).searchParams.entries());a=_w(a,Object.assign(Object.assign({},o),{return_to:window.location.href}));const s=this.getRedirectAttempts();if(s>=this._ssoMaxAuthRedirectAttempts)throw new En("errors.authRedirectLimitExceeded");if(this._enableSilentPreAuth&&t){yield this.authenticateSilent(a);const{isAuthenticated:u}=yield this.checkAuthentication();if(u)return this.clearRedirectAttempts(),this._resolve(!0),yield this._result}this.persistRedirectAttempts(s+1),(r=window==null?void 0:window.location)===null||r===void 0||r.replace(a)}finally{this._resolve(!1),this._authenticating=!1}return this._result})}authenticateSilent(t){return ph(this,void 0,void 0,function*(){const r=document.createElement("iframe");r.style.display="none",document.body.appendChild(r),r.src=t,yield new Promise(n=>{r.onload=()=>{n(!0)}}),document.body.removeChild(r)})}checkAuthentication(){return ph(this,void 0,void 0,function*(){var t,r;const n=_v(this.url,"api/auth/isauth"),i=yield fetch(n,{headers:{Internal:"true"},credentials:"include"}).catch(Ac);if(i.status===200&&!(!((r=(t=i.headers)===null||t===void 0?void 0:t.get("Content-Type"))===null||r===void 0)&&r.includes("application/json")))throw new En("errors.authFailed");const a=yield i.json();if(!a.isAuthenticated){if(!a.ssoEnabled)throw new En("errors.ssoNotEnabled");if(!a.loginUrl)throw new En("errors.ssoNoLoginUrl")}return{isAuthenticated:a.isAuthenticated,loginUrl:a.loginUrl||""}})}}function Vm(e){return e.type==="sso"}var ZR=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};class KR extends Ws{constructor(t,r){super("wat"),this.url=`${Bi(t)}api/v1/wat/sessionToken`,this.body=`{"webAccessToken": "${r}"}`}authenticate(){return ZR(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:this.body}).catch(Ac);if(t.ok){const r=yield t.json();this._initialiser=r.initialiser,this._webSessionToken=r.webSessionToken,this._resolve(!0)}}catch(t){throw new En("errors.tokenAuthFailed")}finally{this._resolve(!1),this._authenticating=!1}return this._result})}applyHeaders(t){if(this._webSessionToken&&this._initialiser){const r=this._webSessionToken,n=this._initialiser;Pc(t,{Authorization:r,Initialiser:n})}}}function Cw(e){return e.type==="wat"}var xw=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};function QR(e){return xw(this,void 0,void 0,function*(){var t,r,n;if(!e.ok){const i=(t=e.headers)===null||t===void 0?void 0:t.get("Content-Type"),a=i&&i.includes("application/json")?yield e.json().catch(()=>({})):{};throw new En("errors.responseError",{status:e.status.toString(),statusText:e.statusText,errorCode:(r=a.error)===null||r===void 0?void 0:r.code,errorMessage:(n=a.error)===null||n===void 0?void 0:n.message,context:e.statusText?"withStatusText":"onlyStatus"})}return e})}function JR(e,t){if(t.invalidate(),a6(t))throw new En("errors.passwordAuthFailed");if(ww(t)||Cw(t))throw new En("errors.tokenAuthFailed");return Vm(t)&&!t.isAuthenticating()&&t.authenticate(),e}function e6(e){return e.message==="Failed to fetch"&&e.name==="TypeError"}function t6(){return console.warn("Network error. Verify server is accessible and your domain is added to 'CORS Allowed Origins' in Sisense Admin Panel -> Security Settings."),Promise.reject(new En("errors.networkError"))}const r6=e=>t=>xw(void 0,void 0,void 0,function*(){return t.status===401?JR(t,e):t.ok?t:QR(t)}),Ac=e=>e6(e)?t6():Promise.reject(e);var n6=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};class i6 extends Ws{constructor(t,r,n){super("password"),this._authheader="",this.url=`${Bi(t)}api/v1/authentication/login`;const i=encodeURIComponent(r),a=encodeURIComponent(n);this.body=`username=${i}&password=${a}`}authenticate(){return n6(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:this.body}).catch(Ac);if(t.ok){const r=yield t.json();this._authheader=r.access_token}}finally{this._resolve(!!this._authheader),this._authenticating=!1}return this._result})}applyHeaders(t){const r="Bearer "+this._authheader;Pc(t,{Authorization:r})}}function a6(e){return e.type==="password"}class o6{constructor(){this.ready=!0,this.events=new Pm,this.ready=!0}isReady(){return this.ready}on(t,r){this.events.on(t,r)}off(t,r){this.events.removeListener(t,r)}send(t,...r){const n=t||r;this.ready=!!n||!0}onMessage(t,r,n){this.onMessageCallback=n;const i=()=>{};return this.on("message",i),()=>{this.off("message",i)}}trigger(t,r){return new Promise(n=>{setTimeout(()=>{this.onMessageCallback&&this.onMessageCallback(t,r),n()},10)})}}const s6="pivot2";class l6{constructor(t,r,n=!1){this._url=t,this._auth=r,this._mockSocket=n}getQueryOptionsSso(t){return{}}getQueryOptionsBearer(t){const r=t.bearer;if(!r)throw new Error("Missing bearer token");return{token:r}}getQueryOptionsWat(t){const r=new Headers;t.applyHeaders(r);const n=r.get("Authorization"),i=r.get("Initialiser");if(!n||!i)throw new Error("Missing auth header");return{authorization:n,initialiser:i}}get socket(){if(!this._socket){if(this._mockSocket)return this._socket=new o6,this._socket;const t=this._auth,r=this._url;let n={};ww(t)?n=this.getQueryOptionsBearer(t):Cw(t)?n=this.getQueryOptionsWat(t):Vm(t)&&(n=this.getQueryOptionsSso(t)),this._socket=new Um(r,n,s6)}return this._socket}}var u6=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};class Tw{constructor(t,r,n=!1){this.socketBuilder=new l6(Bi(t),r,n)}queryData(t,r,n,i){return u6(this,void 0,void 0,function*(){return new IR(this.socketBuilder.socket).loadInitData(t,r,n,i)})}}var Gt={},Sw={},Rc={},Gm={};(function(e){var t=O.commonjsGlobal&&O.commonjsGlobal.__awaiter||function(i,a,o,s){function u(c){return c instanceof o?c:new o(function(d){d(c)})}return new(o||(o=Promise))(function(c,d){function h(v){try{m(s.next(v))}catch(b){d(b)}}function p(v){try{m(s.throw(v))}catch(b){d(b)}}function m(v){v.done?c(v.value):u(v.value).then(h,p)}m((s=s.apply(i,a||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.ExecutionResultStatus=void 0;var r;(function(i){i.SUCCESS="SUCCESS",i.ERROR="ERROR"})(r=e.ExecutionResultStatus||(e.ExecutionResultStatus={}));class n{constructor(a,o,s){this.steps=a,this.passport=o,this.addons=s,this.statistics={startTime:new Date,steps:[],runtimeInfo:{}},this.currentStep=void 0}run(a){return t(this,void 0,void 0,function*(){let o=a,s;for(let c=0;c<this.steps.length;c+=1){this.currentStep=this.steps[c];const{resultValue:d,info:h}=yield this.currentStep.run(this,o);if(this.statistics.steps.push(h),h.success)o=d;else{s=h.error;break}}const u=this.statistics.steps.length===this.steps.length&&this.statistics.steps.every(c=>c.success);return this.statistics.endTime=new Date,{status:u?r.SUCCESS:r.ERROR,error:s,result:u?o:void 0,statistics:this.statistics}})}cancel(a){var o;return t(this,void 0,void 0,function*(){yield(o=this.currentStep)===null||o===void 0?void 0:o.cancel(this,a)})}addRuntimeInfo(a,o){this.statistics.runtimeInfo[a]=o}emitAddonEvent(a,...o){var s;const u=a.split("."),c=u[0],d=u[1],h=(s=this.addons)===null||s===void 0?void 0:s.find(m=>m.addonName===c),p=(h==null?void 0:h.events)[d];p(...o)}}e.Task=n})(Gm);var mh=O.commonjsGlobal&&O.commonjsGlobal.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Rc,"__esModule",{value:!0});Rc.AbstractTaskManager=void 0;const c6=Gm;class d6{constructor(t){this.runningTasks=new Map,this.addons=t||[]}runTask(t){return mh(this,void 0,void 0,function*(){const{taskId:r}=t.passport;this.runningTasks.set(r,t);const n=yield t.run();return this.runningTasks.delete(r),n})}createFlow(t){return r=>mh(this,void 0,void 0,function*(){const n=new c6.Task(t,r,this.addons);return this.runTask(n)})}cancel(t,r){return mh(this,void 0,void 0,function*(){const n=this.runningTasks.get(t);n&&(yield n.cancel(r))})}}Rc.AbstractTaskManager=d6;var Dc={},js={};Object.defineProperty(js,"__esModule",{value:!0});js.TaskCanceledError=void 0;class h6 extends Error{constructor(t){const r=`Task was canceled due to: "${t}"`;super(r)}}js.TaskCanceledError=h6;var n1=O.commonjsGlobal&&O.commonjsGlobal.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Dc,"__esModule",{value:!0});Dc.Step=void 0;const f6=js;class p6{constructor(t,r,n){this.taskSelfResolvers=new Map,this.taskStepInfos=new Map,this.name=t,this.runLogic=r,this.cancelLogic=n}run(t,r){return n1(this,void 0,void 0,function*(){return this.addStepInfo(t,{name:this.name}),new Promise(n=>{const i=new Date,a=(o,s)=>{const u=new Date,c=u.getTime()-i.getTime();this.addStepInfo(t,{startTime:i,endTime:u,duration:c}),this.addStepInfo(t,s?{success:!1,error:s}:{success:!0}),n({resultValue:o,info:this.getStepInfo(t)})};this.taskSelfResolvers.set(t,a),this.runLogic(t,r).then(o=>a(o)).finally(()=>{this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t)}).catch(o=>a(void 0,o))})})}cancel(t,r){return n1(this,void 0,void 0,function*(){this.addStepInfo(t,{wasCanceled:!0,cancelingReason:r});const n=this.taskSelfResolvers.get(t);n==null||n(void 0,new f6.TaskCanceledError(r)),this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t),yield this.cancelLogic(t,r)})}addStepInfo(t,r){const n=this.taskStepInfos.get(t)||{},i=Object.assign(Object.assign({},n),r);this.taskStepInfos.set(t,i)}getStepInfo(t){return this.taskStepInfos.get(t)}}Dc.Step=p6;var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});Nc.Addon=void 0;class m6{constructor(){this.events={}}}Nc.Addon=m6;var kc={},Yl,g6=new Uint8Array(16);function Mw(){if(!Yl&&(Yl=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Yl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yl(g6)}const v6=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Lc(e){return typeof e=="string"&&v6.test(e)}var It=[];for(var gh=0;gh<256;++gh)It.push((gh+256).toString(16).substr(1));function Oc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(It[e[t+0]]+It[e[t+1]]+It[e[t+2]]+It[e[t+3]]+"-"+It[e[t+4]]+It[e[t+5]]+"-"+It[e[t+6]]+It[e[t+7]]+"-"+It[e[t+8]]+It[e[t+9]]+"-"+It[e[t+10]]+It[e[t+11]]+It[e[t+12]]+It[e[t+13]]+It[e[t+14]]+It[e[t+15]]).toLowerCase();if(!Lc(r))throw TypeError("Stringified UUID is invalid");return r}var i1,vh,yh=0,bh=0;function y6(e,t,r){var n=t&&r||0,i=t||new Array(16);e=e||{};var a=e.node||i1,o=e.clockseq!==void 0?e.clockseq:vh;if(a==null||o==null){var s=e.random||(e.rng||Mw)();a==null&&(a=i1=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),o==null&&(o=vh=(s[6]<<8|s[7])&16383)}var u=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:bh+1,d=u-yh+(c-bh)/1e4;if(d<0&&e.clockseq===void 0&&(o=o+1&16383),(d<0||u>yh)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");yh=u,bh=c,vh=o,u+=122192928e5;var h=((u&268435455)*1e4+c)%4294967296;i[n++]=h>>>24&255,i[n++]=h>>>16&255,i[n++]=h>>>8&255,i[n++]=h&255;var p=u/4294967296*1e4&268435455;i[n++]=p>>>8&255,i[n++]=p&255,i[n++]=p>>>24&15|16,i[n++]=p>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(var m=0;m<6;++m)i[n+m]=a[m];return t||Oc(i)}function Ew(e){if(!Lc(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function b6(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var _6="6ba7b810-9dad-11d1-80b4-00c04fd430c8",w6="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Pw(e,t,r){function n(i,a,o,s){if(typeof i=="string"&&(i=b6(i)),typeof a=="string"&&(a=Ew(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+i.length);if(u.set(a),u.set(i,a.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,o){s=s||0;for(var c=0;c<16;++c)o[s+c]=u[c];return o}return Oc(u)}try{n.name=e}catch(i){}return n.DNS=_6,n.URL=w6,n}function C6(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return x6(T6(S6(e),e.length*8))}function x6(e){for(var t=[],r=e.length*32,n="0123456789abcdef",i=0;i<r;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(n.charAt(a>>>4&15)+n.charAt(a&15),16);t.push(o)}return t}function Aw(e){return(e+64>>>9<<4)+14+1}function T6(e,t){e[t>>5]|=128<<t%32,e[Aw(t)-1]=t;for(var r=1732584193,n=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=r,u=n,c=i,d=a;r=Wt(r,n,i,a,e[o],7,-680876936),a=Wt(a,r,n,i,e[o+1],12,-389564586),i=Wt(i,a,r,n,e[o+2],17,606105819),n=Wt(n,i,a,r,e[o+3],22,-1044525330),r=Wt(r,n,i,a,e[o+4],7,-176418897),a=Wt(a,r,n,i,e[o+5],12,1200080426),i=Wt(i,a,r,n,e[o+6],17,-1473231341),n=Wt(n,i,a,r,e[o+7],22,-45705983),r=Wt(r,n,i,a,e[o+8],7,1770035416),a=Wt(a,r,n,i,e[o+9],12,-1958414417),i=Wt(i,a,r,n,e[o+10],17,-42063),n=Wt(n,i,a,r,e[o+11],22,-1990404162),r=Wt(r,n,i,a,e[o+12],7,1804603682),a=Wt(a,r,n,i,e[o+13],12,-40341101),i=Wt(i,a,r,n,e[o+14],17,-1502002290),n=Wt(n,i,a,r,e[o+15],22,1236535329),r=jt(r,n,i,a,e[o+1],5,-165796510),a=jt(a,r,n,i,e[o+6],9,-1069501632),i=jt(i,a,r,n,e[o+11],14,643717713),n=jt(n,i,a,r,e[o],20,-373897302),r=jt(r,n,i,a,e[o+5],5,-701558691),a=jt(a,r,n,i,e[o+10],9,38016083),i=jt(i,a,r,n,e[o+15],14,-660478335),n=jt(n,i,a,r,e[o+4],20,-405537848),r=jt(r,n,i,a,e[o+9],5,568446438),a=jt(a,r,n,i,e[o+14],9,-1019803690),i=jt(i,a,r,n,e[o+3],14,-187363961),n=jt(n,i,a,r,e[o+8],20,1163531501),r=jt(r,n,i,a,e[o+13],5,-1444681467),a=jt(a,r,n,i,e[o+2],9,-51403784),i=jt(i,a,r,n,e[o+7],14,1735328473),n=jt(n,i,a,r,e[o+12],20,-1926607734),r=Ut(r,n,i,a,e[o+5],4,-378558),a=Ut(a,r,n,i,e[o+8],11,-2022574463),i=Ut(i,a,r,n,e[o+11],16,1839030562),n=Ut(n,i,a,r,e[o+14],23,-35309556),r=Ut(r,n,i,a,e[o+1],4,-1530992060),a=Ut(a,r,n,i,e[o+4],11,1272893353),i=Ut(i,a,r,n,e[o+7],16,-155497632),n=Ut(n,i,a,r,e[o+10],23,-1094730640),r=Ut(r,n,i,a,e[o+13],4,681279174),a=Ut(a,r,n,i,e[o],11,-358537222),i=Ut(i,a,r,n,e[o+3],16,-722521979),n=Ut(n,i,a,r,e[o+6],23,76029189),r=Ut(r,n,i,a,e[o+9],4,-640364487),a=Ut(a,r,n,i,e[o+12],11,-421815835),i=Ut(i,a,r,n,e[o+15],16,530742520),n=Ut(n,i,a,r,e[o+2],23,-995338651),r=Vt(r,n,i,a,e[o],6,-198630844),a=Vt(a,r,n,i,e[o+7],10,1126891415),i=Vt(i,a,r,n,e[o+14],15,-1416354905),n=Vt(n,i,a,r,e[o+5],21,-57434055),r=Vt(r,n,i,a,e[o+12],6,1700485571),a=Vt(a,r,n,i,e[o+3],10,-1894986606),i=Vt(i,a,r,n,e[o+10],15,-1051523),n=Vt(n,i,a,r,e[o+1],21,-2054922799),r=Vt(r,n,i,a,e[o+8],6,1873313359),a=Vt(a,r,n,i,e[o+15],10,-30611744),i=Vt(i,a,r,n,e[o+6],15,-1560198380),n=Vt(n,i,a,r,e[o+13],21,1309151649),r=Vt(r,n,i,a,e[o+4],6,-145523070),a=Vt(a,r,n,i,e[o+11],10,-1120210379),i=Vt(i,a,r,n,e[o+2],15,718787259),n=Vt(n,i,a,r,e[o+9],21,-343485551),r=Kn(r,s),n=Kn(n,u),i=Kn(i,c),a=Kn(a,d)}return[r,n,i,a]}function S6(e){if(e.length===0)return[];for(var t=e.length*8,r=new Uint32Array(Aw(t)),n=0;n<t;n+=8)r[n>>5]|=(e[n/8]&255)<<n%32;return r}function Kn(e,t){var r=(e&65535)+(t&65535),n=(e>>16)+(t>>16)+(r>>16);return n<<16|r&65535}function M6(e,t){return e<<t|e>>>32-t}function Ic(e,t,r,n,i,a){return Kn(M6(Kn(Kn(t,e),Kn(n,a)),i),r)}function Wt(e,t,r,n,i,a,o){return Ic(t&r|~t&n,e,t,i,a,o)}function jt(e,t,r,n,i,a,o){return Ic(t&n|r&~n,e,t,i,a,o)}function Ut(e,t,r,n,i,a,o){return Ic(t^r^n,e,t,i,a,o)}function Vt(e,t,r,n,i,a,o){return Ic(r^(t|~n),e,t,i,a,o)}var E6=Pw("v3",48,C6);function P6(e,t,r){e=e||{};var n=e.random||(e.rng||Mw)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Oc(n)}function A6(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function _h(e,t){return e<<t|e>>>32-t}function R6(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=new Array(o),u=0;u<o;++u){for(var c=new Uint32Array(16),d=0;d<16;++d)c[d]=e[u*64+d*4]<<24|e[u*64+d*4+1]<<16|e[u*64+d*4+2]<<8|e[u*64+d*4+3];s[u]=c}s[o-1][14]=(e.length-1)*8/Math.pow(2,32),s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var h=0;h<o;++h){for(var p=new Uint32Array(80),m=0;m<16;++m)p[m]=s[h][m];for(var v=16;v<80;++v)p[v]=_h(p[v-3]^p[v-8]^p[v-14]^p[v-16],1);for(var b=r[0],_=r[1],w=r[2],C=r[3],S=r[4],T=0;T<80;++T){var M=Math.floor(T/20),E=_h(b,5)+A6(M,_,w,C)+S+t[M]+p[T]>>>0;S=C,C=w,w=_h(_,30)>>>0,_=b,b=E}r[0]=r[0]+b>>>0,r[1]=r[1]+_>>>0,r[2]=r[2]+w>>>0,r[3]=r[3]+C>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var D6=Pw("v5",80,R6);const N6="00000000-0000-0000-0000-000000000000";function k6(e){if(!Lc(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const L6=Object.freeze(Object.defineProperty({__proto__:null,NIL:N6,parse:Ew,stringify:Oc,v1:y6,v3:E6,v4:P6,v5:D6,validate:Lc,version:k6},Symbol.toStringTag,{value:"Module"})),O6=O.getAugmentedNamespace(L6);Object.defineProperty(kc,"__esModule",{value:!0});kc.TaskPassport=void 0;const I6=O6;class F6{constructor(){this.taskId=(0,I6.v4)()}}kc.TaskPassport=F6;(function(e){var t=O.commonjsGlobal&&O.commonjsGlobal.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=O.commonjsGlobal&&O.commonjsGlobal.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Rc,e),r(Dc,e),r(Gm,e),r(Nc,e),r(kc,e),r(js,e)})(Sw);(function(e){var t=O.commonjsGlobal&&O.commonjsGlobal.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=O.commonjsGlobal&&O.commonjsGlobal.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Sw,e)})(Gt);class Bt extends U.AbstractTranslatableError{constructor(t,r){super(d_,{key:t,interpolationOptions:r},F4.t)}get status(){return this.interpolationOptions.status}}var $6=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};const ws="api/datasources",B6="api/v2/datamodels";class z6{constructor(t){this.httpClient=t}getDataSourceFields(t,r=9999,n=0){const i=U.getDataSourceName(t),a=`${ws}/${encodeURI(i)}/fields/search`;return this.httpClient.post(a,{offset:n,count:r}).catch(()=>{throw new Bt("errors.dataSourceNotFound",{dataSource:typeof t=="string"?t:t.title})})}getDataSourceList(){const t=`${ws}/?sharedWith=r,w`;return this.httpClient.get(t)}getDataSourceSchema(t){const r=`${B6}/schema?title=${encodeURIComponent(t)}`;return this.httpClient.get(r)}sendJaqlRequest(t,r){const n=qm(t),i=new AbortController;return{responsePromise:this.httpClient.post(n,r,void 0,i.signal).then(a=>Array.isArray(a)?{values:[],metadata:[]}:a),abortHttpRequest:a=>i.abort(a)}}sendCountRowsRequest(t,r){const n=U6(t),i=new AbortController;return{responsePromise:this.httpClient.post(n,r,void 0,i.signal),abortHttpRequest:a=>i.abort(a)}}sendDownloadCsvRequest(t,r){const n=j6(t),i=new AbortController,a=new URLSearchParams;return a.append("data",encodeURIComponent(JSON.stringify(r))),{responsePromise:this.httpClient.post(n,a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}},i.signal,{nonJSONBody:!0,returnBlob:!0}),abortHttpRequest:o=>i.abort(o)}}sendCancelJaqlQueryRequest(t,r){return this.sendCancelMultipleJaqlQueriesRequest([t],r)}sendCancelMultipleJaqlQueriesRequest(t,r){return $6(this,void 0,void 0,function*(){const n={queries:t.join(";")},i=H6(r);try{yield this.httpClient.post(i,n)}catch(a){if(a.status==="404"){const o=W6(r);yield this.httpClient.post(o,n)}else throw a}})}}function H6(e){const t=encodeURIComponent(U.getDataSourceName(e));return`${ws}/localhost/${t}/cancel_queries`}function W6(e){const t=encodeURIComponent(U.getDataSourceName(e));return`${ws}/live/${t}/cancel_queries`}function qm(e){const t=encodeURIComponent(U.getDataSourceName(e));return`${ws}/${t}/jaql`}function j6(e){return`${qm(e)}/csv`}function U6(e){return`${qm(e)}/countrows`}var Rw={exports:{}};/*! @preserve
6
- * numeral.js
7
- * version : 2.0.6
8
- * author : Adam Draper
9
- * license : MIT
10
- * http://adamwdraper.github.com/Numeral-js/
11
- */(function(e){(function(t,r){e.exports?e.exports=r():t.numeral=r()})(O.commonjsGlobal,function(){var t,r,n="2.0.6",i={},a={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function u(c,d){this._input=c,this._value=d}return t=function(c){var d,h,p,m;if(t.isNumeral(c))d=c.value();else if(c===0||typeof c=="undefined")d=0;else if(c===null||r.isNaN(c))d=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)d=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)d=null;else{for(h in i)if(m=typeof i[h].regexps.unformat=="function"?i[h].regexps.unformat():i[h].regexps.unformat,m&&c.match(m)){p=i[h].unformat;break}p=p||t._.stringToNumber,d=p(c)}else d=Number(c)||null;return new u(c,d)},t.version=n,t.isNumeral=function(c){return c instanceof u},t._=r={numberToFormat:function(c,d,h){var p=a[t.options.currentLocale],m=!1,v=!1,b=0,_="",w=1e12,C=1e9,S=1e6,T=1e3,M="",E=!1,D,N,F,B,G,Y,$;if(c=c||0,N=Math.abs(c),t._.includes(d,"(")?(m=!0,d=d.replace(/[\(|\)]/g,"")):(t._.includes(d,"+")||t._.includes(d,"-"))&&(G=t._.includes(d,"+")?d.indexOf("+"):c<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),t._.includes(d,"a")&&(D=d.match(/a(k|m|b|t)?/),D=D?D[1]:!1,t._.includes(d," a")&&(_=" "),d=d.replace(new RegExp(_+"a[kmbt]?"),""),N>=w&&!D||D==="t"?(_+=p.abbreviations.trillion,c=c/w):N<w&&N>=C&&!D||D==="b"?(_+=p.abbreviations.billion,c=c/C):N<C&&N>=S&&!D||D==="m"?(_+=p.abbreviations.million,c=c/S):(N<S&&N>=T&&!D||D==="k")&&(_+=p.abbreviations.thousand,c=c/T)),t._.includes(d,"[.]")&&(v=!0,d=d.replace("[.]",".")),F=c.toString().split(".")[0],B=d.split(".")[1],Y=d.indexOf(","),b=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,B?(t._.includes(B,"[")?(B=B.replace("]",""),B=B.split("["),M=t._.toFixed(c,B[0].length+B[1].length,h,B[1].length)):M=t._.toFixed(c,B.length,h),F=M.split(".")[0],t._.includes(M,".")?M=p.delimiters.decimal+M.split(".")[1]:M="",v&&Number(M.slice(1))===0&&(M="")):F=t._.toFixed(c,0,h),_&&!D&&Number(F)>=1e3&&_!==p.abbreviations.trillion)switch(F=String(Number(F)/1e3),_){case p.abbreviations.thousand:_=p.abbreviations.million;break;case p.abbreviations.million:_=p.abbreviations.billion;break;case p.abbreviations.billion:_=p.abbreviations.trillion;break}if(t._.includes(F,"-")&&(F=F.slice(1),E=!0),F.length<b)for(var X=b-F.length;X>0;X--)F="0"+F;return Y>-1&&(F=F.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+p.delimiters.thousands)),d.indexOf(".")===0&&(F=""),$=F+M+(_||""),m?$=(m&&E?"(":"")+$+(m&&E?")":""):G>=0?$=G===0?(E?"-":"+")+$:$+(E?"-":"+"):E&&($="-"+$),$},stringToNumber:function(c){var d=a[s.currentLocale],h=c,p={thousand:3,million:6,billion:9,trillion:12},m,v,b;if(s.zeroFormat&&c===s.zeroFormat)v=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)v=null;else{v=1,d.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(m in p)if(b=new RegExp("[^a-zA-Z]"+d.abbreviations[m]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),h.match(b)){v*=Math.pow(10,p[m]);break}v*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),v*=Number(c)}return v},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,d){return c.indexOf(d)!==-1},insert:function(c,d,h){return c.slice(0,h)+d+c.slice(h)},reduce:function(c,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var h=Object(c),p=h.length>>>0,m=0,v;if(arguments.length===3)v=arguments[2];else{for(;m<p&&!(m in h);)m++;if(m>=p)throw new TypeError("Reduce of empty array with no initial value");v=h[m++]}for(;m<p;m++)m in h&&(v=d(v,h[m],m,h));return v},multiplier:function(c){var d=c.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(d,h){var p=r.multiplier(h);return d>p?d:p},1)},toFixed:function(c,d,h,p){var m=c.toString().split("."),v=d-(p||0),b,_,w,C;return m.length===2?b=Math.min(Math.max(m[1].length,v),d):b=v,w=Math.pow(10,b),C=(h(c+"e+"+b)/w).toFixed(b),p>d-b&&(_=new RegExp("\\.?0{1,"+(p-(d-b))+"}$"),C=C.replace(_,"")),C}},t.options=s,t.formats=i,t.locales=a,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return a[s.currentLocale];if(c=c.toLowerCase(),!a[c])throw new Error("Unknown locale : "+c);return a[c]},t.reset=function(){for(var c in o)s[c]=o[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,d,h){if(d=d.toLowerCase(),this[c+"s"][d])throw new TypeError(d+" "+c+" already registered.");return this[c+"s"][d]=h,h},t.validate=function(c,d){var h,p,m,v,b,_,w,C;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{w=t.localeData(d)}catch(S){w=t.localeData(t.locale())}return m=w.currency.symbol,b=w.abbreviations,h=w.delimiters.decimal,w.delimiters.thousands==="."?p="\\.":p=w.delimiters.thousands,C=c.match(/^[^\d]+/),C!==null&&(c=c.substr(1),C[0]!==m)||(C=c.match(/[^\d]+$/),C!==null&&(c=c.slice(0,-1),C[0]!==b.thousand&&C[0]!==b.million&&C[0]!==b.billion&&C[0]!==b.trillion))?!1:(_=new RegExp(p+"{2}"),c.match(/[^\d.,]/g)?!1:(v=c.split(h),v.length>2?!1:v.length<2?!!v[0].match(/^\d+.*\d$/)&&!v[0].match(_):v[0].length===1?!!v[0].match(/^\d+$/)&&!v[0].match(_)&&!!v[1].match(/^\d+$/):!!v[0].match(/^\d+.*\d$/)&&!v[0].match(_)&&!!v[1].match(/^\d+$/)))},t.fn=u.prototype={clone:function(){return t(this)},format:function(c,d){var h=this._value,p=c||s.defaultFormat,m,v,b;if(d=d||Math.round,h===0&&s.zeroFormat!==null)v=s.zeroFormat;else if(h===null&&s.nullFormat!==null)v=s.nullFormat;else{for(m in i)if(p.match(i[m].regexps.format)){b=i[m].format;break}b=b||t._.numberToFormat,v=b(h,p,d)}return v},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var d=r.correctionFactor.call(null,this._value,c);function h(p,m,v,b){return p+Math.round(d*m)}return this._value=r.reduce([this._value,c],h,0)/d,this},subtract:function(c){var d=r.correctionFactor.call(null,this._value,c);function h(p,m,v,b){return p-Math.round(d*m)}return this._value=r.reduce([c],h,Math.round(this._value*d))/d,this},multiply:function(c){function d(h,p,m,v){var b=r.correctionFactor(h,p);return Math.round(h*b)*Math.round(p*b)/Math.round(b*b)}return this._value=r.reduce([this._value,c],d,1),this},divide:function(c){function d(h,p,m,v){var b=r.correctionFactor(h,p);return Math.round(h*b)/Math.round(p*b)}return this._value=r.reduce([this._value,c],d),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var d=c%10;return~~(c%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,d,h){var p=t._.includes(d," BPS")?" ":"",m;return c=c*1e4,d=d.replace(/\s?BPS/,""),m=t._.numberToFormat(c,d,h),t._.includes(m,")")?(m=m.split(""),m.splice(-1,0,p+"BPS"),m=m.join("")):m=m+p+"BPS",m},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=c.suffixes.concat(d.suffixes.filter(function(m){return c.suffixes.indexOf(m)<0})),p=h.join("|");p="("+p.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(p)},format:function(m,v,b){var _,w=t._.includes(v,"ib")?d:c,C=t._.includes(v," b")||t._.includes(v," ib")?" ":"",S,T,M;for(v=v.replace(/\s?i?b/,""),S=0;S<=w.suffixes.length;S++)if(T=Math.pow(w.base,S),M=Math.pow(w.base,S+1),m===null||m===0||m>=T&&m<M){C+=w.suffixes[S],T>0&&(m=m/T);break}return _=t._.numberToFormat(m,v,b),_+C},unformat:function(m){var v=t._.stringToNumber(m),b,_;if(v){for(b=c.suffixes.length-1;b>=0;b--){if(t._.includes(m,c.suffixes[b])){_=Math.pow(c.base,b);break}if(t._.includes(m,d.suffixes[b])){_=Math.pow(d.base,b);break}}v*=_||1}return v}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,d,h){var p=t.locales[t.options.currentLocale],m={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},v,b,_;for(d=d.replace(/\s?\$\s?/,""),v=t._.numberToFormat(c,d,h),c>=0?(m.before=m.before.replace(/[\-\(]/,""),m.after=m.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(m.before,"-")&&!t._.includes(m.before,"(")&&(m.before="-"+m.before),_=0;_<m.before.length;_++)switch(b=m.before[_],b){case"$":v=t._.insert(v,p.currency.symbol,_);break;case" ":v=t._.insert(v," ",_+p.currency.symbol.length-1);break}for(_=m.after.length-1;_>=0;_--)switch(b=m.after[_],b){case"$":v=_===m.after.length-1?v+p.currency.symbol:t._.insert(v,p.currency.symbol,-(m.after.length-(1+_)));break;case" ":v=_===m.after.length-1?v+" ":t._.insert(v," ",-(m.after.length-(1+_)+p.currency.symbol.length-1));break}return v}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,d,h){var p,m=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",v=m.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),p=t._.numberToFormat(Number(v[0]),d,h),p+"e"+v[1]},unformat:function(c){var d=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),h=Number(d[0]),p=Number(d[1]);p=t._.includes(c,"e-")?p*=-1:p;function m(v,b,_,w){var C=t._.correctionFactor(v,b),S=v*C*(b*C)/(C*C);return S}return t._.reduce([h,Math.pow(10,p)],m,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,d,h){var p=t.locales[t.options.currentLocale],m,v=t._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),v+=p.ordinal(c),m=t._.numberToFormat(c,d,h),m+v}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,d,h){var p=t._.includes(d," %")?" ":"",m;return t.options.scalePercentBy100&&(c=c*100),d=d.replace(/\s?\%/,""),m=t._.numberToFormat(c,d,h),t._.includes(m,")")?(m=m.split(""),m.splice(-1,0,p+"%"),m=m.join("")):m=m+p+"%",m},unformat:function(c){var d=t._.stringToNumber(c);return t.options.scalePercentBy100?d*.01:d}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,d,h){var p=Math.floor(c/60/60),m=Math.floor((c-p*60*60)/60),v=Math.round(c-p*60*60-m*60);return p+":"+(m<10?"0"+m:m)+":"+(v<10?"0"+v:v)},unformat:function(c){var d=c.split(":"),h=0;return d.length===3?(h=h+Number(d[0])*60*60,h=h+Number(d[1])*60,h=h+Number(d[2])):d.length===2&&(h=h+Number(d[0])*60,h=h+Number(d[1])),Number(h)}})}(),t})})(Rw);var V6=Rw.exports;const G6=O.getDefaultExportFromCjs(V6),q6=(e,t)=>{const r=Z6(e);return Y6(r,t)};function Y6(e,t){return{columns:t==null?void 0:t.map(r=>({name:r.name,type:U.simpleColumnType(r.type)})),rows:X6(e)}}function X6(e){var t;let r=!1;const n=(t=e[0])===null||t===void 0?void 0:t.map((i,a)=>{const o=e.some(s=>"selected"in s[a]);return o&&(r=!0),o});return e.map(i=>{const a=r?n.some((o,s)=>o&&!i[s].selected):void 0;return i.map(o=>a!==void 0?{data:o.data,text:o.text,blur:a}:{data:o.data,text:o.text})})}function Z6({values:e=[],metadata:t=[]}){var r,n,i,a;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let o=0;o<e.length;o++){const s=e[o];for(let u=0;u<s.length;u++)t[u].format&&(!((n=(r=t[u])===null||r===void 0?void 0:r.format)===null||n===void 0)&&n.number)&&(s[u].text=G6(s[u].data).format((a=(i=t[u])===null||i===void 0?void 0:i.format)===null||a===void 0?void 0:a.number))}return e}var tn=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};class K6 extends Gt.AbstractTaskManager{constructor(t,r){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new Gt.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>tn(this,void 0,void 0,function*(){})),new Gt.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeCountRowsSending=super.createFlow([new Gt.Step("PREPARE_JAQL_PAYLOAD",this.prepareCountRowsJaqlPayload.bind(this),()=>tn(this,void 0,void 0,function*(){})),new Gt.Step("SEND_COUNT_ROWS_QUERY",this.sendCountRowsQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new Gt.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>tn(this,void 0,void 0,function*(){})),new Gt.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new Gt.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>tn(this,void 0,void 0,function*(){})),new Gt.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotQueryClient=r}prepareJaqlPayload(t){return tn(this,void 0,void 0,function*(){const{queryDescription:r,executionConfig:n}=t.passport,i=U.getJaqlQueryPayload(r,n.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendJaqlQuery(t,r){return tn(this,void 0,void 0,function*(){const{queryDescription:n,taskId:i}=t.passport,{responsePromise:a,abortHttpRequest:o}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,r);this.sentRequestsAbortersMap.set(i,o);const s=yield a.finally(()=>{this.sentRequestsAbortersMap.delete(i)});Q6(s);const u=[...n.attributes,...n.measures],c=(s.headers||[]).slice(u.length).map(d=>({name:d,type:"number"}));return q6(s,[...u,...c])})}prepareCountRowsJaqlPayload(t){return tn(this,void 0,void 0,function*(){const{queryDescription:r,executionConfig:n}=t.passport,i=Object.assign(Object.assign({},r),{count:void 0,offset:void 0}),a=U.getJaqlQueryPayload(i,n.shouldSkipHighlightsWithoutAttributes),o=n.onBeforeQuery;return o?o(a):a})}sendCountRowsQuery(t,r){return tn(this,void 0,void 0,function*(){const{taskId:n}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendCountRowsRequest(t.passport.queryDescription.dataSource,r);this.sentRequestsAbortersMap.set(n,a);const o=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(n)});return J6(o),o.countRows})}sendCsvQuery(t,r){return tn(this,void 0,void 0,function*(){const{taskId:n}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,r);return this.sentRequestsAbortersMap.set(n,a),i.finally(()=>{this.sentRequestsAbortersMap.delete(n)})})}cancelDataRetrievalQuery(t){const r=t.passport.taskId,n=this.sentRequestsAbortersMap.get(r);return n&&(n(),this.sentRequestsAbortersMap.delete(r)),this.queryApi.sendCancelJaqlQueryRequest(r,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return tn(this,void 0,void 0,function*(){const{pivotQueryDescription:r,executionConfig:n}=t.passport,i=U.getPivotJaqlQueryPayload(r,n.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendPivotJaqlQuery(t,r){var n;const{pivotQueryDescription:i}=t.passport;return this.pivotQueryClient.queryData(r,!0,(n=i.count)!==null&&n!==void 0?n:t8,!1)}cancelPivotJaqlQuery(t){const r=t.passport.taskId,n=this.sentRequestsAbortersMap.get(r);return n&&(n(),this.sentRequestsAbortersMap.delete(r)),this.queryApi.sendCancelJaqlQueryRequest(r,t.passport.pivotQueryDescription.dataSource)}}function Q6(e){if(!e)throw new Bt("errors.noJaqlResponse");if(e.error){const t=[e.details,e.database].filter(Boolean).join(" ");throw new Error(t)}}function J6(e){if(!e||typeof e.countRows!="number")throw new Bt("errors.invalidCountRowsResponse")}class wh extends Gt.TaskPassport{constructor(t,r,n){super(),this.queryDescription=r,this.type=t,this.executionConfig=n}}class e8 extends Gt.TaskPassport{constructor(t,r,n){super(),this.pivotQueryDescription=r,this.type=t,this.executionConfig=n}}var a1=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):i(d.value).then(s,u)}c((n=n.apply(e,t||[])).next())})};const t8=2e4,Xl="Unspecified reason";class r8{constructor(t,r=new Tw(t.url,t.auth),n){n8(t),this.queryApi=new z6(t),this.taskManager=new K6(this.queryApi,r),this.shouldSkipHighlightsWithoutAttributes=n!=null?n:!1}executeQuery(t,r){const n=new wh("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},r||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Ch(t),this.taskManager.executeQuerySending(n).then(o=>{o.status===Gt.ExecutionResultStatus.SUCCESS?i(o.result):a(o.error)})}),cancel:i=>this.taskManager.cancel(n.taskId,i||Xl)}}executeCountRowsQuery(t,r){const n=new wh("SEND_COUNT_ROWS_QUERY",t,Object.assign(Object.assign({},r||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Ch(t),this.taskManager.executeCountRowsSending(n).then(o=>{o.status===Gt.ExecutionResultStatus.SUCCESS?i(o.result):a(o.error)})}),cancel:i=>this.taskManager.cancel(n.taskId,i||Xl)}}executeCsvQuery(t,r){const n=new wh("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},r||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Ch(t),this.taskManager.executeDownloadCsvSending(n).then(o=>{o.status===Gt.ExecutionResultStatus.SUCCESS?i(o.result):a(o.error)})}),cancel:i=>this.taskManager.cancel(n.taskId,i||Xl)}}executePivotQuery(t,r){const n=new e8("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},r||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Dw(t),this.taskManager.executePivotQuerySending(n).then(o=>{o.status===Gt.ExecutionResultStatus.SUCCESS?i(o.result):a(o.error)})}),cancel:i=>this.taskManager.cancel(n.taskId,i||Xl)}}getDataSourceFields(t){return a1(this,arguments,void 0,function*(r,n=9999,i=0){return(yield this.queryApi.getDataSourceFields(r,n,i))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return a1(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function Ch(e){const{attributes:t,measures:r,filters:n,highlights:i,count:a,offset:o}=e;if(a&&a<0)throw new Bt("errors.invalidCountNegative",{count:a.toString()});if(o&&o<0)throw new Bt("errors.invalidOffset",{offset:o.toString()});if(t.length+r.length===0)throw new Bt("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!U.MetadataTypes.isAttribute(s)){const{name:u}=s;throw new Bt("errors.invalidAttribute",{attributeName:u})}}),r.forEach(s=>{if(!s.skipValidation&&!U.MetadataTypes.isMeasure(s))throw new Bt("errors.invalidMeasure",{measureName:s.name})}),n.forEach(s=>{if(!s.skipValidation&&!U.MetadataTypes.isFilter(s))throw new Bt("errors.invalidFilter",{filterName:s.name})}),i.forEach(s=>{if(!s.skipValidation&&!U.MetadataTypes.isFilter(s))throw new Bt("errors.invalidHighlight",{highlightName:s.name})})}function Dw(e){const{rowsAttributes:t,columnsAttributes:r,measures:n,filters:i,highlights:a,count:o,offset:s}=e;if(o&&o<0)throw new Bt("errors.invalidCountNegative",{count:o.toString()});if(s&&s<0)throw new Bt("errors.invalidOffset",{offset:s.toString()});if(t.length+r.length+n.length===0)throw new Bt("errors.noDimensionsOrMeasures");i.forEach(u=>{if(!u.skipValidation&&!U.MetadataTypes.isFilter(u))throw new Bt("errors.invalidFilter",{filterName:u.name})}),a.forEach(u=>{if(!u.skipValidation&&!U.MetadataTypes.isFilter(u))throw new Bt("errors.invalidHighlight",{highlightName:u.name})})}function n8(e){if(!e)throw new Bt("errors.missingHttpClient");if(!e.post)throw new Bt("errors.missingPostMethod")}function Ir(e){var o,s;const{app:t,queryDescription:r,executionConfig:n}=e;return(((s=(o=t==null?void 0:t.settings.queryCacheConfig)==null?void 0:o.enabled)!=null?s:!1)?U.executeQueryWithCache:U.executeQuery)(r,t,n)}const i8=(e,t)=>{const r=P.getPaletteColor(t,0),n=P.toGray(r),i=P.scaleBrightness(r,-.2),a=e.minColor===P.DEFAULT_COLOR||e.minColor===n,o=e.maxColor===P.DEFAULT_COLOR||e.maxColor===i;return a&&o?"auto":a?"max":o?"min":"both"},a8=(e,t)=>{let r={type:"range",steps:e.steps};if(e.rangeMode!=="auto"){const o=parseFloat(`${e.minvalue}`),s=parseFloat(`${e.midvalue}`),u=parseFloat(`${e.maxvalue}`);r=R(R(R(R({},r),o&&{minValue:o}),s&&{midValue:s}),u&&{maxValue:u})}const n=P.getPaletteColor(t,0),i=P.scaleBrightness(n,.2),a=P.scaleBrightness(n,-.2);switch(e.rangeMode){case"auto":return H(R({},r),{minColor:P.toGray(n),maxColor:a});case"both":return H(R({},r),{minColor:e.min||i,maxColor:e.max||a});case"min":return H(R({},r),{minColor:e.min||i,maxColor:P.DEFAULT_COLOR});case"max":return H(R({},r),{minColor:P.DEFAULT_COLOR,maxColor:e.max||a})}},Nw=(e,t)=>{if(e!==void 0)switch(e.type){case"color":return R({type:"uniform",color:e.color||P.getPaletteColor(t,e.colorIndex||0)},e.colorIndex!==void 0&&{colorIndex:e.colorIndex});case"range":return a8(e,t);case"condition":return{type:"conditional",conditions:e.conditions.filter(r=>typeof r.expression=="string").map(({color:r,expression:n,operator:i})=>({color:r,expression:n,operator:i})),defaultColor:P.getPaletteColor(t,0)};default:return P.getUniformColorOptionsFromString(P.getPaletteColor(t,0))}},o8=e=>e.replace(/%46/g,".").replace(/%36/g,"$"),kw=e=>Object.entries(e).reduce((t,[r,{color:n}])=>(t[o8(r)]=n,t),{}),s8=(e,t)=>{if(e===void 0)return;const r=P.getPaletteColor(t,0);if(typeof e=="string")return{type:"color",color:e};switch(e.type){case"uniform":return H(R({type:"color",color:e.color},e.colorIndex!==void 0&&{colorIndex:e.colorIndex}),{isHandPickedColor:e.colorIndex===void 0});case"range":{const n=P.getPaletteColor(t,0),i=P.toGray(n),a=P.scaleBrightness(n,-.2),o=i8(e,t),s={type:"range",steps:e.steps||5,rangeMode:o,min:o==="max"?i:e.minColor,max:o==="min"?a:e.maxColor};return s.rangeMode!=="auto"&&(e.minValue!==void 0&&(s.minvalue=e.minValue.toString()),e.midValue!==void 0&&(s.midvalue=e.midValue.toString()),e.maxValue!==void 0&&(s.maxvalue=e.maxValue.toString())),s}case"conditional":return{type:"condition",conditions:(e.conditions||[]).filter(n=>typeof n.expression=="string").map(({color:n,expression:i,operator:a})=>({color:n||r,expression:i,operator:a}))};default:return{type:"color",color:r,colorIndex:0}}},l8=e=>e.reduce((t,r)=>{var n,i;return(n=r.format)!=null&&n.members&&(t[U.normalizeName(r.jaql.title)]=kw((i=r.format)==null?void 0:i.members)),t},{}),u8=P.createDataColoringFunction({getValueFromDataStructure:e=>e.originalValue,applyColorToDataStructure:(e,t)=>H(R({},e),{color:t})}),c8=Nw({type:"range",steps:5,rangeMode:"auto"}),d8=(e,t,r)=>{var u,c,d;const n=P.getColumnByName(t,e.geo.column.name),i=P.getColumnByName(t,(c=(u=e.color)==null?void 0:u.column.name)!=null?c:e.geo.column.name);if(!n||!i)throw new U.TranslatableError("errors.requiredColumnMissing",{hint:"geo or color column is missing for Areamap"});const a=(d=r==null?void 0:r.defaultNumberFormattingEnabled)!=null?d:!0,o=t.rows.map(h=>{var v;const p=P.getValue(h,i),m=P.formatNumberWithFallback(p,(v=e.color)==null?void 0:v.numberFormatConfig,a,P.applyFormatPlainText);return{geoName:P.getValue(h,n),originalValue:p,formattedOriginalValue:m}});let s;return e.color&&(s=u8(o,e.color.color||c8)),{type:"areamap",geoData:s||o}},h8={loadData:Ir,getChartData:d8},Ym=50,f8=1e3,p8=500,Vu=1e5,rr={lineType:"straight",stackType:"classic",legend:{enabled:!0,position:"bottom"},lineWidth:2,marker:{enabled:!1,size:"small",fill:"full"},xAxis:{type:"linear",enabled:!0,titleEnabled:!0,title:"X Axis title",gridLine:!0,labels:!0,min:null,max:null,tickInterval:null},yAxis:{type:"linear",enabled:!0,titleEnabled:!0,title:"Y Axis title",gridLine:!0,labels:!0,min:null,max:null,tickInterval:null},autoZoom:{enabled:!0},pieType:P.DefaultPieType,funnelType:P.DefaultFunnelType,funnelSize:P.DefaultFunnelSize,funnelDirection:P.DefaultFunnelDirection,indicatorType:"numeric",numericSubtype:"numericSimple",skin:"vertical",indicatorComponents:{title:{shouldBeShown:!1,text:""},secondaryTitle:{text:""},ticks:{shouldBeShown:!0},labels:{shouldBeShown:!0}},dataLimits:{seriesCapacity:Ym,categoriesCapacity:Vu}},m8={translateStyleOptionsToDesignOptions:function(e){return H(R({},rr),{mapType:e.mapType||"world"})},isCorrectStyleOptions:function(e){return typeof e=="object"&&e!==null}};var Sf={exports:{}};/* @preserve
12
- * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
13
- * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
14
- */(function(e,t){(function(r,n){n(t)})(O.commonjsGlobal,function(r){var n="1.9.4";function i(l){var f,g,x,A;for(g=1,x=arguments.length;g<x;g++){A=arguments[g];for(f in A)l[f]=A[f]}return l}var a=Object.create||function(){function l(){}return function(f){return l.prototype=f,new l}}();function o(l,f){var g=Array.prototype.slice;if(l.bind)return l.bind.apply(l,g.call(arguments,1));var x=g.call(arguments,2);return function(){return l.apply(f,x.length?x.concat(g.call(arguments)):arguments)}}var s=0;function u(l){return"_leaflet_id"in l||(l._leaflet_id=++s),l._leaflet_id}function c(l,f,g){var x,A,I,K;return K=function(){x=!1,A&&(I.apply(g,A),A=!1)},I=function(){x?A=arguments:(l.apply(g,arguments),setTimeout(K,f),x=!0)},I}function d(l,f,g){var x=f[1],A=f[0],I=x-A;return l===x&&g?l:((l-A)%I+I)%I+A}function h(){return!1}function p(l,f){if(f===!1)return l;var g=Math.pow(10,f===void 0?6:f);return Math.round(l*g)/g}function m(l){return l.trim?l.trim():l.replace(/^\s+|\s+$/g,"")}function v(l){return m(l).split(/\s+/)}function b(l,f){Object.prototype.hasOwnProperty.call(l,"options")||(l.options=l.options?a(l.options):{});for(var g in f)l.options[g]=f[g];return l.options}function _(l,f,g){var x=[];for(var A in l)x.push(encodeURIComponent(g?A.toUpperCase():A)+"="+encodeURIComponent(l[A]));return(!f||f.indexOf("?")===-1?"?":"&")+x.join("&")}var w=/\{ *([\w_ -]+) *\}/g;function C(l,f){return l.replace(w,function(g,x){var A=f[x];if(A===void 0)throw new Error("No value provided for variable "+g);return typeof A=="function"&&(A=A(f)),A})}var S=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"};function T(l,f){for(var g=0;g<l.length;g++)if(l[g]===f)return g;return-1}var M="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function E(l){return window["webkit"+l]||window["moz"+l]||window["ms"+l]}var D=0;function N(l){var f=+new Date,g=Math.max(0,16-(f-D));return D=f+g,window.setTimeout(l,g)}var F=window.requestAnimationFrame||E("RequestAnimationFrame")||N,B=window.cancelAnimationFrame||E("CancelAnimationFrame")||E("CancelRequestAnimationFrame")||function(l){window.clearTimeout(l)};function G(l,f,g){if(g&&F===N)l.call(f);else return F.call(window,o(l,f))}function Y(l){l&&B.call(window,l)}var $={__proto__:null,extend:i,create:a,bind:o,get lastId(){return s},stamp:u,throttle:c,wrapNum:d,falseFn:h,formatNum:p,trim:m,splitWords:v,setOptions:b,getParamString:_,template:C,isArray:S,indexOf:T,emptyImageUrl:M,requestFn:F,cancelFn:B,requestAnimFrame:G,cancelAnimFrame:Y};function X(){}X.extend=function(l){var f=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},g=f.__super__=this.prototype,x=a(g);x.constructor=f,f.prototype=x;for(var A in this)Object.prototype.hasOwnProperty.call(this,A)&&A!=="prototype"&&A!=="__super__"&&(f[A]=this[A]);return l.statics&&i(f,l.statics),l.includes&&(V(l.includes),i.apply(null,[x].concat(l.includes))),i(x,l),delete x.statics,delete x.includes,x.options&&(x.options=g.options?a(g.options):{},i(x.options,l.options)),x._initHooks=[],x.callInitHooks=function(){if(!this._initHooksCalled){g.callInitHooks&&g.callInitHooks.call(this),this._initHooksCalled=!0;for(var I=0,K=x._initHooks.length;I<K;I++)x._initHooks[I].call(this)}},f},X.include=function(l){var f=this.prototype.options;return i(this.prototype,l),l.options&&(this.prototype.options=f,this.mergeOptions(l.options)),this},X.mergeOptions=function(l){return i(this.prototype.options,l),this},X.addInitHook=function(l){var f=Array.prototype.slice.call(arguments,1),g=typeof l=="function"?l:function(){this[l].apply(this,f)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(g),this};function V(l){if(!(typeof L=="undefined"||!L||!L.Mixin)){l=S(l)?l:[l];for(var f=0;f<l.length;f++)l[f]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Z={on:function(l,f,g){if(typeof l=="object")for(var x in l)this._on(x,l[x],f);else{l=v(l);for(var A=0,I=l.length;A<I;A++)this._on(l[A],f,g)}return this},off:function(l,f,g){if(!arguments.length)delete this._events;else if(typeof l=="object")for(var x in l)this._off(x,l[x],f);else{l=v(l);for(var A=arguments.length===1,I=0,K=l.length;I<K;I++)A?this._off(l[I]):this._off(l[I],f,g)}return this},_on:function(l,f,g,x){if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}if(this._listens(l,f,g)===!1){g===this&&(g=void 0);var A={fn:f,ctx:g};x&&(A.once=!0),this._events=this._events||{},this._events[l]=this._events[l]||[],this._events[l].push(A)}},_off:function(l,f,g){var x,A,I;if(this._events&&(x=this._events[l],!!x)){if(arguments.length===1){if(this._firingCount)for(A=0,I=x.length;A<I;A++)x[A].fn=h;delete this._events[l];return}if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}var K=this._listens(l,f,g);if(K!==!1){var ee=x[K];this._firingCount&&(ee.fn=h,this._events[l]=x=x.slice()),x.splice(K,1)}}},fire:function(l,f,g){if(!this.listens(l,g))return this;var x=i({},f,{type:l,target:this,sourceTarget:f&&f.sourceTarget||this});if(this._events){var A=this._events[l];if(A){this._firingCount=this._firingCount+1||1;for(var I=0,K=A.length;I<K;I++){var ee=A[I],re=ee.fn;ee.once&&this.off(l,re,ee.ctx),re.call(ee.ctx||this,x)}this._firingCount--}}return g&&this._propagateEvent(x),this},listens:function(l,f,g,x){typeof l!="string"&&console.warn('"string" type argument expected');var A=f;typeof f!="function"&&(x=!!f,A=void 0,g=void 0);var I=this._events&&this._events[l];if(I&&I.length&&this._listens(l,A,g)!==!1)return!0;if(x){for(var K in this._eventParents)if(this._eventParents[K].listens(l,f,g,x))return!0}return!1},_listens:function(l,f,g){if(!this._events)return!1;var x=this._events[l]||[];if(!f)return!!x.length;g===this&&(g=void 0);for(var A=0,I=x.length;A<I;A++)if(x[A].fn===f&&x[A].ctx===g)return A;return!1},once:function(l,f,g){if(typeof l=="object")for(var x in l)this._on(x,l[x],f,!0);else{l=v(l);for(var A=0,I=l.length;A<I;A++)this._on(l[A],f,g,!0)}return this},addEventParent:function(l){return this._eventParents=this._eventParents||{},this._eventParents[u(l)]=l,this},removeEventParent:function(l){return this._eventParents&&delete this._eventParents[u(l)],this},_propagateEvent:function(l){for(var f in this._eventParents)this._eventParents[f].fire(l.type,i({layer:l.target,propagatedFrom:l.target},l),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var j=X.extend(Z);function q(l,f,g){this.x=g?Math.round(l):l,this.y=g?Math.round(f):f}var te=Math.trunc||function(l){return l>0?Math.floor(l):Math.ceil(l)};q.prototype={clone:function(){return new q(this.x,this.y)},add:function(l){return this.clone()._add(Q(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(Q(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new q(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new q(this.x/l.x,this.y/l.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=te(this.x),this.y=te(this.y),this},distanceTo:function(l){l=Q(l);var f=l.x-this.x,g=l.y-this.y;return Math.sqrt(f*f+g*g)},equals:function(l){return l=Q(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=Q(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function Q(l,f,g){return l instanceof q?l:S(l)?new q(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new q(l.x,l.y):new q(l,f,g)}function J(l,f){if(l)for(var g=f?[l,f]:l,x=0,A=g.length;x<A;x++)this.extend(g[x])}J.prototype={extend:function(l){var f,g;if(!l)return this;if(l instanceof q||typeof l[0]=="number"||"x"in l)f=g=Q(l);else if(l=ne(l),f=l.min,g=l.max,!f||!g)return this;return!this.min&&!this.max?(this.min=f.clone(),this.max=g.clone()):(this.min.x=Math.min(f.x,this.min.x),this.max.x=Math.max(g.x,this.max.x),this.min.y=Math.min(f.y,this.min.y),this.max.y=Math.max(g.y,this.max.y)),this},getCenter:function(l){return Q((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,l)},getBottomLeft:function(){return Q(this.min.x,this.max.y)},getTopRight:function(){return Q(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(l){var f,g;return typeof l[0]=="number"||l instanceof q?l=Q(l):l=ne(l),l instanceof J?(f=l.min,g=l.max):f=g=l,f.x>=this.min.x&&g.x<=this.max.x&&f.y>=this.min.y&&g.y<=this.max.y},intersects:function(l){l=ne(l);var f=this.min,g=this.max,x=l.min,A=l.max,I=A.x>=f.x&&x.x<=g.x,K=A.y>=f.y&&x.y<=g.y;return I&&K},overlaps:function(l){l=ne(l);var f=this.min,g=this.max,x=l.min,A=l.max,I=A.x>f.x&&x.x<g.x,K=A.y>f.y&&x.y<g.y;return I&&K},isValid:function(){return!!(this.min&&this.max)},pad:function(l){var f=this.min,g=this.max,x=Math.abs(f.x-g.x)*l,A=Math.abs(f.y-g.y)*l;return ne(Q(f.x-x,f.y-A),Q(g.x+x,g.y+A))},equals:function(l){return l?(l=ne(l),this.min.equals(l.getTopLeft())&&this.max.equals(l.getBottomRight())):!1}};function ne(l,f){return!l||l instanceof J?l:new J(l,f)}function ae(l,f){if(l)for(var g=f?[l,f]:l,x=0,A=g.length;x<A;x++)this.extend(g[x])}ae.prototype={extend:function(l){var f=this._southWest,g=this._northEast,x,A;if(l instanceof se)x=l,A=l;else if(l instanceof ae){if(x=l._southWest,A=l._northEast,!x||!A)return this}else return l?this.extend(ce(l)||oe(l)):this;return!f&&!g?(this._southWest=new se(x.lat,x.lng),this._northEast=new se(A.lat,A.lng)):(f.lat=Math.min(x.lat,f.lat),f.lng=Math.min(x.lng,f.lng),g.lat=Math.max(A.lat,g.lat),g.lng=Math.max(A.lng,g.lng)),this},pad:function(l){var f=this._southWest,g=this._northEast,x=Math.abs(f.lat-g.lat)*l,A=Math.abs(f.lng-g.lng)*l;return new ae(new se(f.lat-x,f.lng-A),new se(g.lat+x,g.lng+A))},getCenter:function(){return new se((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new se(this.getNorth(),this.getWest())},getSouthEast:function(){return new se(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(l){typeof l[0]=="number"||l instanceof se||"lat"in l?l=ce(l):l=oe(l);var f=this._southWest,g=this._northEast,x,A;return l instanceof ae?(x=l.getSouthWest(),A=l.getNorthEast()):x=A=l,x.lat>=f.lat&&A.lat<=g.lat&&x.lng>=f.lng&&A.lng<=g.lng},intersects:function(l){l=oe(l);var f=this._southWest,g=this._northEast,x=l.getSouthWest(),A=l.getNorthEast(),I=A.lat>=f.lat&&x.lat<=g.lat,K=A.lng>=f.lng&&x.lng<=g.lng;return I&&K},overlaps:function(l){l=oe(l);var f=this._southWest,g=this._northEast,x=l.getSouthWest(),A=l.getNorthEast(),I=A.lat>f.lat&&x.lat<g.lat,K=A.lng>f.lng&&x.lng<g.lng;return I&&K},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(l,f){return l?(l=oe(l),this._southWest.equals(l.getSouthWest(),f)&&this._northEast.equals(l.getNorthEast(),f)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function oe(l,f){return l instanceof ae?l:new ae(l,f)}function se(l,f,g){if(isNaN(l)||isNaN(f))throw new Error("Invalid LatLng object: ("+l+", "+f+")");this.lat=+l,this.lng=+f,g!==void 0&&(this.alt=+g)}se.prototype={equals:function(l,f){if(!l)return!1;l=ce(l);var g=Math.max(Math.abs(this.lat-l.lat),Math.abs(this.lng-l.lng));return g<=(f===void 0?1e-9:f)},toString:function(l){return"LatLng("+p(this.lat,l)+", "+p(this.lng,l)+")"},distanceTo:function(l){return pe.distance(this,ce(l))},wrap:function(){return pe.wrapLatLng(this)},toBounds:function(l){var f=180*l/40075017,g=f/Math.cos(Math.PI/180*this.lat);return oe([this.lat-f,this.lng-g],[this.lat+f,this.lng+g])},clone:function(){return new se(this.lat,this.lng,this.alt)}};function ce(l,f,g){return l instanceof se?l:S(l)&&typeof l[0]!="object"?l.length===3?new se(l[0],l[1],l[2]):l.length===2?new se(l[0],l[1]):null:l==null?l:typeof l=="object"&&"lat"in l?new se(l.lat,"lng"in l?l.lng:l.lon,l.alt):f===void 0?null:new se(l,f,g)}var me={latLngToPoint:function(l,f){var g=this.projection.project(l),x=this.scale(f);return this.transformation._transform(g,x)},pointToLatLng:function(l,f){var g=this.scale(f),x=this.transformation.untransform(l,g);return this.projection.unproject(x)},project:function(l){return this.projection.project(l)},unproject:function(l){return this.projection.unproject(l)},scale:function(l){return 256*Math.pow(2,l)},zoom:function(l){return Math.log(l/256)/Math.LN2},getProjectedBounds:function(l){if(this.infinite)return null;var f=this.projection.bounds,g=this.scale(l),x=this.transformation.transform(f.min,g),A=this.transformation.transform(f.max,g);return new J(x,A)},infinite:!1,wrapLatLng:function(l){var f=this.wrapLng?d(l.lng,this.wrapLng,!0):l.lng,g=this.wrapLat?d(l.lat,this.wrapLat,!0):l.lat,x=l.alt;return new se(g,f,x)},wrapLatLngBounds:function(l){var f=l.getCenter(),g=this.wrapLatLng(f),x=f.lat-g.lat,A=f.lng-g.lng;if(x===0&&A===0)return l;var I=l.getSouthWest(),K=l.getNorthEast(),ee=new se(I.lat-x,I.lng-A),re=new se(K.lat-x,K.lng-A);return new ae(ee,re)}},pe=i({},me,{wrapLng:[-180,180],R:6371e3,distance:function(l,f){var g=Math.PI/180,x=l.lat*g,A=f.lat*g,I=Math.sin((f.lat-l.lat)*g/2),K=Math.sin((f.lng-l.lng)*g/2),ee=I*I+Math.cos(x)*Math.cos(A)*K*K,re=2*Math.atan2(Math.sqrt(ee),Math.sqrt(1-ee));return this.R*re}}),we=6378137,Le={R:we,MAX_LATITUDE:85.0511287798,project:function(l){var f=Math.PI/180,g=this.MAX_LATITUDE,x=Math.max(Math.min(g,l.lat),-g),A=Math.sin(x*f);return new q(this.R*l.lng*f,this.R*Math.log((1+A)/(1-A))/2)},unproject:function(l){var f=180/Math.PI;return new se((2*Math.atan(Math.exp(l.y/this.R))-Math.PI/2)*f,l.x*f/this.R)},bounds:function(){var l=we*Math.PI;return new J([-l,-l],[l,l])}()};function Ce(l,f,g,x){if(S(l)){this._a=l[0],this._b=l[1],this._c=l[2],this._d=l[3];return}this._a=l,this._b=f,this._c=g,this._d=x}Ce.prototype={transform:function(l,f){return this._transform(l.clone(),f)},_transform:function(l,f){return f=f||1,l.x=f*(this._a*l.x+this._b),l.y=f*(this._c*l.y+this._d),l},untransform:function(l,f){return f=f||1,new q((l.x/f-this._b)/this._a,(l.y/f-this._d)/this._c)}};function le(l,f,g,x){return new Ce(l,f,g,x)}var Ve=i({},pe,{code:"EPSG:3857",projection:Le,transformation:function(){var l=.5/(Math.PI*Le.R);return le(l,.5,-l,.5)}()}),Te=i({},Ve,{code:"EPSG:900913"});function Ne(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function Be(l,f){var g="",x,A,I,K,ee,re;for(x=0,I=l.length;x<I;x++){for(ee=l[x],A=0,K=ee.length;A<K;A++)re=ee[A],g+=(A?"L":"M")+re.x+" "+re.y;g+=f?xe.svg?"z":"x":""}return g||"M0 0"}var Xe=document.documentElement.style,Je="ActiveXObject"in window,pr=Je&&!document.addEventListener,Pt="msLaunchUri"in navigator&&!("documentMode"in document),Ht=Zr("webkit"),or=Zr("android"),xr=Zr("android 2")||Zr("android 3"),Lt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Fn=or&&Zr("Google")&&Lt<537&&!("AudioNode"in window),Tr=!!window.opera,Sr=!Pt&&Zr("chrome"),Yr=Zr("gecko")&&!Ht&&!Tr&&!Je,$r=!Sr&&Zr("safari"),wn=Zr("phantom"),At="OTransition"in Xe,Xr=navigator.platform.indexOf("Win")===0,He=Je&&"transition"in Xe,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!xr,ci="MozPerspective"in Xe,bo=!window.L_DISABLE_3D&&(He||vt||ci)&&!At&&!wn,Cn=typeof orientation!="undefined"||Zr("mobile"),Xi=Cn&&Ht,Ad=Cn&&vt,ml=!window.PointerEvent&&window.MSPointerEvent,gl=!!(window.PointerEvent||ml),vl="ontouchstart"in window||!!window.TouchEvent,Rd=!window.L_NO_TOUCH&&(vl||gl),Dd=Cn&&Tr,Nd=Cn&&Yr,kd=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,yl=function(){var l=!1;try{var f=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",h,f),window.removeEventListener("testPassiveEventSupport",h,f)}catch(g){}return l}(),bl=function(){return!!document.createElement("canvas").getContext}(),Zi=!!(document.createElementNS&&Ne("svg").createSVGRect),_l=!!Zi&&function(){var l=document.createElement("div");return l.innerHTML="<svg/>",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Ae=!Zi&&function(){try{var l=document.createElement("div");l.innerHTML='<v:shape adj="1"/>';var f=l.firstChild;return f.style.behavior="url(#default#VML)",f&&typeof f.adj=="object"}catch(g){return!1}}(),mr=navigator.platform.indexOf("Mac")===0,wl=navigator.platform.indexOf("Linux")===0;function Zr(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var xe={ie:Je,ielt9:pr,edge:Pt,webkit:Ht,android:or,android23:xr,androidStock:Fn,opera:Tr,chrome:Sr,gecko:Yr,safari:$r,phantom:wn,opera12:At,win:Xr,ie3d:He,webkit3d:vt,gecko3d:ci,any3d:bo,mobile:Cn,mobileWebkit:Xi,mobileWebkit3d:Ad,msPointer:ml,pointer:gl,touch:Rd,touchNative:vl,mobileOpera:Dd,mobileGecko:Nd,retina:kd,passiveEvents:yl,canvas:bl,svg:Zi,vml:Ae,inlineSvg:_l,mac:mr,linux:wl},Cg=xe.msPointer?"MSPointerDown":"pointerdown",xg=xe.msPointer?"MSPointerMove":"pointermove",Tg=xe.msPointer?"MSPointerUp":"pointerup",Sg=xe.msPointer?"MSPointerCancel":"pointercancel",Ld={touchstart:Cg,touchmove:xg,touchend:Tg,touchcancel:Sg},Mg={touchstart:cE,touchmove:Cl,touchend:Cl,touchcancel:Cl},Ki={},Eg=!1;function aE(l,f,g){return f==="touchstart"&&uE(),Mg[f]?(g=Mg[f].bind(this,g),l.addEventListener(Ld[f],g,!1),g):(console.warn("wrong event specified:",f),h)}function oE(l,f,g){if(!Ld[f]){console.warn("wrong event specified:",f);return}l.removeEventListener(Ld[f],g,!1)}function sE(l){Ki[l.pointerId]=l}function lE(l){Ki[l.pointerId]&&(Ki[l.pointerId]=l)}function Pg(l){delete Ki[l.pointerId]}function uE(){Eg||(document.addEventListener(Cg,sE,!0),document.addEventListener(xg,lE,!0),document.addEventListener(Tg,Pg,!0),document.addEventListener(Sg,Pg,!0),Eg=!0)}function Cl(l,f){if(f.pointerType!==(f.MSPOINTER_TYPE_MOUSE||"mouse")){f.touches=[];for(var g in Ki)f.touches.push(Ki[g]);f.changedTouches=[f],l(f)}}function cE(l,f){f.MSPOINTER_TYPE_TOUCH&&f.pointerType===f.MSPOINTER_TYPE_TOUCH&&Ot(f),Cl(l,f)}function dE(l){var f={},g,x;for(x in l)g=l[x],f[x]=g&&g.bind?g.bind(l):g;return l=f,f.type="dblclick",f.detail=2,f.isTrusted=!1,f._simulated=!0,f}var hE=200;function fE(l,f){l.addEventListener("dblclick",f);var g=0,x;function A(I){if(I.detail!==1){x=I.detail;return}if(!(I.pointerType==="mouse"||I.sourceCapabilities&&!I.sourceCapabilities.firesTouchEvents)){var K=kg(I);if(!(K.some(function(re){return re instanceof HTMLLabelElement&&re.attributes.for})&&!K.some(function(re){return re instanceof HTMLInputElement||re instanceof HTMLSelectElement}))){var ee=Date.now();ee-g<=hE?(x++,x===2&&f(dE(I))):x=1,g=ee}}}return l.addEventListener("click",A),{dblclick:f,simDblclick:A}}function pE(l,f){l.removeEventListener("dblclick",f.dblclick),l.removeEventListener("click",f.simDblclick)}var Od=Sl(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),_o=Sl(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ag=_o==="webkitTransition"||_o==="OTransition"?_o+"End":"transitionend";function Rg(l){return typeof l=="string"?document.getElementById(l):l}function wo(l,f){var g=l.style[f]||l.currentStyle&&l.currentStyle[f];if((!g||g==="auto")&&document.defaultView){var x=document.defaultView.getComputedStyle(l,null);g=x?x[f]:null}return g==="auto"?null:g}function je(l,f,g){var x=document.createElement(l);return x.className=f||"",g&&g.appendChild(x),x}function lt(l){var f=l.parentNode;f&&f.removeChild(l)}function xl(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Qi(l){var f=l.parentNode;f&&f.lastChild!==l&&f.appendChild(l)}function Ji(l){var f=l.parentNode;f&&f.firstChild!==l&&f.insertBefore(l,f.firstChild)}function Id(l,f){if(l.classList!==void 0)return l.classList.contains(f);var g=Tl(l);return g.length>0&&new RegExp("(^|\\s)"+f+"(\\s|$)").test(g)}function Oe(l,f){if(l.classList!==void 0)for(var g=v(f),x=0,A=g.length;x<A;x++)l.classList.add(g[x]);else if(!Id(l,f)){var I=Tl(l);Fd(l,(I?I+" ":"")+f)}}function ft(l,f){l.classList!==void 0?l.classList.remove(f):Fd(l,m((" "+Tl(l)+" ").replace(" "+f+" "," ")))}function Fd(l,f){l.className.baseVal===void 0?l.className=f:l.className.baseVal=f}function Tl(l){return l.correspondingElement&&(l=l.correspondingElement),l.className.baseVal===void 0?l.className:l.className.baseVal}function Mr(l,f){"opacity"in l.style?l.style.opacity=f:"filter"in l.style&&mE(l,f)}function mE(l,f){var g=!1,x="DXImageTransform.Microsoft.Alpha";try{g=l.filters.item(x)}catch(A){if(f===1)return}f=Math.round(f*100),g?(g.Enabled=f!==100,g.Opacity=f):l.style.filter+=" progid:"+x+"(opacity="+f+")"}function Sl(l){for(var f=document.documentElement.style,g=0;g<l.length;g++)if(l[g]in f)return l[g];return!1}function di(l,f,g){var x=f||new q(0,0);l.style[Od]=(xe.ie3d?"translate("+x.x+"px,"+x.y+"px)":"translate3d("+x.x+"px,"+x.y+"px,0)")+(g?" scale("+g+")":"")}function yt(l,f){l._leaflet_pos=f,xe.any3d?di(l,f):(l.style.left=f.x+"px",l.style.top=f.y+"px")}function hi(l){return l._leaflet_pos||new q(0,0)}var Co,xo,$d;if("onselectstart"in document)Co=function(){ke(window,"selectstart",Ot)},xo=function(){et(window,"selectstart",Ot)};else{var To=Sl(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Co=function(){if(To){var l=document.documentElement.style;$d=l[To],l[To]="none"}},xo=function(){To&&(document.documentElement.style[To]=$d,$d=void 0)}}function Bd(){ke(window,"dragstart",Ot)}function zd(){et(window,"dragstart",Ot)}var Ml,Hd;function Wd(l){for(;l.tabIndex===-1;)l=l.parentNode;l.style&&(El(),Ml=l,Hd=l.style.outlineStyle,l.style.outlineStyle="none",ke(window,"keydown",El))}function El(){Ml&&(Ml.style.outlineStyle=Hd,Ml=void 0,Hd=void 0,et(window,"keydown",El))}function Dg(l){do l=l.parentNode;while((!l.offsetWidth||!l.offsetHeight)&&l!==document.body);return l}function jd(l){var f=l.getBoundingClientRect();return{x:f.width/l.offsetWidth||1,y:f.height/l.offsetHeight||1,boundingClientRect:f}}var gE={__proto__:null,TRANSFORM:Od,TRANSITION:_o,TRANSITION_END:Ag,get:Rg,getStyle:wo,create:je,remove:lt,empty:xl,toFront:Qi,toBack:Ji,hasClass:Id,addClass:Oe,removeClass:ft,setClass:Fd,getClass:Tl,setOpacity:Mr,testProp:Sl,setTransform:di,setPosition:yt,getPosition:hi,get disableTextSelection(){return Co},get enableTextSelection(){return xo},disableImageDrag:Bd,enableImageDrag:zd,preventOutline:Wd,restoreOutline:El,getSizedParentNode:Dg,getScale:jd};function ke(l,f,g,x){if(f&&typeof f=="object")for(var A in f)Vd(l,A,f[A],g);else{f=v(f);for(var I=0,K=f.length;I<K;I++)Vd(l,f[I],g,x)}return this}var Kr="_leaflet_events";function et(l,f,g,x){if(arguments.length===1)Ng(l),delete l[Kr];else if(f&&typeof f=="object")for(var A in f)Gd(l,A,f[A],g);else if(f=v(f),arguments.length===2)Ng(l,function(ee){return T(f,ee)!==-1});else for(var I=0,K=f.length;I<K;I++)Gd(l,f[I],g,x);return this}function Ng(l,f){for(var g in l[Kr]){var x=g.split(/\d/)[0];(!f||f(x))&&Gd(l,x,null,null,g)}}var Ud={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Vd(l,f,g,x){var A=f+u(g)+(x?"_"+u(x):"");if(l[Kr]&&l[Kr][A])return this;var I=function(ee){return g.call(x||l,ee||window.event)},K=I;!xe.touchNative&&xe.pointer&&f.indexOf("touch")===0?I=aE(l,f,I):xe.touch&&f==="dblclick"?I=fE(l,I):"addEventListener"in l?f==="touchstart"||f==="touchmove"||f==="wheel"||f==="mousewheel"?l.addEventListener(Ud[f]||f,I,xe.passiveEvents?{passive:!1}:!1):f==="mouseenter"||f==="mouseleave"?(I=function(ee){ee=ee||window.event,Yd(l,ee)&&K(ee)},l.addEventListener(Ud[f],I,!1)):l.addEventListener(f,K,!1):l.attachEvent("on"+f,I),l[Kr]=l[Kr]||{},l[Kr][A]=I}function Gd(l,f,g,x,A){A=A||f+u(g)+(x?"_"+u(x):"");var I=l[Kr]&&l[Kr][A];if(!I)return this;!xe.touchNative&&xe.pointer&&f.indexOf("touch")===0?oE(l,f,I):xe.touch&&f==="dblclick"?pE(l,I):"removeEventListener"in l?l.removeEventListener(Ud[f]||f,I,!1):l.detachEvent("on"+f,I),l[Kr][A]=null}function fi(l){return l.stopPropagation?l.stopPropagation():l.originalEvent?l.originalEvent._stopped=!0:l.cancelBubble=!0,this}function qd(l){return Vd(l,"wheel",fi),this}function So(l){return ke(l,"mousedown touchstart dblclick contextmenu",fi),l._leaflet_disable_click=!0,this}function Ot(l){return l.preventDefault?l.preventDefault():l.returnValue=!1,this}function pi(l){return Ot(l),fi(l),this}function kg(l){if(l.composedPath)return l.composedPath();for(var f=[],g=l.target;g;)f.push(g),g=g.parentNode;return f}function Lg(l,f){if(!f)return new q(l.clientX,l.clientY);var g=jd(f),x=g.boundingClientRect;return new q((l.clientX-x.left)/g.x-f.clientLeft,(l.clientY-x.top)/g.y-f.clientTop)}var vE=xe.linux&&xe.chrome?window.devicePixelRatio:xe.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Og(l){return xe.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/vE:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function Yd(l,f){var g=f.relatedTarget;if(!g)return!0;try{for(;g&&g!==l;)g=g.parentNode}catch(x){return!1}return g!==l}var yE={__proto__:null,on:ke,off:et,stopPropagation:fi,disableScrollPropagation:qd,disableClickPropagation:So,preventDefault:Ot,stop:pi,getPropagationPath:kg,getMousePosition:Lg,getWheelDelta:Og,isExternalTarget:Yd,addListener:ke,removeListener:et},Ig=j.extend({run:function(l,f,g,x){this.stop(),this._el=l,this._inProgress=!0,this._duration=g||.25,this._easeOutPower=1/Math.max(x||.5,.2),this._startPos=hi(l),this._offset=f.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=G(this._animate,this),this._step()},_step:function(l){var f=+new Date-this._startTime,g=this._duration*1e3;f<g?this._runFrame(this._easeOut(f/g),l):(this._runFrame(1),this._complete())},_runFrame:function(l,f){var g=this._startPos.add(this._offset.multiplyBy(l));f&&g._round(),yt(this._el,g),this.fire("step")},_complete:function(){Y(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(l){return 1-Math.pow(1-l,this._easeOutPower)}}),We=j.extend({options:{crs:Ve,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(l,f){f=b(this,f),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(l),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),f.maxBounds&&this.setMaxBounds(f.maxBounds),f.zoom!==void 0&&(this._zoom=this._limitZoom(f.zoom)),f.center&&f.zoom!==void 0&&this.setView(ce(f.center),f.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=_o&&xe.any3d&&!xe.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ke(this._proxy,Ag,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(l,f,g){if(f=f===void 0?this._zoom:this._limitZoom(f),l=this._limitCenter(ce(l),f,this.options.maxBounds),g=g||{},this._stop(),this._loaded&&!g.reset&&g!==!0){g.animate!==void 0&&(g.zoom=i({animate:g.animate},g.zoom),g.pan=i({animate:g.animate,duration:g.duration},g.pan));var x=this._zoom!==f?this._tryAnimatedZoom&&this._tryAnimatedZoom(l,f,g.zoom):this._tryAnimatedPan(l,g.pan);if(x)return clearTimeout(this._sizeTimer),this}return this._resetView(l,f,g.pan&&g.pan.noMoveStart),this},setZoom:function(l,f){return this._loaded?this.setView(this.getCenter(),l,{zoom:f}):(this._zoom=l,this)},zoomIn:function(l,f){return l=l||(xe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+l,f)},zoomOut:function(l,f){return l=l||(xe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-l,f)},setZoomAround:function(l,f,g){var x=this.getZoomScale(f),A=this.getSize().divideBy(2),I=l instanceof q?l:this.latLngToContainerPoint(l),K=I.subtract(A).multiplyBy(1-1/x),ee=this.containerPointToLatLng(A.add(K));return this.setView(ee,f,{zoom:g})},_getBoundsCenterZoom:function(l,f){f=f||{},l=l.getBounds?l.getBounds():oe(l);var g=Q(f.paddingTopLeft||f.padding||[0,0]),x=Q(f.paddingBottomRight||f.padding||[0,0]),A=this.getBoundsZoom(l,!1,g.add(x));if(A=typeof f.maxZoom=="number"?Math.min(f.maxZoom,A):A,A===1/0)return{center:l.getCenter(),zoom:A};var I=x.subtract(g).divideBy(2),K=this.project(l.getSouthWest(),A),ee=this.project(l.getNorthEast(),A),re=this.unproject(K.add(ee).divideBy(2).add(I),A);return{center:re,zoom:A}},fitBounds:function(l,f){if(l=oe(l),!l.isValid())throw new Error("Bounds are not valid.");var g=this._getBoundsCenterZoom(l,f);return this.setView(g.center,g.zoom,f)},fitWorld:function(l){return this.fitBounds([[-90,-180],[90,180]],l)},panTo:function(l,f){return this.setView(l,this._zoom,{pan:f})},panBy:function(l,f){if(l=Q(l).round(),f=f||{},!l.x&&!l.y)return this.fire("moveend");if(f.animate!==!0&&!this.getSize().contains(l))return this._resetView(this.unproject(this.project(this.getCenter()).add(l)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ig,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),f.noMoveStart||this.fire("movestart"),f.animate!==!1){Oe(this._mapPane,"leaflet-pan-anim");var g=this._getMapPanePos().subtract(l).round();this._panAnim.run(this._mapPane,g,f.duration||.25,f.easeLinearity)}else this._rawPanBy(l),this.fire("move").fire("moveend");return this},flyTo:function(l,f,g){if(g=g||{},g.animate===!1||!xe.any3d)return this.setView(l,f,g);this._stop();var x=this.project(this.getCenter()),A=this.project(l),I=this.getSize(),K=this._zoom;l=ce(l),f=f===void 0?K:f;var ee=Math.max(I.x,I.y),re=ee*this.getZoomScale(K,f),ue=A.distanceTo(x)||1,ye=1.42,Se=ye*ye;function Ie(bt){var Bl=bt?-1:1,oP=bt?re:ee,sP=re*re-ee*ee+Bl*Se*Se*ue*ue,lP=2*oP*Se*ue,ah=sP/lP,gv=Math.sqrt(ah*ah+1)-ah,uP=gv<1e-9?-18:Math.log(gv);return uP}function Xt(bt){return(Math.exp(bt)-Math.exp(-bt))/2}function Rt(bt){return(Math.exp(bt)+Math.exp(-bt))/2}function Pr(bt){return Xt(bt)/Rt(bt)}var sr=Ie(0);function aa(bt){return ee*(Rt(sr)/Rt(sr+ye*bt))}function rP(bt){return ee*(Rt(sr)*Pr(sr+ye*bt)-Xt(sr))/Se}function nP(bt){return 1-Math.pow(1-bt,1.5)}var iP=Date.now(),pv=(Ie(1)-sr)/ye,aP=g.duration?1e3*g.duration:1e3*pv*.8;function mv(){var bt=(Date.now()-iP)/aP,Bl=nP(bt)*pv;bt<=1?(this._flyToFrame=G(mv,this),this._move(this.unproject(x.add(A.subtract(x).multiplyBy(rP(Bl)/ue)),K),this.getScaleZoom(ee/aa(Bl),K),{flyTo:!0})):this._move(l,f)._moveEnd(!0)}return this._moveStart(!0,g.noMoveStart),mv.call(this),this},flyToBounds:function(l,f){var g=this._getBoundsCenterZoom(l,f);return this.flyTo(g.center,g.zoom,f)},setMaxBounds:function(l){return l=oe(l),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),l.isValid()?(this.options.maxBounds=l,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(l){var f=this.options.minZoom;return this.options.minZoom=l,this._loaded&&f!==l&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(l):this},setMaxZoom:function(l){var f=this.options.maxZoom;return this.options.maxZoom=l,this._loaded&&f!==l&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,f){this._enforcingBounds=!0;var g=this.getCenter(),x=this._limitCenter(g,this._zoom,oe(l));return g.equals(x)||this.panTo(x,f),this._enforcingBounds=!1,this},panInside:function(l,f){f=f||{};var g=Q(f.paddingTopLeft||f.padding||[0,0]),x=Q(f.paddingBottomRight||f.padding||[0,0]),A=this.project(this.getCenter()),I=this.project(l),K=this.getPixelBounds(),ee=ne([K.min.add(g),K.max.subtract(x)]),re=ee.getSize();if(!ee.contains(I)){this._enforcingBounds=!0;var ue=I.subtract(ee.getCenter()),ye=ee.extend(I).getSize().subtract(re);A.x+=ue.x<0?-ye.x:ye.x,A.y+=ue.y<0?-ye.y:ye.y,this.panTo(this.unproject(A),f),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=i({animate:!1,pan:!0},l===!0?{animate:!0}:l);var f=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var g=this.getSize(),x=f.divideBy(2).round(),A=g.divideBy(2).round(),I=x.subtract(A);return!I.x&&!I.y?this:(l.animate&&l.pan?this.panBy(I):(l.pan&&this._rawPanBy(I),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:f,newSize:g}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=i({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var f=o(this._handleGeolocationResponse,this),g=o(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(f,g,l):navigator.geolocation.getCurrentPosition(f,g,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var f=l.code,g=l.message||(f===1?"permission denied":f===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:f,message:"Geolocation error: "+g+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var f=l.coords.latitude,g=l.coords.longitude,x=new se(f,g),A=x.toBounds(l.coords.accuracy*2),I=this._locateOptions;if(I.setView){var K=this.getBoundsZoom(A);this.setView(x,I.maxZoom?Math.min(K,I.maxZoom):K)}var ee={latlng:x,bounds:A,timestamp:l.timestamp};for(var re in l.coords)typeof l.coords[re]=="number"&&(ee[re]=l.coords[re]);this.fire("locationfound",ee)}},addHandler:function(l,f){if(!f)return this;var g=this[l]=new f(this);return this._handlers.push(g),this.options[l]&&g.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(f){this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),lt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)lt(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,f){var g="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),x=je("div",g,f||this._mapPane);return l&&(this._panes[l]=x),x},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),f=this.unproject(l.getBottomLeft()),g=this.unproject(l.getTopRight());return new ae(f,g)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(l,f,g){l=oe(l),g=Q(g||[0,0]);var x=this.getZoom()||0,A=this.getMinZoom(),I=this.getMaxZoom(),K=l.getNorthWest(),ee=l.getSouthEast(),re=this.getSize().subtract(g),ue=ne(this.project(ee,x),this.project(K,x)).getSize(),ye=xe.any3d?this.options.zoomSnap:1,Se=re.x/ue.x,Ie=re.y/ue.y,Xt=f?Math.max(Se,Ie):Math.min(Se,Ie);return x=this.getScaleZoom(Xt,x),ye&&(x=Math.round(x/(ye/100))*(ye/100),x=f?Math.ceil(x/ye)*ye:Math.floor(x/ye)*ye),Math.max(A,Math.min(I,x))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new q(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,f){var g=this._getTopLeftPoint(l,f);return new J(g,g.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,f){var g=this.options.crs;return f=f===void 0?this._zoom:f,g.scale(l)/g.scale(f)},getScaleZoom:function(l,f){var g=this.options.crs;f=f===void 0?this._zoom:f;var x=g.zoom(l*g.scale(f));return isNaN(x)?1/0:x},project:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.latLngToPoint(ce(l),f)},unproject:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.pointToLatLng(Q(l),f)},layerPointToLatLng:function(l){var f=Q(l).add(this.getPixelOrigin());return this.unproject(f)},latLngToLayerPoint:function(l){var f=this.project(ce(l))._round();return f._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(ce(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(oe(l))},distance:function(l,f){return this.options.crs.distance(ce(l),ce(f))},containerPointToLayerPoint:function(l){return Q(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return Q(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var f=this.containerPointToLayerPoint(Q(l));return this.layerPointToLatLng(f)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ce(l)))},mouseEventToContainerPoint:function(l){return Lg(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var f=this._container=Rg(l);if(f){if(f._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ke(f,"scroll",this._onScroll,this),this._containerId=u(f)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&xe.any3d,Oe(l,"leaflet-container"+(xe.touch?" leaflet-touch":"")+(xe.retina?" leaflet-retina":"")+(xe.ielt9?" leaflet-oldie":"")+(xe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var f=wo(l,"position");f!=="absolute"&&f!=="relative"&&f!=="fixed"&&f!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),yt(this._mapPane,new q(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Oe(l.markerPane,"leaflet-zoom-hide"),Oe(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,f,g){yt(this._mapPane,new q(0,0));var x=!this._loaded;this._loaded=!0,f=this._limitZoom(f),this.fire("viewprereset");var A=this._zoom!==f;this._moveStart(A,g)._move(l,f)._moveEnd(A),this.fire("viewreset"),x&&this.fire("load")},_moveStart:function(l,f){return l&&this.fire("zoomstart"),f||this.fire("movestart"),this},_move:function(l,f,g,x){f===void 0&&(f=this._zoom);var A=this._zoom!==f;return this._zoom=f,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),x?g&&g.pinch&&this.fire("zoom",g):((A||g&&g.pinch)&&this.fire("zoom",g),this.fire("move",g)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){yt(this._mapPane,this._getMapPanePos().subtract(l))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(l){this._targets={},this._targets[u(this._container)]=this;var f=l?et:ke;f(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&f(window,"resize",this._onResize,this),xe.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=G(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,f){for(var g=[],x,A=f==="mouseout"||f==="mouseover",I=l.target||l.srcElement,K=!1;I;){if(x=this._targets[u(I)],x&&(f==="click"||f==="preclick")&&this._draggableMoved(x)){K=!0;break}if(x&&x.listens(f,!0)&&(A&&!Yd(I,l)||(g.push(x),A))||I===this._container)break;I=I.parentNode}return!g.length&&!K&&!A&&this.listens(f,!0)&&(g=[this]),g},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var f=l.target||l.srcElement;if(!(!this._loaded||f._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(f))){var g=l.type;g==="mousedown"&&Wd(f),this._fireDOMEvent(l,g)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,f,g){if(l.type==="click"){var x=i({},l);x.type="preclick",this._fireDOMEvent(x,x.type,g)}var A=this._findEventTargets(l,f);if(g){for(var I=[],K=0;K<g.length;K++)g[K].listens(f,!0)&&I.push(g[K]);A=I.concat(A)}if(A.length){f==="contextmenu"&&Ot(l);var ee=A[0],re={originalEvent:l};if(l.type!=="keypress"&&l.type!=="keydown"&&l.type!=="keyup"){var ue=ee.getLatLng&&(!ee._radius||ee._radius<=10);re.containerPoint=ue?this.latLngToContainerPoint(ee.getLatLng()):this.mouseEventToContainerPoint(l),re.layerPoint=this.containerPointToLayerPoint(re.containerPoint),re.latlng=ue?ee.getLatLng():this.layerPointToLatLng(re.layerPoint)}for(K=0;K<A.length;K++)if(A[K].fire(f,re,!0),re.originalEvent._stopped||A[K].options.bubblingMouseEvents===!1&&T(this._mouseEvents,f)!==-1)return}},_draggableMoved:function(l){return l=l.dragging&&l.dragging.enabled()?l:this,l.dragging&&l.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var l=0,f=this._handlers.length;l<f;l++)this._handlers[l].disable()},whenReady:function(l,f){return this._loaded?l.call(f||this,{target:this}):this.on("load",l,f),this},_getMapPanePos:function(){return hi(this._mapPane)||new q(0,0)},_moved:function(){var l=this._getMapPanePos();return l&&!l.equals([0,0])},_getTopLeftPoint:function(l,f){var g=l&&f!==void 0?this._getNewPixelOrigin(l,f):this.getPixelOrigin();return g.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(l,f){var g=this.getSize()._divideBy(2);return this.project(l,f)._subtract(g)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(l,f,g){var x=this._getNewPixelOrigin(g,f);return this.project(l,f)._subtract(x)},_latLngBoundsToNewLayerBounds:function(l,f,g){var x=this._getNewPixelOrigin(g,f);return ne([this.project(l.getSouthWest(),f)._subtract(x),this.project(l.getNorthWest(),f)._subtract(x),this.project(l.getSouthEast(),f)._subtract(x),this.project(l.getNorthEast(),f)._subtract(x)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(l){return this.latLngToLayerPoint(l).subtract(this._getCenterLayerPoint())},_limitCenter:function(l,f,g){if(!g)return l;var x=this.project(l,f),A=this.getSize().divideBy(2),I=new J(x.subtract(A),x.add(A)),K=this._getBoundsOffset(I,g,f);return Math.abs(K.x)<=1&&Math.abs(K.y)<=1?l:this.unproject(x.add(K),f)},_limitOffset:function(l,f){if(!f)return l;var g=this.getPixelBounds(),x=new J(g.min.add(l),g.max.add(l));return l.add(this._getBoundsOffset(x,f))},_getBoundsOffset:function(l,f,g){var x=ne(this.project(f.getNorthEast(),g),this.project(f.getSouthWest(),g)),A=x.min.subtract(l.min),I=x.max.subtract(l.max),K=this._rebound(A.x,-I.x),ee=this._rebound(A.y,-I.y);return new q(K,ee)},_rebound:function(l,f){return l+f>0?Math.round(l-f)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(f))},_limitZoom:function(l){var f=this.getMinZoom(),g=this.getMaxZoom(),x=xe.any3d?this.options.zoomSnap:1;return x&&(l=Math.round(l/x)*x),Math.max(f,Math.min(g,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,f){var g=this._getCenterOffset(l)._trunc();return(f&&f.animate)!==!0&&!this.getSize().contains(g)?!1:(this.panBy(g,f),!0)},_createAnimProxy:function(){var l=this._proxy=je("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(f){var g=Od,x=this._proxy.style[g];di(this._proxy,this.project(f.center,f.zoom),this.getZoomScale(f.zoom,1)),x===this._proxy.style[g]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){lt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),f=this.getZoom();di(this._proxy,this.project(l,f),this.getZoomScale(f,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,f,g){if(this._animatingZoom)return!0;if(g=g||{},!this._zoomAnimated||g.animate===!1||this._nothingToAnimate()||Math.abs(f-this._zoom)>this.options.zoomAnimationThreshold)return!1;var x=this.getZoomScale(f),A=this._getCenterOffset(l)._divideBy(1-1/x);return g.animate!==!0&&!this.getSize().contains(A)?!1:(G(function(){this._moveStart(!0,g.noMoveStart||!1)._animateZoom(l,f,!0)},this),!0)},_animateZoom:function(l,f,g,x){this._mapPane&&(g&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=f,Oe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:f,noUpdate:x}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ft(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function bE(l,f){return new We(l,f)}var Br=X.extend({options:{position:"topright"},initialize:function(l){b(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var f=this._map;return f&&f.removeControl(this),this.options.position=l,f&&f.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var f=this._container=this.onAdd(l),g=this.getPosition(),x=l._controlCorners[g];return Oe(f,"leaflet-control"),g.indexOf("bottom")!==-1?x.insertBefore(f,x.firstChild):x.appendChild(f),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(lt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),Mo=function(l){return new Br(l)};We.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},f="leaflet-",g=this._controlContainer=je("div",f+"control-container",this._container);function x(A,I){var K=f+A+" "+f+I;l[A+I]=je("div",K,g)}x("top","left"),x("top","right"),x("bottom","left"),x("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)lt(this._controlCorners[l]);lt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Fg=Br.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,f,g,x){return g<x?-1:x<g?1:0}},initialize:function(l,f,g){b(this,g),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var x in l)this._addLayer(l[x],x);for(x in f)this._addLayer(f[x],x,!0)},onAdd:function(l){this._initLayout(),this._update(),this._map=l,l.on("zoomend",this._checkDisabledLayers,this);for(var f=0;f<this._layers.length;f++)this._layers[f].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(l){return Br.prototype.addTo.call(this,l),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(l,f){return this._addLayer(l,f),this._map?this._update():this},addOverlay:function(l,f){return this._addLayer(l,f,!0),this._map?this._update():this},removeLayer:function(l){l.off("add remove",this._onLayerChange,this);var f=this._getLayer(u(l));return f&&this._layers.splice(this._layers.indexOf(f),1),this._map?this._update():this},expand:function(){Oe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var l=this._map.getSize().y-(this._container.offsetTop+50);return l<this._section.clientHeight?(Oe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=l+"px"):ft(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ft(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var l="leaflet-control-layers",f=this._container=je("div",l),g=this.options.collapsed;f.setAttribute("aria-haspopup",!0),So(f),qd(f);var x=this._section=je("section",l+"-list");g&&(this._map.on("click",this.collapse,this),ke(f,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var A=this._layersLink=je("a",l+"-toggle",f);A.href="#",A.title="Layers",A.setAttribute("role","button"),ke(A,{keydown:function(I){I.keyCode===13&&this._expandSafely()},click:function(I){Ot(I),this._expandSafely()}},this),g||this.expand(),this._baseLayersList=je("div",l+"-base",x),this._separator=je("div",l+"-separator",x),this._overlaysList=je("div",l+"-overlays",x),f.appendChild(x)},_getLayer:function(l){for(var f=0;f<this._layers.length;f++)if(this._layers[f]&&u(this._layers[f].layer)===l)return this._layers[f]},_addLayer:function(l,f,g){this._map&&l.on("add remove",this._onLayerChange,this),this._layers.push({layer:l,name:f,overlay:g}),this.options.sortLayers&&this._layers.sort(o(function(x,A){return this.options.sortFunction(x.layer,A.layer,x.name,A.name)},this)),this.options.autoZIndex&&l.setZIndex&&(this._lastZIndex++,l.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;xl(this._baseLayersList),xl(this._overlaysList),this._layerControlInputs=[];var l,f,g,x,A=0;for(g=0;g<this._layers.length;g++)x=this._layers[g],this._addItem(x),f=f||x.overlay,l=l||!x.overlay,A+=x.overlay?0:1;return this.options.hideSingleBase&&(l=l&&A>1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=f&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var f=this._getLayer(u(l.target)),g=f.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;g&&this._map.fire(g,f)},_createRadioElement:function(l,f){var g='<input type="radio" class="leaflet-control-layers-selector" name="'+l+'"'+(f?' checked="checked"':"")+"/>",x=document.createElement("div");return x.innerHTML=g,x.firstChild},_addItem:function(l){var f=document.createElement("label"),g=this._map.hasLayer(l.layer),x;l.overlay?(x=document.createElement("input"),x.type="checkbox",x.className="leaflet-control-layers-selector",x.defaultChecked=g):x=this._createRadioElement("leaflet-base-layers_"+u(this),g),this._layerControlInputs.push(x),x.layerId=u(l.layer),ke(x,"click",this._onInputClick,this);var A=document.createElement("span");A.innerHTML=" "+l.name;var I=document.createElement("span");f.appendChild(I),I.appendChild(x),I.appendChild(A);var K=l.overlay?this._overlaysList:this._baseLayersList;return K.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,f,g,x=[],A=[];this._handlingClick=!0;for(var I=l.length-1;I>=0;I--)f=l[I],g=this._getLayer(f.layerId).layer,f.checked?x.push(g):f.checked||A.push(g);for(I=0;I<A.length;I++)this._map.hasLayer(A[I])&&this._map.removeLayer(A[I]);for(I=0;I<x.length;I++)this._map.hasLayer(x[I])||this._map.addLayer(x[I]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var l=this._layerControlInputs,f,g,x=this._map.getZoom(),A=l.length-1;A>=0;A--)f=l[A],g=this._getLayer(f.layerId).layer,f.disabled=g.options.minZoom!==void 0&&x<g.options.minZoom||g.options.maxZoom!==void 0&&x>g.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,ke(l,"click",Ot),this.expand();var f=this;setTimeout(function(){et(l,"click",Ot),f._preventClick=!1})}}),_E=function(l,f,g){return new Fg(l,f,g)},Xd=Br.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(l){var f="leaflet-control-zoom",g=je("div",f+" leaflet-bar"),x=this.options;return this._zoomInButton=this._createButton(x.zoomInText,x.zoomInTitle,f+"-in",g,this._zoomIn),this._zoomOutButton=this._createButton(x.zoomOutText,x.zoomOutTitle,f+"-out",g,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),g},onRemove:function(l){l.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(l){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(l.shiftKey?3:1))},_zoomOut:function(l){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,f,g,x,A){var I=je("a",g,x);return I.innerHTML=l,I.href="#",I.title=f,I.setAttribute("role","button"),I.setAttribute("aria-label",f),So(I),ke(I,"click",pi),ke(I,"click",A,this),ke(I,"click",this._refocusOnMap,this),I},_updateDisabled:function(){var l=this._map,f="leaflet-disabled";ft(this._zoomInButton,f),ft(this._zoomOutButton,f),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(Oe(this._zoomOutButton,f),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(Oe(this._zoomInButton,f),this._zoomInButton.setAttribute("aria-disabled","true"))}});We.mergeOptions({zoomControl:!0}),We.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Xd,this.addControl(this.zoomControl))});var wE=function(l){return new Xd(l)},$g=Br.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var f="leaflet-control-scale",g=je("div",f),x=this.options;return this._addScales(x,f+"-line",g),l.on(x.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),g},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,f,g){l.metric&&(this._mScale=je("div",f,g)),l.imperial&&(this._iScale=je("div",f,g))},_update:function(){var l=this._map,f=l.getSize().y/2,g=l.distance(l.containerPointToLatLng([0,f]),l.containerPointToLatLng([this.options.maxWidth,f]));this._updateScales(g)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var f=this._getRoundNum(l),g=f<1e3?f+" m":f/1e3+" km";this._updateScale(this._mScale,g,f/l)},_updateImperial:function(l){var f=l*3.2808399,g,x,A;f>5280?(g=f/5280,x=this._getRoundNum(g),this._updateScale(this._iScale,x+" mi",x/g)):(A=this._getRoundNum(f),this._updateScale(this._iScale,A+" ft",A/f))},_updateScale:function(l,f,g){l.style.width=Math.round(this.options.maxWidth*g)+"px",l.innerHTML=f},_getRoundNum:function(l){var f=Math.pow(10,(Math.floor(l)+"").length-1),g=l/f;return g=g>=10?10:g>=5?5:g>=3?3:g>=2?2:1,f*g}}),CE=function(l){return new $g(l)},xE='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Zd=Br.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(xe.inlineSvg?xE+" ":"")+"Leaflet</a>"},initialize:function(l){b(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=je("div","leaflet-control-attribution"),So(this._container);for(var f in l._layers)l._layers[f].getAttribution&&this.addAttribution(l._layers[f].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var f in this._attributions)this._attributions[f]&&l.push(f);var g=[];this.options.prefix&&g.push(this.options.prefix),l.length&&g.push(l.join(", ")),this._container.innerHTML=g.join(' <span aria-hidden="true">|</span> ')}}});We.mergeOptions({attributionControl:!0}),We.addInitHook(function(){this.options.attributionControl&&new Zd().addTo(this)});var TE=function(l){return new Zd(l)};Br.Layers=Fg,Br.Zoom=Xd,Br.Scale=$g,Br.Attribution=Zd,Mo.layers=_E,Mo.zoom=wE,Mo.scale=CE,Mo.attribution=TE;var Qr=X.extend({initialize:function(l){this._map=l},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Qr.addTo=function(l,f){return l.addHandler(f,this),this};var SE={Events:Z},Bg=xe.touch?"touchstart mousedown":"mousedown",$n=j.extend({options:{clickTolerance:3},initialize:function(l,f,g,x){b(this,x),this._element=l,this._dragStartTarget=f||l,this._preventOutline=g},enable:function(){this._enabled||(ke(this._dragStartTarget,Bg,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($n._dragging===this&&this.finishDrag(!0),et(this._dragStartTarget,Bg,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!Id(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){$n._dragging===this&&this.finishDrag();return}if(!($n._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&($n._dragging=this,this._preventOutline&&Wd(this._element),Bd(),Co(),!this._moving)){this.fire("down");var f=l.touches?l.touches[0]:l,g=Dg(this._element);this._startPoint=new q(f.clientX,f.clientY),this._startPos=hi(this._element),this._parentScale=jd(g);var x=l.type==="mousedown";ke(document,x?"mousemove":"touchmove",this._onMove,this),ke(document,x?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var f=l.touches&&l.touches.length===1?l.touches[0]:l,g=new q(f.clientX,f.clientY)._subtract(this._startPoint);!g.x&&!g.y||Math.abs(g.x)+Math.abs(g.y)<this.options.clickTolerance||(g.x/=this._parentScale.x,g.y/=this._parentScale.y,Ot(l),this._moved||(this.fire("dragstart"),this._moved=!0,Oe(document.body,"leaflet-dragging"),this._lastTarget=l.target||l.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Oe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(g),this._moving=!0,this._lastEvent=l,this._updatePosition())}},_updatePosition:function(){var l={originalEvent:this._lastEvent};this.fire("predrag",l),yt(this._element,this._newPos),this.fire("drag",l)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(l){ft(document.body,"leaflet-dragging"),this._lastTarget&&(ft(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),et(document,"mousemove touchmove",this._onMove,this),et(document,"mouseup touchend touchcancel",this._onUp,this),zd(),xo();var f=this._moved&&this._moving;this._moving=!1,$n._dragging=!1,f&&this.fire("dragend",{noInertia:l,distance:this._newPos.distanceTo(this._startPos)})}});function zg(l,f,g){var x,A=[1,4,2,8],I,K,ee,re,ue,ye,Se,Ie;for(I=0,ye=l.length;I<ye;I++)l[I]._code=mi(l[I],f);for(ee=0;ee<4;ee++){for(Se=A[ee],x=[],I=0,ye=l.length,K=ye-1;I<ye;K=I++)re=l[I],ue=l[K],re._code&Se?ue._code&Se||(Ie=Pl(ue,re,Se,f,g),Ie._code=mi(Ie,f),x.push(Ie)):(ue._code&Se&&(Ie=Pl(ue,re,Se,f,g),Ie._code=mi(Ie,f),x.push(Ie)),x.push(re));l=x}return l}function Hg(l,f){var g,x,A,I,K,ee,re,ue,ye;if(!l||l.length===0)throw new Error("latlngs not passed");Er(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var Se=ce([0,0]),Ie=oe(l),Xt=Ie.getNorthWest().distanceTo(Ie.getSouthWest())*Ie.getNorthEast().distanceTo(Ie.getNorthWest());Xt<1700&&(Se=Kd(l));var Rt=l.length,Pr=[];for(g=0;g<Rt;g++){var sr=ce(l[g]);Pr.push(f.project(ce([sr.lat-Se.lat,sr.lng-Se.lng])))}for(ee=re=ue=0,g=0,x=Rt-1;g<Rt;x=g++)A=Pr[g],I=Pr[x],K=A.y*I.x-I.y*A.x,re+=(A.x+I.x)*K,ue+=(A.y+I.y)*K,ee+=K*3;ee===0?ye=Pr[0]:ye=[re/ee,ue/ee];var aa=f.unproject(Q(ye));return ce([aa.lat+Se.lat,aa.lng+Se.lng])}function Kd(l){for(var f=0,g=0,x=0,A=0;A<l.length;A++){var I=ce(l[A]);f+=I.lat,g+=I.lng,x++}return ce([f/x,g/x])}var ME={__proto__:null,clipPolygon:zg,polygonCenter:Hg,centroid:Kd};function Wg(l,f){if(!f||!l.length)return l.slice();var g=f*f;return l=AE(l,g),l=PE(l,g),l}function jg(l,f,g){return Math.sqrt(Eo(l,f,g,!0))}function EE(l,f,g){return Eo(l,f,g)}function PE(l,f){var g=l.length,x=typeof Uint8Array!="undefined"?Uint8Array:Array,A=new x(g);A[0]=A[g-1]=1,Qd(l,A,f,0,g-1);var I,K=[];for(I=0;I<g;I++)A[I]&&K.push(l[I]);return K}function Qd(l,f,g,x,A){var I=0,K,ee,re;for(ee=x+1;ee<=A-1;ee++)re=Eo(l[ee],l[x],l[A],!0),re>I&&(K=ee,I=re);I>g&&(f[K]=1,Qd(l,f,g,x,K),Qd(l,f,g,K,A))}function AE(l,f){for(var g=[l[0]],x=1,A=0,I=l.length;x<I;x++)RE(l[x],l[A])>f&&(g.push(l[x]),A=x);return A<I-1&&g.push(l[I-1]),g}var Ug;function Vg(l,f,g,x,A){var I=x?Ug:mi(l,g),K=mi(f,g),ee,re,ue;for(Ug=K;;){if(!(I|K))return[l,f];if(I&K)return!1;ee=I||K,re=Pl(l,f,ee,g,A),ue=mi(re,g),ee===I?(l=re,I=ue):(f=re,K=ue)}}function Pl(l,f,g,x,A){var I=f.x-l.x,K=f.y-l.y,ee=x.min,re=x.max,ue,ye;return g&8?(ue=l.x+I*(re.y-l.y)/K,ye=re.y):g&4?(ue=l.x+I*(ee.y-l.y)/K,ye=ee.y):g&2?(ue=re.x,ye=l.y+K*(re.x-l.x)/I):g&1&&(ue=ee.x,ye=l.y+K*(ee.x-l.x)/I),new q(ue,ye,A)}function mi(l,f){var g=0;return l.x<f.min.x?g|=1:l.x>f.max.x&&(g|=2),l.y<f.min.y?g|=4:l.y>f.max.y&&(g|=8),g}function RE(l,f){var g=f.x-l.x,x=f.y-l.y;return g*g+x*x}function Eo(l,f,g,x){var A=f.x,I=f.y,K=g.x-A,ee=g.y-I,re=K*K+ee*ee,ue;return re>0&&(ue=((l.x-A)*K+(l.y-I)*ee)/re,ue>1?(A=g.x,I=g.y):ue>0&&(A+=K*ue,I+=ee*ue)),K=l.x-A,ee=l.y-I,x?K*K+ee*ee:new q(A,I)}function Er(l){return!S(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]!="undefined"}function Gg(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Er(l)}function qg(l,f){var g,x,A,I,K,ee,re,ue;if(!l||l.length===0)throw new Error("latlngs not passed");Er(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var ye=ce([0,0]),Se=oe(l),Ie=Se.getNorthWest().distanceTo(Se.getSouthWest())*Se.getNorthEast().distanceTo(Se.getNorthWest());Ie<1700&&(ye=Kd(l));var Xt=l.length,Rt=[];for(g=0;g<Xt;g++){var Pr=ce(l[g]);Rt.push(f.project(ce([Pr.lat-ye.lat,Pr.lng-ye.lng])))}for(g=0,x=0;g<Xt-1;g++)x+=Rt[g].distanceTo(Rt[g+1])/2;if(x===0)ue=Rt[0];else for(g=0,I=0;g<Xt-1;g++)if(K=Rt[g],ee=Rt[g+1],A=K.distanceTo(ee),I+=A,I>x){re=(I-x)/A,ue=[ee.x-re*(ee.x-K.x),ee.y-re*(ee.y-K.y)];break}var sr=f.unproject(Q(ue));return ce([sr.lat+ye.lat,sr.lng+ye.lng])}var DE={__proto__:null,simplify:Wg,pointToSegmentDistance:jg,closestPointOnSegment:EE,clipSegment:Vg,_getEdgeIntersection:Pl,_getBitCode:mi,_sqClosestPointOnSegment:Eo,isFlat:Er,_flat:Gg,polylineCenter:qg},Jd={project:function(l){return new q(l.lng,l.lat)},unproject:function(l){return new se(l.y,l.x)},bounds:new J([-180,-90],[180,90])},eh={R:6378137,R_MINOR:6356752314245179e-9,bounds:new J([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var f=Math.PI/180,g=this.R,x=l.lat*f,A=this.R_MINOR/g,I=Math.sqrt(1-A*A),K=I*Math.sin(x),ee=Math.tan(Math.PI/4-x/2)/Math.pow((1-K)/(1+K),I/2);return x=-g*Math.log(Math.max(ee,1e-10)),new q(l.lng*f*g,x)},unproject:function(l){for(var f=180/Math.PI,g=this.R,x=this.R_MINOR/g,A=Math.sqrt(1-x*x),I=Math.exp(-l.y/g),K=Math.PI/2-2*Math.atan(I),ee=0,re=.1,ue;ee<15&&Math.abs(re)>1e-7;ee++)ue=A*Math.sin(K),ue=Math.pow((1-ue)/(1+ue),A/2),re=Math.PI/2-2*Math.atan(I*ue)-K,K+=re;return new se(K*f,l.x*f/g)}},NE={__proto__:null,LonLat:Jd,Mercator:eh,SphericalMercator:Le},kE=i({},pe,{code:"EPSG:3395",projection:eh,transformation:function(){var l=.5/(Math.PI*eh.R);return le(l,.5,-l,.5)}()}),Yg=i({},pe,{code:"EPSG:4326",projection:Jd,transformation:le(1/180,1,-1/180,.5)}),LE=i({},me,{projection:Jd,transformation:le(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,f){var g=f.lng-l.lng,x=f.lat-l.lat;return Math.sqrt(g*g+x*x)},infinite:!0});me.Earth=pe,me.EPSG3395=kE,me.EPSG3857=Ve,me.EPSG900913=Te,me.EPSG4326=Yg,me.Simple=LE;var zr=j.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[u(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[u(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var f=l.target;if(f.hasLayer(this)){if(this._map=f,this._zoomAnimated=f._zoomAnimated,this.getEvents){var g=this.getEvents();f.on(g,this),this.once("remove",function(){f.off(g,this)},this)}this.onAdd(f),this.fire("add"),f.fire("layeradd",{layer:this})}}});We.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var f=u(l);return this._layers[f]?this:(this._layers[f]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var f=u(l);return this._layers[f]?(this._loaded&&l.onRemove(this),delete this._layers[f],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return u(l)in this._layers},eachLayer:function(l,f){for(var g in this._layers)l.call(f,this._layers[g]);return this},_addLayers:function(l){l=l?S(l)?l:[l]:[];for(var f=0,g=l.length;f<g;f++)this.addLayer(l[f])},_addZoomLimit:function(l){(!isNaN(l.options.maxZoom)||!isNaN(l.options.minZoom))&&(this._zoomBoundLayers[u(l)]=l,this._updateZoomLevels())},_removeZoomLimit:function(l){var f=u(l);this._zoomBoundLayers[f]&&(delete this._zoomBoundLayers[f],this._updateZoomLevels())},_updateZoomLevels:function(){var l=1/0,f=-1/0,g=this._getZoomSpan();for(var x in this._zoomBoundLayers){var A=this._zoomBoundLayers[x].options;l=A.minZoom===void 0?l:Math.min(l,A.minZoom),f=A.maxZoom===void 0?f:Math.max(f,A.maxZoom)}this._layersMaxZoom=f===-1/0?void 0:f,this._layersMinZoom=l===1/0?void 0:l,g!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ea=zr.extend({initialize:function(l,f){b(this,f),this._layers={};var g,x;if(l)for(g=0,x=l.length;g<x;g++)this.addLayer(l[g])},addLayer:function(l){var f=this.getLayerId(l);return this._layers[f]=l,this._map&&this._map.addLayer(l),this},removeLayer:function(l){var f=l in this._layers?l:this.getLayerId(l);return this._map&&this._layers[f]&&this._map.removeLayer(this._layers[f]),delete this._layers[f],this},hasLayer:function(l){var f=typeof l=="number"?l:this.getLayerId(l);return f in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(l){var f=Array.prototype.slice.call(arguments,1),g,x;for(g in this._layers)x=this._layers[g],x[l]&&x[l].apply(x,f);return this},onAdd:function(l){this.eachLayer(l.addLayer,l)},onRemove:function(l){this.eachLayer(l.removeLayer,l)},eachLayer:function(l,f){for(var g in this._layers)l.call(f,this._layers[g]);return this},getLayer:function(l){return this._layers[l]},getLayers:function(){var l=[];return this.eachLayer(l.push,l),l},setZIndex:function(l){return this.invoke("setZIndex",l)},getLayerId:function(l){return u(l)}}),OE=function(l,f){return new ea(l,f)},xn=ea.extend({addLayer:function(l){return this.hasLayer(l)?this:(l.addEventParent(this),ea.prototype.addLayer.call(this,l),this.fire("layeradd",{layer:l}))},removeLayer:function(l){return this.hasLayer(l)?(l in this._layers&&(l=this._layers[l]),l.removeEventParent(this),ea.prototype.removeLayer.call(this,l),this.fire("layerremove",{layer:l})):this},setStyle:function(l){return this.invoke("setStyle",l)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var l=new ae;for(var f in this._layers){var g=this._layers[f];l.extend(g.getBounds?g.getBounds():g.getLatLng())}return l}}),IE=function(l,f){return new xn(l,f)},ta=X.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(l){b(this,l)},createIcon:function(l){return this._createIcon("icon",l)},createShadow:function(l){return this._createIcon("shadow",l)},_createIcon:function(l,f){var g=this._getIconUrl(l);if(!g){if(l==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var x=this._createImg(g,f&&f.tagName==="IMG"?f:null);return this._setIconStyles(x,l),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),x},_setIconStyles:function(l,f){var g=this.options,x=g[f+"Size"];typeof x=="number"&&(x=[x,x]);var A=Q(x),I=Q(f==="shadow"&&g.shadowAnchor||g.iconAnchor||A&&A.divideBy(2,!0));l.className="leaflet-marker-"+f+" "+(g.className||""),I&&(l.style.marginLeft=-I.x+"px",l.style.marginTop=-I.y+"px"),A&&(l.style.width=A.x+"px",l.style.height=A.y+"px")},_createImg:function(l,f){return f=f||document.createElement("img"),f.src=l,f},_getIconUrl:function(l){return xe.retina&&this.options[l+"RetinaUrl"]||this.options[l+"Url"]}});function FE(l){return new ta(l)}var Po=ta.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(l){return typeof Po.imagePath!="string"&&(Po.imagePath=this._detectIconPath()),(this.options.imagePath||Po.imagePath)+ta.prototype._getIconUrl.call(this,l)},_stripUrl:function(l){var f=function(g,x,A){var I=x.exec(g);return I&&I[A]};return l=f(l,/^url\((['"])?(.+)\1\)$/,2),l&&f(l,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var l=je("div","leaflet-default-icon-path",document.body),f=wo(l,"background-image")||wo(l,"backgroundImage");if(document.body.removeChild(l),f=this._stripUrl(f),f)return f;var g=document.querySelector('link[href$="leaflet.css"]');return g?g.href.substring(0,g.href.length-11-1):""}}),Xg=Qr.extend({initialize:function(l){this._marker=l},addHooks:function(){var l=this._marker._icon;this._draggable||(this._draggable=new $n(l,l,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Oe(l,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ft(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(l){var f=this._marker,g=f._map,x=this._marker.options.autoPanSpeed,A=this._marker.options.autoPanPadding,I=hi(f._icon),K=g.getPixelBounds(),ee=g.getPixelOrigin(),re=ne(K.min._subtract(ee).add(A),K.max._subtract(ee).subtract(A));if(!re.contains(I)){var ue=Q((Math.max(re.max.x,I.x)-re.max.x)/(K.max.x-re.max.x)-(Math.min(re.min.x,I.x)-re.min.x)/(K.min.x-re.min.x),(Math.max(re.max.y,I.y)-re.max.y)/(K.max.y-re.max.y)-(Math.min(re.min.y,I.y)-re.min.y)/(K.min.y-re.min.y)).multiplyBy(x);g.panBy(ue,{animate:!1}),this._draggable._newPos._add(ue),this._draggable._startPos._add(ue),yt(f._icon,this._draggable._newPos),this._onDrag(l),this._panRequest=G(this._adjustPan.bind(this,l))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(l){this._marker.options.autoPan&&(Y(this._panRequest),this._panRequest=G(this._adjustPan.bind(this,l)))},_onDrag:function(l){var f=this._marker,g=f._shadow,x=hi(f._icon),A=f._map.layerPointToLatLng(x);g&&yt(g,x),f._latlng=A,l.latlng=A,l.oldLatLng=this._oldLatLng,f.fire("move",l).fire("drag",l)},_onDragEnd:function(l){Y(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",l)}}),Al=zr.extend({options:{icon:new Po,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(l,f){b(this,f),this._latlng=ce(l)},onAdd:function(l){this._zoomAnimated=this._zoomAnimated&&l.options.markerZoomAnimation,this._zoomAnimated&&l.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(l){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&l.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(l){var f=this._latlng;return this._latlng=ce(l),this.update(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},setZIndexOffset:function(l){return this.options.zIndexOffset=l,this.update()},getIcon:function(){return this.options.icon},setIcon:function(l){return this.options.icon=l,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var l=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(l)}return this},_initIcon:function(){var l=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),g=l.icon.createIcon(this._icon),x=!1;g!==this._icon&&(this._icon&&this._removeIcon(),x=!0,l.title&&(g.title=l.title),g.tagName==="IMG"&&(g.alt=l.alt||"")),Oe(g,f),l.keyboard&&(g.tabIndex="0",g.setAttribute("role","button")),this._icon=g,l.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ke(g,"focus",this._panOnFocus,this);var A=l.icon.createShadow(this._shadow),I=!1;A!==this._shadow&&(this._removeShadow(),I=!0),A&&(Oe(A,f),A.alt=""),this._shadow=A,l.opacity<1&&this._updateOpacity(),x&&this.getPane().appendChild(this._icon),this._initInteraction(),A&&I&&this.getPane(l.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&et(this._icon,"focus",this._panOnFocus,this),lt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&lt(this._shadow),this._shadow=null},_setPos:function(l){this._icon&&yt(this._icon,l),this._shadow&&yt(this._shadow,l),this._zIndex=l.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(l){this._icon&&(this._icon.style.zIndex=this._zIndex+l)},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center).round();this._setPos(f)},_initInteraction:function(){if(this.options.interactive&&(Oe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xg)){var l=this.options.draggable;this.dragging&&(l=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xg(this),l&&this.dragging.enable()}},setOpacity:function(l){return this.options.opacity=l,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var l=this.options.opacity;this._icon&&Mr(this._icon,l),this._shadow&&Mr(this._shadow,l)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var l=this._map;if(l){var f=this.options.icon.options,g=f.iconSize?Q(f.iconSize):Q(0,0),x=f.iconAnchor?Q(f.iconAnchor):Q(0,0);l.panInside(this._latlng,{paddingTopLeft:x,paddingBottomRight:g.subtract(x)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function $E(l,f){return new Al(l,f)}var Bn=zr.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(l){this._renderer=l.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(l){return b(this,l),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&l&&Object.prototype.hasOwnProperty.call(l,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Rl=Bn.extend({options:{fill:!0,radius:10},initialize:function(l,f){b(this,f),this._latlng=ce(l),this._radius=this.options.radius},setLatLng:function(l){var f=this._latlng;return this._latlng=ce(l),this.redraw(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(l){return this.options.radius=this._radius=l,this.redraw()},getRadius:function(){return this._radius},setStyle:function(l){var f=l&&l.radius||this._radius;return Bn.prototype.setStyle.call(this,l),this.setRadius(f),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var l=this._radius,f=this._radiusY||l,g=this._clickTolerance(),x=[l+g,f+g];this._pxBounds=new J(this._point.subtract(x),this._point.add(x))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(l){return l.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function BE(l,f){return new Rl(l,f)}var th=Rl.extend({initialize:function(l,f,g){if(typeof f=="number"&&(f=i({},g,{radius:f})),b(this,f),this._latlng=ce(l),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(l){return this._mRadius=l,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var l=[this._radius,this._radiusY||this._radius];return new ae(this._map.layerPointToLatLng(this._point.subtract(l)),this._map.layerPointToLatLng(this._point.add(l)))},setStyle:Bn.prototype.setStyle,_project:function(){var l=this._latlng.lng,f=this._latlng.lat,g=this._map,x=g.options.crs;if(x.distance===pe.distance){var A=Math.PI/180,I=this._mRadius/pe.R/A,K=g.project([f+I,l]),ee=g.project([f-I,l]),re=K.add(ee).divideBy(2),ue=g.unproject(re).lat,ye=Math.acos((Math.cos(I*A)-Math.sin(f*A)*Math.sin(ue*A))/(Math.cos(f*A)*Math.cos(ue*A)))/A;(isNaN(ye)||ye===0)&&(ye=I/Math.cos(Math.PI/180*f)),this._point=re.subtract(g.getPixelOrigin()),this._radius=isNaN(ye)?0:re.x-g.project([ue,l-ye]).x,this._radiusY=re.y-K.y}else{var Se=x.unproject(x.project(this._latlng).subtract([this._mRadius,0]));this._point=g.latLngToLayerPoint(this._latlng),this._radius=this._point.x-g.latLngToLayerPoint(Se).x}this._updateBounds()}});function zE(l,f,g){return new th(l,f,g)}var Tn=Bn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(l,f){b(this,f),this._setLatLngs(l)},getLatLngs:function(){return this._latlngs},setLatLngs:function(l){return this._setLatLngs(l),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(l){for(var f=1/0,g=null,x=Eo,A,I,K=0,ee=this._parts.length;K<ee;K++)for(var re=this._parts[K],ue=1,ye=re.length;ue<ye;ue++){A=re[ue-1],I=re[ue];var Se=x(l,A,I,!0);Se<f&&(f=Se,g=x(l,A,I))}return g&&(g.distance=Math.sqrt(f)),g},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return qg(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(l,f){return f=f||this._defaultShape(),l=ce(l),f.push(l),this._bounds.extend(l),this.redraw()},_setLatLngs:function(l){this._bounds=new ae,this._latlngs=this._convertLatLngs(l)},_defaultShape:function(){return Er(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(l){for(var f=[],g=Er(l),x=0,A=l.length;x<A;x++)g?(f[x]=ce(l[x]),this._bounds.extend(f[x])):f[x]=this._convertLatLngs(l[x]);return f},_project:function(){var l=new J;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,l),this._bounds.isValid()&&l.isValid()&&(this._rawPxBounds=l,this._updateBounds())},_updateBounds:function(){var l=this._clickTolerance(),f=new q(l,l);this._rawPxBounds&&(this._pxBounds=new J([this._rawPxBounds.min.subtract(f),this._rawPxBounds.max.add(f)]))},_projectLatlngs:function(l,f,g){var x=l[0]instanceof se,A=l.length,I,K;if(x){for(K=[],I=0;I<A;I++)K[I]=this._map.latLngToLayerPoint(l[I]),g.extend(K[I]);f.push(K)}else for(I=0;I<A;I++)this._projectLatlngs(l[I],f,g)},_clipPoints:function(){var l=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}var f=this._parts,g,x,A,I,K,ee,re;for(g=0,A=0,I=this._rings.length;g<I;g++)for(re=this._rings[g],x=0,K=re.length;x<K-1;x++)ee=Vg(re[x],re[x+1],l,x,!0),ee&&(f[A]=f[A]||[],f[A].push(ee[0]),(ee[1]!==re[x+1]||x===K-2)&&(f[A].push(ee[1]),A++))}},_simplifyPoints:function(){for(var l=this._parts,f=this.options.smoothFactor,g=0,x=l.length;g<x;g++)l[g]=Wg(l[g],f)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(l,f){var g,x,A,I,K,ee,re=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(l))return!1;for(g=0,I=this._parts.length;g<I;g++)for(ee=this._parts[g],x=0,K=ee.length,A=K-1;x<K;A=x++)if(!(!f&&x===0)&&jg(l,ee[A],ee[x])<=re)return!0;return!1}});function HE(l,f){return new Tn(l,f)}Tn._flat=Gg;var ra=Tn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Hg(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(l){var f=Tn.prototype._convertLatLngs.call(this,l),g=f.length;return g>=2&&f[0]instanceof se&&f[0].equals(f[g-1])&&f.pop(),f},_setLatLngs:function(l){Tn.prototype._setLatLngs.call(this,l),Er(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Er(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,f=this.options.weight,g=new q(f,f);if(l=new J(l.min.subtract(g),l.max.add(g)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var x=0,A=this._rings.length,I;x<A;x++)I=zg(this._rings[x],l,!0),I.length&&this._parts.push(I)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(l){var f=!1,g,x,A,I,K,ee,re,ue;if(!this._pxBounds||!this._pxBounds.contains(l))return!1;for(I=0,re=this._parts.length;I<re;I++)for(g=this._parts[I],K=0,ue=g.length,ee=ue-1;K<ue;ee=K++)x=g[K],A=g[ee],x.y>l.y!=A.y>l.y&&l.x<(A.x-x.x)*(l.y-x.y)/(A.y-x.y)+x.x&&(f=!f);return f||Tn.prototype._containsPoint.call(this,l,!0)}});function WE(l,f){return new ra(l,f)}var Sn=xn.extend({initialize:function(l,f){b(this,f),this._layers={},l&&this.addData(l)},addData:function(l){var f=S(l)?l:l.features,g,x,A;if(f){for(g=0,x=f.length;g<x;g++)A=f[g],(A.geometries||A.geometry||A.features||A.coordinates)&&this.addData(A);return this}var I=this.options;if(I.filter&&!I.filter(l))return this;var K=Dl(l,I);return K?(K.feature=Ll(l),K.defaultOptions=K.options,this.resetStyle(K),I.onEachFeature&&I.onEachFeature(l,K),this.addLayer(K)):this},resetStyle:function(l){return l===void 0?this.eachLayer(this.resetStyle,this):(l.options=i({},l.defaultOptions),this._setLayerStyle(l,this.options.style),this)},setStyle:function(l){return this.eachLayer(function(f){this._setLayerStyle(f,l)},this)},_setLayerStyle:function(l,f){l.setStyle&&(typeof f=="function"&&(f=f(l.feature)),l.setStyle(f))}});function Dl(l,f){var g=l.type==="Feature"?l.geometry:l,x=g?g.coordinates:null,A=[],I=f&&f.pointToLayer,K=f&&f.coordsToLatLng||rh,ee,re,ue,ye;if(!x&&!g)return null;switch(g.type){case"Point":return ee=K(x),Zg(I,l,ee,f);case"MultiPoint":for(ue=0,ye=x.length;ue<ye;ue++)ee=K(x[ue]),A.push(Zg(I,l,ee,f));return new xn(A);case"LineString":case"MultiLineString":return re=Nl(x,g.type==="LineString"?0:1,K),new Tn(re,f);case"Polygon":case"MultiPolygon":return re=Nl(x,g.type==="Polygon"?1:2,K),new ra(re,f);case"GeometryCollection":for(ue=0,ye=g.geometries.length;ue<ye;ue++){var Se=Dl({geometry:g.geometries[ue],type:"Feature",properties:l.properties},f);Se&&A.push(Se)}return new xn(A);case"FeatureCollection":for(ue=0,ye=g.features.length;ue<ye;ue++){var Ie=Dl(g.features[ue],f);Ie&&A.push(Ie)}return new xn(A);default:throw new Error("Invalid GeoJSON object.")}}function Zg(l,f,g,x){return l?l(f,g):new Al(g,x&&x.markersInheritOptions&&x)}function rh(l){return new se(l[1],l[0],l[2])}function Nl(l,f,g){for(var x=[],A=0,I=l.length,K;A<I;A++)K=f?Nl(l[A],f-1,g):(g||rh)(l[A]),x.push(K);return x}function nh(l,f){return l=ce(l),l.alt!==void 0?[p(l.lng,f),p(l.lat,f),p(l.alt,f)]:[p(l.lng,f),p(l.lat,f)]}function kl(l,f,g,x){for(var A=[],I=0,K=l.length;I<K;I++)A.push(f?kl(l[I],Er(l[I])?0:f-1,g,x):nh(l[I],x));return!f&&g&&A.length>0&&A.push(A[0].slice()),A}function na(l,f){return l.feature?i({},l.feature,{geometry:f}):Ll(f)}function Ll(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var ih={toGeoJSON:function(l){return na(this,{type:"Point",coordinates:nh(this.getLatLng(),l)})}};Al.include(ih),th.include(ih),Rl.include(ih),Tn.include({toGeoJSON:function(l){var f=!Er(this._latlngs),g=kl(this._latlngs,f?1:0,!1,l);return na(this,{type:(f?"Multi":"")+"LineString",coordinates:g})}}),ra.include({toGeoJSON:function(l){var f=!Er(this._latlngs),g=f&&!Er(this._latlngs[0]),x=kl(this._latlngs,g?2:f?1:0,!0,l);return f||(x=[x]),na(this,{type:(g?"Multi":"")+"Polygon",coordinates:x})}}),ea.include({toMultiPoint:function(l){var f=[];return this.eachLayer(function(g){f.push(g.toGeoJSON(l).geometry.coordinates)}),na(this,{type:"MultiPoint",coordinates:f})},toGeoJSON:function(l){var f=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(f==="MultiPoint")return this.toMultiPoint(l);var g=f==="GeometryCollection",x=[];return this.eachLayer(function(A){if(A.toGeoJSON){var I=A.toGeoJSON(l);if(g)x.push(I.geometry);else{var K=Ll(I);K.type==="FeatureCollection"?x.push.apply(x,K.features):x.push(K)}}}),g?na(this,{geometries:x,type:"GeometryCollection"}):{type:"FeatureCollection",features:x}}});function Kg(l,f){return new Sn(l,f)}var jE=Kg,Ol=zr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,f,g){this._url=l,this._bounds=oe(f),b(this,g)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Oe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){lt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Qi(this._image),this},bringToBack:function(){return this._map&&Ji(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=oe(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",f=this._image=l?this._url:je("img");if(Oe(f,"leaflet-image-layer"),this._zoomAnimated&&Oe(f,"leaflet-zoom-animated"),this.options.className&&Oe(f,this.options.className),f.onselectstart=h,f.onmousemove=h,f.onload=o(this.fire,this,"load"),f.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=f.src;return}f.src=this._url,f.alt=this.options.alt},_animateZoom:function(l){var f=this._map.getZoomScale(l.zoom),g=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;di(this._image,g,f)},_reset:function(){var l=this._image,f=new J(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),g=f.getSize();yt(l,f.min),l.style.width=g.x+"px",l.style.height=g.y+"px"},_updateOpacity:function(){Mr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),UE=function(l,f,g){return new Ol(l,f,g)},Qg=Ol.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",f=this._image=l?this._url:je("video");if(Oe(f,"leaflet-image-layer"),this._zoomAnimated&&Oe(f,"leaflet-zoom-animated"),this.options.className&&Oe(f,this.options.className),f.onselectstart=h,f.onmousemove=h,f.onloadeddata=o(this.fire,this,"load"),l){for(var g=f.getElementsByTagName("source"),x=[],A=0;A<g.length;A++)x.push(g[A].src);this._url=g.length>0?x:[f.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(f.style,"objectFit")&&(f.style.objectFit="fill"),f.autoplay=!!this.options.autoplay,f.loop=!!this.options.loop,f.muted=!!this.options.muted,f.playsInline=!!this.options.playsInline;for(var I=0;I<this._url.length;I++){var K=je("source");K.src=this._url[I],f.appendChild(K)}}});function VE(l,f,g){return new Qg(l,f,g)}var Jg=Ol.extend({_initImage:function(){var l=this._image=this._url;Oe(l,"leaflet-image-layer"),this._zoomAnimated&&Oe(l,"leaflet-zoom-animated"),this.options.className&&Oe(l,this.options.className),l.onselectstart=h,l.onmousemove=h}});function GE(l,f,g){return new Jg(l,f,g)}var Jr=zr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(l,f){l&&(l instanceof se||S(l))?(this._latlng=ce(l),b(this,f)):(b(this,l),this._source=f),this.options.content&&(this._content=this.options.content)},openOn:function(l){return l=arguments.length?l:this._source._map,l.hasLayer(this)||l.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(l){return this._map?this.close():(arguments.length?this._source=l:l=this._source,this._prepareOpen(),this.openOn(l._map)),this},onAdd:function(l){this._zoomAnimated=l._zoomAnimated,this._container||this._initLayout(),l._fadeAnimated&&Mr(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),l._fadeAnimated&&Mr(this._container,1),this.bringToFront(),this.options.interactive&&(Oe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(l){l._fadeAnimated?(Mr(this._container,0),this._removeTimeout=setTimeout(o(lt,void 0,this._container),200)):lt(this._container),this.options.interactive&&(ft(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(l){return this._latlng=ce(l),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(l){return this._content=l,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var l={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Qi(this._container),this},bringToBack:function(){return this._map&&Ji(this._container),this},_prepareOpen:function(l){var f=this._source;if(!f._map)return!1;if(f instanceof xn){f=null;var g=this._source._layers;for(var x in g)if(g[x]._map){f=g[x];break}if(!f)return!1;this._source=f}if(!l)if(f.getCenter)l=f.getCenter();else if(f.getLatLng)l=f.getLatLng();else if(f.getBounds)l=f.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(l),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var l=this._contentNode,f=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof f=="string")l.innerHTML=f;else{for(;l.hasChildNodes();)l.removeChild(l.firstChild);l.appendChild(f)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var l=this._map.latLngToLayerPoint(this._latlng),f=Q(this.options.offset),g=this._getAnchor();this._zoomAnimated?yt(this._container,l.add(g)):f=f.add(l).add(g);var x=this._containerBottom=-f.y,A=this._containerLeft=-Math.round(this._containerWidth/2)+f.x;this._container.style.bottom=x+"px",this._container.style.left=A+"px"}},_getAnchor:function(){return[0,0]}});We.include({_initOverlay:function(l,f,g,x){var A=f;return A instanceof l||(A=new l(x).setContent(f)),g&&A.setLatLng(g),A}}),zr.include({_initOverlay:function(l,f,g,x){var A=g;return A instanceof l?(b(A,x),A._source=this):(A=f&&!x?f:new l(x,this),A.setContent(g)),A}});var Il=Jr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(l){return l=arguments.length?l:this._source._map,!l.hasLayer(this)&&l._popup&&l._popup.options.autoClose&&l.removeLayer(l._popup),l._popup=this,Jr.prototype.openOn.call(this,l)},onAdd:function(l){Jr.prototype.onAdd.call(this,l),l.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Bn||this._source.on("preclick",fi))},onRemove:function(l){Jr.prototype.onRemove.call(this,l),l.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Bn||this._source.off("preclick",fi))},getEvents:function(){var l=Jr.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(l.preclick=this.close),this.options.keepInView&&(l.moveend=this._adjustPan),l},_initLayout:function(){var l="leaflet-popup",f=this._container=je("div",l+" "+(this.options.className||"")+" leaflet-zoom-animated"),g=this._wrapper=je("div",l+"-content-wrapper",f);if(this._contentNode=je("div",l+"-content",g),So(f),qd(this._contentNode),ke(f,"contextmenu",fi),this._tipContainer=je("div",l+"-tip-container",f),this._tip=je("div",l+"-tip",this._tipContainer),this.options.closeButton){var x=this._closeButton=je("a",l+"-close-button",f);x.setAttribute("role","button"),x.setAttribute("aria-label","Close popup"),x.href="#close",x.innerHTML='<span aria-hidden="true">&#215;</span>',ke(x,"click",function(A){Ot(A),this.close()},this)}},_updateLayout:function(){var l=this._contentNode,f=l.style;f.width="",f.whiteSpace="nowrap";var g=l.offsetWidth;g=Math.min(g,this.options.maxWidth),g=Math.max(g,this.options.minWidth),f.width=g+1+"px",f.whiteSpace="",f.height="";var x=l.offsetHeight,A=this.options.maxHeight,I="leaflet-popup-scrolled";A&&x>A?(f.height=A+"px",Oe(l,I)):ft(l,I),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),g=this._getAnchor();yt(this._container,f.add(g))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,f=parseInt(wo(this._container,"marginBottom"),10)||0,g=this._container.offsetHeight+f,x=this._containerWidth,A=new q(this._containerLeft,-g-this._containerBottom);A._add(hi(this._container));var I=l.layerPointToContainerPoint(A),K=Q(this.options.autoPanPadding),ee=Q(this.options.autoPanPaddingTopLeft||K),re=Q(this.options.autoPanPaddingBottomRight||K),ue=l.getSize(),ye=0,Se=0;I.x+x+re.x>ue.x&&(ye=I.x+x-ue.x+re.x),I.x-ye-ee.x<0&&(ye=I.x-ee.x),I.y+g+re.y>ue.y&&(Se=I.y+g-ue.y+re.y),I.y-Se-ee.y<0&&(Se=I.y-ee.y),(ye||Se)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([ye,Se]))}},_getAnchor:function(){return Q(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qE=function(l,f){return new Il(l,f)};We.mergeOptions({closePopupOnClick:!0}),We.include({openPopup:function(l,f,g){return this._initOverlay(Il,l,f,g).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),zr.include({bindPopup:function(l,f){return this._popup=this._initOverlay(Il,this._popup,l,f),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(l){return this._popup&&(this instanceof xn||(this._popup._source=this),this._popup._prepareOpen(l||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){pi(l);var f=l.layer||l.target;if(this._popup._source===f&&!(f instanceof Bn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=f,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var Fl=Jr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){Jr.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){Jr.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=Jr.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",f=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=je("div",f),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+u(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var f,g,x=this._map,A=this._container,I=x.latLngToContainerPoint(x.getCenter()),K=x.layerPointToContainerPoint(l),ee=this.options.direction,re=A.offsetWidth,ue=A.offsetHeight,ye=Q(this.options.offset),Se=this._getAnchor();ee==="top"?(f=re/2,g=ue):ee==="bottom"?(f=re/2,g=0):ee==="center"?(f=re/2,g=ue/2):ee==="right"?(f=0,g=ue/2):ee==="left"?(f=re,g=ue/2):K.x<I.x?(ee="right",f=0,g=ue/2):(ee="left",f=re+(ye.x+Se.x)*2,g=ue/2),l=l.subtract(Q(f,g,!0)).add(ye).add(Se),ft(A,"leaflet-tooltip-right"),ft(A,"leaflet-tooltip-left"),ft(A,"leaflet-tooltip-top"),ft(A,"leaflet-tooltip-bottom"),Oe(A,"leaflet-tooltip-"+ee),yt(A,l)},_updatePosition:function(){var l=this._map.latLngToLayerPoint(this._latlng);this._setPosition(l)},setOpacity:function(l){this.options.opacity=l,this._container&&Mr(this._container,l)},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center);this._setPosition(f)},_getAnchor:function(){return Q(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),YE=function(l,f){return new Fl(l,f)};We.include({openTooltip:function(l,f,g){return this._initOverlay(Fl,l,f,g).openOn(this),this},closeTooltip:function(l){return l.close(),this}}),zr.include({bindTooltip:function(l,f){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Fl,this._tooltip,l,f),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(l){if(!(!l&&this._tooltipHandlersAdded)){var f=l?"off":"on",g={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?g.add=this._openTooltip:(g.mouseover=this._openTooltip,g.mouseout=this.closeTooltip,g.click=this._openTooltip,this._map?this._addFocusListeners():g.add=this._addFocusListeners),this._tooltip.options.sticky&&(g.mousemove=this._moveTooltip),this[f](g),this._tooltipHandlersAdded=!l}},openTooltip:function(l){return this._tooltip&&(this instanceof xn||(this._tooltip._source=this),this._tooltip._prepareOpen(l)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(l){return this._tooltip&&this._tooltip.setContent(l),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(l){var f=typeof l.getElement=="function"&&l.getElement();f&&(ke(f,"focus",function(){this._tooltip._source=l,this.openTooltip()},this),ke(f,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(l){var f=typeof l.getElement=="function"&&l.getElement();f&&f.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(l){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var f=this;this._map.once("moveend",function(){f._openOnceFlag=!1,f._openTooltip(l)});return}this._tooltip._source=l.layer||l.target,this.openTooltip(this._tooltip.options.sticky?l.latlng:void 0)}},_moveTooltip:function(l){var f=l.latlng,g,x;this._tooltip.options.sticky&&l.originalEvent&&(g=this._map.mouseEventToContainerPoint(l.originalEvent),x=this._map.containerPointToLayerPoint(g),f=this._map.layerPointToLatLng(x)),this._tooltip.setLatLng(f)}});var ev=ta.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(l){var f=l&&l.tagName==="DIV"?l:document.createElement("div"),g=this.options;if(g.html instanceof Element?(xl(f),f.appendChild(g.html)):f.innerHTML=g.html!==!1?g.html:"",g.bgPos){var x=Q(g.bgPos);f.style.backgroundPosition=-x.x+"px "+-x.y+"px"}return this._setIconStyles(f,"icon"),f},createShadow:function(){return null}});function XE(l){return new ev(l)}ta.Default=Po;var Ao=zr.extend({options:{tileSize:256,opacity:1,updateWhenIdle:xe.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(l){b(this,l)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(l){l._addZoomLimit(this)},onRemove:function(l){this._removeAllTiles(),lt(this._container),l._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Qi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ji(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(l){return this.options.opacity=l,this._updateOpacity(),this},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var l=this._clampZoom(this._map.getZoom());l!==this._tileZoom&&(this._tileZoom=l,this._updateLevels()),this._update()}return this},getEvents:function(){var l={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),l.move=this._onMove),this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},createTile:function(){return document.createElement("div")},getTileSize:function(){var l=this.options.tileSize;return l instanceof q?l:new q(l,l)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(l){for(var f=this.getPane().children,g=-l(-1/0,1/0),x=0,A=f.length,I;x<A;x++)I=f[x].style.zIndex,f[x]!==this._container&&I&&(g=l(g,+I));isFinite(g)&&(this.options.zIndex=g+l(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!xe.ielt9){Mr(this._container,this.options.opacity);var l=+new Date,f=!1,g=!1;for(var x in this._tiles){var A=this._tiles[x];if(!(!A.current||!A.loaded)){var I=Math.min(1,(l-A.loaded)/200);Mr(A.el,I),I<1?f=!0:(A.active?g=!0:this._onOpaqueTile(A),A.active=!0)}}g&&!this._noPrune&&this._pruneTiles(),f&&(Y(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=je("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var l=this._tileZoom,f=this.options.maxZoom;if(l!==void 0){for(var g in this._levels)g=Number(g),this._levels[g].el.children.length||g===l?(this._levels[g].el.style.zIndex=f-Math.abs(l-g),this._onUpdateLevel(g)):(lt(this._levels[g].el),this._removeTilesAtZoom(g),this._onRemoveLevel(g),delete this._levels[g]);var x=this._levels[l],A=this._map;return x||(x=this._levels[l]={},x.el=je("div","leaflet-tile-container leaflet-zoom-animated",this._container),x.el.style.zIndex=f,x.origin=A.project(A.unproject(A.getPixelOrigin()),l).round(),x.zoom=l,this._setZoomTransform(x,A.getCenter(),A.getZoom()),this._onCreateLevel(x)),this._level=x,x}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var l,f,g=this._map.getZoom();if(g>this.options.maxZoom||g<this.options.minZoom){this._removeAllTiles();return}for(l in this._tiles)f=this._tiles[l],f.retain=f.current;for(l in this._tiles)if(f=this._tiles[l],f.current&&!f.active){var x=f.coords;this._retainParent(x.x,x.y,x.z,x.z-5)||this._retainChildren(x.x,x.y,x.z,x.z+2)}for(l in this._tiles)this._tiles[l].retain||this._removeTile(l)}},_removeTilesAtZoom:function(l){for(var f in this._tiles)this._tiles[f].coords.z===l&&this._removeTile(f)},_removeAllTiles:function(){for(var l in this._tiles)this._removeTile(l)},_invalidateAll:function(){for(var l in this._levels)lt(this._levels[l].el),this._onRemoveLevel(Number(l)),delete this._levels[l];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(l,f,g,x){var A=Math.floor(l/2),I=Math.floor(f/2),K=g-1,ee=new q(+A,+I);ee.z=+K;var re=this._tileCoordsToKey(ee),ue=this._tiles[re];return ue&&ue.active?(ue.retain=!0,!0):(ue&&ue.loaded&&(ue.retain=!0),K>x?this._retainParent(A,I,K,x):!1)},_retainChildren:function(l,f,g,x){for(var A=2*l;A<2*l+2;A++)for(var I=2*f;I<2*f+2;I++){var K=new q(A,I);K.z=g+1;var ee=this._tileCoordsToKey(K),re=this._tiles[ee];if(re&&re.active){re.retain=!0;continue}else re&&re.loaded&&(re.retain=!0);g+1<x&&this._retainChildren(A,I,g+1,x)}},_resetView:function(l){var f=l&&(l.pinch||l.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),f,f)},_animateZoom:function(l){this._setView(l.center,l.zoom,!0,l.noUpdate)},_clampZoom:function(l){var f=this.options;return f.minNativeZoom!==void 0&&l<f.minNativeZoom?f.minNativeZoom:f.maxNativeZoom!==void 0&&f.maxNativeZoom<l?f.maxNativeZoom:l},_setView:function(l,f,g,x){var A=Math.round(f);this.options.maxZoom!==void 0&&A>this.options.maxZoom||this.options.minZoom!==void 0&&A<this.options.minZoom?A=void 0:A=this._clampZoom(A);var I=this.options.updateWhenZooming&&A!==this._tileZoom;(!x||I)&&(this._tileZoom=A,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),A!==void 0&&this._update(l),g||this._pruneTiles(),this._noPrune=!!g),this._setZoomTransforms(l,f)},_setZoomTransforms:function(l,f){for(var g in this._levels)this._setZoomTransform(this._levels[g],l,f)},_setZoomTransform:function(l,f,g){var x=this._map.getZoomScale(g,l.zoom),A=l.origin.multiplyBy(x).subtract(this._map._getNewPixelOrigin(f,g)).round();xe.any3d?di(l.el,A,x):yt(l.el,A)},_resetGrid:function(){var l=this._map,f=l.options.crs,g=this._tileSize=this.getTileSize(),x=this._tileZoom,A=this._map.getPixelWorldBounds(this._tileZoom);A&&(this._globalTileRange=this._pxBoundsToTileRange(A)),this._wrapX=f.wrapLng&&!this.options.noWrap&&[Math.floor(l.project([0,f.wrapLng[0]],x).x/g.x),Math.ceil(l.project([0,f.wrapLng[1]],x).x/g.y)],this._wrapY=f.wrapLat&&!this.options.noWrap&&[Math.floor(l.project([f.wrapLat[0],0],x).y/g.x),Math.ceil(l.project([f.wrapLat[1],0],x).y/g.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(l){var f=this._map,g=f._animatingZoom?Math.max(f._animateToZoom,f.getZoom()):f.getZoom(),x=f.getZoomScale(g,this._tileZoom),A=f.project(l,this._tileZoom).floor(),I=f.getSize().divideBy(x*2);return new J(A.subtract(I),A.add(I))},_update:function(l){var f=this._map;if(f){var g=this._clampZoom(f.getZoom());if(l===void 0&&(l=f.getCenter()),this._tileZoom!==void 0){var x=this._getTiledPixelBounds(l),A=this._pxBoundsToTileRange(x),I=A.getCenter(),K=[],ee=this.options.keepBuffer,re=new J(A.getBottomLeft().subtract([ee,-ee]),A.getTopRight().add([ee,-ee]));if(!(isFinite(A.min.x)&&isFinite(A.min.y)&&isFinite(A.max.x)&&isFinite(A.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ue in this._tiles){var ye=this._tiles[ue].coords;(ye.z!==this._tileZoom||!re.contains(new q(ye.x,ye.y)))&&(this._tiles[ue].current=!1)}if(Math.abs(g-this._tileZoom)>1){this._setView(l,g);return}for(var Se=A.min.y;Se<=A.max.y;Se++)for(var Ie=A.min.x;Ie<=A.max.x;Ie++){var Xt=new q(Ie,Se);if(Xt.z=this._tileZoom,!!this._isValidTile(Xt)){var Rt=this._tiles[this._tileCoordsToKey(Xt)];Rt?Rt.current=!0:K.push(Xt)}}if(K.sort(function(sr,aa){return sr.distanceTo(I)-aa.distanceTo(I)}),K.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Pr=document.createDocumentFragment();for(Ie=0;Ie<K.length;Ie++)this._addTile(K[Ie],Pr);this._level.el.appendChild(Pr)}}}},_isValidTile:function(l){var f=this._map.options.crs;if(!f.infinite){var g=this._globalTileRange;if(!f.wrapLng&&(l.x<g.min.x||l.x>g.max.x)||!f.wrapLat&&(l.y<g.min.y||l.y>g.max.y))return!1}if(!this.options.bounds)return!0;var x=this._tileCoordsToBounds(l);return oe(this.options.bounds).overlaps(x)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var f=this._map,g=this.getTileSize(),x=l.scaleBy(g),A=x.add(g),I=f.unproject(x,l.z),K=f.unproject(A,l.z);return[I,K]},_tileCoordsToBounds:function(l){var f=this._tileCoordsToNwSe(l),g=new ae(f[0],f[1]);return this.options.noWrap||(g=this._map.wrapLatLngBounds(g)),g},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var f=l.split(":"),g=new q(+f[0],+f[1]);return g.z=+f[2],g},_removeTile:function(l){var f=this._tiles[l];f&&(lt(f.el),delete this._tiles[l],this.fire("tileunload",{tile:f.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){Oe(l,"leaflet-tile");var f=this.getTileSize();l.style.width=f.x+"px",l.style.height=f.y+"px",l.onselectstart=h,l.onmousemove=h,xe.ielt9&&this.options.opacity<1&&Mr(l,this.options.opacity)},_addTile:function(l,f){var g=this._getTilePos(l),x=this._tileCoordsToKey(l),A=this.createTile(this._wrapCoords(l),o(this._tileReady,this,l));this._initTile(A),this.createTile.length<2&&G(o(this._tileReady,this,l,null,A)),yt(A,g),this._tiles[x]={el:A,coords:l,current:!0},f.appendChild(A),this.fire("tileloadstart",{tile:A,coords:l})},_tileReady:function(l,f,g){f&&this.fire("tileerror",{error:f,tile:g,coords:l});var x=this._tileCoordsToKey(l);g=this._tiles[x],g&&(g.loaded=+new Date,this._map._fadeAnimated?(Mr(g.el,0),Y(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(g.active=!0,this._pruneTiles()),f||(Oe(g.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:g.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),xe.ielt9||!this._map._fadeAnimated?G(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var f=new q(this._wrapX?d(l.x,this._wrapX):l.x,this._wrapY?d(l.y,this._wrapY):l.y);return f.z=l.z,f},_pxBoundsToTileRange:function(l){var f=this.getTileSize();return new J(l.min.unscaleBy(f).floor(),l.max.unscaleBy(f).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function ZE(l){return new Ao(l)}var ia=Ao.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,f){this._url=l,f=b(this,f),f.detectRetina&&xe.retina&&f.maxZoom>0?(f.tileSize=Math.floor(f.tileSize/2),f.zoomReverse?(f.zoomOffset--,f.minZoom=Math.min(f.maxZoom,f.minZoom+1)):(f.zoomOffset++,f.maxZoom=Math.max(f.minZoom,f.maxZoom-1)),f.minZoom=Math.max(0,f.minZoom)):f.zoomReverse?f.minZoom=Math.min(f.maxZoom,f.minZoom):f.maxZoom=Math.max(f.minZoom,f.maxZoom),typeof f.subdomains=="string"&&(f.subdomains=f.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,f){return this._url===l&&f===void 0&&(f=!0),this._url=l,f||this.redraw(),this},createTile:function(l,f){var g=document.createElement("img");return ke(g,"load",o(this._tileOnLoad,this,f,g)),ke(g,"error",o(this._tileOnError,this,f,g)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(g.referrerPolicy=this.options.referrerPolicy),g.alt="",g.src=this.getTileUrl(l),g},getTileUrl:function(l){var f={r:xe.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var g=this._globalTileRange.max.y-l.y;this.options.tms&&(f.y=g),f["-y"]=g}return C(this._url,i(f,this.options))},_tileOnLoad:function(l,f){xe.ielt9?setTimeout(o(l,this,null,f),0):l(null,f)},_tileOnError:function(l,f,g){var x=this.options.errorTileUrl;x&&f.getAttribute("src")!==x&&(f.src=x),l(g,f)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,f=this.options.maxZoom,g=this.options.zoomReverse,x=this.options.zoomOffset;return g&&(l=f-l),l+x},_getSubdomain:function(l){var f=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[f]},_abortLoading:function(){var l,f;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(f=this._tiles[l].el,f.onload=h,f.onerror=h,!f.complete)){f.src=M;var g=this._tiles[l].coords;lt(f),delete this._tiles[l],this.fire("tileabort",{tile:f,coords:g})}},_removeTile:function(l){var f=this._tiles[l];if(f)return f.el.setAttribute("src",M),Ao.prototype._removeTile.call(this,l)},_tileReady:function(l,f,g){if(!(!this._map||g&&g.getAttribute("src")===M))return Ao.prototype._tileReady.call(this,l,f,g)}});function tv(l,f){return new ia(l,f)}var rv=ia.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,f){this._url=l;var g=i({},this.defaultWmsParams);for(var x in f)x in this.options||(g[x]=f[x]);f=b(this,f);var A=f.detectRetina&&xe.retina?2:1,I=this.getTileSize();g.width=I.x*A,g.height=I.y*A,this.wmsParams=g},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var f=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[f]=this._crs.code,ia.prototype.onAdd.call(this,l)},getTileUrl:function(l){var f=this._tileCoordsToNwSe(l),g=this._crs,x=ne(g.project(f[0]),g.project(f[1])),A=x.min,I=x.max,K=(this._wmsVersion>=1.3&&this._crs===Yg?[A.y,A.x,I.y,I.x]:[A.x,A.y,I.x,I.y]).join(","),ee=ia.prototype.getTileUrl.call(this,l);return ee+_(this.wmsParams,ee,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+K},setParams:function(l,f){return i(this.wmsParams,l),f||this.redraw(),this}});function KE(l,f){return new rv(l,f)}ia.WMS=rv,tv.wms=KE;var Mn=zr.extend({options:{padding:.1},initialize:function(l){b(this,l),u(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Oe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,f){var g=this._map.getZoomScale(f,this._zoom),x=this._map.getSize().multiplyBy(.5+this.options.padding),A=this._map.project(this._center,f),I=x.multiplyBy(-g).add(A).subtract(this._map._getNewPixelOrigin(l,f));xe.any3d?di(this._container,I,g):yt(this._container,I)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,f=this._map.getSize(),g=this._map.containerPointToLayerPoint(f.multiplyBy(-l)).round();this._bounds=new J(g,g.add(f.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),nv=Mn.extend({options:{tolerance:0},getEvents:function(){var l=Mn.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Mn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");ke(l,"mousemove",this._onMouseMove,this),ke(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ke(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,lt(this._container),et(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var f in this._layers)l=this._layers[f],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mn.prototype._update.call(this);var l=this._bounds,f=this._container,g=l.getSize(),x=xe.retina?2:1;yt(f,l.min),f.width=x*g.x,f.height=x*g.y,f.style.width=g.x+"px",f.style.height=g.y+"px",xe.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Mn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[u(l)]=l;var f=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=f),this._drawLast=f,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var f=l._order,g=f.next,x=f.prev;g?g.prev=x:this._drawLast=x,x?x.next=g:this._drawFirst=g,delete l._order,delete this._layers[u(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var f=l.options.dashArray.split(/[, ]+/),g=[],x,A;for(A=0;A<f.length;A++){if(x=Number(f[A]),isNaN(x))return;g.push(x)}l.options._dashArray=g}else l.options._dashArray=l.options.dashArray},_requestRedraw:function(l){this._map&&(this._extendRedrawBounds(l),this._redrawRequest=this._redrawRequest||G(this._redraw,this))},_extendRedrawBounds:function(l){if(l._pxBounds){var f=(l.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new J,this._redrawBounds.extend(l._pxBounds.min.subtract([f,f])),this._redrawBounds.extend(l._pxBounds.max.add([f,f]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var l=this._redrawBounds;if(l){var f=l.getSize();this._ctx.clearRect(l.min.x,l.min.y,f.x,f.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var l,f=this._redrawBounds;if(this._ctx.save(),f){var g=f.getSize();this._ctx.beginPath(),this._ctx.rect(f.min.x,f.min.y,g.x,g.y),this._ctx.clip()}this._drawing=!0;for(var x=this._drawFirst;x;x=x.next)l=x.layer,(!f||l._pxBounds&&l._pxBounds.intersects(f))&&l._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(l,f){if(this._drawing){var g,x,A,I,K=l._parts,ee=K.length,re=this._ctx;if(ee){for(re.beginPath(),g=0;g<ee;g++){for(x=0,A=K[g].length;x<A;x++)I=K[g][x],re[x?"lineTo":"moveTo"](I.x,I.y);f&&re.closePath()}this._fillStroke(re,l)}}},_updateCircle:function(l){if(!(!this._drawing||l._empty())){var f=l._point,g=this._ctx,x=Math.max(Math.round(l._radius),1),A=(Math.max(Math.round(l._radiusY),1)||x)/x;A!==1&&(g.save(),g.scale(1,A)),g.beginPath(),g.arc(f.x,f.y/A,x,0,Math.PI*2,!1),A!==1&&g.restore(),this._fillStroke(g,l)}},_fillStroke:function(l,f){var g=f.options;g.fill&&(l.globalAlpha=g.fillOpacity,l.fillStyle=g.fillColor||g.color,l.fill(g.fillRule||"evenodd")),g.stroke&&g.weight!==0&&(l.setLineDash&&l.setLineDash(f.options&&f.options._dashArray||[]),l.globalAlpha=g.opacity,l.lineWidth=g.weight,l.strokeStyle=g.color,l.lineCap=g.lineCap,l.lineJoin=g.lineJoin,l.stroke())},_onClick:function(l){for(var f=this._map.mouseEventToLayerPoint(l),g,x,A=this._drawFirst;A;A=A.next)g=A.layer,g.options.interactive&&g._containsPoint(f)&&(!(l.type==="click"||l.type==="preclick")||!this._map._draggableMoved(g))&&(x=g);this._fireEvent(x?[x]:!1,l)},_onMouseMove:function(l){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var f=this._map.mouseEventToLayerPoint(l);this._handleMouseHover(l,f)}},_handleMouseOut:function(l){var f=this._hoveredLayer;f&&(ft(this._container,"leaflet-interactive"),this._fireEvent([f],l,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(l,f){if(!this._mouseHoverThrottled){for(var g,x,A=this._drawFirst;A;A=A.next)g=A.layer,g.options.interactive&&g._containsPoint(f)&&(x=g);x!==this._hoveredLayer&&(this._handleMouseOut(l),x&&(Oe(this._container,"leaflet-interactive"),this._fireEvent([x],l,"mouseover"),this._hoveredLayer=x)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,l),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(l,f,g){this._map._fireDOMEvent(f,g||f.type,l)},_bringToFront:function(l){var f=l._order;if(f){var g=f.next,x=f.prev;if(g)g.prev=x;else return;x?x.next=g:g&&(this._drawFirst=g),f.prev=this._drawLast,this._drawLast.next=f,f.next=null,this._drawLast=f,this._requestRedraw(l)}},_bringToBack:function(l){var f=l._order;if(f){var g=f.next,x=f.prev;if(x)x.next=g;else return;g?g.prev=x:x&&(this._drawLast=x),f.prev=null,f.next=this._drawFirst,this._drawFirst.prev=f,this._drawFirst=f,this._requestRedraw(l)}}});function iv(l){return xe.canvas?new nv(l):null}var Ro=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(l){return document.createElement("<lvml:"+l+' class="lvml">')}}catch(l){}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),QE={_initContainer:function(){this._container=je("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Mn.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var f=l._container=Ro("shape");Oe(f,"leaflet-vml-shape "+(this.options.className||"")),f.coordsize="1 1",l._path=Ro("path"),f.appendChild(l._path),this._updateStyle(l),this._layers[u(l)]=l},_addPath:function(l){var f=l._container;this._container.appendChild(f),l.options.interactive&&l.addInteractiveTarget(f)},_removePath:function(l){var f=l._container;lt(f),l.removeInteractiveTarget(f),delete this._layers[u(l)]},_updateStyle:function(l){var f=l._stroke,g=l._fill,x=l.options,A=l._container;A.stroked=!!x.stroke,A.filled=!!x.fill,x.stroke?(f||(f=l._stroke=Ro("stroke")),A.appendChild(f),f.weight=x.weight+"px",f.color=x.color,f.opacity=x.opacity,x.dashArray?f.dashStyle=S(x.dashArray)?x.dashArray.join(" "):x.dashArray.replace(/( *, *)/g," "):f.dashStyle="",f.endcap=x.lineCap.replace("butt","flat"),f.joinstyle=x.lineJoin):f&&(A.removeChild(f),l._stroke=null),x.fill?(g||(g=l._fill=Ro("fill")),A.appendChild(g),g.color=x.fillColor||x.color,g.opacity=x.fillOpacity):g&&(A.removeChild(g),l._fill=null)},_updateCircle:function(l){var f=l._point.round(),g=Math.round(l._radius),x=Math.round(l._radiusY||g);this._setPath(l,l._empty()?"M0 0":"AL "+f.x+","+f.y+" "+g+","+x+" 0,"+65535*360)},_setPath:function(l,f){l._path.v=f},_bringToFront:function(l){Qi(l._container)},_bringToBack:function(l){Ji(l._container)}},$l=xe.vml?Ro:Ne,Do=Mn.extend({_initContainer:function(){this._container=$l("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$l("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){lt(this._container),et(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mn.prototype._update.call(this);var l=this._bounds,f=l.getSize(),g=this._container;(!this._svgSize||!this._svgSize.equals(f))&&(this._svgSize=f,g.setAttribute("width",f.x),g.setAttribute("height",f.y)),yt(g,l.min),g.setAttribute("viewBox",[l.min.x,l.min.y,f.x,f.y].join(" ")),this.fire("update")}},_initPath:function(l){var f=l._path=$l("path");l.options.className&&Oe(f,l.options.className),l.options.interactive&&Oe(f,"leaflet-interactive"),this._updateStyle(l),this._layers[u(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){lt(l._path),l.removeInteractiveTarget(l._path),delete this._layers[u(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var f=l._path,g=l.options;f&&(g.stroke?(f.setAttribute("stroke",g.color),f.setAttribute("stroke-opacity",g.opacity),f.setAttribute("stroke-width",g.weight),f.setAttribute("stroke-linecap",g.lineCap),f.setAttribute("stroke-linejoin",g.lineJoin),g.dashArray?f.setAttribute("stroke-dasharray",g.dashArray):f.removeAttribute("stroke-dasharray"),g.dashOffset?f.setAttribute("stroke-dashoffset",g.dashOffset):f.removeAttribute("stroke-dashoffset")):f.setAttribute("stroke","none"),g.fill?(f.setAttribute("fill",g.fillColor||g.color),f.setAttribute("fill-opacity",g.fillOpacity),f.setAttribute("fill-rule",g.fillRule||"evenodd")):f.setAttribute("fill","none"))},_updatePoly:function(l,f){this._setPath(l,Be(l._parts,f))},_updateCircle:function(l){var f=l._point,g=Math.max(Math.round(l._radius),1),x=Math.max(Math.round(l._radiusY),1)||g,A="a"+g+","+x+" 0 1,0 ",I=l._empty()?"M0 0":"M"+(f.x-g)+","+f.y+A+g*2+",0 "+A+-g*2+",0 ";this._setPath(l,I)},_setPath:function(l,f){l._path.setAttribute("d",f)},_bringToFront:function(l){Qi(l._path)},_bringToBack:function(l){Ji(l._path)}});xe.vml&&Do.include(QE);function av(l){return xe.svg||xe.vml?new Do(l):null}We.include({getRenderer:function(l){var f=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return f||(f=this._renderer=this._createRenderer()),this.hasLayer(f)||this.addLayer(f),f},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var f=this._paneRenderers[l];return f===void 0&&(f=this._createRenderer({pane:l}),this._paneRenderers[l]=f),f},_createRenderer:function(l){return this.options.preferCanvas&&iv(l)||av(l)}});var ov=ra.extend({initialize:function(l,f){ra.prototype.initialize.call(this,this._boundsToLatLngs(l),f)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=oe(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function JE(l,f){return new ov(l,f)}Do.create=$l,Do.pointsToPath=Be,Sn.geometryToLayer=Dl,Sn.coordsToLatLng=rh,Sn.coordsToLatLngs=Nl,Sn.latLngToCoords=nh,Sn.latLngsToCoords=kl,Sn.getFeature=na,Sn.asFeature=Ll,We.mergeOptions({boxZoom:!0});var sv=Qr.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){et(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){lt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Co(),Bd(),this._startPoint=this._map.mouseEventToContainerPoint(l),ke(document,{contextmenu:pi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=je("div","leaflet-zoom-box",this._container),Oe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var f=new J(this._point,this._startPoint),g=f.getSize();yt(this._box,f.min),this._box.style.width=g.x+"px",this._box.style.height=g.y+"px"},_finish:function(){this._moved&&(lt(this._box),ft(this._container,"leaflet-crosshair")),xo(),zd(),et(document,{contextmenu:pi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var f=new ae(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(f).fire("boxzoomend",{boxZoomBounds:f})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});We.addInitHook("addHandler","boxZoom",sv),We.mergeOptions({doubleClickZoom:!0});var lv=Qr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var f=this._map,g=f.getZoom(),x=f.options.zoomDelta,A=l.originalEvent.shiftKey?g-x:g+x;f.options.doubleClickZoom==="center"?f.setZoom(A):f.setZoomAround(l.containerPoint,A)}});We.addInitHook("addHandler","doubleClickZoom",lv),We.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var uv=Qr.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new $n(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}Oe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ft(this._map._container,"leaflet-grab"),ft(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var f=oe(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(f.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(f.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var f=this._lastTime=+new Date,g=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(g),this._times.push(f),this._prunePositions(f)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),f=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=f.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,f){return l-(l-f)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),f=this._offsetLimit;l.x<f.min.x&&(l.x=this._viscousLimit(l.x,f.min.x)),l.y<f.min.y&&(l.y=this._viscousLimit(l.y,f.min.y)),l.x>f.max.x&&(l.x=this._viscousLimit(l.x,f.max.x)),l.y>f.max.y&&(l.y=this._viscousLimit(l.y,f.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,f=Math.round(l/2),g=this._initialWorldOffset,x=this._draggable._newPos.x,A=(x-f+g)%l+f-g,I=(x+f+g)%l-f-g,K=Math.abs(A+g)<Math.abs(I+g)?A:I;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=K},_onDragEnd:function(l){var f=this._map,g=f.options,x=!g.inertia||l.noInertia||this._times.length<2;if(f.fire("dragend",l),x)f.fire("moveend");else{this._prunePositions(+new Date);var A=this._lastPos.subtract(this._positions[0]),I=(this._lastTime-this._times[0])/1e3,K=g.easeLinearity,ee=A.multiplyBy(K/I),re=ee.distanceTo([0,0]),ue=Math.min(g.inertiaMaxSpeed,re),ye=ee.multiplyBy(ue/re),Se=ue/(g.inertiaDeceleration*K),Ie=ye.multiplyBy(-Se/2).round();!Ie.x&&!Ie.y?f.fire("moveend"):(Ie=f._limitOffset(Ie,f.options.maxBounds),G(function(){f.panBy(Ie,{duration:Se,easeLinearity:K,noMoveStart:!0,animate:!0})}))}}});We.addInitHook("addHandler","dragging",uv),We.mergeOptions({keyboard:!0,keyboardPanDelta:80});var cv=Qr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(l){this._map=l,this._setPanDelta(l.options.keyboardPanDelta),this._setZoomDelta(l.options.zoomDelta)},addHooks:function(){var l=this._map._container;l.tabIndex<=0&&(l.tabIndex="0"),ke(l,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),et(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var l=document.body,f=document.documentElement,g=l.scrollTop||f.scrollTop,x=l.scrollLeft||f.scrollLeft;this._map._container.focus(),window.scrollTo(x,g)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(l){var f=this._panKeys={},g=this.keyCodes,x,A;for(x=0,A=g.left.length;x<A;x++)f[g.left[x]]=[-1*l,0];for(x=0,A=g.right.length;x<A;x++)f[g.right[x]]=[l,0];for(x=0,A=g.down.length;x<A;x++)f[g.down[x]]=[0,l];for(x=0,A=g.up.length;x<A;x++)f[g.up[x]]=[0,-1*l]},_setZoomDelta:function(l){var f=this._zoomKeys={},g=this.keyCodes,x,A;for(x=0,A=g.zoomIn.length;x<A;x++)f[g.zoomIn[x]]=l;for(x=0,A=g.zoomOut.length;x<A;x++)f[g.zoomOut[x]]=-l},_addHooks:function(){ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){et(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(l){if(!(l.altKey||l.ctrlKey||l.metaKey)){var f=l.keyCode,g=this._map,x;if(f in this._panKeys){if(!g._panAnim||!g._panAnim._inProgress)if(x=this._panKeys[f],l.shiftKey&&(x=Q(x).multiplyBy(3)),g.options.maxBounds&&(x=g._limitOffset(Q(x),g.options.maxBounds)),g.options.worldCopyJump){var A=g.wrapLatLng(g.unproject(g.project(g.getCenter()).add(x)));g.panTo(A)}else g.panBy(x)}else if(f in this._zoomKeys)g.setZoom(g.getZoom()+(l.shiftKey?3:1)*this._zoomKeys[f]);else if(f===27&&g._popup&&g._popup.options.closeOnEscapeKey)g.closePopup();else return;pi(l)}}});We.addInitHook("addHandler","keyboard",cv),We.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var dv=Qr.extend({addHooks:function(){ke(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){et(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(l){var f=Og(l),g=this._map.options.wheelDebounceTime;this._delta+=f,this._lastMousePos=this._map.mouseEventToContainerPoint(l),this._startTime||(this._startTime=+new Date);var x=Math.max(g-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),x),pi(l)},_performZoom:function(){var l=this._map,f=l.getZoom(),g=this._map.options.zoomSnap||0;l._stop();var x=this._delta/(this._map.options.wheelPxPerZoomLevel*4),A=4*Math.log(2/(1+Math.exp(-Math.abs(x))))/Math.LN2,I=g?Math.ceil(A/g)*g:A,K=l._limitZoom(f+(this._delta>0?I:-I))-f;this._delta=0,this._startTime=null,K&&(l.options.scrollWheelZoom==="center"?l.setZoom(f+K):l.setZoomAround(this._lastMousePos,f+K))}});We.addInitHook("addHandler","scrollWheelZoom",dv);var eP=600;We.mergeOptions({tapHold:xe.touchNative&&xe.safari&&xe.mobile,tapTolerance:15});var hv=Qr.extend({addHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){et(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var f=l.touches[0];this._startPos=this._newPos=new q(f.clientX,f.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(ke(document,"touchend",Ot),ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",f))},this),eP),ke(document,"touchend touchcancel contextmenu",this._cancel,this),ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){et(document,"touchend",Ot),et(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),et(document,"touchend touchcancel contextmenu",this._cancel,this),et(document,"touchmove",this._onMove,this)},_onMove:function(l){var f=l.touches[0];this._newPos=new q(f.clientX,f.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,f){var g=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:f.screenX,screenY:f.screenY,clientX:f.clientX,clientY:f.clientY});g._simulated=!0,f.target.dispatchEvent(g)}});We.addInitHook("addHandler","tapHold",hv),We.mergeOptions({touchZoom:xe.touch,bounceAtZoomLimits:!0});var fv=Qr.extend({addHooks:function(){Oe(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),et(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var f=this._map;if(!(!l.touches||l.touches.length!==2||f._animatingZoom||this._zooming)){var g=f.mouseEventToContainerPoint(l.touches[0]),x=f.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=f.getSize()._divideBy(2),this._startLatLng=f.containerPointToLatLng(this._centerPoint),f.options.touchZoom!=="center"&&(this._pinchStartLatLng=f.containerPointToLatLng(g.add(x)._divideBy(2))),this._startDist=g.distanceTo(x),this._startZoom=f.getZoom(),this._moved=!1,this._zooming=!0,f._stop(),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend touchcancel",this._onTouchEnd,this),Ot(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var f=this._map,g=f.mouseEventToContainerPoint(l.touches[0]),x=f.mouseEventToContainerPoint(l.touches[1]),A=g.distanceTo(x)/this._startDist;if(this._zoom=f.getScaleZoom(A,this._startZoom),!f.options.bounceAtZoomLimits&&(this._zoom<f.getMinZoom()&&A<1||this._zoom>f.getMaxZoom()&&A>1)&&(this._zoom=f._limitZoom(this._zoom)),f.options.touchZoom==="center"){if(this._center=this._startLatLng,A===1)return}else{var I=g._add(x)._divideBy(2)._subtract(this._centerPoint);if(A===1&&I.x===0&&I.y===0)return;this._center=f.unproject(f.project(this._pinchStartLatLng,this._zoom).subtract(I),this._zoom)}this._moved||(f._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var K=o(f._move,f,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(K,this,!0),Ot(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),et(document,"touchmove",this._onTouchMove,this),et(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});We.addInitHook("addHandler","touchZoom",fv),We.BoxZoom=sv,We.DoubleClickZoom=lv,We.Drag=uv,We.Keyboard=cv,We.ScrollWheelZoom=dv,We.TapHold=hv,We.TouchZoom=fv,r.Bounds=J,r.Browser=xe,r.CRS=me,r.Canvas=nv,r.Circle=th,r.CircleMarker=Rl,r.Class=X,r.Control=Br,r.DivIcon=ev,r.DivOverlay=Jr,r.DomEvent=yE,r.DomUtil=gE,r.Draggable=$n,r.Evented=j,r.FeatureGroup=xn,r.GeoJSON=Sn,r.GridLayer=Ao,r.Handler=Qr,r.Icon=ta,r.ImageOverlay=Ol,r.LatLng=se,r.LatLngBounds=ae,r.Layer=zr,r.LayerGroup=ea,r.LineUtil=DE,r.Map=We,r.Marker=Al,r.Mixin=SE,r.Path=Bn,r.Point=q,r.PolyUtil=ME,r.Polygon=ra,r.Polyline=Tn,r.Popup=Il,r.PosAnimation=Ig,r.Projection=NE,r.Rectangle=ov,r.Renderer=Mn,r.SVG=Do,r.SVGOverlay=Jg,r.TileLayer=ia,r.Tooltip=Fl,r.Transformation=Ce,r.Util=$,r.VideoOverlay=Qg,r.bind=o,r.bounds=ne,r.canvas=iv,r.circle=zE,r.circleMarker=BE,r.control=Mo,r.divIcon=XE,r.extend=i,r.featureGroup=IE,r.geoJSON=Kg,r.geoJson=jE,r.gridLayer=ZE,r.icon=FE,r.imageOverlay=UE,r.latLng=ce,r.latLngBounds=oe,r.layerGroup=OE,r.map=bE,r.marker=$E,r.point=Q,r.polygon=WE,r.polyline=HE,r.popup=qE,r.rectangle=JE,r.setOptions=b,r.stamp=u,r.svg=av,r.svgOverlay=GE,r.tileLayer=tv,r.tooltip=YE,r.transformation=le,r.version=n,r.videoOverlay=VE;var tP=window.L;r.noConflict=function(){return window.L=tP,this},window.L=r})})(Sf,Sf.exports);var Lw=Sf.exports;const An=O.getDefaultExportFromCjs(Lw);var Ow={exports:{}};function g8(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var Ai=1,Ri=2,ka=3,v8=4,Mf=5,o1=6378137,y8=6356752314e-3,s1=.0066943799901413165,ts=484813681109536e-20,fe=Math.PI/2,b8=.16666666666666666,_8=.04722222222222222,w8=.022156084656084655,ge=1e-10,$t=.017453292519943295,sn=57.29577951308232,qe=Math.PI/4,Cs=Math.PI*2,mt=3.14159265359,fr={};fr.greenwich=0;fr.lisbon=-9.131906111111;fr.paris=2.337229166667;fr.bogota=-74.080916666667;fr.madrid=-3.687938888889;fr.rome=12.452333333333;fr.bern=7.439583333333;fr.jakarta=106.807719444444;fr.ferro=-17.666666666667;fr.brussels=4.367975;fr.stockholm=18.058277777778;fr.athens=23.7163375;fr.oslo=10.722916666667;const C8={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var l1=/[\s_\-\/\(\)]/g;function ni(e,t){if(e[t])return e[t];for(var r=Object.keys(e),n=t.toLowerCase().replace(l1,""),i=-1,a,o;++i<r.length;)if(a=r[i],o=a.toLowerCase().replace(l1,""),o===n)return e[a]}function Ef(e){var t={},r=e.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,u){var c=u.split("=");return c.push(!0),s[c[0].toLowerCase()]=c[1],s},{}),n,i,a,o={proj:"projName",datum:"datumCode",rf:function(s){t.rf=parseFloat(s)},lat_0:function(s){t.lat0=s*$t},lat_1:function(s){t.lat1=s*$t},lat_2:function(s){t.lat2=s*$t},lat_ts:function(s){t.lat_ts=s*$t},lon_0:function(s){t.long0=s*$t},lon_1:function(s){t.long1=s*$t},lon_2:function(s){t.long2=s*$t},alpha:function(s){t.alpha=parseFloat(s)*$t},gamma:function(s){t.rectified_grid_angle=parseFloat(s)},lonc:function(s){t.longc=s*$t},x_0:function(s){t.x0=parseFloat(s)},y_0:function(s){t.y0=parseFloat(s)},k_0:function(s){t.k0=parseFloat(s)},k:function(s){t.k0=parseFloat(s)},a:function(s){t.a=parseFloat(s)},b:function(s){t.b=parseFloat(s)},r:function(s){t.a=t.b=parseFloat(s)},r_a:function(){t.R_A=!0},zone:function(s){t.zone=parseInt(s,10)},south:function(){t.utmSouth=!0},towgs84:function(s){t.datum_params=s.split(",").map(function(u){return parseFloat(u)})},to_meter:function(s){t.to_meter=parseFloat(s)},units:function(s){t.units=s;var u=ni(C8,s);u&&(t.to_meter=u.to_meter)},from_greenwich:function(s){t.from_greenwich=s*$t},pm:function(s){var u=ni(fr,s);t.from_greenwich=(u||parseFloat(s))*$t},nadgrids:function(s){s==="@null"?t.datumCode="none":t.nadgrids=s},axis:function(s){var u="ewnsud";s.length===3&&u.indexOf(s.substr(0,1))!==-1&&u.indexOf(s.substr(1,1))!==-1&&u.indexOf(s.substr(2,1))!==-1&&(t.axis=s)},approx:function(){t.approx=!0}};for(n in r)i=r[n],n in o?(a=o[n],typeof a=="function"?a(i):t[a]=i):t[n]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var xs=1,Iw=2,Fw=3,Gu=4,$w=5,Xm=-1,x8=/\s/,T8=/[A-Za-z]/,S8=/[A-Za-z84_]/,Fc=/[,\]]/,Bw=/[\d\.E\-\+]/;function On(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=xs}On.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==Gu)for(;x8.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case xs:return this.neutral(e);case Iw:return this.keyword(e);case Gu:return this.quoted(e);case $w:return this.afterquote(e);case Fw:return this.number(e);case Xm:return}};On.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=Gu;return}if(Fc.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)};On.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=xs;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=xs,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Xm);return}};On.prototype.number=function(e){if(Bw.test(e)){this.word+=e;return}if(Fc.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)};On.prototype.quoted=function(e){if(e==='"'){this.state=$w;return}this.word+=e};On.prototype.keyword=function(e){if(S8.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=xs;return}if(Fc.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)};On.prototype.neutral=function(e){if(T8.test(e)){this.word=e,this.state=Iw;return}if(e==='"'){this.word="",this.state=Gu;return}if(Bw.test(e)){this.word=e,this.state=Fw;return}if(Fc.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)};On.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Xm)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function M8(e){var t=new On(e);return t.output()}function u1(e,t,r){Array.isArray(t)&&(r.unshift(t),t=null);var n=t?{}:e,i=r.reduce(function(a,o){return xa(o,a),a},n);t&&(e[t]=i)}function xa(e,t){if(!Array.isArray(e)){t[e]=!0;return}var r=e.shift();if(r==="PARAMETER"&&(r=e.shift()),e.length===1){if(Array.isArray(e[0])){t[r]={},xa(e[0],t[r]);return}t[r]=e[0];return}if(!e.length){t[r]=!0;return}if(r==="TOWGS84"){t[r]=e;return}if(r==="AXIS"){r in t||(t[r]=[]),t[r].push(e);return}Array.isArray(r)||(t[r]={});var n;switch(r){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[r]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&xa(e[2],t[r]);return;case"SPHEROID":case"ELLIPSOID":t[r]={name:e[0],a:e[1],rf:e[2]},e.length===4&&xa(e[3],t[r]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],u1(t,r,e);return;default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return xa(e,t[r]);return u1(t,r,e)}}var E8=.017453292519943295;function P8(e,t){var r=t[0],n=t[1];!(r in e)&&n in e&&(e[r]=e[n],t.length===3&&(e[r]=t[2](e[r])))}function rn(e){return e*E8}function A8(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",r=0,n=e.AXIS.length;r<n;++r){var i=[e.AXIS[r][0].toLowerCase(),e.AXIS[r][1].toLowerCase()];i[0].indexOf("north")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="north"?t+="n":i[0].indexOf("south")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="south"?t+="s":i[0].indexOf("east")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="east"?t+="e":(i[0].indexOf("west")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var a=e.GEOGCS;e.type==="GEOGCS"&&(a=e),a&&(a.DATUM?e.datumCode=a.DATUM.name.toLowerCase():e.datumCode=a.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(e.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=a.DATUM.SPHEROID.a,e.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(e.datum_params=a.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function o(c){var d=e.to_meter||1;return c*d}var s=function(c){return P8(e,c)},u=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",rn],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",rn],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",rn],["lat0","latitude_of_origin",rn],["lat0","standard_parallel_1",rn],["lat1","standard_parallel_1",rn],["lat2","standard_parallel_2",rn],["azimuth","Azimuth"],["alpha","azimuth",rn],["srsCode","name"]];u.forEach(s),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")?(e.lat0=rn(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=rn(e.lat0>0?90:-90))}function zw(e){var t=M8(e),r=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",r]);var i={};return xa(t,i),A8(i),i}function Jt(e){var t=this;if(arguments.length===2){var r=arguments[1];typeof r=="string"?r.charAt(0)==="+"?Jt[e]=Ef(arguments[1]):Jt[e]=zw(arguments[1]):Jt[e]=r}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(n){Array.isArray(n)?Jt.apply(t,n):Jt(n)});if(typeof e=="string"){if(e in Jt)return Jt[e]}else"EPSG"in e?Jt["EPSG:"+e.EPSG]=e:"ESRI"in e?Jt["ESRI:"+e.ESRI]=e:"IAU2000"in e?Jt["IAU2000:"+e.IAU2000]=e:console.log(e);return}}g8(Jt);function R8(e){return typeof e=="string"}function D8(e){return e in Jt}var N8=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function k8(e){return N8.some(function(t){return e.indexOf(t)>-1})}var L8=["3857","900913","3785","102113"];function O8(e){var t=ni(e,"authority");if(t){var r=ni(t,"epsg");return r&&L8.indexOf(r)>-1}}function I8(e){var t=ni(e,"extension");if(t)return ni(t,"proj4")}function F8(e){return e[0]==="+"}function $8(e){if(R8(e)){if(D8(e))return Jt[e];if(k8(e)){var t=zw(e);if(O8(t))return Jt["EPSG:3857"];var r=I8(t);return r?Ef(r):t}if(F8(e))return Ef(e)}else return e}function c1(e,t){e=e||{};var r,n;if(!t)return e;for(n in t)r=t[n],r!==void 0&&(e[n]=r);return e}function fn(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}function Us(e){return e<0?-1:1}function be(e){return Math.abs(e)<=mt?e:e-Us(e)*Cs}function Wr(e,t,r){var n=e*r,i=.5*e;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(fe-t))/n}function Ts(e,t){for(var r=.5*e,n,i,a=fe-2*Math.atan(t),o=0;o<=15;o++)if(n=e*Math.sin(a),i=fe-2*Math.atan(t*Math.pow((1-n)/(1+n),r))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function B8(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=fn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function z8(e){var t=e.x,r=e.y;if(r*sn>90&&r*sn<-90&&t*sn>180&&t*sn<-180)return null;var n,i;if(Math.abs(Math.abs(r)-fe)<=ge)return null;if(this.sphere)n=this.x0+this.a*this.k0*be(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(qe+.5*r));else{var a=Math.sin(r),o=Wr(this.e,r,a);n=this.x0+this.a*this.k0*be(t-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return e.x=n,e.y=i,e}function H8(e){var t=e.x-this.x0,r=e.y-this.y0,n,i;if(this.sphere)i=fe-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(i=Ts(this.e,a),i===-9999)return null}return n=be(this.long0+t/(this.a*this.k0)),e.x=n,e.y=i,e}var W8=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const j8={init:B8,forward:z8,inverse:H8,names:W8};function U8(){}function d1(e){return e}var V8=["longlat","identity"];const G8={init:U8,forward:d1,inverse:d1,names:V8};var q8=[j8,G8],Tu={},qu=[];function Hw(e,t){var r=qu.length;return e.names?(qu[r]=e,e.names.forEach(function(n){Tu[n.toLowerCase()]=r}),this):(console.log(t),!0)}function Y8(e){if(!e)return!1;var t=e.toLowerCase();if(typeof Tu[t]!="undefined"&&qu[Tu[t]])return qu[Tu[t]]}function X8(){q8.forEach(Hw)}const Z8={start:X8,add:Hw,get:Y8};var Pe={};Pe.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Pe.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Pe.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Pe.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Pe.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Pe.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Pe.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Pe.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Pe.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Pe.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Pe.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Pe.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Pe.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Pe.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Pe.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Pe.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};Pe.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Pe.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Pe.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Pe.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Pe.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Pe.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Pe.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Pe.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Pe.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Pe.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Pe.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Pe.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Pe.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Pe.hough={a:6378270,rf:297,ellipseName:"Hough"};Pe.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Pe.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Pe.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Pe.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Pe.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Pe.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Pe.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Pe.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Pe.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Pe.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Pe.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Pe.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var K8=Pe.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Pe.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Q8(e,t,r,n){var i=e*e,a=t*t,o=(i-a)/i,s=0;n?(e*=1-o*(b8+o*(_8+o*w8)),i=e*e,o=0):s=Math.sqrt(o);var u=(i-a)/a;return{es:o,e:s,ep2:u}}function J8(e,t,r,n,i){if(!e){var a=ni(Pe,n);a||(a=K8),e=a.a,t=a.b,r=a.rf}return r&&!t&&(t=(1-1/r)*e),(r===0||Math.abs(e-t)<ge)&&(i=!0,t=e),{a:e,b:t,rf:r,sphere:i}}var Et={};Et.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};Et.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};Et.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};Et.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};Et.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};Et.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};Et.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};Et.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};Et.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"};Et.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};Et.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};Et.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};Et.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};Et.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};Et.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};Et.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};Et.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};Et.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function eD(e,t,r,n,i,a,o){var s={};return e===void 0||e==="none"?s.datum_type=Mf:s.datum_type=v8,t&&(s.datum_params=t.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=Ai),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=Ri,s.datum_params[3]*=ts,s.datum_params[4]*=ts,s.datum_params[5]*=ts,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=ka,s.grids=o),s.a=r,s.b=n,s.es=i,s.ep2=a,s}var Ww={};function tD(e,t){var r=new DataView(t),n=iD(r),i=aD(r,n),a=oD(r,i,n),o={header:i,subgrids:a};return Ww[e]=o,o}function rD(e){if(e===void 0)return null;var t=e.split(",");return t.map(nD)}function nD(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Ww[e]||null,isNull:!1}}function Ta(e){return e/3600*Math.PI/180}function iD(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function aD(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Pf(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function Pf(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function oD(e,t,r){for(var n=176,i=[],a=0;a<t.nSubgrids;a++){var o=lD(e,n,r),s=uD(e,n,o,r),u=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),c=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);i.push({ll:[Ta(o.lowerLongitude),Ta(o.lowerLatitude)],del:[Ta(o.longitudeInterval),Ta(o.latitudeInterval)],lim:[u,c],count:o.gridNodeCount,cvs:sD(s)}),n+=176+o.gridNodeCount*16}return i}function sD(e){return e.map(function(t){return[Ta(t.longitudeShift),Ta(t.latitudeShift)]})}function lD(e,t,r){return{name:Pf(e,t+8,t+16).trim(),parent:Pf(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,r),upperLatitude:e.getFloat64(t+88,r),lowerLongitude:e.getFloat64(t+104,r),upperLongitude:e.getFloat64(t+120,r),latitudeInterval:e.getFloat64(t+136,r),longitudeInterval:e.getFloat64(t+152,r),gridNodeCount:e.getInt32(t+168,r)}}function uD(e,t,r,n){for(var i=t+176,a=16,o=[],s=0;s<r.gridNodeCount;s++){var u={latitudeShift:e.getFloat32(i+s*a,n),longitudeShift:e.getFloat32(i+s*a+4,n),latitudeAccuracy:e.getFloat32(i+s*a+8,n),longitudeAccuracy:e.getFloat32(i+s*a+12,n)};o.push(u)}return o}function cn(e,t){if(!(this instanceof cn))return new cn(e);t=t||function(c){if(c)throw c};var r=$8(e);if(typeof r!="object"){t(e);return}var n=cn.projections.get(r.projName);if(!n){t(e);return}if(r.datumCode&&r.datumCode!=="none"){var i=ni(Et,r.datumCode);i&&(r.datum_params=r.datum_params||(i.towgs84?i.towgs84.split(","):null),r.ellps=i.ellipse,r.datumName=i.datumName?i.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84",r.lat1=r.lat1||r.lat0;var a=J8(r.a,r.b,r.rf,r.ellps,r.sphere),o=Q8(a.a,a.b,a.rf,r.R_A),s=rD(r.nadgrids),u=r.datum||eD(r.datumCode,r.datum_params,a.a,a.b,o.es,o.ep2,s);c1(this,r),c1(this,n),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=u,this.init(),t(null,this)}cn.projections=Z8;cn.projections.start();function cD(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===Ai?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===Ri?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function jw(e,t,r){var n=e.x,i=e.y,a=e.z?e.z:0,o,s,u,c;if(i<-fe&&i>-1.001*fe)i=-fe;else if(i>fe&&i<1.001*fe)i=fe;else{if(i<-fe)return{x:-1/0,y:-1/0,z:e.z};if(i>fe)return{x:1/0,y:1/0,z:e.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(i),c=Math.cos(i),u=s*s,o=r/Math.sqrt(1-t*u),{x:(o+a)*c*Math.cos(n),y:(o+a)*c*Math.sin(n),z:(o*(1-t)+a)*s}}function Uw(e,t,r,n){var i=1e-12,a=i*i,o=30,s,u,c,d,h,p,m,v,b,_,w,C,S,T=e.x,M=e.y,E=e.z?e.z:0,D,N,F;if(s=Math.sqrt(T*T+M*M),u=Math.sqrt(T*T+M*M+E*E),s/r<i){if(D=0,u/r<i)return N=fe,F=-n,{x:e.x,y:e.y,z:e.z}}else D=Math.atan2(M,T);c=E/u,d=s/u,h=1/Math.sqrt(1-t*(2-t)*d*d),v=d*(1-t)*h,b=c*h,S=0;do S++,m=r/Math.sqrt(1-t*b*b),F=s*v+E*b-m*(1-t*b*b),p=t*m/(m+F),h=1/Math.sqrt(1-p*(2-p)*d*d),_=d*(1-p)*h,w=c*h,C=w*v-_*b,v=_,b=w;while(C*C>a&&S<o);return N=Math.atan(w/Math.abs(_)),{x:D,y:N,z:F}}function dD(e,t,r){if(t===Ai)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===Ri){var n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=r[5],c=r[6];return{x:c*(e.x-u*e.y+s*e.z)+n,y:c*(u*e.x+e.y-o*e.z)+i,z:c*(-s*e.x+o*e.y+e.z)+a}}}function hD(e,t,r){if(t===Ai)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===Ri){var n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=r[5],c=r[6],d=(e.x-n)/c,h=(e.y-i)/c,p=(e.z-a)/c;return{x:d+u*h-s*p,y:-u*d+h+o*p,z:s*d-o*h+p}}}function Zl(e){return e===Ai||e===Ri}function fD(e,t,r){if(cD(e,t)||e.datum_type===Mf||t.datum_type===Mf)return r;var n=e.a,i=e.es;if(e.datum_type===ka){var a=h1(e,!1,r);if(a!==0)return;n=o1,i=s1}var o=t.a,s=t.b,u=t.es;if(t.datum_type===ka&&(o=o1,s=y8,u=s1),i===u&&n===o&&!Zl(e.datum_type)&&!Zl(t.datum_type))return r;if(r=jw(r,i,n),Zl(e.datum_type)&&(r=dD(r,e.datum_type,e.datum_params)),Zl(t.datum_type)&&(r=hD(r,t.datum_type,t.datum_params)),r=Uw(r,u,o,s),t.datum_type===ka){var c=h1(t,!0,r);if(c!==0)return}return r}function h1(e,t,r){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-r.x,y:r.y},i={x:Number.NaN,y:Number.NaN},a=[];e:for(var o=0;o<e.grids.length;o++){var s=e.grids[o];if(a.push(s.name),s.isNull){i=n;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}for(var u=s.grid.subgrids,c=0,d=u.length;c<d;c++){var h=u[c],p=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,m=h.ll[0]-p,v=h.ll[1]-p,b=h.ll[0]+(h.lim[0]-1)*h.del[0]+p,_=h.ll[1]+(h.lim[1]-1)*h.del[1]+p;if(!(v>n.y||m>n.x||_<n.y||b<n.x)&&(i=pD(n,t,h),!isNaN(i.x)))break e}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*sn+" "+n.y*sn+" tried: '"+a+"'"),-1):(r.x=-i.x,r.y=i.y,0)}function pD(e,t,r){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var i={x:e.x,y:e.y};i.x-=r.ll[0],i.y-=r.ll[1],i.x=be(i.x-Math.PI)+Math.PI;var a=f1(i,r);if(t){if(isNaN(a.x))return n;a.x=i.x-a.x,a.y=i.y-a.y;var o=9,s=1e-12,u,c;do{if(c=f1(a,r),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}u={x:i.x-(c.x+a.x),y:i.y-(c.y+a.y)},a.x+=u.x,a.y+=u.y}while(o--&&Math.abs(u.x)>s&&Math.abs(u.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=be(a.x+r.ll[0]),n.y=a.y+r.ll[1]}else isNaN(a.x)||(n.x=e.x+a.x,n.y=e.y+a.y);return n}function f1(e,t){var r={x:e.x/t.del[0],y:e.y/t.del[1]},n={x:Math.floor(r.x),y:Math.floor(r.y)},i={x:r.x-1*n.x,y:r.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return a;o=n.y*t.lim[0]+n.x;var s={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var u={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var c={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var d={x:t.cvs[o][0],y:t.cvs[o][1]},h=i.x*i.y,p=i.x*(1-i.y),m=(1-i.x)*(1-i.y),v=(1-i.x)*i.y;return a.x=m*s.x+p*u.x+v*d.x+h*c.x,a.y=m*s.y+p*u.y+v*d.y+h*c.y,a}function p1(e,t,r){var n=r.x,i=r.y,a=r.z||0,o,s,u,c={};for(u=0;u<3;u++)if(!(t&&u===2&&r.z===void 0))switch(u===0?(o=n,"ew".indexOf(e.axis[u])!==-1?s="x":s="y"):u===1?(o=i,"ns".indexOf(e.axis[u])!==-1?s="y":s="x"):(o=a,s="z"),e.axis[u]){case"e":c[s]=o;break;case"w":c[s]=-o;break;case"n":c[s]=o;break;case"s":c[s]=-o;break;case"u":r[s]!==void 0&&(c.z=o);break;case"d":r[s]!==void 0&&(c.z=-o);break;default:return null}return c}function Vw(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function mD(e){m1(e.x),m1(e.y)}function m1(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function gD(e,t){return(e.datum.datum_type===Ai||e.datum.datum_type===Ri||e.datum.datum_type===ka)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Ai||t.datum.datum_type===Ri||t.datum.datum_type===ka)&&e.datumCode!=="WGS84"}function Yu(e,t,r,n){var i;Array.isArray(r)?r=Vw(r):r={x:r.x,y:r.y,z:r.z,m:r.m};var a=r.z!==void 0;if(mD(r),e.datum&&t.datum&&gD(e,t)&&(i=new cn("WGS84"),r=Yu(e,i,r,n),e=i),n&&e.axis!=="enu"&&(r=p1(e,!1,r)),e.projName==="longlat")r={x:r.x*$t,y:r.y*$t,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),r=e.inverse(r),!r)return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=fD(e.datum,t.datum,r),!!r)return t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),t.projName==="longlat"?r={x:r.x*sn,y:r.y*sn,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),n&&t.axis!=="enu"?p1(t,!0,r):(r&&!a&&delete r.z,r)}var g1=cn("WGS84");function xh(e,t,r,n){var i,a,o;return Array.isArray(r)?(i=Yu(e,t,r,n)||{x:NaN,y:NaN},r.length>2?typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(r.splice(3)):[i.x,i.y,r[2]].concat(r.splice(3)):[i.x,i.y].concat(r.splice(2)):[i.x,i.y]):(a=Yu(e,t,r,n),o=Object.keys(r),o.length===2||o.forEach(function(s){if(typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;a[s]=r[s]}),a)}function v1(e){return e instanceof cn?e:e.oProj?e.oProj:cn(e)}function br(e,t,r){e=v1(e);var n=!1,i;return typeof t=="undefined"?(t=e,e=g1,n=!0):(typeof t.x!="undefined"||Array.isArray(t))&&(r=t,t=e,e=g1,n=!0),t=v1(t),r?xh(e,t,r):(i={forward:function(a,o){return xh(e,t,a,o)},inverse:function(a,o){return xh(t,e,a,o)}},n&&(i.oProj=t),i)}var y1=6,Gw="AJSAJS",qw="AFAFAF",Sa=65,ur=73,Ar=79,qo=86,Yo=90;const vD={forward:Yw,inverse:yD,toPoint:Xw};function Yw(e,t){return t=t||5,wD(bD({lat:e[1],lon:e[0]}),t)}function yD(e){var t=Zm(Kw(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Xw(e){var t=Zm(Kw(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Th(e){return e*(Math.PI/180)}function b1(e){return 180*(e/Math.PI)}function bD(e){var t=e.lat,r=e.lon,n=6378137,i=.00669438,a=.9996,o,s,u,c,d,h,p,m=Th(t),v=Th(r),b,_;_=Math.floor((r+180)/6)+1,r===180&&(_=60),t>=56&&t<64&&r>=3&&r<12&&(_=32),t>=72&&t<84&&(r>=0&&r<9?_=31:r>=9&&r<21?_=33:r>=21&&r<33?_=35:r>=33&&r<42&&(_=37)),o=(_-1)*6-180+3,b=Th(o),s=i/(1-i),u=n/Math.sqrt(1-i*Math.sin(m)*Math.sin(m)),c=Math.tan(m)*Math.tan(m),d=s*Math.cos(m)*Math.cos(m),h=Math.cos(m)*(v-b),p=n*((1-i/4-3*i*i/64-5*i*i*i/256)*m-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*m)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*m)-35*i*i*i/3072*Math.sin(6*m));var w=a*u*(h+(1-c+d)*h*h*h/6+(5-18*c+c*c+72*d-58*s)*h*h*h*h*h/120)+5e5,C=a*(p+u*Math.tan(m)*(h*h/2+(5-c+9*d+4*d*d)*h*h*h*h/24+(61-58*c+c*c+600*d-330*s)*h*h*h*h*h*h/720));return t<0&&(C+=1e7),{northing:Math.round(C),easting:Math.round(w),zoneNumber:_,zoneLetter:_D(t)}}function Zm(e){var t=e.northing,r=e.easting,n=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var a=.9996,o=6378137,s=.00669438,u,c=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),d,h,p,m,v,b,_,w,C,S=r-5e5,T=t;n<"N"&&(T-=1e7),_=(i-1)*6-180+3,u=s/(1-s),b=T/a,w=b/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),C=w+(3*c/2-27*c*c*c/32)*Math.sin(2*w)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*w)+151*c*c*c/96*Math.sin(6*w),d=o/Math.sqrt(1-s*Math.sin(C)*Math.sin(C)),h=Math.tan(C)*Math.tan(C),p=u*Math.cos(C)*Math.cos(C),m=o*(1-s)/Math.pow(1-s*Math.sin(C)*Math.sin(C),1.5),v=S/(d*a);var M=C-d*Math.tan(C)/m*(v*v/2-(5+3*h+10*p-4*p*p-9*u)*v*v*v*v/24+(61+90*h+298*p+45*h*h-252*u-3*p*p)*v*v*v*v*v*v/720);M=b1(M);var E=(v-(1+2*h+p)*v*v*v/6+(5-2*p+28*h-3*p*p+8*u+24*h*h)*v*v*v*v*v/120)/Math.cos(C);E=_+b1(E);var D;if(e.accuracy){var N=Zm({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});D={top:N.lat,right:N.lon,bottom:M,left:E}}else D={lat:M,lon:E};return D}function _D(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function wD(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+CD(e.easting,e.northing,e.zoneNumber)+r.substr(r.length-5,t)+n.substr(n.length-5,t)}function CD(e,t,r){var n=Zw(r),i=Math.floor(e/1e5),a=Math.floor(t/1e5)%20;return xD(i,a,n)}function Zw(e){var t=e%y1;return t===0&&(t=y1),t}function xD(e,t,r){var n=r-1,i=Gw.charCodeAt(n),a=qw.charCodeAt(n),o=i+e-1,s=a+t,u=!1;o>Yo&&(o=o-Yo+Sa-1,u=!0),(o===ur||i<ur&&o>ur||(o>ur||i<ur)&&u)&&o++,(o===Ar||i<Ar&&o>Ar||(o>Ar||i<Ar)&&u)&&(o++,o===ur&&o++),o>Yo&&(o=o-Yo+Sa-1),s>qo?(s=s-qo+Sa-1,u=!0):u=!1,(s===ur||a<ur&&s>ur||(s>ur||a<ur)&&u)&&s++,(s===Ar||a<Ar&&s>Ar||(s>Ar||a<Ar)&&u)&&(s++,s===ur&&s++),s>qo&&(s=s-qo+Sa-1);var c=String.fromCharCode(o)+String.fromCharCode(s);return c}function Kw(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,r=null,n="",i,a=0;!/[A-Z]/.test(i=e.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+e;n+=i,a++}var o=parseInt(n,10);if(a===0||a+3>t)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+e;r=e.substring(a,a+=2);for(var u=Zw(o),c=TD(r.charAt(0),u),d=SD(r.charAt(1),u);d<MD(s);)d+=2e6;var h=t-a;if(h%2!==0)throw`MGRSPoint has to have an even number
15
- of digits after the zone letter and two 100km letters - front
16
- half for easting meters, second half for
17
- northing meters`+e;var p=h/2,m=0,v=0,b,_,w,C,S;return p>0&&(b=1e5/Math.pow(10,p),_=e.substring(a,a+p),m=parseFloat(_)*b,w=e.substring(a+p),v=parseFloat(w)*b),C=m+c,S=v+d,{easting:C,northing:S,zoneLetter:s,zoneNumber:o,accuracy:b}}function TD(e,t){for(var r=Gw.charCodeAt(t-1),n=1e5,i=!1;r!==e.charCodeAt(0);){if(r++,r===ur&&r++,r===Ar&&r++,r>Yo){if(i)throw"Bad character: "+e;r=Sa,i=!0}n+=1e5}return n}function SD(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var r=qw.charCodeAt(t-1),n=0,i=!1;r!==e.charCodeAt(0);){if(r++,r===ur&&r++,r===Ar&&r++,r>qo){if(i)throw"Bad character: "+e;r=Sa,i=!0}n+=1e5}return n}function MD(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function $a(e,t,r){if(!(this instanceof $a))return new $a(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof t=="undefined"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}$a.fromMGRS=function(e){return new $a(Xw(e))};$a.prototype.toMGRS=function(e){return Yw([this.x,this.y],e)};var ED=1,PD=.25,_1=.046875,w1=.01953125,C1=.01068115234375,AD=.75,RD=.46875,DD=.013020833333333334,ND=.007120768229166667,kD=.3645833333333333,LD=.005696614583333333,OD=.3076171875;function Qw(e){var t=[];t[0]=ED-e*(PD+e*(_1+e*(w1+e*C1))),t[1]=e*(AD-e*(_1+e*(w1+e*C1)));var r=e*e;return t[2]=r*(RD-e*(DD+e*ND)),r*=e,t[3]=r*(kD-e*LD),t[4]=r*e*OD,t}function $c(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var ID=20;function Jw(e,t,r){for(var n=1/(1-t),i=e,a=ID;a;--a){var o=Math.sin(i),s=1-t*o*o;if(s=($c(i,o,Math.cos(i),r)-e)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<ge)return i}return i}function FD(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Qw(this.es),this.ml0=$c(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function $D(e){var t=e.x,r=e.y,n=be(t-this.long0),i,a,o,s=Math.sin(r),u=Math.cos(r);if(this.es){var d=u*n,h=Math.pow(d,2),p=this.ep2*Math.pow(u,2),m=Math.pow(p,2),v=Math.abs(u)>ge?Math.tan(r):0,b=Math.pow(v,2),_=Math.pow(b,2);i=1-this.es*Math.pow(s,2),d=d/Math.sqrt(i);var w=$c(r,s,u,this.en);a=this.a*(this.k0*d*(1+h/6*(1-b+p+h/20*(5-18*b+_+14*p-58*b*p+h/42*(61+179*_-_*b-479*b)))))+this.x0,o=this.a*(this.k0*(w-this.ml0+s*n*d/2*(1+h/12*(5-b+9*p+4*m+h/30*(61+_-58*b+270*p-330*b*p+h/56*(1385+543*_-_*b-3111*b))))))+this.y0}else{var c=u*Math.sin(n);if(Math.abs(Math.abs(c)-1)<ge)return 93;if(a=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,o=u*Math.cos(n)/Math.sqrt(1-Math.pow(c,2)),c=Math.abs(o),c>=1){if(c-1>ge)return 93;o=0}else o=Math.acos(o);r<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return e.x=a,e.y=o,e}function BD(e){var t,r,n,i,a=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,r=Jw(t,this.es,this.en),Math.abs(r)<fe){var h=Math.sin(r),p=Math.cos(r),m=Math.abs(p)>ge?Math.tan(r):0,v=this.ep2*Math.pow(p,2),b=Math.pow(v,2),_=Math.pow(m,2),w=Math.pow(_,2);t=1-this.es*Math.pow(h,2);var C=a*Math.sqrt(t)/this.k0,S=Math.pow(C,2);t=t*m,n=r-t*S/(1-this.es)*.5*(1-S/12*(5+3*_-9*v*_+v-4*b-S/30*(61+90*_-252*v*_+45*w+46*v-S/56*(1385+3633*_+4095*w+1574*w*_)))),i=be(this.long0+C*(1-S/6*(1+2*_+v-S/20*(5+28*_+24*w+8*v*_+6*v-S/42*(61+662*_+1320*w+720*w*_))))/p)}else n=fe*Us(o),i=0;else{var s=Math.exp(a/this.k0),u=.5*(s-1/s),c=this.lat0+o/this.k0,d=Math.cos(c);t=Math.sqrt((1-Math.pow(d,2))/(1+Math.pow(u,2))),n=Math.asin(t),o<0&&(n=-n),u===0&&d===0?i=0:i=be(Math.atan2(u,d)+this.long0)}return e.x=i,e.y=n,e}var zD=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Su={init:FD,forward:$D,inverse:BD,names:zD};function eC(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function Dr(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function HD(e){var t=1+e,r=t-1;return r===0?e:e*Math.log(t)/r}function WD(e){var t=Math.abs(e);return t=HD(t*(1+t/(Dr(1,t)+1))),e<0?-t:t}function Km(e,t){for(var r=2*Math.cos(2*t),n=e.length-1,i=e[n],a=0,o;--n>=0;)o=-a+r*i+e[n],a=i,i=o;return t+o*Math.sin(2*t)}function jD(e,t){for(var r=2*Math.cos(t),n=e.length-1,i=e[n],a=0,o;--n>=0;)o=-a+r*i+e[n],a=i,i=o;return Math.sin(t)*o}function UD(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function tC(e,t,r){for(var n=Math.sin(t),i=Math.cos(t),a=eC(r),o=UD(r),s=2*i*o,u=-2*n*a,c=e.length-1,d=e[c],h=0,p=0,m=0,v,b;--c>=0;)v=p,b=h,p=d,h=m,d=-v+s*p-u*h+e[c],m=-b+u*p+s*h;return s=n*o,u=i*a,[s*d-u*m,s*m+u*d]}function VD(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Su.init.apply(this),this.forward=Su.forward,this.inverse=Su.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),r=r*t,this.cgb[1]=r*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r=r*t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),r=r*t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(-12/5+t*(-24832/14175))),r=r*t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r=r*t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(1/4+r*(1/64+r/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),r=r*t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r=r*t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r=r*t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r=r*t,this.utg[5]=r*(-20648693/638668800),this.gtu[5]=r*(212378941/319334400);var n=Km(this.cbg,this.lat0);this.Zb=-this.Qn*(n+jD(this.gtu,2*n))}function GD(e){var t=be(e.x-this.long0),r=e.y;r=Km(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),a=Math.sin(t),o=Math.cos(t);r=Math.atan2(n,o*i),t=Math.atan2(a*i,Dr(n,i*o)),t=WD(Math.tan(t));var s=tC(this.gtu,2*r,2*t);r=r+s[0],t=t+s[1];var u,c;return Math.abs(t)<=2.623395162778?(u=this.a*(this.Qn*t)+this.x0,c=this.a*(this.Qn*r+this.Zb)+this.y0):(u=1/0,c=1/0),e.x=u,e.y=c,e}function qD(e){var t=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);r=(r-this.Zb)/this.Qn,t=t/this.Qn;var n,i;if(Math.abs(t)<=2.623395162778){var a=tC(this.utg,2*r,2*t);r=r+a[0],t=t+a[1],t=Math.atan(eC(t));var o=Math.sin(r),s=Math.cos(r),u=Math.sin(t),c=Math.cos(t);r=Math.atan2(o*c,Dr(u,c*s)),t=Math.atan2(u,c*s),n=be(t+this.long0),i=Km(this.cgb,r)}else n=1/0,i=1/0;return e.x=n,e.y=i,e}var YD=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Mu={init:VD,forward:GD,inverse:qD,names:YD};function XD(e,t){if(e===void 0){if(e=Math.floor((be(t)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var ZD="etmerc";function KD(){var e=XD(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$t,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Mu.init.apply(this),this.forward=Mu.forward,this.inverse=Mu.inverse}var QD=["Universal Transverse Mercator System","utm"];const JD={init:KD,names:QD,dependsOn:ZD};function Qm(e,t){return Math.pow((1-e)/(1+e),t)}var eN=20;function tN(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+qe)/(Math.pow(Math.tan(.5*this.lat0+qe),this.C)*Qm(this.e*e,this.ratexp))}function rN(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+qe),this.C)*Qm(this.e*Math.sin(r),this.ratexp))-fe,e.x=this.C*t,e}function nN(e){for(var t=1e-14,r=e.x/this.C,n=e.y,i=Math.pow(Math.tan(.5*n+qe)/this.K,1/this.C),a=eN;a>0&&(n=2*Math.atan(i*Qm(this.e*Math.sin(e.y),-.5*this.e))-fe,!(Math.abs(n-e.y)<t));--a)e.y=n;return a?(e.x=r,e.y=n,e):null}var iN=["gauss"];const Jm={init:tN,forward:rN,inverse:nN,names:iN};function aN(){Jm.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function oN(e){var t,r,n,i;return e.x=be(e.x-this.long0),Jm.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*n),e.x=i*r*Math.sin(e.x),e.y=i*(this.cosc0*t-this.sinc0*r*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function sN(e){var t,r,n,i,a;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,a=Dr(e.x,e.y)){var o=2*Math.atan2(a,this.R2);t=Math.sin(o),r=Math.cos(o),i=Math.asin(r*this.sinc0+e.y*t*this.cosc0/a),n=Math.atan2(e.x*t,a*this.cosc0*r-e.y*this.sinc0*t)}else i=this.phic0,n=0;return e.x=n,e.y=i,Jm.inverse.apply(this,[e]),e.x=be(e.x+this.long0),e}var lN=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const uN={init:aN,forward:oN,inverse:sN,names:lN};function cN(e,t,r){return t*=r,Math.tan(.5*(fe+e))*Math.pow((1-t)/(1+t),.5*r)}function dN(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ge&&(this.k0=.5*(1+Us(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ge&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ge&&Math.abs(Math.cos(this.lat_ts))>ge&&(this.k0=.5*this.cons*fn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Wr(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=fn(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-fe,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function hN(e){var t=e.x,r=e.y,n=Math.sin(r),i=Math.cos(r),a,o,s,u,c,d,h=be(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=ge&&Math.abs(r+this.lat0)<=ge?(e.x=NaN,e.y=NaN,e):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(h)),e.x=this.a*a*i*Math.sin(h)+this.x0,e.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(h))+this.y0,e):(o=2*Math.atan(this.ssfn_(r,n,this.e))-fe,u=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=ge?(c=Wr(this.e,r*this.con,this.con*n),d=2*this.a*this.k0*c/this.cons,e.x=this.x0+d*Math.sin(t-this.long0),e.y=this.y0-this.con*d*Math.cos(t-this.long0),e):(Math.abs(this.sinlat0)<ge?(a=2*this.a*this.k0/(1+u*Math.cos(h)),e.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*u*Math.cos(h))),e.y=a*(this.cosX0*s-this.sinX0*u*Math.cos(h))+this.y0),e.x=a*u*Math.sin(h)+this.x0,e))}function fN(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,i,a,o=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,r=this.lat0,o<=ge?(e.x=t,e.y=r,e):(r=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/o),Math.abs(this.coslat0)<ge?this.lat0>0?t=be(this.long0+Math.atan2(e.x,-1*e.y)):t=be(this.long0+Math.atan2(e.x,e.y)):t=be(this.long0+Math.atan2(e.x*Math.sin(s),o*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=r,e)}else if(Math.abs(this.coslat0)<=ge){if(o<=ge)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,n=o*this.cons/(2*this.a*this.k0),r=this.con*Ts(this.e,n),t=this.con*be(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=ge?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+e.y*Math.sin(i)*this.cosX0/o),t=be(this.long0+Math.atan2(e.x*Math.sin(i),o*this.cosX0*Math.cos(i)-e.y*this.sinX0*Math.sin(i)))),r=-1*Ts(this.e,Math.tan(.5*(fe+a)));return e.x=t,e.y=r,e}var pN=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const mN={init:dN,forward:hN,inverse:fN,names:pN,ssfn_:cN};function gN(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=this.rf,i=1/n,a=2*i-Math.pow(i,2),o=this.e=Math.sqrt(a);this.R=this.k0*r*Math.sqrt(1-a)/(1-a*Math.pow(t,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+e/2)),c=Math.log((1+o*t)/(1-o*t));this.K=s-this.alpha*u+this.alpha*o/2*c}function vN(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(e.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*o+this.x0,e}function yN(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,u=0,c=a,d=-1e3,h=0;Math.abs(c-d)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),d=c,c=2*Math.atan(Math.exp(u))-Math.PI/2}return e.x=s,e.y=c,e}var bN=["somerc"];const _N={init:gN,forward:vN,inverse:yN,names:bN};var va=1e-7;function wN(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],r=typeof e.PROJECTION=="object"?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||t.indexOf(r)!==-1}function CN(){var e,t,r,n,i,a,o,s,u,c,d=0,h,p=0,m=0,v=0,b=0,_=0,w=0;this.no_off=wN(this),this.no_rot="no_rot"in this;var C=!1;"alpha"in this&&(C=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),C&&(w=this.alpha),S&&(d=this.rectified_grid_angle*$t),C||S)p=this.longc;else if(m=this.long1,b=this.lat1,v=this.long2,_=this.lat2,Math.abs(b-_)<=va||(e=Math.abs(b))<=va||Math.abs(e-fe)<=va||Math.abs(Math.abs(this.lat0)-fe)<=va||Math.abs(Math.abs(_)-fe)<=va)throw new Error;var T=1-this.es;t=Math.sqrt(T),Math.abs(this.lat0)>ge?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/T),this.A=this.B*this.k0*t/e,n=this.B*t/(r*Math.sqrt(e)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Wr(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=i=1),C||S?(C?(h=Math.asin(Math.sin(w)/n),S||(d=w)):(h=d,w=Math.asin(n*Math.sin(h))),this.lam0=p-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(a=Math.pow(Wr(this.e,b,Math.sin(b)),this.B),o=Math.pow(Wr(this.e,_,Math.sin(_)),this.B),i=this.E/a,u=(o-a)/(o+a),c=this.E*this.E,c=(c-o*a)/(c+o*a),e=m-v,e<-Math.pi?v-=Cs:e>Math.pi&&(v+=Cs),this.lam0=be(.5*(m+v)-Math.atan(c*Math.tan(.5*this.B*(m-v))/u)/this.B),h=Math.atan(2*Math.sin(this.B*be(m-this.lam0))/(i-1/i)),d=w=Math.asin(n*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),this.sinrot=Math.sin(d),this.cosrot=Math.cos(d),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(w))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(qe-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(qe+i))}function xN(e){var t={},r,n,i,a,o,s,u,c;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-fe)>ge){if(o=this.E/Math.pow(Wr(this.e,e.y,Math.sin(e.y)),this.B),s=1/o,r=.5*(o-s),n=.5*(o+s),a=Math.sin(this.B*e.x),i=(r*this.singam-a*this.cosgam)/n,Math.abs(Math.abs(i)-1)<ge)throw new Error;c=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*e.x),Math.abs(s)<va?u=this.A*e.x:u=this.ArB*Math.atan2(r*this.cosgam+a*this.singam,s)}else c=e.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*e.y;return this.no_rot?(t.x=u,t.y=c):(u-=this.u_0,t.x=c*this.cosrot+u*this.sinrot,t.y=u*this.cosrot-c*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function TN(e){var t,r,n,i,a,o,s,u={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,t=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*r),i=.5*(n-1/n),a=.5*(n+1/n),o=Math.sin(this.BrA*t),s=(o*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)<ge)u.x=0,u.y=s<0?-fe:fe;else{if(u.y=this.E/Math.sqrt((1+s)/(1-s)),u.y=Ts(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return u.x+=this.lam0,u}var SN=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const MN={init:CN,forward:xN,inverse:TN,names:SN};function EN(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ge)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),r=Math.cos(this.lat1),n=fn(this.e,t,r),i=Wr(this.e,this.lat1,t),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=fn(this.e,a,o),u=Wr(this.e,this.lat2,a),c=Wr(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ge?this.ns=Math.log(n/s)/Math.log(i/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function PN(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=ge&&(r=Us(r)*(fe-2*ge));var n=Math.abs(Math.abs(r)-fe),i,a;if(n>ge)i=Wr(this.e,r,Math.sin(r)),a=this.a*this.f0*Math.pow(i,this.ns);else{if(n=r*this.ns,n<=0)return null;a=0}var o=this.ns*be(t-this.long0);return e.x=this.k0*(a*Math.sin(o))+this.x0,e.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,e}function AN(e){var t,r,n,i,a,o=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+s*s),r=1):(t=-Math.sqrt(o*o+s*s),r=-1);var u=0;if(t!==0&&(u=Math.atan2(r*o,r*s)),t!==0||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),i=Ts(this.e,n),i===-9999)return null}else i=-fe;return a=be(u/this.ns+this.long0),e.x=a,e.y=i,e}var RN=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const DN={init:EN,forward:PN,inverse:AN,names:RN};function NN(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function kN(e){var t,r,n,i,a,o,s,u=e.x,c=e.y,d=be(u-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),n=-d*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),a=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),e.y=s*Math.cos(o)/1,e.x=s*Math.sin(o)/1,this.czech||(e.y*=-1,e.x*=-1),e}function LN(e){var t,r,n,i,a,o,s,u,c=e.x;e.x=e.y,e.y=c,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),a=Math.atan2(e.y,e.x),i=a/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),e.x=this.long0-r/this.alfa,s=t,u=0;var d=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-e.y)<1e-10&&(u=1),s=e.y,d+=1;while(u===0&&d<15);return d>=15?null:e}var ON=["Krovak","krovak"];const IN={init:NN,forward:kN,inverse:LN,names:ON};function nr(e,t,r,n,i){return e*i-t*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i)}function Vs(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function Gs(e){return .375*e*(1+.25*e*(1+.46875*e))}function qs(e){return .05859375*e*e*(1+.75*e)}function Ys(e){return e*e*e*(35/3072)}function Ba(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}function Ja(e){return Math.abs(e)<fe?e:e-Us(e)*Math.PI}function Xu(e,t,r,n,i){var a,o;a=e/t;for(var s=0;s<15;s++)if(o=(e-(t*a-r*Math.sin(2*a)+n*Math.sin(4*a)-i*Math.sin(6*a)))/(t-2*r*Math.cos(2*a)+4*n*Math.cos(4*a)-6*i*Math.cos(6*a)),a+=o,Math.abs(o)<=1e-10)return a;return NaN}function FN(){this.sphere||(this.e0=Vs(this.es),this.e1=Gs(this.es),this.e2=qs(this.es),this.e3=Ys(this.es),this.ml0=this.a*nr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function $N(e){var t,r,n=e.x,i=e.y;if(n=be(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(n)),r=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var a=Math.sin(i),o=Math.cos(i),s=Ba(this.a,this.e,a),u=Math.tan(i)*Math.tan(i),c=n*Math.cos(i),d=c*c,h=this.es*o*o/(1-this.es),p=this.a*nr(this.e0,this.e1,this.e2,this.e3,i);t=s*c*(1-d*u*(1/6-(8-u+8*h)*d/120)),r=p-this.ml0+s*a/o*d*(.5+(5-u+6*h)*d/24)}return e.x=t+this.x0,e.y=r+this.y0,e}function BN(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,r=e.y/this.a,n,i;if(this.sphere){var a=r+this.lat0;n=Math.asin(Math.sin(a)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(a))}else{var o=this.ml0/this.a+r,s=Xu(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-fe)<=ge)return e.x=this.long0,e.y=fe,r<0&&(e.y*=-1),e;var u=Ba(this.a,this.e,Math.sin(s)),c=u*u*u/this.a/this.a*(1-this.es),d=Math.pow(Math.tan(s),2),h=t*this.a/u,p=h*h;n=s-u*Math.tan(s)/c*h*h*(.5-(1+3*d)*h*h/24),i=h*(1-p*(d/3+(1+3*d)*d*p/15))/Math.cos(s)}return e.x=be(i+this.long0),e.y=Ja(n),e}var zN=["Cassini","Cassini_Soldner","cass"];const HN={init:FN,forward:$N,inverse:BN,names:zN};function ei(e,t){var r;return e>1e-7?(r=e*t,(1-e*e)*(t/(1-r*r)-.5/e*Math.log((1-r)/(1+r)))):2*t}var WN=1,jN=2,UN=3,VN=4;function GN(){var e=Math.abs(this.lat0);if(Math.abs(e-fe)<ge?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<ge?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=ei(this.e,1),this.mmf=.5/(1-this.es),this.apa=tk(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=ei(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function qN(e){var t,r,n,i,a,o,s,u,c,d,h=e.x,p=e.y;if(h=be(h-this.long0),this.sphere){if(a=Math.sin(p),d=Math.cos(p),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(r=this.mode===this.EQUIT?1+d*n:1+this.sinph0*a+this.cosph0*d*n,r<=ge)return null;r=Math.sqrt(2/r),t=r*d*Math.sin(h),r*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*d*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)<ge)return null;r=qe-p*.5,r=2*(this.mode===this.S_POLE?Math.cos(r):Math.sin(r)),t=r*Math.sin(h),r*=n}}else{switch(s=0,u=0,c=0,n=Math.cos(h),i=Math.sin(h),a=Math.sin(p),o=ei(this.e,a),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=o/this.qp,u=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:c=1+this.sinb1*s+this.cosb1*u*n;break;case this.EQUIT:c=1+u*n;break;case this.N_POLE:c=fe+p,o=this.qp-o;break;case this.S_POLE:c=p-fe,o=this.qp+o;break}if(Math.abs(c)<ge)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),this.mode===this.OBLIQ?r=this.ymf*c*(this.cosb1*s-this.sinb1*u*n):r=(c=Math.sqrt(2/(1+u*n)))*s*this.ymf,t=this.xmf*c*u*i;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(c=Math.sqrt(o))*i,r=n*(this.mode===this.S_POLE?c:-c)):t=r=0;break}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e}function YN(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,r=e.y/this.a,n,i,a,o,s,u,c;if(this.sphere){var d=0,h,p=0;if(h=Math.sqrt(t*t+r*r),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(p=Math.sin(i),d=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=ge?0:Math.asin(r*p/h),t*=p,r=d*h;break;case this.OBLIQ:i=Math.abs(h)<=ge?this.lat0:Math.asin(d*this.sinph0+r*p*this.cosph0/h),t*=p*this.cosph0,r=(d-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:r=-r,i=fe-i;break;case this.S_POLE:i-=fe;break}n=r===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,r)}else{if(c=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,r*=this.dd,u=Math.sqrt(t*t+r*r),u<ge)return e.x=this.long0,e.y=this.lat0,e;o=2*Math.asin(.5*u/this.rq),a=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(c=a*this.sinb1+r*o*this.cosb1/u,s=this.qp*c,r=u*this.cosb1*a-r*this.sinb1*o):(c=r*o/u,s=this.qp*c,r=u*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),s=t*t+r*r,!s)return e.x=this.long0,e.y=this.lat0,e;c=1-s/this.qp,this.mode===this.S_POLE&&(c=-c)}n=Math.atan2(t,r),i=rk(Math.asin(c),this.apa)}return e.x=be(this.long0+n),e.y=i,e}var XN=.3333333333333333,ZN=.17222222222222222,KN=.10257936507936508,QN=.06388888888888888,JN=.0664021164021164,ek=.016415012942191543;function tk(e){var t,r=[];return r[0]=e*XN,t=e*e,r[0]+=t*ZN,r[1]=t*QN,t*=e,r[0]+=t*KN,r[1]+=t*JN,r[2]=t*ek,r}function rk(e,t){var r=e+e;return e+t[0]*Math.sin(r)+t[1]*Math.sin(r+r)+t[2]*Math.sin(r+r+r)}var nk=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const ik={init:GN,forward:qN,inverse:YN,names:nk,S_POLE:WN,N_POLE:jN,EQUIT:UN,OBLIQ:VN};function ii(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function ak(){Math.abs(this.lat1+this.lat2)<ge||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=fn(this.e3,this.sin_po,this.cos_po),this.qs1=ei(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=fn(this.e3,this.sin_po,this.cos_po),this.qs2=ei(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=ei(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>ge?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function ok(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=ei(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*be(t-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return e.x=o,e.y=s,e}function sk(e){var t,r,n,i,a,o;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),i=0,t!==0&&(i=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,r)),a=be(i/this.ns0+this.long0),e.x=a,e.y=o,e}function lk(e,t){var r,n,i,a,o,s=ii(.5*t);if(e<ge)return s;for(var u=e*e,c=1;c<=25;c++)if(r=Math.sin(s),n=Math.cos(s),i=e*r,a=1-i*i,o=.5*a*a/n*(t/(1-u)-r/a+.5/e*Math.log((1-i)/(1+i))),s=s+o,Math.abs(o)<=1e-7)return s;return null}var uk=["Albers_Conic_Equal_Area","Albers","aea"];const ck={init:ak,forward:ok,inverse:sk,names:uk,phi1z:lk};function dk(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function hk(e){var t,r,n,i,a,o,s,u,c=e.x,d=e.y;return n=be(c-this.long0),t=Math.sin(d),r=Math.cos(d),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*r*i,a=1,o>0||Math.abs(o)<=ge?(s=this.x0+this.a*a*r*Math.sin(n)/o,u=this.y0+this.a*a*(this.cos_p14*t-this.sin_p14*r*i)/o):(s=this.x0+this.infinity_dist*r*Math.sin(n),u=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*i)),e.x=s,e.y=u,e}function fk(e){var t,r,n,i,a,o;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(i=Math.atan2(t,this.rc),r=Math.sin(i),n=Math.cos(i),o=ii(n*this.sin_p14+e.y*r*this.cos_p14/t),a=Math.atan2(e.x*r,t*this.cos_p14*n-e.y*this.sin_p14*r),a=be(this.long0+a)):(o=this.phic0,a=0),e.x=a,e.y=o,e}var pk=["gnom"];const mk={init:dk,forward:hk,inverse:fk,names:pk};function gk(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*fe:fe;for(var n=Math.asin(.5*t),i,a,o,s,u=0;u<30;u++)if(a=Math.sin(n),o=Math.cos(n),s=e*a,i=Math.pow(1-s*s,2)/(2*o)*(t/(1-e*e)-a/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function vk(){this.sphere||(this.k0=fn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yk(e){var t=e.x,r=e.y,n,i,a=be(t-this.long0);if(this.sphere)n=this.x0+this.a*a*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var o=ei(this.e,Math.sin(r));n=this.x0+this.a*this.k0*a,i=this.y0+this.a*o*.5/this.k0}return e.x=n,e.y=i,e}function bk(e){e.x-=this.x0,e.y-=this.y0;var t,r;return this.sphere?(t=be(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=gk(this.e,2*e.y*this.k0/this.a),t=be(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e}var _k=["cea"];const wk={init:vk,forward:yk,inverse:bk,names:_k};function Ck(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function xk(e){var t=e.x,r=e.y,n=be(t-this.long0),i=Ja(r-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*i,e}function Tk(e){var t=e.x,r=e.y;return e.x=be(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Ja(this.lat0+(r-this.y0)/this.a),e}var Sk=["Equirectangular","Equidistant_Cylindrical","eqc"];const Mk={init:Ck,forward:xk,inverse:Tk,names:Sk};var x1=20;function Ek(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vs(this.es),this.e1=Gs(this.es),this.e2=qs(this.es),this.e3=Ys(this.es),this.ml0=this.a*nr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Pk(e){var t=e.x,r=e.y,n,i,a,o=be(t-this.long0);if(a=o*Math.sin(r),this.sphere)Math.abs(r)<=ge?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(r),i=this.a*(Ja(r-this.lat0)+(1-Math.cos(a))/Math.tan(r)));else if(Math.abs(r)<=ge)n=this.a*o,i=-1*this.ml0;else{var s=Ba(this.a,this.e,Math.sin(r))/Math.tan(r);n=s*Math.sin(a),i=this.a*nr(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*(1-Math.cos(a))}return e.x=n+this.x0,e.y=i+this.y0,e}function Ak(e){var t,r,n,i,a,o,s,u,c;if(n=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=ge)t=be(n/this.a+this.long0),r=0;else{o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,u=o;var d;for(a=x1;a;--a)if(d=Math.tan(u),c=-1*(o*(u*d+1)-u-.5*(u*u+s)*d)/((u-o)/d-1),u+=c,Math.abs(c)<=ge){r=u;break}t=be(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=ge)r=0,t=be(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,u=o;var h,p,m,v,b;for(a=x1;a;--a)if(b=this.e*Math.sin(u),h=Math.sqrt(1-b*b)*Math.tan(u),p=this.a*nr(this.e0,this.e1,this.e2,this.e3,u),m=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),v=p/this.a,c=(o*(h*v+1)-v-.5*h*(v*v+s))/(this.es*Math.sin(2*u)*(v*v+s-2*o*v)/(4*h)+(o-v)*(h*m-2/Math.sin(2*u))-m),u-=c,Math.abs(c)<=ge){r=u;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=be(this.long0+Math.asin(n*h/this.a)/Math.sin(r))}return e.x=t,e.y=r,e}var Rk=["Polyconic","poly"];const Dk={init:Ek,forward:Pk,inverse:Ak,names:Rk};function Nk(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function kk(e){var t,r=e.x,n=e.y,i=n-this.lat0,a=r-this.long0,o=i/ts*1e-5,s=a,u=1,c=0;for(t=1;t<=10;t++)u=u*o,c=c+this.A[t]*u;var d=c,h=s,p=1,m=0,v,b,_=0,w=0;for(t=1;t<=6;t++)v=p*d-m*h,b=m*d+p*h,p=v,m=b,_=_+this.B_re[t]*p-this.B_im[t]*m,w=w+this.B_im[t]*p+this.B_re[t]*m;return e.x=w*this.a+this.x0,e.y=_*this.a+this.y0,e}function Lk(e){var t,r=e.x,n=e.y,i=r-this.x0,a=n-this.y0,o=a/this.a,s=i/this.a,u=1,c=0,d,h,p=0,m=0;for(t=1;t<=6;t++)d=u*o-c*s,h=c*o+u*s,u=d,c=h,p=p+this.C_re[t]*u-this.C_im[t]*c,m=m+this.C_im[t]*u+this.C_re[t]*c;for(var v=0;v<this.iterations;v++){var b=p,_=m,w,C,S=o,T=s;for(t=2;t<=6;t++)w=b*p-_*m,C=_*p+b*m,b=w,_=C,S=S+(t-1)*(this.B_re[t]*b-this.B_im[t]*_),T=T+(t-1)*(this.B_im[t]*b+this.B_re[t]*_);b=1,_=0;var M=this.B_re[1],E=this.B_im[1];for(t=2;t<=6;t++)w=b*p-_*m,C=_*p+b*m,b=w,_=C,M=M+t*(this.B_re[t]*b-this.B_im[t]*_),E=E+t*(this.B_im[t]*b+this.B_re[t]*_);var D=M*M+E*E;p=(S*M+T*E)/D,m=(T*M-S*E)/D}var N=p,F=m,B=1,G=0;for(t=1;t<=9;t++)B=B*N,G=G+this.D[t]*B;var Y=this.lat0+G*ts*1e5,$=this.long0+F;return e.x=$,e.y=Y,e}var Ok=["New_Zealand_Map_Grid","nzmg"];const Ik={init:Nk,forward:kk,inverse:Lk,names:Ok};function Fk(){}function $k(e){var t=e.x,r=e.y,n=be(t-this.long0),i=this.x0+this.a*n,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+r/2.5))*1.25;return e.x=i,e.y=a,e}function Bk(e){e.x-=this.x0,e.y-=this.y0;var t=be(this.long0+e.x/this.a),r=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=r,e}var zk=["Miller_Cylindrical","mill"];const Hk={init:Fk,forward:$k,inverse:Bk,names:zk};var Wk=20;function jk(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Qw(this.es)}function Uk(e){var t,r,n=e.x,i=e.y;if(n=be(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var a=this.n*Math.sin(i),o=Wk;o;--o){var s=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<ge)break}t=this.a*this.C_x*n*(this.m+Math.cos(i)),r=this.a*this.C_y*i}else{var u=Math.sin(i),c=Math.cos(i);r=this.a*$c(i,u,c,this.en),t=this.a*n*c/Math.sqrt(1-this.es*u*u)}return e.x=t,e.y=r,e}function Vk(e){var t,r,n,i;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=ii((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=ii(Math.sin(t)/this.n)),n=be(n+this.long0),t=Ja(t)):(t=Jw(e.y/this.a,this.es,this.en),i=Math.abs(t),i<fe?(i=Math.sin(t),r=this.long0+e.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),n=be(r)):i-ge<fe&&(n=this.long0)),e.x=n,e.y=t,e}var Gk=["Sinusoidal","sinu"];const qk={init:jk,forward:Uk,inverse:Vk,names:Gk};function Yk(){}function Xk(e){for(var t=e.x,r=e.y,n=be(t-this.long0),i=r,a=Math.PI*Math.sin(r);;){var o=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=o,Math.abs(o)<ge)break}i/=2,Math.PI/2-Math.abs(r)<ge&&(n=0);var s=.900316316158*this.a*n*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return e.x=s,e.y=u,e}function Zk(e){var t,r;e.x-=this.x0,e.y-=this.y0,r=e.y/(1.4142135623731*this.a),Math.abs(r)>.999999999999&&(r=.999999999999),t=Math.asin(r);var n=be(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return e.x=n,e.y=i,e}var Kk=["Mollweide","moll"];const Qk={init:Yk,forward:Xk,inverse:Zk,names:Kk};function Jk(){Math.abs(this.lat1+this.lat2)<ge||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vs(this.es),this.e1=Gs(this.es),this.e2=qs(this.es),this.e3=Ys(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=fn(this.e,this.sinphi,this.cosphi),this.ml1=nr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ge?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=fn(this.e,this.sinphi,this.cosphi),this.ml2=nr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=nr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function eL(e){var t=e.x,r=e.y,n;if(this.sphere)n=this.a*(this.g-r);else{var i=nr(this.e0,this.e1,this.e2,this.e3,r);n=this.a*(this.g-i)}var a=this.ns*be(t-this.long0),o=this.x0+n*Math.sin(a),s=this.y0+this.rh-n*Math.cos(a);return e.x=o,e.y=s,e}function tL(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,r,n,i;this.ns>=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var a=0;if(r!==0&&(a=Math.atan2(t*e.x,t*e.y)),this.sphere)return i=be(this.long0+a/this.ns),n=Ja(this.g-r/this.a),e.x=i,e.y=n,e;var o=this.g-r/this.a;return n=Xu(o,this.e0,this.e1,this.e2,this.e3),i=be(this.long0+a/this.ns),e.x=i,e.y=n,e}var rL=["Equidistant_Conic","eqdc"];const nL={init:Jk,forward:eL,inverse:tL,names:rL};function iL(){this.R=this.a}function aL(e){var t=e.x,r=e.y,n=be(t-this.long0),i,a;Math.abs(r)<=ge&&(i=this.x0+this.R*n,a=this.y0);var o=ii(2*Math.abs(r/Math.PI));(Math.abs(n)<=ge||Math.abs(Math.abs(r)-fe)<=ge)&&(i=this.x0,r>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/n-n/Math.PI),u=s*s,c=Math.sin(o),d=Math.cos(o),h=d/(c+d-1),p=h*h,m=h*(2/c-1),v=m*m,b=Math.PI*this.R*(s*(h-v)+Math.sqrt(u*(h-v)*(h-v)-(v+u)*(p-v)))/(v+u);n<0&&(b=-b),i=this.x0+b;var _=u+h;return b=Math.PI*this.R*(m*_-s*Math.sqrt((v+u)*(u+1)-_*_))/(v+u),r>=0?a=this.y0+b:a=this.y0-b,e.x=i,e.y=a,e}function oL(e){var t,r,n,i,a,o,s,u,c,d,h,p,m;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,n=e.x/h,i=e.y/h,a=n*n+i*i,o=-Math.abs(i)*(1+a),s=o-2*i*i+n*n,u=-2*o+1+2*i*i+a*a,m=i*i/u+(2*s*s*s/u/u/u-9*o*s/u/u)/27,c=(o-s*s/3/u)/u,d=2*Math.sqrt(-c/3),h=3*m/c/d,Math.abs(h)>1&&(h>=0?h=1:h=-1),p=Math.acos(h)/3,e.y>=0?r=(-d*Math.cos(p+Math.PI/3)-s/3/u)*Math.PI:r=-(-d*Math.cos(p+Math.PI/3)-s/3/u)*Math.PI,Math.abs(n)<ge?t=this.long0:t=be(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(n*n-i*i)+a*a))/2/n),e.x=t,e.y=r,e}var sL=["Van_der_Grinten_I","VanDerGrinten","vandg"];const lL={init:iL,forward:aL,inverse:oL,names:sL};function uL(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function cL(e){var t=e.x,r=e.y,n=Math.sin(e.y),i=Math.cos(e.y),a=be(t-this.long0),o,s,u,c,d,h,p,m,v,b,_,w,C,S,T,M,E,D,N,F,B,G,Y;return this.sphere?Math.abs(this.sin_p12-1)<=ge?(e.x=this.x0+this.a*(fe-r)*Math.sin(a),e.y=this.y0-this.a*(fe-r)*Math.cos(a),e):Math.abs(this.sin_p12+1)<=ge?(e.x=this.x0+this.a*(fe+r)*Math.sin(a),e.y=this.y0+this.a*(fe+r)*Math.cos(a),e):(D=this.sin_p12*n+this.cos_p12*i*Math.cos(a),M=Math.acos(D),E=M?M/Math.sin(M):1,e.x=this.x0+this.a*E*i*Math.sin(a),e.y=this.y0+this.a*E*(this.cos_p12*n-this.sin_p12*i*Math.cos(a)),e):(o=Vs(this.es),s=Gs(this.es),u=qs(this.es),c=Ys(this.es),Math.abs(this.sin_p12-1)<=ge?(d=this.a*nr(o,s,u,c,fe),h=this.a*nr(o,s,u,c,r),e.x=this.x0+(d-h)*Math.sin(a),e.y=this.y0-(d-h)*Math.cos(a),e):Math.abs(this.sin_p12+1)<=ge?(d=this.a*nr(o,s,u,c,fe),h=this.a*nr(o,s,u,c,r),e.x=this.x0+(d+h)*Math.sin(a),e.y=this.y0+(d+h)*Math.cos(a),e):(p=n/i,m=Ba(this.a,this.e,this.sin_p12),v=Ba(this.a,this.e,n),b=Math.atan((1-this.es)*p+this.es*m*this.sin_p12/(v*i)),_=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(b)-this.sin_p12*Math.cos(a)),_===0?N=Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):Math.abs(Math.abs(_)-Math.PI)<=ge?N=-Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):N=Math.asin(Math.sin(a)*Math.cos(b)/Math.sin(_)),w=this.e*this.sin_p12/Math.sqrt(1-this.es),C=this.e*this.cos_p12*Math.cos(_)/Math.sqrt(1-this.es),S=w*C,T=C*C,F=N*N,B=F*N,G=B*N,Y=G*N,M=m*N*(1-F*T*(1-T)/6+B/8*S*(1-2*T)+G/120*(T*(4-7*T)-3*w*w*(1-7*T))-Y/48*S),e.x=this.x0+M*Math.sin(_),e.y=this.y0+M*Math.cos(_),e))}function dL(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,i,a,o,s,u,c,d,h,p,m,v,b,_,w,C,S,T,M,E,D,N;return this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y),t>2*fe*this.a?void 0:(r=t/this.a,n=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(t)<=ge?o=this.lat0:(o=ii(i*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-fe,Math.abs(s)<=ge?this.lat0>=0?a=be(this.long0+Math.atan2(e.x,-e.y)):a=be(this.long0-Math.atan2(-e.x,e.y)):a=be(this.long0+Math.atan2(e.x*n,t*this.cos_p12*i-e.y*this.sin_p12*n))),e.x=a,e.y=o,e)):(u=Vs(this.es),c=Gs(this.es),d=qs(this.es),h=Ys(this.es),Math.abs(this.sin_p12-1)<=ge?(p=this.a*nr(u,c,d,h,fe),t=Math.sqrt(e.x*e.x+e.y*e.y),m=p-t,o=Xu(m/this.a,u,c,d,h),a=be(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=o,e):Math.abs(this.sin_p12+1)<=ge?(p=this.a*nr(u,c,d,h,fe),t=Math.sqrt(e.x*e.x+e.y*e.y),m=t-p,o=Xu(m/this.a,u,c,d,h),a=be(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=o,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),v=Ba(this.a,this.e,this.sin_p12),w=Math.cos(_),C=this.e*this.cos_p12*w,S=-C*C/(1-this.es),T=3*this.es*(1-S)*this.sin_p12*this.cos_p12*w/(1-this.es),M=t/v,E=M-S*(1+S)*Math.pow(M,3)/6-T*(1+3*S)*Math.pow(M,4)/24,D=1-S*E*E/2-M*E*E*E/6,b=Math.asin(this.sin_p12*Math.cos(E)+this.cos_p12*Math.sin(E)*w),a=be(this.long0+Math.asin(Math.sin(_)*Math.sin(E)/Math.cos(b))),N=Math.sin(b),o=Math.atan2((N-this.es*D*this.sin_p12)*Math.tan(b),N*(1-this.es)),e.x=a,e.y=o,e))}var hL=["Azimuthal_Equidistant","aeqd"];const fL={init:uL,forward:cL,inverse:dL,names:hL};function pL(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function mL(e){var t,r,n,i,a,o,s,u,c=e.x,d=e.y;return n=be(c-this.long0),t=Math.sin(d),r=Math.cos(d),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*r*i,a=1,(o>0||Math.abs(o)<=ge)&&(s=this.a*a*r*Math.sin(n),u=this.y0+this.a*a*(this.cos_p14*t-this.sin_p14*r*i)),e.x=s,e.y=u,e}function gL(e){var t,r,n,i,a,o,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),r=ii(t/this.a),n=Math.sin(r),i=Math.cos(r),o=this.long0,Math.abs(t)<=ge?(s=this.lat0,e.x=o,e.y=s,e):(s=ii(i*this.sin_p14+e.y*n*this.cos_p14/t),a=Math.abs(this.lat0)-fe,Math.abs(a)<=ge?(this.lat0>=0?o=be(this.long0+Math.atan2(e.x,-e.y)):o=be(this.long0-Math.atan2(-e.x,e.y)),e.x=o,e.y=s,e):(o=be(this.long0+Math.atan2(e.x*n,t*this.cos_p14*i-e.y*this.sin_p14*n)),e.x=o,e.y=s,e))}var vL=["ortho"];const yL={init:pL,forward:mL,inverse:gL,names:vL};var ct={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Ye={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function bL(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=fe-qe/2?this.face=ct.TOP:this.lat0<=-(fe-qe/2)?this.face=ct.BOTTOM:Math.abs(this.long0)<=qe?this.face=ct.FRONT:Math.abs(this.long0)<=fe+qe?this.face=this.long0>0?ct.RIGHT:ct.LEFT:this.face=ct.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function _L(e){var t={x:0,y:0},r,n,i,a,o,s,u={value:0};if(e.x-=this.long0,this.es!==0?r=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):r=e.y,n=e.x,this.face===ct.TOP)a=fe-r,n>=qe&&n<=fe+qe?(u.value=Ye.AREA_0,i=n-fe):n>fe+qe||n<=-(fe+qe)?(u.value=Ye.AREA_1,i=n>0?n-mt:n+mt):n>-(fe+qe)&&n<=-qe?(u.value=Ye.AREA_2,i=n+fe):(u.value=Ye.AREA_3,i=n);else if(this.face===ct.BOTTOM)a=fe+r,n>=qe&&n<=fe+qe?(u.value=Ye.AREA_0,i=-n+fe):n<qe&&n>=-qe?(u.value=Ye.AREA_1,i=-n):n<-qe&&n>=-(fe+qe)?(u.value=Ye.AREA_2,i=-n-fe):(u.value=Ye.AREA_3,i=n>0?-n+mt:-n-mt);else{var c,d,h,p,m,v,b;this.face===ct.RIGHT?n=La(n,+fe):this.face===ct.BACK?n=La(n,+mt):this.face===ct.LEFT&&(n=La(n,-fe)),p=Math.sin(r),m=Math.cos(r),v=Math.sin(n),b=Math.cos(n),c=m*b,d=m*v,h=p,this.face===ct.FRONT?(a=Math.acos(c),i=Kl(a,h,d,u)):this.face===ct.RIGHT?(a=Math.acos(d),i=Kl(a,h,-c,u)):this.face===ct.BACK?(a=Math.acos(-c),i=Kl(a,h,-d,u)):this.face===ct.LEFT?(a=Math.acos(-d),i=Kl(a,h,c,u)):(a=i=0,u.value=Ye.AREA_0)}return s=Math.atan(12/mt*(i+Math.acos(Math.sin(i)*Math.cos(qe))-fe)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),u.value===Ye.AREA_1?s+=fe:u.value===Ye.AREA_2?s+=mt:u.value===Ye.AREA_3&&(s+=1.5*mt),t.x=o*Math.cos(s),t.y=o*Math.sin(s),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,e.x=t.x,e.y=t.y,e}function wL(e){var t={lam:0,phi:0},r,n,i,a,o,s,u,c,d,h={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),r=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?h.value=Ye.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(h.value=Ye.AREA_1,r-=fe):e.x<0&&-e.x>=Math.abs(e.y)?(h.value=Ye.AREA_2,r=r<0?r+mt:r-mt):(h.value=Ye.AREA_3,r+=fe),d=mt/12*Math.tan(r),o=Math.sin(d)/(Math.cos(d)-1/Math.sqrt(2)),s=Math.atan(o),i=Math.cos(r),a=Math.tan(n),u=1-i*i*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),u<-1?u=-1:u>1&&(u=1),this.face===ct.TOP)c=Math.acos(u),t.phi=fe-c,h.value===Ye.AREA_0?t.lam=s+fe:h.value===Ye.AREA_1?t.lam=s<0?s+mt:s-mt:h.value===Ye.AREA_2?t.lam=s-fe:t.lam=s;else if(this.face===ct.BOTTOM)c=Math.acos(u),t.phi=c-fe,h.value===Ye.AREA_0?t.lam=-s+fe:h.value===Ye.AREA_1?t.lam=-s:h.value===Ye.AREA_2?t.lam=-s-fe:t.lam=s<0?-s-mt:-s+mt;else{var p,m,v;p=u,d=p*p,d>=1?v=0:v=Math.sqrt(1-d)*Math.sin(s),d+=v*v,d>=1?m=0:m=Math.sqrt(1-d),h.value===Ye.AREA_1?(d=m,m=-v,v=d):h.value===Ye.AREA_2?(m=-m,v=-v):h.value===Ye.AREA_3&&(d=m,m=v,v=-d),this.face===ct.RIGHT?(d=p,p=-m,m=d):this.face===ct.BACK?(p=-p,m=-m):this.face===ct.LEFT&&(d=p,p=m,m=-d),t.phi=Math.acos(-v)-fe,t.lam=Math.atan2(m,p),this.face===ct.RIGHT?t.lam=La(t.lam,-fe):this.face===ct.BACK?t.lam=La(t.lam,-mt):this.face===ct.LEFT&&(t.lam=La(t.lam,+fe))}if(this.es!==0){var b,_,w;b=t.phi<0?1:0,_=Math.tan(t.phi),w=this.b/Math.sqrt(_*_+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-w*w)/(this.one_minus_f*w)),b&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function Kl(e,t,r,n){var i;return e<ge?(n.value=Ye.AREA_0,i=0):(i=Math.atan2(t,r),Math.abs(i)<=qe?n.value=Ye.AREA_0:i>qe&&i<=fe+qe?(n.value=Ye.AREA_1,i-=fe):i>fe+qe||i<=-(fe+qe)?(n.value=Ye.AREA_2,i=i>=0?i-mt:i+mt):(n.value=Ye.AREA_3,i+=fe)),i}function La(e,t){var r=e+t;return r<-mt?r+=Cs:r>+mt&&(r-=Cs),r}var CL=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const xL={init:bL,forward:_L,inverse:wL,names:CL};var Af=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Xo=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],rC=.8487,nC=1.3523,iC=sn/5,TL=1/iC,Ma=18,Zu=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},SL=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function ML(e,t,r,n){for(var i=t;n;--n){var a=e(i);if(i-=a,Math.abs(a)<r)break}return i}function EL(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function PL(e){var t=be(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*iC);n<0?n=0:n>=Ma&&(n=Ma-1),r=sn*(r-TL*n);var i={x:Zu(Af[n],r)*t,y:Zu(Xo[n],r)};return e.y<0&&(i.y=-i.y),i.x=i.x*this.a*rC+this.x0,i.y=i.y*this.a*nC+this.y0,i}function AL(e){var t={x:(e.x-this.x0)/(this.a*rC),y:Math.abs(e.y-this.y0)/(this.a*nC)};if(t.y>=1)t.x/=Af[Ma][0],t.y=e.y<0?-fe:fe;else{var r=Math.floor(t.y*Ma);for(r<0?r=0:r>=Ma&&(r=Ma-1);;)if(Xo[r][0]>t.y)--r;else if(Xo[r+1][0]<=t.y)++r;else break;var n=Xo[r],i=5*(t.y-n[0])/(Xo[r+1][0]-n[0]);i=ML(function(a){return(Zu(n,a)-t.y)/SL(n,a)},i,ge,100),t.x/=Zu(Af[r],i),t.y=(5*r+i)*$t,e.y<0&&(t.y=-t.y)}return t.x=be(t.x+this.long0),t}var RL=["Robinson","robin"];const DL={init:EL,forward:PL,inverse:AL,names:RL};function NL(){this.name="geocent"}function kL(e){var t=jw(e,this.es,this.a);return t}function LL(e){var t=Uw(e,this.es,this.a,this.b);return t}var OL=["Geocentric","geocentric","geocent","Geocent"];const IL={init:NL,forward:kL,inverse:LL,names:OL};var qt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Lo={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function FL(){if(Object.keys(Lo).forEach(function(r){if(typeof this[r]=="undefined")this[r]=Lo[r].def;else{if(Lo[r].num&&isNaN(this[r]))throw new Error("Invalid parameter value, must be numeric "+r+" = "+this[r]);Lo[r].num&&(this[r]=parseFloat(this[r]))}Lo[r].degrees&&(this[r]=this[r]*$t)}.bind(this)),Math.abs(Math.abs(this.lat0)-fe)<ge?this.mode=this.lat0<0?qt.S_POLE:qt.N_POLE:Math.abs(this.lat0)<ge?this.mode=qt.EQUIT:(this.mode=qt.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function $L(e){e.x-=this.long0;var t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),i,a;switch(this.mode){case qt.OBLIQ:a=this.sinph0*t+this.cosph0*r*n;break;case qt.EQUIT:a=r*n;break;case qt.S_POLE:a=-t;break;case qt.N_POLE:a=t;break}switch(a=this.pn1/(this.p-a),i=a*r*Math.sin(e.x),this.mode){case qt.OBLIQ:a*=this.cosph0*t-this.sinph0*r*n;break;case qt.EQUIT:a*=t;break;case qt.N_POLE:a*=-(r*n);break;case qt.S_POLE:a*=r*n;break}var o,s;return o=a*this.cg+i*this.sg,s=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-a*this.sg)*this.cw*s,a=o*s,e.x=i*this.a,e.y=a*this.a,e}function BL(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},r,n,i;i=1/(this.pn1-e.y*this.sw),r=this.pn1*e.x*i,n=this.pn1*e.y*this.cw*i,e.x=r*this.cg+n*this.sg,e.y=n*this.cg-r*this.sg;var a=Dr(e.x,e.y);if(Math.abs(a)<ge)t.x=0,t.y=e.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case qt.OBLIQ:t.y=Math.asin(o*this.sinph0+e.y*s*this.cosph0/a),e.y=(o-this.sinph0*Math.sin(t.y))*a,e.x*=s*this.cosph0;break;case qt.EQUIT:t.y=Math.asin(e.y*s/a),e.y=o*a,e.x*=s;break;case qt.N_POLE:t.y=Math.asin(o),e.y=-e.y;break;case qt.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var zL=["Tilted_Perspective","tpers"];const HL={init:FL,forward:$L,inverse:BL,names:zL};function WL(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function jL(e){var t=e.x,r=e.y,n,i,a,o;if(t=t-this.long0,this.shape==="ellipse"){r=Math.atan(this.radius_p2*Math.tan(r));var s=this.radius_p/Dr(this.radius_p*Math.cos(r),Math.sin(r));if(i=s*Math.cos(t)*Math.cos(r),a=s*Math.sin(t)*Math.cos(r),o=s*Math.sin(r),(this.radius_g-i)*i-a*a-o*o*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=this.radius_g-i,this.flip_axis?(e.x=this.radius_g_1*Math.atan(a/Dr(o,n)),e.y=this.radius_g_1*Math.atan(o/n)):(e.x=this.radius_g_1*Math.atan(a/n),e.y=this.radius_g_1*Math.atan(o/Dr(a,n)))}else this.shape==="sphere"&&(n=Math.cos(r),i=Math.cos(t)*n,a=Math.sin(t)*n,o=Math.sin(r),n=this.radius_g-i,this.flip_axis?(e.x=this.radius_g_1*Math.atan(a/Dr(o,n)),e.y=this.radius_g_1*Math.atan(o/n)):(e.x=this.radius_g_1*Math.atan(a/n),e.y=this.radius_g_1*Math.atan(o/Dr(a,n))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function UL(e){var t=-1,r=0,n=0,i,a,o,s;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),r=Math.tan(e.x/this.radius_g_1)*Dr(1,n)):(r=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Dr(1,r));var u=n/this.radius_p;if(i=r*r+u*u+t*t,a=2*this.radius_g*t,o=a*a-4*i*this.C,o<0)return e.x=Number.NaN,e.y=Number.NaN,e;s=(-a-Math.sqrt(o))/(2*i),t=this.radius_g+s*t,r*=s,n*=s,e.x=Math.atan2(r,t),e.y=Math.atan(n*Math.cos(e.x)/t),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),r=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+n*n)):(r=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+r*r)),i=r*r+n*n+t*t,a=2*this.radius_g*t,o=a*a-4*i*this.C,o<0)return e.x=Number.NaN,e.y=Number.NaN,e;s=(-a-Math.sqrt(o))/(2*i),t=this.radius_g+s*t,r*=s,n*=s,e.x=Math.atan2(r,t),e.y=Math.atan(n*Math.cos(e.x)/t)}return e.x=e.x+this.long0,e}var VL=["Geostationary Satellite View","Geostationary_Satellite","geos"];const GL={init:WL,forward:jL,inverse:UL,names:VL};var rs=1.340264,ns=-.081106,is=893e-6,as=.003796,Ku=Math.sqrt(3)/2;function qL(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function YL(e){var t=be(e.x-this.long0),r=e.y,n=Math.asin(Ku*Math.sin(r)),i=n*n,a=i*i*i;return e.x=t*Math.cos(n)/(Ku*(rs+3*ns*i+a*(7*is+9*as*i))),e.y=n*(rs+ns*i+a*(is+as*i)),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function XL(e){e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a;var t=1e-9,r=12,n=e.y,i,a,o,s,u,c;for(c=0;c<r&&(i=n*n,a=i*i*i,o=n*(rs+ns*i+a*(is+as*i))-e.y,s=rs+3*ns*i+a*(7*is+9*as*i),n-=u=o/s,!(Math.abs(u)<t));++c);return i=n*n,a=i*i*i,e.x=Ku*e.x*(rs+3*ns*i+a*(7*is+9*as*i))/Math.cos(n),e.y=Math.asin(Math.sin(n)/Ku),e.x=be(e.x+this.long0),e}var ZL=["eqearth","Equal Earth","Equal_Earth"];const KL={init:qL,forward:YL,inverse:XL,names:ZL};function QL(e){e.Proj.projections.add(Su),e.Proj.projections.add(Mu),e.Proj.projections.add(JD),e.Proj.projections.add(uN),e.Proj.projections.add(mN),e.Proj.projections.add(_N),e.Proj.projections.add(MN),e.Proj.projections.add(DN),e.Proj.projections.add(IN),e.Proj.projections.add(HN),e.Proj.projections.add(ik),e.Proj.projections.add(ck),e.Proj.projections.add(mk),e.Proj.projections.add(wk),e.Proj.projections.add(Mk),e.Proj.projections.add(Dk),e.Proj.projections.add(Ik),e.Proj.projections.add(Hk),e.Proj.projections.add(qk),e.Proj.projections.add(Qk),e.Proj.projections.add(nL),e.Proj.projections.add(lL),e.Proj.projections.add(fL),e.Proj.projections.add(yL),e.Proj.projections.add(xL),e.Proj.projections.add(DL),e.Proj.projections.add(IL),e.Proj.projections.add(HL),e.Proj.projections.add(GL),e.Proj.projections.add(KL)}br.defaultDatum="WGS84";br.Proj=cn;br.WGS84=new br.Proj("WGS84");br.Point=$a;br.toPoint=Vw;br.defs=Jt;br.nadgrid=tD;br.transform=Yu;br.mgrs=vD;br.version="__VERSION__";QL(br);const JL=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"})),e7=O.getAugmentedNamespace(JL);(function(e){(function(t){var r,n;r=Lw,n=e7,e.exports=t(r,n)})(function(t,r){return r.__esModule&&r.default&&(r=r.default),t.Proj={},t.Proj._isProj4Obj=function(n){return typeof n.inverse!="undefined"&&typeof n.forward!="undefined"},t.Proj.Projection=t.Class.extend({initialize:function(n,i,a){var o=t.Proj._isProj4Obj(n);this._proj=o?n:this._projFromCodeDef(n,i),this.bounds=o?i:a},project:function(n){var i=this._proj.forward([n.lng,n.lat]);return new t.Point(i[0],i[1])},unproject:function(n,i){var a=this._proj.inverse([n.x,n.y]);return new t.LatLng(a[1],a[0],i)},_projFromCodeDef:function(n,i){if(i)r.defs(n,i);else if(r.defs[n]===void 0){var a=n.split(":");if(a.length>3&&(n=a[a.length-3]+":"+a[a.length-1]),r.defs[n]===void 0)throw"No projection definition for code "+n}return r(n)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(n,i,a){var o,s,u,c;if(t.Proj._isProj4Obj(n)?(s=n,o=s.srsCode,c=i||{},this.projection=new t.Proj.Projection(s,c.bounds)):(o=n,u=i,c=a||{},this.projection=new t.Proj.Projection(o,u,c.bounds)),t.Util.setOptions(this,c),this.code=o,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var d=this.options.resolutions.length-1;d>=0;d--)this.options.resolutions[d]&&(this._scales[d]=1/this.options.resolutions[d])}this.infinite=!this.options.bounds},scale:function(n){var i=Math.floor(n),a,o,s,u;return n===i?this._scales[n]:(a=this._scales[i],o=this._scales[i+1],s=o-a,u=n-i,a+s*u)},zoom:function(n){var i=this._closestElement(this._scales,n),a=this._scales.indexOf(i),o,s,u;return n===i?a:i===void 0?-1/0:(s=a+1,o=this._scales[s],o===void 0?1/0:(u=o-i,(n-i)/u+a))},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(n,i){for(var a,o=n.length;o--;)n[o]<=i&&(a===void 0||a<n[o])&&(a=n[o]);return a}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(n,i){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,n,i)},addData:function(n){var i;n&&(n.crs&&n.crs.type==="name"?i=new t.Proj.CRS(n.crs.properties.name):n.crs&&n.crs.type&&(i=new t.Proj.CRS(n.crs.type+":"+n.crs.properties.code)),i!==void 0&&(this.options.coordsToLatLng=function(a){var o=t.point(a[0],a[1]);return i.projection.unproject(o)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,n)}finally{this._callLevel--,this._callLevel===0&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(n,i){return new t.Proj.GeoJSON(n,i)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(n,i,a){t.ImageOverlay.prototype.initialize.call(this,n,null,a),this._projectedBounds=i},_animateZoom:function(n){var i=this._map.getZoomScale(n.zoom),a=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),o=this._projectedToNewLayerPoint(a,n.zoom,n.center);t.DomUtil.setTransform(this._image,o,i)},_reset:function(){var n=this._map.getZoom(),i=this._map.getPixelOrigin(),a=t.bounds(this._transform(this._projectedBounds.min,n)._subtract(i),this._transform(this._projectedBounds.max,n)._subtract(i)),o=a.getSize();t.DomUtil.setPosition(this._image,a.min),this._image.style.width=o.x+"px",this._image.style.height=o.y+"px"},_projectedToNewLayerPoint:function(n,i,a){var o=this._map.getSize()._divideBy(2),s=this._map.project(a,i)._subtract(o)._round(),u=s.add(this._map._getMapPanePos());return this._transform(n,i)._subtract(u)},_transform:function(n,i){var a=this._map.options.crs,o=a.transformation,s=a.scale(i);return o.transform(n,s)}}),t.Proj.imageOverlay=function(n,i,a){return new t.Proj.ImageOverlay(n,i,a)},t.Proj})})(Ow);var t7=Ow.exports;const r7=250;function aC(e){const t=e.chart.animation.init.duration==="auto"?r7:e.chart.animation.init.duration;return{animate:t!==0,duration:t/1e3}}function n7(e,t,r={}){t.length&&e.fitBounds(t.map(n=>[n.getLatLng().lat,n.getLatLng().lng]),R({maxZoom:4},r))}const i7=[{officialName:"Afghanistan",allNames:["af","afġānistān","afghanistan","afg"],id:"AFG"},{id:"ALA",officialName:"Åland Islands",allNames:["ax","ala","åland islands","aland islands"]},{officialName:"Albania",allNames:["al","shqipëri","shqipëria","shqipnia","albania","alb"],id:"ALB"},{officialName:"Algeria",allNames:["dz","dzayer","algérie","algeria","dza"],id:"DZA"},{officialName:"American Samoa",allNames:["as","amerika sāmoa","amelika sāmoa","sāmoa amelika","american samoa","asm"],id:"ASM"},{id:"AND",officialName:"Andorra",allNames:["ad","and","andorra"]},{officialName:"Angola",allNames:["ao","república de angola","ʁɛpublika de an'ɡɔla","angola","ago"],id:"AGO"},{officialName:"Anguilla",allNames:["ai","anguilla","aia"],id:"AIA"},{id:"ATA",officialName:"Antarctica",allNames:["aq","ata","antarctica"]},{officialName:"Antigua and Barbuda",allNames:["ag","antigua and barbuda","atg"],id:"ATG"},{officialName:"Argentina",allNames:["ar","argentine republic","república argentina","argentina","arg"],id:"ARG"},{officialName:"Armenia",allNames:["am","hayastan","republic of armenia","հայաստանի հանրապետություն","armenia","arm"],id:"ARM"},{officialName:"Aruba",allNames:["aw","aruba","abw"],id:"ABW"},{officialName:"Australia",allNames:["au","australia","aus"],id:"AUS"},{officialName:"Austria",allNames:["at","österreich","osterreich","oesterreich","austria","aut"],id:"AUT"},{officialName:"Azerbaijan",allNames:["az","republic of azerbaijan","azərbaycan respublikası","azerbaijan","aze","azerbaijan republic"],id:"AZE"},{officialName:"Bahrain",allNames:["bh","kingdom of bahrain","mamlakat al-baḥrayn","bahrain","bhr"],id:"BHR"},{officialName:"Bangladesh",allNames:["bd","people's republic of bangladesh","gônôprôjatôntri bangladesh","bangladesh","bgd"],id:"BGD"},{officialName:"Barbados",allNames:["bb","barbados","brb"],id:"BRB"},{officialName:"Belarus",allNames:["by","bielaruś","republic of belarus","белоруссия","республика беларусь","belorussiya","respublika belarus’","belarus","blr"],id:"BLR"},{officialName:"Belgium",allNames:["be","belgië","belgie","belgien","belgique","kingdom of belgium","koninkrijk belgië","royaume de belgique","königreich belgien","belgium","bel"],id:"BEL"},{officialName:"Belize",allNames:["bz","belize","blz"],id:"BLZ"},{officialName:"Benin",allNames:["bj","republic of benin","république du bénin","benin","ben"],id:"BEN"},{officialName:"Bermuda",allNames:["bm","the islands ofbermuda","the bermudas","somers isles","bermuda","bmu"],id:"BMU"},{officialName:"Bhutan",allNames:["bt","kingdom of bhutan","bhutan","btn"],id:"BTN"},{officialName:"Bolivia",allNames:["bo","buliwya","wuliwya","plurinational state of bolivia","estado plurinacional de bolivia","buliwya mamallaqta","wuliwya suyu","tetã volívia","bolivia","bol","plurinational state of"],id:"BOL"},{id:"BES",officialName:"Bonaire",allNames:["bq","bes","bonaire","sint eustatius and saba","caribbean netherlands"]},{officialName:"Bosnia and Herzegovina",allNames:["ba","bosnia-herzegovina","босна и херцеговина","bosnia and herzegovina","bih"],id:"BIH"},{officialName:"Botswana",allNames:["bw","republic of botswana","lefatshe la botswana","botswana","bwa"],id:"BWA"},{id:"BVT",officialName:"Bouvet Island",allNames:["bv","bvt","bouvet island"]},{officialName:"Brazil",allNames:["br","brasil","federative republic of brazil","república federativa do brasil","brazil","bra"],id:"BRA"},{officialName:"British Indian Ocean Territory",allNames:["io","british indian ocean territory","iot"],id:"IOT"},{officialName:"Brunei",allNames:["bn","nation of brunei","the abode of peace","brunei","brn","brunei darussalam"],id:"BRN"},{officialName:"Bulgaria",allNames:["bg","republic of bulgaria","република българия","bulgaria","bgr"],id:"BGR"},{officialName:"Burkina Faso",allNames:["bf","burkina faso","bfa"],id:"BFA"},{officialName:"Burundi",allNames:["bi","republic of burundi","republika y'uburundi","république du burundi","burundi","bdi"],id:"BDI"},{officialName:"Cambodia",allNames:["kh","kingdom of cambodia","cambodia","khm"],id:"KHM"},{officialName:"Cameroon",allNames:["cm","republic of cameroon","république du cameroun","cameroon","cmr"],id:"CMR"},{officialName:"Canada",allNames:["ca","canada","can"],id:"CAN"},{officialName:"Cape Verde",allNames:["cv","republic of cabo verde","república de cabo verde","cape verde","cpv"],id:"CPV"},{officialName:"Cayman Islands",allNames:["ky","cayman islands","cym"],id:"CYM"},{officialName:"Central African Republic",allNames:["cf","central african republic","république centrafricaine","central african republic","caf"],id:"CAF"},{officialName:"Chad",allNames:["td","tchad","republic of chad","république du tchad","chad","tcd"],id:"TCD"},{officialName:"Chile",allNames:["cl","republic of chile","república de chile","chile","chl"],id:"CHL"},{officialName:"China",allNames:["cn","zhōngguó","zhongguo","zhonghua","people's republic of china","中华人民共和国","zhōnghuá rénmín gònghéguó","china","chn"],id:"CHN"},{officialName:"Christmas Island",allNames:["cx","territory of christmas island","christmas island","cxr"],id:"CXR"},{officialName:"Cocos (Keeling) Islands",allNames:["cc","territoryof the cocos (keeling) islands","keeling islands","cocos (keeling) islands","cck","cocos islands","cocos [keeling] islands"],id:"CCK"},{officialName:"Colombia",allNames:["co","republic of colombia","república de colombia","colombia","col"],id:"COL"},{officialName:"Comoros",allNames:["km","union of the comoros","union des comores","udzima wa komori","al-ittiḥād al-qumurī","comoros","com"],id:"COM"},{officialName:"Cook Islands",allNames:["ck","kūki 'āirani","cook islands","cok"],id:"COK"},{officialName:"Costa Rica",allNames:["cr","republic of costa rica","república de costa rica","costa rica","cri"],id:"CRI"},{officialName:"Croatia",allNames:["hr","hrvatska","republic of croatia","republika hrvatska","croatia","hrv","croatia, republic of","croatia democratic republic of the"],id:"HRV"},{officialName:"Cuba",allNames:["cu","republic of cuba","república de cuba","cuba","cub"],id:"CUB"},{id:"CUW",officialName:"Curaçao",allNames:["cw","cuw","curaçao","curacao"]},{officialName:"Cyprus",allNames:["cy","kýpros","kıbrıs","republic of cyprus","κυπριακή δημοκρατία","kıbrıs cumhuriyeti","cyprus","cyp"],id:"CYP"},{officialName:"Czech Republic",allNames:["cz","česká republika","česko","czech republic","cze"],id:"CZE"},{officialName:"Democratic Republic of the Congo",allNames:["cd","dr congo","congo-kinshasa","drc","democratic republic of the congo","cod","congo (kinshasa)","the democratic republic of the congo","congo, the democratic republic of the","congo [drc]","congo, dem. rep."],id:"COD"},{officialName:"Denmark",allNames:["dk","danmark","kingdom of denmark","kongeriget danmark","denmark","dnk"],id:"DNK"},{officialName:"Djibouti",allNames:["dj","jabuuti","gabuuti","republic of djibouti","république de djibouti","gabuutih ummuuno","jamhuuriyadda jabuuti","djibouti","dji"],id:"DJI"},{officialName:"Dominica",allNames:["dm","dominique","wai‘tu kubuli","commonwealth of dominica","dominica","dma"],id:"DMA"},{officialName:"Dominican Republic",allNames:["do","dominican republic","dom"],id:"DOM"},{officialName:"East Timor",allNames:["tl","east timor","democratic republic of timor-leste","república democrática de timor-leste","repúblika demokrátika timór-leste","east timor","tls","timor-leste"],id:"TLS"},{officialName:"Ecuador",allNames:["ec","republic of ecuador","república del ecuador","ecuador","ecu"],id:"ECU"},{officialName:"Egypt",allNames:["eg","arab republic of egypt","egypt","egy"],id:"EGY"},{officialName:"El Salvador",allNames:["sv","republic of el salvador","república de el salvador","el salvador","slv"],id:"SLV"},{officialName:"Equatorial Guinea",allNames:["gq","republic of equatorial guinea","república de guinea ecuatorial","république de guinée équatoriale","república da guiné equatorial","equatorial guinea","gnq"],id:"GNQ"},{officialName:"Eritrea",allNames:["er","state of eritrea","ሃገረ ኤርትራ","dawlatiritriyá","ʾertrā","iritriyā","eritrea","eri"],id:"ERI"},{officialName:"Estonia",allNames:["ee","eesti","republic of estonia","eesti vabariik","estonia","est"],id:"EST"},{officialName:"Ethiopia",allNames:["et","ʾītyōṗṗyā","federal democratic republic of ethiopia","የኢትዮጵያ ፌዴራላዊ ዲሞክራሲያዊ ሪፐብሊክ","ethiopia","eth"],id:"ETH"},{officialName:"Falkland Islands",allNames:["fk","islas malvinas","falkland islands","flk","falkland islands (malvinas)","falkland islands (islas malvinas)","falkland islands [malvinas]","falkland islands [islas malvinas]"],id:"FLK"},{officialName:"Faroe Islands",allNames:["fo","føroyar","færøerne","faroe islands","fro"],id:"FRO"},{officialName:"Federated States of Micronesia",allNames:["fm","federated states of micronesia","federated states of micronesia","fsm","micronesia","federated states of"],id:"FSM"},{officialName:"Fiji",allNames:["fj","viti","republic of fiji","matanitu ko viti","fijī gaṇarājya","fiji","fji"],id:"FJI"},{officialName:"Finland",allNames:["fi","suomi","republic of finland","suomen tasavalta","republiken finland","finland","fin"],id:"FIN"},{officialName:"France",allNames:["fr","french republic","république française","france","fra"],id:"FRA"},{officialName:"French Guiana",allNames:["gf","guiana","guyane","french guiana","guf"],id:"GUF"},{officialName:"French Polynesia",allNames:["pf","polynésie française","french polynesia","pōrīnetia farāni","french polynesia","pyf"],id:"PYF"},{officialName:"French Southern and Antarctic Lands",allNames:["tf","french southern andantarctic lands","atf","french southern territories"],id:"ATF"},{officialName:"Gabon",allNames:["ga","gabonese republic","république gabonaise","gabon","gab","gabon republic"],id:"GAB"},{officialName:"Georgia",allNames:["ge","sakartvelo","georgia","geo"],id:"GEO"},{officialName:"Germany",allNames:["de","federal republic of germany","bundesrepublik deutschland","germany","deu"],id:"DEU"},{officialName:"Ghana",allNames:["gh","ghana","gha"],id:"GHA"},{officialName:"Gibraltar",allNames:["gi","gibraltar","gib"],id:"GIB"},{officialName:"Greece",allNames:["gr","elláda","hellenic republic","ελληνική δημοκρατία","greece","grc"],id:"GRC"},{officialName:"Greenland",allNames:["gl","grønland","greenland","grl"],id:"GRL"},{officialName:"Grenada",allNames:["gd","grenada","grd"],id:"GRD"},{officialName:"Guadeloupe",allNames:["gp","gwadloup","guadeloupe","glp"],id:"GLP"},{officialName:"Guam",allNames:["gu","guåhån","guam","gum"],id:"GUM"},{officialName:"Guatemala",allNames:["gt","guatemala","gtm"],id:"GTM"},{officialName:"Guernsey",allNames:["gg","bailiwick of guernsey","bailliage de guernesey","guernsey","ggy"],id:"GGY"},{officialName:"Guinea",allNames:["gn","republic of guinea","république de guinée","guinea","gin"],id:"GIN"},{officialName:"Guinea-Bissau",allNames:["gw","republic of guinea-bissau","república da guiné-bissau","guinea-bissau","gnb"],id:"GNB"},{officialName:"Guyana",allNames:["gy","co-operative republic of guyana","guyana","guy"],id:"GUY"},{officialName:"Haiti",allNames:["ht","republic of haiti","république d'haïti","repiblik ayiti","haiti","hti"],id:"HTI"},{officialName:"Heard Island and McDonald Islands",allNames:["hm","heard island and mcdonald islands","hmd","heard and mcdonald islands"],id:"HMD"},{officialName:"Honduras",allNames:["hn","republic of honduras","república de honduras","honduras","hnd"],id:"HND"},{officialName:"Hong Kong",allNames:["hk","香港","hongkong","hkg","hong kong","hong kong, china"],id:"HKG"},{officialName:"Hungary",allNames:["hu","hungary","hun"],id:"HUN"},{officialName:"Iceland",allNames:["is","island","republic of iceland","lýðveldið ísland","iceland","isl"],id:"ISL"},{officialName:"India",allNames:["in","bhārat","republic of india","bharat ganrajya","india","ind"],id:"IND"},{officialName:"Indonesia",allNames:["id","republic of indonesia","republik indonesia","indonesia","idn"],id:"IDN"},{officialName:"Iran",allNames:["ir","islamic republic of iran","jomhuri-ye eslāmi-ye irān","iran","irn","islamic republic of"],id:"IRN"},{officialName:"Iraq",allNames:["iq","republic of iraq","jumhūriyyat al-‘irāq","iraq","irq"],id:"IRQ"},{officialName:"Ireland",allNames:["ie","éire","republic of ireland","poblacht na héireann","ireland","irl"],id:"IRL"},{officialName:"Isle of Man",allNames:["im","ellan vannin","mann","mannin","isle of man","imn"],id:"IMN"},{officialName:"Israel",allNames:["il","state of israel","medīnat yisrā'el","israel","isr"],id:"ISR"},{officialName:"Italy",allNames:["it","italian republic","repubblica italiana","italy","ita"],id:"ITA"},{officialName:"Ivory Coast",allNames:["ci","ivory coast","republic of côte d'ivoire","république de côte d'ivoire","ivory coast","civ","côte d'ivoire","cote d'ivoire","cote divoire","cã´te d'ivoire","cote d'lvoire"],id:"CIV"},{officialName:"Jamaica",allNames:["jm","jamaica","jam"],id:"JAM"},{officialName:"Japan",allNames:["jp","nippon","nihon","japan","jpn"],id:"JPN"},{officialName:"Jersey",allNames:["je","bailiwick of jersey","bailliage de jersey","bailliage dé jèrri","jersey","jey"],id:"JEY"},{officialName:"Jordan",allNames:["jo","hashemite kingdomof jordan","al-mamlakah al-urdunīyah al-hāshimīyah","jordan","jor"],id:"JOR"},{officialName:"Kazakhstan",allNames:["kz","qazaqstan","казахстан","republic of kazakhstan","қазақстан республикасы","qazaqstan respublïkası","республика казахстан","respublika kazakhstan","kazakhstan","kaz"],id:"KAZ"},{officialName:"Kenya",allNames:["ke","republic of kenya","jamhuri ya kenya","kenya","ken"],id:"KEN"},{officialName:"Kiribati",allNames:["ki","republic of kiribati","ribaberiki kiribati","kiribati","kir"],id:"KIR"},{officialName:"Kuwait",allNames:["kw","state of kuwait","dawlat al-kuwait","kuwait","kwt"],id:"KWT"},{officialName:"Kyrgyzstan",allNames:["kg","киргизия","kyrgyz republic","кыргыз республикасы","kyrgyz respublikasy","kyrgyzstan","kgz"],id:"KGZ"},{officialName:"Laos",allNames:["la","lao","lao people's democratic republic","sathalanalat paxathipatai paxaxon lao","laos","lao"],id:"LAO"},{officialName:"Latvia",allNames:["lv","republic of latvia","latvijas republika","latvia","lva"],id:"LVA"},{officialName:"Lebanon",allNames:["lb","lebanese republic","al-jumhūrīyah al-libnānīyah","lebanon","lbn"],id:"LBN"},{officialName:"Lesotho",allNames:["ls","kingdom of lesotho","muso oa lesotho","lesotho","lso"],id:"LSO"},{officialName:"Liberia",allNames:["lr","republic of liberia","liberia","lbr"],id:"LBR"},{officialName:"Libya",allNames:["ly","state of libya","dawlat libya","libya","lby"],id:"LBY"},{officialName:"Liechtenstein",allNames:["li","principality of liechtenstein","fürstentum liechtenstein","liechtenstein","lie"],id:"LIE"},{officialName:"Lithuania",allNames:["lt","republic of lithuania","lietuvos respublika","lithuania","ltu"],id:"LTU"},{officialName:"Luxembourg",allNames:["lu","grand duchy of luxembourg","grand-duché de luxembourg","großherzogtum luxemburg","groussherzogtum lëtzebuerg","luxembourg","lux"],id:"LUX"},{officialName:"Macau",allNames:["mo","澳门","macao special administrative region of the people's republic of china","中華人民共和國澳門特別行政區","região administrativa especial de macau da república popular da china","macau","mac","macao","macao, china","macau, china"],id:"MAC"},{officialName:"Madagascar",allNames:["mg","republic of madagascar","repoblikan'i madagasikara","république de madagascar","madagascar","mdg"],id:"MDG"},{officialName:"Malawi",allNames:["mw","republic of malawi","malawi","mwi"],id:"MWI"},{officialName:"Malaysia",allNames:["my","malaysia","mys"],id:"MYS"},{officialName:"Maldives",allNames:["mv","maldive islands","republic of the maldives","dhivehi raajjeyge jumhooriyya","maldives","mdv"],id:"MDV"},{officialName:"Mali",allNames:["ml","republic of mali","république du mali","mali","mli"],id:"MLI"},{officialName:"Malta",allNames:["mt","republic of malta","repubblika ta' malta","malta","mlt"],id:"MLT"},{officialName:"Marshall Islands",allNames:["mh","republic of the marshall islands","aolepān aorōkin m̧ajeļ","marshall islands","mhl"],id:"MHL"},{officialName:"Martinique",allNames:["mq","martinique","mtq"],id:"MTQ"},{officialName:"Mauritania",allNames:["mr","islamic republic of mauritania","al-jumhūriyyah al-ʾislāmiyyah al-mūrītāniyyah","mauritania","mrt"],id:"MRT"},{officialName:"Mauritius",allNames:["mu","republic of mauritius","république de maurice","mauritius","mus"],id:"MUS"},{officialName:"Mayotte",allNames:["yt","department of mayotte","département de mayotte","mayotte","myt"],id:"MYT"},{officialName:"Mexico",allNames:["mx","mexicanos","united mexican states","estados unidos mexicanos","mexico","mex"],id:"MEX"},{officialName:"Moldova",allNames:["md","republic of moldova","republica moldova","moldova","mda","republic of"],id:"MDA"},{officialName:"Monaco",allNames:["mc","principality of monaco","principauté de monaco","monaco","mco"],id:"MCO"},{officialName:"Mongolia",allNames:["mn","mongolia","mng"],id:"MNG"},{id:"MNE",officialName:"Montenegro",allNames:["me","mne","montenegro"]},{officialName:"Montserrat",allNames:["ms","montserrat","msr"],id:"MSR"},{officialName:"Morocco",allNames:["ma","kingdom of morocco","al-mamlakah al-maġribiyah","morocco","mar","morroco"],id:"MAR"},{officialName:"Mozambique",allNames:["mz","republic of mozambique","república de moçambique","mozambique","moz"],id:"MOZ"},{id:"MMR",officialName:"Myanmar",allNames:["mm","mmr","myanmar","myanmar (burma)","myanmar [burma]","burma"]},{officialName:"Namibia",allNames:["na","namibië","republic of namibia","namibia","nam"],id:"NAM"},{officialName:"Nauru",allNames:["nr","naoero","pleasant island","republic of nauru","ripublik naoero","nauru","nru"],id:"NRU"},{officialName:"Nepal",allNames:["np","federal democratic republic of nepal","loktāntrik ganatantra nepāl","nepal","npl"],id:"NPL"},{officialName:"Netherlands",allNames:["nl","holland","nederland","netherlands","nld","the netherlands"],id:"NLD"},{officialName:"New Caledonia",allNames:["nc","new caledonia","ncl"],id:"NCL"},{officialName:"New Zealand",allNames:["nz","aotearoa","new zealand","nzl"],id:"NZL"},{officialName:"Nicaragua",allNames:["ni","republic of nicaragua","república de nicaragua","nicaragua","nic"],id:"NIC"},{officialName:"Niger",allNames:["ne","nijar","republic of niger","république du niger","niger","ner"],id:"NER"},{officialName:"Nigeria",allNames:["ng","nijeriya","naíjíríà","federal republic of nigeria","nigeria","nga"],id:"NGA"},{officialName:"Niue",allNames:["nu","niue","niu"],id:"NIU"},{officialName:"Norfolk Island",allNames:["nf","territory of norfolk island","teratri of norf'k ailen","norfolk island","nfk"],id:"NFK"},{officialName:"North Korea",allNames:["kp","democratic people's republic of korea","조선민주주의인민공화국","chosŏn minjujuŭi inmin konghwaguk","north korea","prk","korea, democratic people's republic of","korea, north"],id:"PRK"},{officialName:"Northern Mariana Islands",allNames:["mp","commonwealth of the northern mariana islands","sankattan siha na islas mariånas","northern mariana islands","mnp"],id:"MNP"},{officialName:"Norway",allNames:["no","norge","noreg","kingdom of norway","kongeriket norge","kongeriket noreg","norway","nor"],id:"NOR"},{officialName:"Oman",allNames:["om","sultanate of oman","salṭanat ʻumān","oman","omn"],id:"OMN"},{officialName:"Pakistan",allNames:["pk","pākistān","islamic republic of pakistan","islāmī jumhūriya'eh pākistān","pakistan","pak"],id:"PAK"},{officialName:"Palau",allNames:["pw","republic of palau","beluuer a belau","palau","plw"],id:"PLW"},{id:"PSE",officialName:"Palestinian Authority",allNames:["ps","pse","palestinian authority","palestinian territory"]},{officialName:"Panama",allNames:["pa","republic of panama","república de panamá","panama","pan"],id:"PAN"},{officialName:"Papua New Guinea",allNames:["pg","independent state of papua new guinea","independen stet bilong papua niugini","papua new guinea","png"],id:"PNG"},{officialName:"Paraguay",allNames:["py","republic of paraguay","república del paraguay","tetã paraguái","paraguay","pry"],id:"PRY"},{officialName:"Peru",allNames:["pe","republic of peru","república del perú","peru","per"],id:"PER"},{officialName:"Philippines",allNames:["ph","republic of the philippines","repúblika ng pilipinas","philippines","phl"],id:"PHL"},{officialName:"Pitcairn Islands",allNames:["pn","pitcairn henderson ducie and oeno islands","pitcairn islands","pcn","pitcairn"],id:"PCN"},{officialName:"Poland",allNames:["pl","republic of poland","rzeczpospolita polska","poland","pol"],id:"POL"},{officialName:"Portugal",allNames:["pt","portuguesa","portuguese republic","república portuguesa","portugal","prt"],id:"PRT"},{officialName:"Puerto Rico",allNames:["pr","commonwealth of puerto rico","estado libre asociado de puerto rico","puerto rico","pri"],id:"PRI"},{officialName:"Qatar",allNames:["qa","state of qatar","dawlat qaṭar","qatar","qat"],id:"QAT"},{officialName:"Republic of Macedonia",allNames:["mk","republic of macedonia","република македонија","republic of macedonia","mkd","macedonia","macedonia (fyrom)","macedonia [fyrom]","the former yugoslav republic of","the former yugoslav republic of macedonia"],id:"MKD"},{officialName:"Republic of the Congo",allNames:["cg","congo-brazzaville","republic of the congo","cog","congo (brazzaville)","congo [republic]","congo","congo, rep."],id:"COG"},{officialName:"Réunion",allNames:["re","reunion","réunion","reu","rã©union"],id:"REU"},{officialName:"Romania",allNames:["ro","rumania","roumania","românia","romania","rou"],id:"ROU"},{officialName:"Russia",allNames:["ru","rossiya","russian federation","российская федерация","rossiyskaya federatsiya","russia","rus"],id:"RUS"},{officialName:"Rwanda",allNames:["rw","republic of rwanda","repubulika y'u rwanda","république du rwanda","rwanda","rwa"],id:"RWA"},{id:"BLM",officialName:"Saint Barthélemy",allNames:["bl","blm","saint barthélemy","saint barthelemy","st barthelemy"]},{officialName:"Saint Helena",allNames:["sh","saint helena","shn","st helena","ascension and tristan da cunha"],id:"SHN"},{officialName:"Saint Kitts and Nevis",allNames:["kn","federation of saint christopher and nevis","saint kitts and nevis","kna","st kitts and nevis","saint kitts-nevis","st kitts-nevis"],id:"KNA"},{officialName:"Saint Lucia",allNames:["lc","saint lucia","lca","st lucia"],id:"LCA"},{officialName:"Saint Pierre and Miquelon",allNames:["pm","collectivité territoriale de saint-pierre-et-miquelon","saint pierre andmiquelon","spm","st pierre and miquelon","saint pierre and miquelon","st. pierre and miquelon"],id:"SPM"},{officialName:"Saint Vincent and the Grenadines",allNames:["vc","saint vincent and the grenadines","vct","st vincent and the grenadines"],id:"VCT"},{officialName:"Samoa",allNames:["ws","independent state of samoa","malo saʻoloto tutoʻatasi o sāmoa","samoa","wsm","western samoa"],id:"WSM"},{officialName:"San Marino",allNames:["sm","republic of san marino","repubblica di san marino","san marino","smr"],id:"SMR"},{officialName:"São Tomé and Príncipe",allNames:["st","democratic republic of são tomé and príncipe","república democrática de são tomé e príncipe","são tomé and príncipe","stp","sao tome and principe","sã£o tomã© and prã­ncipe"],id:"STP"},{officialName:"Saudi Arabia",allNames:["sa","kingdom of saudi arabia","al-mamlakah al-‘arabiyyah as-su‘ūdiyyah","saudi arabia","sau"],id:"SAU"},{officialName:"Senegal",allNames:["sn","republic of senegal","république du sénégal","senegal","sen"],id:"SEN"},{id:"SRB",officialName:"Serbia",allNames:["rs","srb","serbia"]},{officialName:"Seychelles",allNames:["sc","republic of seychelles","repiblik sesel","république des seychelles","seychelles","syc"],id:"SYC"},{officialName:"Sierra Leone",allNames:["sl","republic of sierra leone","sierra leone","sle"],id:"SLE"},{officialName:"Singapore",allNames:["sg","singapura","republik singapura","新加坡共和国","singapore","sgp"],id:"SGP"},{officialName:"Slovakia",allNames:["sk","slovak republic","slovenská republika","slovakia","svk","slovakia (slovak republic)"],id:"SVK"},{officialName:"Slovenia",allNames:["si","republic of slovenia","republika slovenija","slovenia","svn"],id:"SVN"},{officialName:"Solomon Islands",allNames:["sb","solomon islands","slb"],id:"SLB"},{officialName:"Somalia",allNames:["so","aṣ-ṣūmāl","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jumhūriyyat aṣ-ṣūmāl al-fiderāliyya","somalia","som"],id:"SOM"},{officialName:"South Africa",allNames:["za","rsa","suid-afrika","republic of south africa","south africa","zaf"],id:"ZAF"},{officialName:"South Georgia",allNames:["gs","south georgia and the south sandwich islands","south georgia","sgs"],id:"SGS"},{officialName:"South Korea",allNames:["kr","republic of korea","south korea","kor","korea, republic of","korea, south"],id:"KOR"},{officialName:"South Sudan",allNames:["ss","south sudan","ssd"],id:"SSD"},{officialName:"Spain",allNames:["es","kingdom of spain","reino deespaña","spain","esp"],id:"ESP"},{officialName:"Sri Lanka",allNames:["lk","ilaṅkai","democraticsocialist republic of sri lanka","sri lanka","lka"],id:"LKA"},{id:"SXM",officialName:"St Maarten",allNames:["sx","sxm","st maarten","sint maarten","sint maarten (dutch part)","saint-martin (pays-bas)"]},{id:"MAF",officialName:"St Martin (French part)",allNames:["mf","maf","st martin (french part)","saint martin (french part)","saint-martin (france)"]},{officialName:"Sudan",allNames:["sd","republic of the sudan","jumhūrīyat as-sūdān","sudan","sdn"],id:"SDN"},{officialName:"Suriname",allNames:["sr","sarnam","sranangron","republic of suriname","republiek suriname","suriname","sur"],id:"SUR"},{officialName:"Svalbard and Jan Mayen",allNames:["sj","svalbard and jan mayen islands","svalbard and jan mayen","sjm"],id:"SJM"},{officialName:"Swaziland",allNames:["sz","weswatini","swatini","ngwane","kingdom of swaziland","umbuso waseswatini","swaziland","swz"],id:"SWZ"},{officialName:"Sweden",allNames:["se","kingdom of sweden","konungariket sverige","sweden","swe"],id:"SWE"},{officialName:"Switzerland",allNames:["ch","swiss confederation","schweiz","suisse","svizzera","svizra","switzerland","che"],id:"CHE"},{officialName:"Syria",allNames:["sy","syrian arab republic","al-jumhūrīyah al-ʻarabīyah as-sūrīyah","syria","syr"],id:"SYR"},{officialName:"Taiwan",allNames:["tw","táiwān","republic of china","中華民國","zhōnghuá mínguó","taiwan","twn","taiwan, province of china"],id:"TWN"},{officialName:"Tajikistan",allNames:["tj","toçikiston","republic of tajikistan","ҷумҳурии тоҷикистон","çumhuriyi toçikiston","tajikistan","tjk"],id:"TJK"},{officialName:"Tanzania",allNames:["tz","united republic of tanzania","jamhuri ya muungano wa tanzania","tanzania","tza","united republic of"],id:"TZA"},{officialName:"Thailand",allNames:["th","prathet","thai","kingdom of thailand","ราชอาณาจักรไทย","ratcha anachak thai","thailand","tha"],id:"THA"},{officialName:"The Bahamas",allNames:["bs","commonwealth of the bahamas","the bahamas","bhs","bahamas"],id:"BHS"},{officialName:"The Gambia",allNames:["gm","republic of the gambia","the gambia","gmb","gambia"],id:"GMB"},{officialName:"Togo",allNames:["tg","togolese","togolese republic","république togolaise","togo","tgo"],id:"TGO"},{officialName:"Tokelau",allNames:["tk","tokelau","tkl"],id:"TKL"},{officialName:"Tonga",allNames:["to","tonga","ton"],id:"TON"},{officialName:"Trinidad and Tobago",allNames:["tt","republic of trinidad and tobago","trinidad and tobago","tto"],id:"TTO"},{officialName:"Tunisia",allNames:["tn","republic of tunisia","al-jumhūriyyah at-tūnisiyyah","tunisia","tun"],id:"TUN"},{officialName:"Turkey",allNames:["tr","turkiye","republic of turkey","türkiye cumhuriyeti","turkey","tur"],id:"TUR"},{officialName:"Turkmenistan",allNames:["tm","turkmenistan","tkm"],id:"TKM"},{id:"TCA",officialName:"Turks and Caicos Islands",allNames:["tc","tca","turks and caicos islands"]},{officialName:"Tuvalu",allNames:["tv","tuvalu","tuv"],id:"TUV"},{officialName:"Uganda",allNames:["ug","republic of uganda","jamhuri ya uganda","uganda","uga"],id:"UGA"},{officialName:"Ukraine",allNames:["ua","ukrayina","ukraine","ukr"],id:"UKR"},{officialName:"United Arab Emirates",allNames:["ae","uae","united arab emirates","are"],id:"ARE"},{officialName:"United Kingdom",allNames:["gb","uk","great britain","united kingdom","gbr","britain","england"],id:"GBR"},{officialName:"United States",allNames:["us","usa","united states of america","united states","usa"],id:"USA"},{id:"UMI",officialName:"United States Minor Outlying Islands",allNames:["um","umi","united states minor outlying islands"]},{officialName:"Uruguay",allNames:["uy","oriental republic of uruguay","república oriental del uruguay","uruguay","ury"],id:"URY"},{officialName:"Uzbekistan",allNames:["uz","republic of uzbekistan","o‘zbekiston respublikasi","ўзбекистон республикаси","uzbekistan","uzb"],id:"UZB"},{officialName:"Vanuatu",allNames:["vu","republic of vanuatu","ripablik blong vanuatu","république de vanuatu","vanuatu","vut"],id:"VUT"},{id:"VAT",officialName:"Vatican",allNames:["va","vat","vatican","vatican city","vatican city state","holy see (vatican city state)","holy see [vatican city state]"]},{officialName:"Venezuela",allNames:["ve","bolivarian republic of venezuela","república bolivariana de venezuela","venezuela","ven","bolivarian republic of"],id:"VEN"},{officialName:"Vietnam",allNames:["vn","socialist republic of vietnam","cộng hòa xã hội chủ nghĩa việt nam","vietnam","vnm","viet nam"],id:"VNM"},{id:"VGB",officialName:"Virgin Islands",allNames:["vg","vgb","virgin islands","british","british virgin islands","virgin islands (british)"]},{id:"VIR",officialName:"Virgin Islands",allNames:["vi","vir","virgin islands","u.s.","us virgin islands","u.s. virgin islands","virgin islands (u.s.)"]},{officialName:"Wallis and Futuna",allNames:["wf","territory of the wallis and futuna islands","territoire des îles wallis et futuna","wallis and futuna","wlf","wallis and futuna islands"],id:"WLF"},{officialName:"Western Sahara",allNames:["eh","taneẓroft tutrimt","western sahara","esh"],id:"ESH"},{officialName:"Yemen",allNames:["ye","yemeni republic","al-jumhūriyyah al-yamaniyyah","yemen","yem"],id:"YEM"},{officialName:"Zambia",allNames:["zm","republic of zambia","zambia","zmb"],id:"ZMB"},{officialName:"Zimbabwe",allNames:["zw","republic of zimbabwe","zimbabwe","zwe"],id:"ZWE"}],a7="#d6d9dc",o7="#FBFAFA";function s7(e,t,r){return e.reduce((i,a)=>{const o=a.id;let s;if(r==="world"){const u=i7.find(c=>c.id===o);u?s=t.find(c=>u.allNames.includes(c.geoName.trim().toLowerCase())):s=t.find(c=>c.geoName.trim().toLowerCase()===a.properties.name.trim().toLowerCase())}else s=t.find(u=>u.geoName.trim().toLowerCase()===a.properties.name.trim().toLowerCase());return i[o]={geoDataElement:s,style:{color:a7,weight:1,opacity:1,fillColor:s&&s.color||o7,fillOpacity:1},displayName:(s==null?void 0:s.geoName)||a.properties.name},i},{})}const l7=t7.CRS,u7=({geoJson:e,geoData:t,dataOptions:r,mapType:n})=>{const{themeSettings:i}=y.useThemeContext(),a=k.useRef(null),o=k.useRef(null),[s]=k.useState(An.layerGroup()),u=k.useMemo(()=>s7(e.features,t,n),[e,t,n]);return k.useEffect(()=>{a.current&&!o.current&&(o.current=f7(a.current,n),s.addTo(o.current))},[s,n]),k.useEffect(()=>{const c=An.geoJSON(p7(e,u),{style:d=>u[d.id].style,onEachFeature:(d,h)=>{h.bindTooltip(h7(d,u,r.originalValueTitle),{sticky:!0}),h.on({mouseover:p=>{const m=p.target;c7(m,d.id,u)},mouseout:p=>{const m=p.target;d7(m,d.id,u)}}),r.onAreaClick&&h.on({click:p=>{const m=u[d.id].geoDataElement;m&&r.onAreaClick(m,p.originalEvent)}})}});o.current&&(s.clearLayers(),s.addLayer(c),o.current.fitBounds(c.getBounds(),aC(i)))},[r,u,e,s,i]),O.jsx("div",{ref:a,className:"csdk-map-container",style:{width:"100%",height:"100%",minWidth:"300px",minHeight:"400px",backgroundColor:"#c2dbe9"}})};function c7(e,t,r){if(r[t]){const i=r[t].style.fillColor;e.setStyle({weight:2,color:P.scaleBrightness(i,-.2),fillColor:P.scaleBrightness(i,.05),dashArray:"",fillOpacity:1,opacity:1}),e.bringToFront()}}function d7(e,t,r){e.setStyle(r[t].style)}function h7(e,t,r){const n=t[e.id],{formattedOriginalValue:i}=n.geoDataElement||{},a=`
18
- <div>
19
- <span>${n.displayName}<span>
20
- ${n.geoDataElement&&i!==void 0?`<br/>${r}: <span>${i}<span>`:""}
21
- </div>`;return P.purify.sanitize(a)}function f7(e,t){return t==="world"?An.map(e,{attributionControl:!1,scrollWheelZoom:!0,minZoom:1,zoom:1,maxZoom:5,center:[0,0]}):An.map(e,{crs:new l7("EPSG:5070","+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",{resolutions:[16384,10240,8192,4096]}),center:[35.96852047262865,-96.96520768859223],zoom:.4,maxZoom:3,attributionControl:!1})}function p7(e,t){if(t.ATA&&t.ATA.geoDataElement)return e;{const r=e.features.filter(n=>n.id!=="ATA");return H(R({},e),{features:r})}}var m7="[object Date]";function g7(e){return U.isObjectLike(e)&&U.baseGetTag(e)==m7}var T1=U.nodeUtil&&U.nodeUtil.isDate,v7=T1?U.baseUnary(T1):g7,Rf={exports:{}},oC={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(oC);var dt=oC.exports,Df={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n,i){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);return n}e.exports=t.default})(Df,Df.exports);var y7=Df.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(y7);function i(a){return(0,n.default)({},a)}e.exports=t.default})(Rf,Rf.exports);var b7=Rf.exports;const _7=O.getDefaultExportFromCjs(b7);var Nf={exports:{}},kf={exports:{}},Lf={exports:{}},sC={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(sC);var lC=sC.exports,Of={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n,i){if(i.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+i.length+" present")}e.exports=t.default})(Of,Of.exports);var ar=Of.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(lC),i=r(ar);function a(o){return(0,i.default)(1,arguments),o instanceof Date||(0,n.default)(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}e.exports=t.default})(Lf,Lf.exports);var w7=Lf.exports,If={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(lC),i=r(ar);function a(o){(0,i.default)(1,arguments);var s=Object.prototype.toString.call(o);return o instanceof Date||(0,n.default)(o)==="object"&&s==="[object Date]"?new Date(o.getTime()):typeof o=="number"||s==="[object Number]"?new Date(o):((typeof o=="string"||s==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}e.exports=t.default})(If,If.exports);var yn=If.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(w7),i=r(yn),a=r(ar);function o(s){if((0,a.default)(1,arguments),!(0,n.default)(s)&&typeof s!="number")return!1;var u=(0,i.default)(s);return!isNaN(Number(u))}e.exports=t.default})(kf,kf.exports);var C7=kf.exports,Ff={exports:{}},$f={exports:{}},Bf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){if(n===null||n===!0||n===!1)return NaN;var i=Number(n);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}e.exports=t.default})(Bf,Bf.exports);var Wi=Bf.exports;const x7=O.getDefaultExportFromCjs(Wi);(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Wi),i=r(yn),a=r(ar);function o(s,u){(0,a.default)(2,arguments);var c=(0,i.default)(s).getTime(),d=(0,n.default)(u);return new Date(c+d)}e.exports=t.default})($f,$f.exports);var T7=$f.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(T7),i=r(ar),a=r(Wi);function o(s,u){(0,i.default)(2,arguments);var c=(0,a.default)(u);return(0,n.default)(s,-c)}e.exports=t.default})(Ff,Ff.exports);var S7=Ff.exports,zf={exports:{}},Hf={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(yn),i=r(ar),a=864e5;function o(s){(0,i.default)(1,arguments);var u=(0,n.default)(s),c=u.getTime();u.setUTCMonth(0,1),u.setUTCHours(0,0,0,0);var d=u.getTime(),h=c-d;return Math.floor(h/a)+1}e.exports=t.default})(Hf,Hf.exports);var M7=Hf.exports,Wf={exports:{}},jf={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(yn),i=r(ar);function a(o){(0,i.default)(1,arguments);var s=1,u=(0,n.default)(o),c=u.getUTCDay(),d=(c<s?7:0)+c-s;return u.setUTCDate(u.getUTCDate()-d),u.setUTCHours(0,0,0,0),u}e.exports=t.default})(jf,jf.exports);var e0=jf.exports,Uf={exports:{}},Vf={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(yn),i=r(ar),a=r(e0);function o(s){(0,i.default)(1,arguments);var u=(0,n.default)(s),c=u.getUTCFullYear(),d=new Date(0);d.setUTCFullYear(c+1,0,4),d.setUTCHours(0,0,0,0);var h=(0,a.default)(d),p=new Date(0);p.setUTCFullYear(c,0,4),p.setUTCHours(0,0,0,0);var m=(0,a.default)(p);return u.getTime()>=h.getTime()?c+1:u.getTime()>=m.getTime()?c:c-1}e.exports=t.default})(Vf,Vf.exports);var uC=Vf.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(uC),i=r(e0),a=r(ar);function o(s){(0,a.default)(1,arguments);var u=(0,n.default)(s),c=new Date(0);c.setUTCFullYear(u,0,4),c.setUTCHours(0,0,0,0);var d=(0,i.default)(c);return d}e.exports=t.default})(Uf,Uf.exports);var E7=Uf.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(yn),i=r(e0),a=r(E7),o=r(ar),s=6048e5;function u(c){(0,o.default)(1,arguments);var d=(0,n.default)(c),h=(0,i.default)(d).getTime()-(0,a.default)(d).getTime();return Math.round(h/s)+1}e.exports=t.default})(Wf,Wf.exports);var P7=Wf.exports,Gf={exports:{}},qf={exports:{}},ji={};Object.defineProperty(ji,"__esModule",{value:!0});ji.getDefaultOptions=A7;ji.setDefaultOptions=R7;var cC={};function A7(){return cC}function R7(e){cC=e}(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(yn),i=r(ar),a=r(Wi),o=ji;function s(u,c){var d,h,p,m,v,b,_,w;(0,i.default)(1,arguments);var C=(0,o.getDefaultOptions)(),S=(0,a.default)((d=(h=(p=(m=c==null?void 0:c.weekStartsOn)!==null&&m!==void 0?m:c==null||(v=c.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&p!==void 0?p:C.weekStartsOn)!==null&&h!==void 0?h:(_=C.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&d!==void 0?d:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var T=(0,n.default)(u),M=T.getUTCDay(),E=(M<S?7:0)+M-S;return T.setUTCDate(T.getUTCDate()-E),T.setUTCHours(0,0,0,0),T}e.exports=t.default})(qf,qf.exports);var t0=qf.exports,Yf={exports:{}},Xf={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(yn),i=r(ar),a=r(t0),o=r(Wi),s=ji;function u(c,d){var h,p,m,v,b,_,w,C;(0,i.default)(1,arguments);var S=(0,n.default)(c),T=S.getUTCFullYear(),M=(0,s.getDefaultOptions)(),E=(0,o.default)((h=(p=(m=(v=d==null?void 0:d.firstWeekContainsDate)!==null&&v!==void 0?v:d==null||(b=d.locale)===null||b===void 0||(_=b.options)===null||_===void 0?void 0:_.firstWeekContainsDate)!==null&&m!==void 0?m:M.firstWeekContainsDate)!==null&&p!==void 0?p:(w=M.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&h!==void 0?h:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=new Date(0);D.setUTCFullYear(T+1,0,E),D.setUTCHours(0,0,0,0);var N=(0,a.default)(D,d),F=new Date(0);F.setUTCFullYear(T,0,E),F.setUTCHours(0,0,0,0);var B=(0,a.default)(F,d);return S.getTime()>=N.getTime()?T+1:S.getTime()>=B.getTime()?T:T-1}e.exports=t.default})(Xf,Xf.exports);var dC=Xf.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(dC),i=r(ar),a=r(t0),o=r(Wi),s=ji;function u(c,d){var h,p,m,v,b,_,w,C;(0,i.default)(1,arguments);var S=(0,s.getDefaultOptions)(),T=(0,o.default)((h=(p=(m=(v=d==null?void 0:d.firstWeekContainsDate)!==null&&v!==void 0?v:d==null||(b=d.locale)===null||b===void 0||(_=b.options)===null||_===void 0?void 0:_.firstWeekContainsDate)!==null&&m!==void 0?m:S.firstWeekContainsDate)!==null&&p!==void 0?p:(w=S.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.firstWeekContainsDate)!==null&&h!==void 0?h:1),M=(0,n.default)(c,d),E=new Date(0);E.setUTCFullYear(M,0,T),E.setUTCHours(0,0,0,0);var D=(0,a.default)(E,d);return D}e.exports=t.default})(Yf,Yf.exports);var D7=Yf.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(yn),i=r(t0),a=r(D7),o=r(ar),s=6048e5;function u(c,d){(0,o.default)(1,arguments);var h=(0,n.default)(c),p=(0,i.default)(h,d).getTime()-(0,a.default)(h,d).getTime();return Math.round(p/s)+1}e.exports=t.default})(Gf,Gf.exports);var N7=Gf.exports,Zf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n,i){for(var a=n<0?"-":"",o=Math.abs(n).toString();o.length<i;)o="0"+o;return a+o}e.exports=t.default})(Zf,Zf.exports);var hC=Zf.exports,Kf={exports:{}};(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(hC),i={y:function(s,u){var c=s.getUTCFullYear(),d=c>0?c:1-c;return(0,n.default)(u==="yy"?d%100:d,u.length)},M:function(s,u){var c=s.getUTCMonth();return u==="M"?String(c+1):(0,n.default)(c+1,2)},d:function(s,u){return(0,n.default)(s.getUTCDate(),u.length)},a:function(s,u){var c=s.getUTCHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(s,u){return(0,n.default)(s.getUTCHours()%12||12,u.length)},H:function(s,u){return(0,n.default)(s.getUTCHours(),u.length)},m:function(s,u){return(0,n.default)(s.getUTCMinutes(),u.length)},s:function(s,u){return(0,n.default)(s.getUTCSeconds(),u.length)},S:function(s,u){var c=u.length,d=s.getUTCMilliseconds(),h=Math.floor(d*Math.pow(10,c-3));return(0,n.default)(h,u.length)}},a=i;t.default=a,e.exports=t.default})(Kf,Kf.exports);var k7=Kf.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(M7),i=r(P7),a=r(uC),o=r(N7),s=r(dC),u=r(hC),c=r(k7),d={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},h={G:function(w,C,S){var T=w.getUTCFullYear()>0?1:0;switch(C){case"G":case"GG":case"GGG":return S.era(T,{width:"abbreviated"});case"GGGGG":return S.era(T,{width:"narrow"});case"GGGG":default:return S.era(T,{width:"wide"})}},y:function(w,C,S){if(C==="yo"){var T=w.getUTCFullYear(),M=T>0?T:1-T;return S.ordinalNumber(M,{unit:"year"})}return c.default.y(w,C)},Y:function(w,C,S,T){var M=(0,s.default)(w,T),E=M>0?M:1-M;if(C==="YY"){var D=E%100;return(0,u.default)(D,2)}return C==="Yo"?S.ordinalNumber(E,{unit:"year"}):(0,u.default)(E,C.length)},R:function(w,C){var S=(0,a.default)(w);return(0,u.default)(S,C.length)},u:function(w,C){var S=w.getUTCFullYear();return(0,u.default)(S,C.length)},Q:function(w,C,S){var T=Math.ceil((w.getUTCMonth()+1)/3);switch(C){case"Q":return String(T);case"QQ":return(0,u.default)(T,2);case"Qo":return S.ordinalNumber(T,{unit:"quarter"});case"QQQ":return S.quarter(T,{width:"abbreviated",context:"formatting"});case"QQQQQ":return S.quarter(T,{width:"narrow",context:"formatting"});case"QQQQ":default:return S.quarter(T,{width:"wide",context:"formatting"})}},q:function(w,C,S){var T=Math.ceil((w.getUTCMonth()+1)/3);switch(C){case"q":return String(T);case"qq":return(0,u.default)(T,2);case"qo":return S.ordinalNumber(T,{unit:"quarter"});case"qqq":return S.quarter(T,{width:"abbreviated",context:"standalone"});case"qqqqq":return S.quarter(T,{width:"narrow",context:"standalone"});case"qqqq":default:return S.quarter(T,{width:"wide",context:"standalone"})}},M:function(w,C,S){var T=w.getUTCMonth();switch(C){case"M":case"MM":return c.default.M(w,C);case"Mo":return S.ordinalNumber(T+1,{unit:"month"});case"MMM":return S.month(T,{width:"abbreviated",context:"formatting"});case"MMMMM":return S.month(T,{width:"narrow",context:"formatting"});case"MMMM":default:return S.month(T,{width:"wide",context:"formatting"})}},L:function(w,C,S){var T=w.getUTCMonth();switch(C){case"L":return String(T+1);case"LL":return(0,u.default)(T+1,2);case"Lo":return S.ordinalNumber(T+1,{unit:"month"});case"LLL":return S.month(T,{width:"abbreviated",context:"standalone"});case"LLLLL":return S.month(T,{width:"narrow",context:"standalone"});case"LLLL":default:return S.month(T,{width:"wide",context:"standalone"})}},w:function(w,C,S,T){var M=(0,o.default)(w,T);return C==="wo"?S.ordinalNumber(M,{unit:"week"}):(0,u.default)(M,C.length)},I:function(w,C,S){var T=(0,i.default)(w);return C==="Io"?S.ordinalNumber(T,{unit:"week"}):(0,u.default)(T,C.length)},d:function(w,C,S){return C==="do"?S.ordinalNumber(w.getUTCDate(),{unit:"date"}):c.default.d(w,C)},D:function(w,C,S){var T=(0,n.default)(w);return C==="Do"?S.ordinalNumber(T,{unit:"dayOfYear"}):(0,u.default)(T,C.length)},E:function(w,C,S){var T=w.getUTCDay();switch(C){case"E":case"EE":case"EEE":return S.day(T,{width:"abbreviated",context:"formatting"});case"EEEEE":return S.day(T,{width:"narrow",context:"formatting"});case"EEEEEE":return S.day(T,{width:"short",context:"formatting"});case"EEEE":default:return S.day(T,{width:"wide",context:"formatting"})}},e:function(w,C,S,T){var M=w.getUTCDay(),E=(M-T.weekStartsOn+8)%7||7;switch(C){case"e":return String(E);case"ee":return(0,u.default)(E,2);case"eo":return S.ordinalNumber(E,{unit:"day"});case"eee":return S.day(M,{width:"abbreviated",context:"formatting"});case"eeeee":return S.day(M,{width:"narrow",context:"formatting"});case"eeeeee":return S.day(M,{width:"short",context:"formatting"});case"eeee":default:return S.day(M,{width:"wide",context:"formatting"})}},c:function(w,C,S,T){var M=w.getUTCDay(),E=(M-T.weekStartsOn+8)%7||7;switch(C){case"c":return String(E);case"cc":return(0,u.default)(E,C.length);case"co":return S.ordinalNumber(E,{unit:"day"});case"ccc":return S.day(M,{width:"abbreviated",context:"standalone"});case"ccccc":return S.day(M,{width:"narrow",context:"standalone"});case"cccccc":return S.day(M,{width:"short",context:"standalone"});case"cccc":default:return S.day(M,{width:"wide",context:"standalone"})}},i:function(w,C,S){var T=w.getUTCDay(),M=T===0?7:T;switch(C){case"i":return String(M);case"ii":return(0,u.default)(M,C.length);case"io":return S.ordinalNumber(M,{unit:"day"});case"iii":return S.day(T,{width:"abbreviated",context:"formatting"});case"iiiii":return S.day(T,{width:"narrow",context:"formatting"});case"iiiiii":return S.day(T,{width:"short",context:"formatting"});case"iiii":default:return S.day(T,{width:"wide",context:"formatting"})}},a:function(w,C,S){var T=w.getUTCHours(),M=T/12>=1?"pm":"am";switch(C){case"a":case"aa":return S.dayPeriod(M,{width:"abbreviated",context:"formatting"});case"aaa":return S.dayPeriod(M,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return S.dayPeriod(M,{width:"narrow",context:"formatting"});case"aaaa":default:return S.dayPeriod(M,{width:"wide",context:"formatting"})}},b:function(w,C,S){var T=w.getUTCHours(),M;switch(T===12?M=d.noon:T===0?M=d.midnight:M=T/12>=1?"pm":"am",C){case"b":case"bb":return S.dayPeriod(M,{width:"abbreviated",context:"formatting"});case"bbb":return S.dayPeriod(M,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return S.dayPeriod(M,{width:"narrow",context:"formatting"});case"bbbb":default:return S.dayPeriod(M,{width:"wide",context:"formatting"})}},B:function(w,C,S){var T=w.getUTCHours(),M;switch(T>=17?M=d.evening:T>=12?M=d.afternoon:T>=4?M=d.morning:M=d.night,C){case"B":case"BB":case"BBB":return S.dayPeriod(M,{width:"abbreviated",context:"formatting"});case"BBBBB":return S.dayPeriod(M,{width:"narrow",context:"formatting"});case"BBBB":default:return S.dayPeriod(M,{width:"wide",context:"formatting"})}},h:function(w,C,S){if(C==="ho"){var T=w.getUTCHours()%12;return T===0&&(T=12),S.ordinalNumber(T,{unit:"hour"})}return c.default.h(w,C)},H:function(w,C,S){return C==="Ho"?S.ordinalNumber(w.getUTCHours(),{unit:"hour"}):c.default.H(w,C)},K:function(w,C,S){var T=w.getUTCHours()%12;return C==="Ko"?S.ordinalNumber(T,{unit:"hour"}):(0,u.default)(T,C.length)},k:function(w,C,S){var T=w.getUTCHours();return T===0&&(T=24),C==="ko"?S.ordinalNumber(T,{unit:"hour"}):(0,u.default)(T,C.length)},m:function(w,C,S){return C==="mo"?S.ordinalNumber(w.getUTCMinutes(),{unit:"minute"}):c.default.m(w,C)},s:function(w,C,S){return C==="so"?S.ordinalNumber(w.getUTCSeconds(),{unit:"second"}):c.default.s(w,C)},S:function(w,C){return c.default.S(w,C)},X:function(w,C,S,T){var M=T._originalDate||w,E=M.getTimezoneOffset();if(E===0)return"Z";switch(C){case"X":return m(E);case"XXXX":case"XX":return v(E);case"XXXXX":case"XXX":default:return v(E,":")}},x:function(w,C,S,T){var M=T._originalDate||w,E=M.getTimezoneOffset();switch(C){case"x":return m(E);case"xxxx":case"xx":return v(E);case"xxxxx":case"xxx":default:return v(E,":")}},O:function(w,C,S,T){var M=T._originalDate||w,E=M.getTimezoneOffset();switch(C){case"O":case"OO":case"OOO":return"GMT"+p(E,":");case"OOOO":default:return"GMT"+v(E,":")}},z:function(w,C,S,T){var M=T._originalDate||w,E=M.getTimezoneOffset();switch(C){case"z":case"zz":case"zzz":return"GMT"+p(E,":");case"zzzz":default:return"GMT"+v(E,":")}},t:function(w,C,S,T){var M=T._originalDate||w,E=Math.floor(M.getTime()/1e3);return(0,u.default)(E,C.length)},T:function(w,C,S,T){var M=T._originalDate||w,E=M.getTime();return(0,u.default)(E,C.length)}};function p(_,w){var C=_>0?"-":"+",S=Math.abs(_),T=Math.floor(S/60),M=S%60;if(M===0)return C+String(T);var E=w;return C+String(T)+E+(0,u.default)(M,2)}function m(_,w){if(_%60===0){var C=_>0?"-":"+";return C+(0,u.default)(Math.abs(_)/60,2)}return v(_,w)}function v(_,w){var C=w||"",S=_>0?"-":"+",T=Math.abs(_),M=(0,u.default)(Math.floor(T/60),2),E=(0,u.default)(T%60,2);return S+M+C+E}var b=h;t.default=b,e.exports=t.default})(zf,zf.exports);var L7=zf.exports,Qf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(u,c){switch(u){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},n=function(u,c){switch(u){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},i=function(u,c){var d=u.match(/(P+)(p+)?/)||[],h=d[1],p=d[2];if(!p)return r(u,c);var m;switch(h){case"P":m=c.dateTime({width:"short"});break;case"PP":m=c.dateTime({width:"medium"});break;case"PPP":m=c.dateTime({width:"long"});break;case"PPPP":default:m=c.dateTime({width:"full"});break}return m.replace("{{date}}",r(h,c)).replace("{{time}}",n(p,c))},a={p:n,P:i},o=a;t.default=o,e.exports=t.default})(Qf,Qf.exports);var O7=Qf.exports,Jf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){var i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),n.getTime()-i.getTime()}e.exports=t.default})(Jf,Jf.exports);var fC=Jf.exports;const S1=O.getDefaultExportFromCjs(fC);var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.isProtectedDayOfYearToken=$7;Xs.isProtectedWeekYearToken=B7;Xs.throwProtectedError=z7;var I7=["D","DD"],F7=["YY","YYYY"];function $7(e){return I7.indexOf(e)!==-1}function B7(e){return F7.indexOf(e)!==-1}function z7(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ep={exports:{}},tp={exports:{}},rp={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},n=function(o,s,u){var c,d=r[o];return typeof d=="string"?c=d:s===1?c=d.one:c=d.other.replace("{{count}}",s.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+c:c+" ago":c},i=n;t.default=i,e.exports=t.default})(rp,rp.exports);var H7=rp.exports,np={exports:{}},ip={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):n.defaultWidth,o=n.formats[a]||n.formats[n.defaultWidth];return o}}e.exports=t.default})(ip,ip.exports);var W7=ip.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(W7),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s={date:(0,n.default)({formats:i,defaultWidth:"full"}),time:(0,n.default)({formats:a,defaultWidth:"full"}),dateTime:(0,n.default)({formats:o,defaultWidth:"full"})},u=s;t.default=u,e.exports=t.default})(np,np.exports);var j7=np.exports,ap={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},n=function(o,s,u,c){return r[o]},i=n;t.default=i,e.exports=t.default})(ap,ap.exports);var U7=ap.exports,op={exports:{}},sp={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){return function(i,a){var o=a!=null&&a.context?String(a.context):"standalone",s;if(o==="formatting"&&n.formattingValues){var u=n.defaultFormattingWidth||n.defaultWidth,c=a!=null&&a.width?String(a.width):u;s=n.formattingValues[c]||n.formattingValues[u]}else{var d=n.defaultWidth,h=a!=null&&a.width?String(a.width):n.defaultWidth;s=n.values[h]||n.values[d]}var p=n.argumentCallback?n.argumentCallback(i):i;return s[p]}}e.exports=t.default})(sp,sp.exports);var V7=sp.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(V7),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},o={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},s={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},d=function(v,b){var _=Number(v),w=_%100;if(w>20||w<10)switch(w%10){case 1:return _+"st";case 2:return _+"nd";case 3:return _+"rd"}return _+"th"},h={ordinalNumber:d,era:(0,n.default)({values:i,defaultWidth:"wide"}),quarter:(0,n.default)({values:a,defaultWidth:"wide",argumentCallback:function(v){return v-1}}),month:(0,n.default)({values:o,defaultWidth:"wide"}),day:(0,n.default)({values:s,defaultWidth:"wide"}),dayPeriod:(0,n.default)({values:u,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},p=h;t.default=p,e.exports=t.default})(op,op.exports);var G7=op.exports,lp={exports:{}},up={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(a){return function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=s.width,c=u&&a.matchPatterns[u]||a.matchPatterns[a.defaultMatchWidth],d=o.match(c);if(!d)return null;var h=d[0],p=u&&a.parsePatterns[u]||a.parsePatterns[a.defaultParseWidth],m=Array.isArray(p)?i(p,function(_){return _.test(h)}):n(p,function(_){return _.test(h)}),v;v=a.valueCallback?a.valueCallback(m):m,v=s.valueCallback?s.valueCallback(v):v;var b=o.slice(h.length);return{value:v,rest:b}}}function n(a,o){for(var s in a)if(a.hasOwnProperty(s)&&o(a[s]))return s}function i(a,o){for(var s=0;s<a.length;s++)if(o(a[s]))return s}e.exports=t.default})(up,up.exports);var q7=up.exports,cp={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.match(n.matchPattern);if(!o)return null;var s=o[0],u=i.match(n.parsePattern);if(!u)return null;var c=n.valueCallback?n.valueCallback(u[0]):u[0];c=a.valueCallback?a.valueCallback(c):c;var d=i.slice(s.length);return{value:c,rest:d}}}e.exports=t.default})(cp,cp.exports);var Y7=cp.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(q7),i=r(Y7),a=/^(\d+)(th|st|nd|rd)?/i,o=/\d+/i,s={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},u={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},d={any:[/1/i,/2/i,/3/i,/4/i]},h={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},p={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},m={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},b={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},w={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:o,valueCallback:function(T){return parseInt(T,10)}}),era:(0,n.default)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any"}),quarter:(0,n.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:d,defaultParseWidth:"any",valueCallback:function(T){return T+1}}),month:(0,n.default)({matchPatterns:h,defaultMatchWidth:"wide",parsePatterns:p,defaultParseWidth:"any"}),day:(0,n.default)({matchPatterns:m,defaultMatchWidth:"wide",parsePatterns:v,defaultParseWidth:"any"}),dayPeriod:(0,n.default)({matchPatterns:b,defaultMatchWidth:"any",parsePatterns:_,defaultParseWidth:"any"})},C=w;t.default=C,e.exports=t.default})(lp,lp.exports);var X7=lp.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(H7),i=r(j7),a=r(U7),o=r(G7),s=r(X7),u={code:"en-US",formatDistance:n.default,formatLong:i.default,formatRelative:a.default,localize:o.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=u;t.default=c,e.exports=t.default})(tp,tp.exports);var Z7=tp.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(Z7),i=n.default;t.default=i,e.exports=t.default})(ep,ep.exports);var K7=ep.exports;(function(e,t){var r=dt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var n=r(C7),i=r(S7),a=r(yn),o=r(L7),s=r(O7),u=r(fC),c=Xs,d=r(Wi),h=r(ar),p=ji,m=r(K7),v=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,b=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_=/^'([^]*?)'?$/,w=/''/g,C=/[a-zA-Z]/;function S(M,E,D){var N,F,B,G,Y,$,X,V,Z,j,q,te,Q,J,ne,ae,oe,se;(0,h.default)(2,arguments);var ce=String(E),me=(0,p.getDefaultOptions)(),pe=(N=(F=D==null?void 0:D.locale)!==null&&F!==void 0?F:me.locale)!==null&&N!==void 0?N:m.default,we=(0,d.default)((B=(G=(Y=($=D==null?void 0:D.firstWeekContainsDate)!==null&&$!==void 0?$:D==null||(X=D.locale)===null||X===void 0||(V=X.options)===null||V===void 0?void 0:V.firstWeekContainsDate)!==null&&Y!==void 0?Y:me.firstWeekContainsDate)!==null&&G!==void 0?G:(Z=me.locale)===null||Z===void 0||(j=Z.options)===null||j===void 0?void 0:j.firstWeekContainsDate)!==null&&B!==void 0?B:1);if(!(we>=1&&we<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Le=(0,d.default)((q=(te=(Q=(J=D==null?void 0:D.weekStartsOn)!==null&&J!==void 0?J:D==null||(ne=D.locale)===null||ne===void 0||(ae=ne.options)===null||ae===void 0?void 0:ae.weekStartsOn)!==null&&Q!==void 0?Q:me.weekStartsOn)!==null&&te!==void 0?te:(oe=me.locale)===null||oe===void 0||(se=oe.options)===null||se===void 0?void 0:se.weekStartsOn)!==null&&q!==void 0?q:0);if(!(Le>=0&&Le<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!pe.localize)throw new RangeError("locale must contain localize property");if(!pe.formatLong)throw new RangeError("locale must contain formatLong property");var Ce=(0,a.default)(M);if(!(0,n.default)(Ce))throw new RangeError("Invalid time value");var le=(0,u.default)(Ce),Ve=(0,i.default)(Ce,le),Te={firstWeekContainsDate:we,weekStartsOn:Le,locale:pe,_originalDate:Ce},Ne=ce.match(b).map(function(Be){var Xe=Be[0];if(Xe==="p"||Xe==="P"){var Je=s.default[Xe];return Je(Be,pe.formatLong)}return Be}).join("").match(v).map(function(Be){if(Be==="''")return"'";var Xe=Be[0];if(Xe==="'")return T(Be);var Je=o.default[Xe];if(Je)return!(D!=null&&D.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(Be)&&(0,c.throwProtectedError)(Be,E,String(M)),!(D!=null&&D.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(Be)&&(0,c.throwProtectedError)(Be,E,String(M)),Je(Ve,Be,pe.localize,Te);if(Xe.match(C))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Xe+"`");return Be}).join("");return Ne}function T(M){var E=M.match(_);return E?E[1].replace(w,"'"):M}e.exports=t.default})(Nf,Nf.exports);var Q7=Nf.exports;const J7=O.getDefaultExportFromCjs(Q7);function M1(e,t,r){var n=rO(e,r.timeZone,r.locale);return n.formatToParts?eO(n,t):tO(n,t)}function eO(e,t){for(var r=e.formatToParts(t),n=r.length-1;n>=0;--n)if(r[n].type==="timeZoneName")return r[n].value}function tO(e,t){var r=e.format(t).replace(/\u200E/g,""),n=/ [\w-+ ]+$/.exec(r);return n?n[0].substr(1):""}function rO(e,t,r){if(r&&!r.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(r?[r.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function nO(e,t){var r=sO(t);return r.formatToParts?aO(r,e):oO(r,e)}var iO={year:0,month:1,day:2,hour:3,minute:4,second:5};function aO(e,t){try{for(var r=e.formatToParts(t),n=[],i=0;i<r.length;i++){var a=iO[r[i].type];a>=0&&(n[a]=parseInt(r[i].value,10))}return n}catch(o){if(o instanceof RangeError)return[NaN];throw o}}function oO(e,t){var r=e.format(t),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);return[n[3],n[1],n[2],n[4],n[5],n[6]]}var Sh={};function sO(e){if(!Sh[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),r=t==="06/25/2014, 00:00:00"||t==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";Sh[e]=r?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Sh[e]}function pC(e,t,r,n,i,a,o){var s=new Date(0);return s.setUTCFullYear(e,t,r),s.setUTCHours(n,i,a,o),s}var E1=36e5,lO=6e4,Mh={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function r0(e,t,r){var n,i;if(!e||(n=Mh.timezoneZ.exec(e),n))return 0;var a;if(n=Mh.timezoneHH.exec(e),n)return a=parseInt(n[1],10),P1(a)?-(a*E1):NaN;if(n=Mh.timezoneHHMM.exec(e),n){a=parseInt(n[2],10);var o=parseInt(n[3],10);return P1(a,o)?(i=Math.abs(a)*E1+o*lO,n[1]==="+"?-i:i):NaN}if(dO(e)){t=new Date(t||Date.now());var s=r?t:uO(t),u=dp(s,e),c=r?u:cO(t,u,e);return-c}return NaN}function uO(e){return pC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function dp(e,t){var r=nO(e,t),n=pC(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime(),i=e.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,n-i}function cO(e,t,r){var n=e.getTime(),i=n-t,a=dp(new Date(i),r);if(t===a)return t;i-=a-t;var o=dp(new Date(i),r);return a===o?a:Math.max(a,o)}function P1(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var A1={};function dO(e){if(A1[e])return!0;try{return A1[e]=!0,!0}catch(t){return!1}}var hO=60*1e3,fO={X:function(e,t,r,n){var i=Eh(n.timeZone,e);if(i===0)return"Z";switch(t){case"X":return R1(i);case"XXXX":case"XX":return ya(i);case"XXXXX":case"XXX":default:return ya(i,":")}},x:function(e,t,r,n){var i=Eh(n.timeZone,e);switch(t){case"x":return R1(i);case"xxxx":case"xx":return ya(i);case"xxxxx":case"xxx":default:return ya(i,":")}},O:function(e,t,r,n){var i=Eh(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+pO(i,":");case"OOOO":default:return"GMT"+ya(i,":")}},z:function(e,t,r,n){switch(t){case"z":case"zz":case"zzz":return M1("short",e,n);case"zzzz":default:return M1("long",e,n)}}};function Eh(e,t){var r=e?r0(e,t,!0)/hO:t.getTimezoneOffset();if(Number.isNaN(r))throw new RangeError("Invalid time zone specified: "+e);return r}function Qu(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}function ya(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=Qu(Math.floor(i/60),2),o=Qu(Math.floor(i%60),2);return n+a+r+o}function R1(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Qu(Math.abs(e)/60,2)}return ya(e,t)}function pO(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+Qu(a,2)}var mO=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Ph=36e5,D1=6e4,gO=2,tr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:mO};function mC(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var r=t||{},n=r.additionalDigits==null?gO:x7(r.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=vO(e),a=yO(i.date,n),o=a.year,s=a.restDateString,u=bO(s,o);if(isNaN(u))return new Date(NaN);if(u){var c=u.getTime(),d=0,h;if(i.time&&(d=_O(i.time),isNaN(d)))return new Date(NaN);if(i.timeZone||r.timeZone){if(h=r0(i.timeZone||r.timeZone,new Date(c+d)),isNaN(h))return new Date(NaN)}else h=S1(new Date(c+d)),h=S1(new Date(c+d+h));return new Date(c+d+h)}else return new Date(NaN)}function vO(e){var t={},r=tr.dateTimePattern.exec(e),n;if(r?(t.date=r[1],n=r[3]):(r=tr.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){var i=tr.timeZone.exec(n);i?(t.time=n.replace(i[1],""),t.timeZone=i[1].trim()):t.time=n}return t}function yO(e,t){var r=tr.YYY[t],n=tr.YYYYY[t],i;if(i=tr.YYYY.exec(e)||n.exec(e),i){var a=i[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(i=tr.YY.exec(e)||r.exec(e),i){var o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}return{year:null}}function bO(e,t){if(t===null)return null;var r,n,i,a;if(e.length===0)return n=new Date(0),n.setUTCFullYear(t),n;if(r=tr.MM.exec(e),r)return n=new Date(0),i=parseInt(r[1],10)-1,k1(t,i)?(n.setUTCFullYear(t,i),n):new Date(NaN);if(r=tr.DDD.exec(e),r){n=new Date(0);var o=parseInt(r[1],10);return xO(t,o)?(n.setUTCFullYear(t,0,o),n):new Date(NaN)}if(r=tr.MMDD.exec(e),r){n=new Date(0),i=parseInt(r[1],10)-1;var s=parseInt(r[2],10);return k1(t,i,s)?(n.setUTCFullYear(t,i,s),n):new Date(NaN)}if(r=tr.Www.exec(e),r)return a=parseInt(r[1],10)-1,L1(t,a)?N1(t,a):new Date(NaN);if(r=tr.WwwD.exec(e),r){a=parseInt(r[1],10)-1;var u=parseInt(r[2],10)-1;return L1(t,a,u)?N1(t,a,u):new Date(NaN)}return null}function _O(e){var t,r,n;if(t=tr.HH.exec(e),t)return r=parseFloat(t[1].replace(",",".")),Ah(r)?r%24*Ph:NaN;if(t=tr.HHMM.exec(e),t)return r=parseInt(t[1],10),n=parseFloat(t[2].replace(",",".")),Ah(r,n)?r%24*Ph+n*D1:NaN;if(t=tr.HHMMSS.exec(e),t){r=parseInt(t[1],10),n=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Ah(r,n,i)?r%24*Ph+n*D1+i*1e3:NaN}return null}function N1(e,t,r){t=t||0,r=r||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7,a=t*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}var wO=[31,28,31,30,31,30,31,31,30,31,30,31],CO=[31,29,31,30,31,30,31,31,30,31,30,31];function gC(e){return e%400===0||e%4===0&&e%100!==0}function k1(e,t,r){if(t<0||t>11)return!1;if(r!=null){if(r<1)return!1;var n=gC(e);if(n&&r>CO[t]||!n&&r>wO[t])return!1}return!0}function xO(e,t){if(t<1)return!1;var r=gC(e);return!(r&&t>366||!r&&t>365)}function L1(e,t,r){return!(t<0||t>52||r!=null&&(r<0||r>6))}function Ah(e,t,r){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||r!=null&&(r<0||r>=60))}var TO=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function SO(e,t,r){var n=String(t),i=r||{},a=n.match(TO);if(a){var o=mC(i.originalDate||e,i);n=a.reduce(function(s,u){if(u[0]==="'")return s;var c=s.indexOf(u),d=s[c-1]==="'",h=s.replace(u,"'"+fO[u[0]](o,u,null,i)+"'");return d?h.substring(0,c-1)+h.substring(c+1):h},n)}return J7(e,n,i)}function MO(e,t,r){var n=mC(e,r),i=r0(t,n,!0),a=new Date(n.getTime()-i),o=new Date(0);return o.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),o.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),o}function Di(e,t,r,n){var i=_7(n);return i.timeZone=t,i.originalDate=e,SO(MO(e,t),r,i)}function O1(e,t){z.requiredArgs(2,arguments);var r=z.toDate(e),n=z.toInteger(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function EO(e,t){z.requiredArgs(2,arguments);var r=z.toDate(e),n=z.toInteger(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function vC(e,t){z.requiredArgs(2,arguments);var r=z.toInteger(t);return EO(e,r*12)}function PO(e){z.requiredArgs(1,arguments);var t=z.toDate(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function AO(e,t){z.requiredArgs(2,arguments);var r=z.toDate(e),n=z.toInteger(t),i=r.getFullYear(),a=r.getDate(),o=new Date(0);o.setFullYear(i,n,15),o.setHours(0,0,0,0);var s=PO(o);return r.setMonth(n,Math.min(a,s)),r}function yC(e,t){z.requiredArgs(2,arguments);var r=z.toInteger(t);return vC(e,-r)}function Ni(e,t,r){z.requiredArgs(2,arguments);var n=z.startOfUTCWeek(e,r),i=z.startOfUTCWeek(t,r);return n.getTime()===i.getTime()}var I1={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"halbe Minute",withPreposition:"halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},RO=function(t,r,n){var i,a=n!=null&&n.addSuffix?I1[t].withPreposition:I1[t].standalone;return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:"vor "+i:i},DO={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},NO={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},kO={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},LO={date:z.buildFormatLongFn({formats:DO,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:NO,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:kO,defaultWidth:"full"})},OO={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},IO=function(t,r,n,i){return OO[t]},FO={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},$O={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},hp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},BO={narrow:hp.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:hp.wide},zO={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},HO={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},WO={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},jO=function(t){var r=Number(t);return r+"."},UO={ordinalNumber:jO,era:z.buildLocalizeFn({values:FO,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:$O,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:hp,formattingValues:BO,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:zO,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:HO,defaultWidth:"wide",formattingValues:WO,defaultFormattingWidth:"wide"})},VO=/^(\d+)(\.)?/i,GO=/\d+/i,qO={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},YO={any:[/^v/i,/^n/i]},XO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},ZO={any:[/1/i,/2/i,/3/i,/4/i]},KO={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},QO={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},JO={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},e9={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},t9={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},r9={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},n9={ordinalNumber:z.buildMatchPatternFn({matchPattern:VO,parsePattern:GO,valueCallback:function(t){return parseInt(t)}}),era:z.buildMatchFn({matchPatterns:qO,defaultMatchWidth:"wide",parsePatterns:YO,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:ZO,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:KO,defaultMatchWidth:"wide",parsePatterns:QO,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:JO,defaultMatchWidth:"wide",parsePatterns:e9,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:t9,defaultMatchWidth:"wide",parsePatterns:r9,defaultParseWidth:"any"})},i9={code:"de",formatDistance:RO,formatLong:LO,formatRelative:IO,localize:UO,match:n9,options:{weekStartsOn:1,firstWeekContainsDate:4}},a9={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},o9={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},s9={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},l9={date:z.buildFormatLongFn({formats:a9,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:o9,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:s9,defaultWidth:"full"})},u9={code:"en-GB",formatDistance:z.formatDistance,formatLong:l9,formatRelative:z.formatRelative,localize:z.localize,match:z.match,options:{weekStartsOn:1,firstWeekContainsDate:4}},c9={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},d9=function(t,r,n){var i,a=c9[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+i:"hace "+i:i},h9={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},f9={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},p9={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},m9={date:z.buildFormatLongFn({formats:h9,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:f9,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:p9,defaultWidth:"full"})},g9={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},v9={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},y9=function(t,r,n,i){return r.getUTCHours()!==1?v9[t]:g9[t]},b9={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},_9={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},w9={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},C9={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},x9={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},T9={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},S9=function(t,r){var n=Number(t);return n+"º"},M9={ordinalNumber:S9,era:z.buildLocalizeFn({values:b9,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:_9,defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:z.buildLocalizeFn({values:w9,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:C9,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:x9,defaultWidth:"wide",formattingValues:T9,defaultFormattingWidth:"wide"})},E9=/^(\d+)(º)?/i,P9=/\d+/i,A9={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},R9={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},D9={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},N9={any:[/1/i,/2/i,/3/i,/4/i]},k9={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},L9={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},O9={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},I9={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},F9={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},$9={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},B9={ordinalNumber:z.buildMatchPatternFn({matchPattern:E9,parsePattern:P9,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:A9,defaultMatchWidth:"wide",parsePatterns:R9,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:D9,defaultMatchWidth:"wide",parsePatterns:N9,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:k9,defaultMatchWidth:"wide",parsePatterns:L9,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:O9,defaultMatchWidth:"wide",parsePatterns:I9,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:F9,defaultMatchWidth:"any",parsePatterns:$9,defaultParseWidth:"any"})},z9={code:"es",formatDistance:d9,formatLong:m9,formatRelative:y9,localize:M9,match:B9,options:{weekStartsOn:1,firstWeekContainsDate:1}},H9={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},W9=function(t,r,n){var i,a=H9[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dans "+i:"il y a "+i:i},j9={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},U9={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},V9={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G9={date:z.buildFormatLongFn({formats:j9,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:U9,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:V9,defaultWidth:"full"})},q9={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Y9=function(t,r,n,i){return q9[t]},X9={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},Z9={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},K9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},Q9={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},J9={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},eI=function(t,r){var n=Number(t),i=r==null?void 0:r.unit;if(n===0)return"0";var a=["year","week","hour","minute","second"],o;return n===1?o=i&&a.includes(i)?"ère":"er":o="ème",n+o},tI={ordinalNumber:eI,era:z.buildLocalizeFn({values:X9,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:Z9,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:K9,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:Q9,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:J9,defaultWidth:"wide"})},rI=/^(\d+)(ième|ère|ème|er|e)?/i,nI=/\d+/i,iI={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},aI={any:[/^av/i,/^ap/i]},oI={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},sI={any:[/1/i,/2/i,/3/i,/4/i]},lI={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},uI={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},cI={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},dI={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},hI={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},fI={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},pI={ordinalNumber:z.buildMatchPatternFn({matchPattern:rI,parsePattern:nI,valueCallback:function(t){return parseInt(t)}}),era:z.buildMatchFn({matchPatterns:iI,defaultMatchWidth:"wide",parsePatterns:aI,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:oI,defaultMatchWidth:"wide",parsePatterns:sI,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:lI,defaultMatchWidth:"wide",parsePatterns:uI,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:cI,defaultMatchWidth:"wide",parsePatterns:dI,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:hI,defaultMatchWidth:"any",parsePatterns:fI,defaultParseWidth:"any"})},mI={code:"fr",formatDistance:W9,formatLong:G9,formatRelative:Y9,localize:tI,match:pI,options:{weekStartsOn:1,firstWeekContainsDate:4}},gI={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},vI=function(t,r,n){var i,a=gI[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"tra "+i:i+" fa":i},yI={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},bI={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},_I={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},wI={date:z.buildFormatLongFn({formats:yI,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:bI,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:_I,defaultWidth:"full"})},n0=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function CI(e){switch(e){case 0:return"'domenica scorsa alle' p";default:return"'"+n0[e]+" scorso alle' p"}}function F1(e){return"'"+n0[e]+" alle' p"}function xI(e){switch(e){case 0:return"'domenica prossima alle' p";default:return"'"+n0[e]+" prossimo alle' p"}}var TI={lastWeek:function(t,r,n){var i=t.getUTCDay();return Ni(t,r,n)?F1(i):CI(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:function(t,r,n){var i=t.getUTCDay();return Ni(t,r,n)?F1(i):xI(i)},other:"P"},SI=function(t,r,n,i){var a=TI[t];return typeof a=="function"?a(r,n,i):a},MI={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},EI={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},PI={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},AI={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},RI={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},DI={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},NI=function(t,r){var n=Number(t);return String(n)},kI={ordinalNumber:NI,era:z.buildLocalizeFn({values:MI,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:EI,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:PI,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:AI,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:RI,defaultWidth:"wide",formattingValues:DI,defaultFormattingWidth:"wide"})},LI=/^(\d+)(º)?/i,OI=/\d+/i,II={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},FI={any:[/^a/i,/^(d|e)/i]},$I={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},BI={any:[/1/i,/2/i,/3/i,/4/i]},zI={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},HI={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},WI={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},jI={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},UI={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},VI={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},GI={ordinalNumber:z.buildMatchPatternFn({matchPattern:LI,parsePattern:OI,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:II,defaultMatchWidth:"wide",parsePatterns:FI,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:$I,defaultMatchWidth:"wide",parsePatterns:BI,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:zI,defaultMatchWidth:"wide",parsePatterns:HI,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:WI,defaultMatchWidth:"wide",parsePatterns:jI,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:UI,defaultMatchWidth:"any",parsePatterns:VI,defaultParseWidth:"any"})},qI={code:"it",formatDistance:vI,formatLong:wI,formatRelative:SI,localize:kI,match:GI,options:{weekStartsOn:1,firstWeekContainsDate:4}},YI={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},XI=function(t,r,n){n=n||{};var i,a=YI[t];return typeof a=="string"?i=a:r===1?n.addSuffix&&a.oneWithSuffix?i=a.oneWithSuffix:i=a.one:n.addSuffix&&a.otherWithSuffix?i=a.otherWithSuffix.replace("{{count}}",String(r)):i=a.other.replace("{{count}}",String(r)),n.addSuffix?n.comparison&&n.comparison>0?i+"後":i+"前":i},ZI={full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},KI={full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},QI={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},JI={date:z.buildFormatLongFn({formats:ZI,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:KI,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:QI,defaultWidth:"full"})},eF={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},tF=function(t,r,n,i){return eF[t]},rF={narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},nF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},iF={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},aF={narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},oF={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},sF={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},lF=function(t,r){var n=Number(t),i=String(r==null?void 0:r.unit);switch(i){case"year":return"".concat(n,"年");case"quarter":return"第".concat(n,"四半期");case"month":return"".concat(n,"月");case"week":return"第".concat(n,"週");case"date":return"".concat(n,"日");case"hour":return"".concat(n,"時");case"minute":return"".concat(n,"分");case"second":return"".concat(n,"秒");default:return"".concat(n)}},uF={ordinalNumber:lF,era:z.buildLocalizeFn({values:rF,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:nF,defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:z.buildLocalizeFn({values:iF,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:aF,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:oF,defaultWidth:"wide",formattingValues:sF,defaultFormattingWidth:"wide"})},cF=/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,dF=/\d+/i,hF={narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},fF={narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},pF={narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},mF={any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},gF={narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},vF={any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},yF={narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},bF={any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},_F={any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},wF={any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},CF={ordinalNumber:z.buildMatchPatternFn({matchPattern:cF,parsePattern:dF,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:hF,defaultMatchWidth:"wide",parsePatterns:fF,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:pF,defaultMatchWidth:"wide",parsePatterns:mF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:gF,defaultMatchWidth:"wide",parsePatterns:vF,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:yF,defaultMatchWidth:"wide",parsePatterns:bF,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:_F,defaultMatchWidth:"any",parsePatterns:wF,defaultParseWidth:"any"})},xF={code:"ja",formatDistance:XI,formatLong:JI,formatRelative:tF,localize:uF,match:CF,options:{weekStartsOn:0,firstWeekContainsDate:1}},TF={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},SF=function(t,r,n){var i,a=TF[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?i+" 후":i+" 전":i},MF={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},EF={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},PF={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},AF={date:z.buildFormatLongFn({formats:MF,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:EF,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:PF,defaultWidth:"full"})},RF={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},DF=function(t,r,n,i){return RF[t]},NF={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},kF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},LF={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},OF={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},IF={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},FF={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},$F=function(t,r){var n=Number(t),i=String(r==null?void 0:r.unit);switch(i){case"minute":case"second":return String(n);case"date":return n+"일";default:return n+"번째"}},BF={ordinalNumber:$F,era:z.buildLocalizeFn({values:NF,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:kF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:LF,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:OF,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:IF,defaultWidth:"wide",formattingValues:FF,defaultFormattingWidth:"wide"})},zF=/^(\d+)(일|번째)?/i,HF=/\d+/i,WF={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},jF={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},UF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},VF={any:[/1/i,/2/i,/3/i,/4/i]},GF={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},qF={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},YF={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},XF={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},ZF={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},KF={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},QF={ordinalNumber:z.buildMatchPatternFn({matchPattern:zF,parsePattern:HF,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:WF,defaultMatchWidth:"wide",parsePatterns:jF,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:UF,defaultMatchWidth:"wide",parsePatterns:VF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:GF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:YF,defaultMatchWidth:"wide",parsePatterns:XF,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:ZF,defaultMatchWidth:"any",parsePatterns:KF,defaultParseWidth:"any"})},JF={code:"ko",formatDistance:SF,formatLong:AF,formatRelative:DF,localize:BF,match:QF,options:{weekStartsOn:0,firstWeekContainsDate:1}},e$={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},t$=function(t,r,n){var i,a=e$[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"over "+i:i+" geleden":i},r$={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},n$={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},i$={full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a$={date:z.buildFormatLongFn({formats:r$,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:n$,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:i$,defaultWidth:"full"})},o$={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},s$=function(t,r,n,i){return o$[t]},l$={narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},u$={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},c$={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},d$={narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},h$={narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},f$=function(t,r){var n=Number(t);return n+"e"},p$={ordinalNumber:f$,era:z.buildLocalizeFn({values:l$,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:u$,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:c$,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:d$,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:h$,defaultWidth:"wide"})},m$=/^(\d+)e?/i,g$=/\d+/i,v$={narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},y$={any:[/^v/,/^n/]},b$={narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},_$={any:[/1/i,/2/i,/3/i,/4/i]},w$={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},C$={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},x$={narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},T$={narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},S$={any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},M$={any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},E$={ordinalNumber:z.buildMatchPatternFn({matchPattern:m$,parsePattern:g$,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:v$,defaultMatchWidth:"wide",parsePatterns:y$,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:b$,defaultMatchWidth:"wide",parsePatterns:_$,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:w$,defaultMatchWidth:"wide",parsePatterns:C$,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:x$,defaultMatchWidth:"wide",parsePatterns:T$,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:S$,defaultMatchWidth:"any",parsePatterns:M$,defaultParseWidth:"any"})},P$={code:"nl",formatDistance:t$,formatLong:a$,formatRelative:s$,localize:p$,match:E$,options:{weekStartsOn:1,firstWeekContainsDate:4}},A$={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},R$=function(t,r,n){var i,a=A$[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"daqui a "+i:"há "+i:i},D$={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},N$={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},k$={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},L$={date:z.buildFormatLongFn({formats:D$,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:N$,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:k$,defaultWidth:"full"})},O$={lastWeek:function(t){var r=t.getUTCDay(),n=r===0||r===6?"último":"última";return"'"+n+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},I$=function(t,r,n,i){var a=O$[t];return typeof a=="function"?a(r):a},F$={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},$$={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},B$={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},z$={narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},H$={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},W$={narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},j$=function(t,r){var n=Number(t);return n+"º"},U$={ordinalNumber:j$,era:z.buildLocalizeFn({values:F$,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:$$,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:B$,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:z$,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:H$,defaultWidth:"wide",formattingValues:W$,defaultFormattingWidth:"wide"})},V$=/^(\d+)(º|ª)?/i,G$=/\d+/i,q$={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},Y$={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},X$={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},Z$={any:[/1/i,/2/i,/3/i,/4/i]},K$={narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Q$={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},J$={narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},eB={narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},tB={narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},rB={any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},nB={ordinalNumber:z.buildMatchPatternFn({matchPattern:V$,parsePattern:G$,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:q$,defaultMatchWidth:"wide",parsePatterns:Y$,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:X$,defaultMatchWidth:"wide",parsePatterns:Z$,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:K$,defaultMatchWidth:"wide",parsePatterns:Q$,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:J$,defaultMatchWidth:"wide",parsePatterns:eB,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:tB,defaultMatchWidth:"any",parsePatterns:rB,defaultParseWidth:"any"})},iB={code:"pt",formatDistance:R$,formatLong:L$,formatRelative:I$,localize:U$,match:nB,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Oo(e,t){if(e.one!==void 0&&t===1)return e.one;var r=t%10,n=t%100;return r===1&&n!==11?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Zt(e){return function(t,r){return r!=null&&r.addSuffix?r.comparison&&r.comparison>0?e.future?Oo(e.future,t):"через "+Oo(e.regular,t):e.past?Oo(e.past,t):Oo(e.regular,t)+" назад":Oo(e.regular,t)}}var aB={lessThanXSeconds:Zt({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Zt({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:function(t,r){return r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"через полминуты":"полминуты назад":"полминуты"},lessThanXMinutes:Zt({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Zt({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Zt({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Zt({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Zt({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Zt({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Zt({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Zt({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Zt({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Zt({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Zt({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Zt({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Zt({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},oB=function(t,r,n){return aB[t](r,n)},sB={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},lB={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},uB={any:"{{date}}, {{time}}"},cB={date:z.buildFormatLongFn({formats:sB,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:lB,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:uB,defaultWidth:"any"})},i0=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function dB(e){var t=i0[e];switch(e){case 0:return"'в прошлое "+t+" в' p";case 1:case 2:case 4:return"'в прошлый "+t+" в' p";case 3:case 5:case 6:return"'в прошлую "+t+" в' p"}}function $1(e){var t=i0[e];return e===2?"'во "+t+" в' p":"'в "+t+" в' p"}function hB(e){var t=i0[e];switch(e){case 0:return"'в следующее "+t+" в' p";case 1:case 2:case 4:return"'в следующий "+t+" в' p";case 3:case 5:case 6:return"'в следующую "+t+" в' p"}}var fB={lastWeek:function(t,r,n){var i=t.getUTCDay();return Ni(t,r,n)?$1(i):dB(i)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:function(t,r,n){var i=t.getUTCDay();return Ni(t,r,n)?$1(i):hB(i)},other:"P"},pB=function(t,r,n,i){var a=fB[t];return typeof a=="function"?a(r,n,i):a},mB={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},gB={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},vB={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},yB={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},bB={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},_B={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},wB={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},CB=function(t,r){var n=Number(t),i=r==null?void 0:r.unit,a;return i==="date"?a="-е":i==="week"||i==="minute"||i==="second"?a="-я":a="-й",n+a},xB={ordinalNumber:CB,era:z.buildLocalizeFn({values:mB,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:gB,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:vB,defaultWidth:"wide",formattingValues:yB,defaultFormattingWidth:"wide"}),day:z.buildLocalizeFn({values:bB,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:_B,defaultWidth:"any",formattingValues:wB,defaultFormattingWidth:"wide"})},TB=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,SB=/\d+/i,MB={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},EB={any:[/^д/i,/^н/i]},PB={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},AB={any:[/1/i,/2/i,/3/i,/4/i]},RB={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},DB={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},NB={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},kB={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},LB={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},OB={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},IB={ordinalNumber:z.buildMatchPatternFn({matchPattern:TB,parsePattern:SB,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:MB,defaultMatchWidth:"wide",parsePatterns:EB,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:PB,defaultMatchWidth:"wide",parsePatterns:AB,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:RB,defaultMatchWidth:"wide",parsePatterns:DB,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:NB,defaultMatchWidth:"wide",parsePatterns:kB,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:LB,defaultMatchWidth:"wide",parsePatterns:OB,defaultParseWidth:"any"})},FB={code:"ru",formatDistance:oB,formatLong:cB,formatRelative:pB,localize:xB,match:IB,options:{weekStartsOn:1,firstWeekContainsDate:1}},$B={lessThanXSeconds:{one:"bir saniyeden az",other:"{{count}} saniyeden az"},xSeconds:{one:"1 saniye",other:"{{count}} saniye"},halfAMinute:"yarım dakika",lessThanXMinutes:{one:"bir dakikadan az",other:"{{count}} dakikadan az"},xMinutes:{one:"1 dakika",other:"{{count}} dakika"},aboutXHours:{one:"yaklaşık 1 saat",other:"yaklaşık {{count}} saat"},xHours:{one:"1 saat",other:"{{count}} saat"},xDays:{one:"1 gün",other:"{{count}} gün"},aboutXWeeks:{one:"yaklaşık 1 hafta",other:"yaklaşık {{count}} hafta"},xWeeks:{one:"1 hafta",other:"{{count}} hafta"},aboutXMonths:{one:"yaklaşık 1 ay",other:"yaklaşık {{count}} ay"},xMonths:{one:"1 ay",other:"{{count}} ay"},aboutXYears:{one:"yaklaşık 1 yıl",other:"yaklaşık {{count}} yıl"},xYears:{one:"1 yıl",other:"{{count}} yıl"},overXYears:{one:"1 yıldan fazla",other:"{{count}} yıldan fazla"},almostXYears:{one:"neredeyse 1 yıl",other:"neredeyse {{count}} yıl"}},BB=function(t,r,n){var i,a=$B[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?i+" sonra":i+" önce":i},zB={full:"d MMMM y EEEE",long:"d MMMM y",medium:"d MMM y",short:"dd.MM.yyyy"},HB={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},WB={full:"{{date}} 'saat' {{time}}",long:"{{date}} 'saat' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jB={date:z.buildFormatLongFn({formats:zB,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:HB,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:WB,defaultWidth:"full"})},UB={lastWeek:"'geçen hafta' eeee 'saat' p",yesterday:"'dün saat' p",today:"'bugün saat' p",tomorrow:"'yarın saat' p",nextWeek:"eeee 'saat' p",other:"P"},VB=function(t,r,n,i){return UB[t]},GB={narrow:["MÖ","MS"],abbreviated:["MÖ","MS"],wide:["Milattan Önce","Milattan Sonra"]},qB={narrow:["1","2","3","4"],abbreviated:["1Ç","2Ç","3Ç","4Ç"],wide:["İlk çeyrek","İkinci Çeyrek","Üçüncü çeyrek","Son çeyrek"]},YB={narrow:["O","Ş","M","N","M","H","T","A","E","E","K","A"],abbreviated:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],wide:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},XB={narrow:["P","P","S","Ç","P","C","C"],short:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],abbreviated:["Paz","Pzt","Sal","Çar","Per","Cum","Cts"],wide:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},ZB={narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"},wide:{am:"Ö.Ö.",pm:"Ö.S.",midnight:"gece yarısı",noon:"öğle",morning:"sabah",afternoon:"öğleden sonra",evening:"akşam",night:"gece"}},KB={narrow:{am:"öö",pm:"ös",midnight:"gy",noon:"ö",morning:"sa",afternoon:"ös",evening:"ak",night:"ge"},abbreviated:{am:"ÖÖ",pm:"ÖS",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"},wide:{am:"ö.ö.",pm:"ö.s.",midnight:"gece yarısı",noon:"öğlen",morning:"sabahleyin",afternoon:"öğleden sonra",evening:"akşamleyin",night:"geceleyin"}},QB=function(t,r){var n=Number(t);return n+"."},JB={ordinalNumber:QB,era:z.buildLocalizeFn({values:GB,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:qB,defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:z.buildLocalizeFn({values:YB,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:XB,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:ZB,defaultWidth:"wide",formattingValues:KB,defaultFormattingWidth:"wide"})},ez=/^(\d+)(\.)?/i,tz=/\d+/i,rz={narrow:/^(mö|ms)/i,abbreviated:/^(mö|ms)/i,wide:/^(milattan önce|milattan sonra)/i},nz={any:[/(^mö|^milattan önce)/i,/(^ms|^milattan sonra)/i]},iz={narrow:/^[1234]/i,abbreviated:/^[1234]ç/i,wide:/^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i},az={any:[/1/i,/2/i,/3/i,/4/i],abbreviated:[/1ç/i,/2ç/i,/3ç/i,/4ç/i],wide:[/^(i|İ)lk çeyrek/i,/(i|İ)kinci çeyrek/i,/üçüncü çeyrek/i,/son çeyrek/i]},oz={narrow:/^[oşmnhtaek]/i,abbreviated:/^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,wide:/^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i},sz={narrow:[/^o/i,/^ş/i,/^m/i,/^n/i,/^m/i,/^h/i,/^t/i,/^a/i,/^e/i,/^e/i,/^k/i,/^a/i],any:[/^o/i,/^ş/i,/^mar/i,/^n/i,/^may/i,/^h/i,/^t/i,/^ağ/i,/^ey/i,/^ek/i,/^k/i,/^ar/i]},lz={narrow:/^[psçc]/i,short:/^(pz|pt|sa|ça|pe|cu|ct)/i,abbreviated:/^(paz|pzt|sal|çar|per|cum|cts)/i,wide:/^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i},uz={narrow:[/^p/i,/^p/i,/^s/i,/^ç/i,/^p/i,/^c/i,/^c/i],any:[/^pz/i,/^pt/i,/^sa/i,/^ça/i,/^pe/i,/^cu/i,/^ct/i],wide:[/^pazar(?!tesi)/i,/^pazartesi/i,/^salı/i,/^çarşamba/i,/^perşembe/i,/^cuma(?!rtesi)/i,/^cumartesi/i]},cz={narrow:/^(öö|ös|gy|ö|sa|ös|ak|ge)/i,any:/^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i},dz={any:{am:/^ö\.?ö\.?/i,pm:/^ö\.?s\.?/i,midnight:/^(gy|gece yarısı)/i,noon:/^öğ/i,morning:/^sa/i,afternoon:/^öğleden sonra/i,evening:/^ak/i,night:/^ge/i}},hz={ordinalNumber:z.buildMatchPatternFn({matchPattern:ez,parsePattern:tz,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:rz,defaultMatchWidth:"wide",parsePatterns:nz,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:iz,defaultMatchWidth:"wide",parsePatterns:az,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:oz,defaultMatchWidth:"wide",parsePatterns:sz,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:lz,defaultMatchWidth:"wide",parsePatterns:uz,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:cz,defaultMatchWidth:"any",parsePatterns:dz,defaultParseWidth:"any"})},fz={code:"tr",formatDistance:BB,formatLong:jB,formatRelative:VB,localize:JB,match:hz,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Io(e,t){if(e.one!==void 0&&t===1)return e.one;var r=t%10,n=t%100;return r===1&&n!==11?e.singularNominative.replace("{{count}}",String(t)):r>=2&&r<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Kt(e){return function(t,r){return r&&r.addSuffix?r.comparison&&r.comparison>0?e.future?Io(e.future,t):"за "+Io(e.regular,t):e.past?Io(e.past,t):Io(e.regular,t)+" тому":Io(e.regular,t)}}var pz=function(t,r){return r&&r.addSuffix?r.comparison&&r.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини"},mz={lessThanXSeconds:Kt({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Kt({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:pz,lessThanXMinutes:Kt({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Kt({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Kt({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Kt({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Kt({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Kt({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Kt({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Kt({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Kt({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Kt({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Kt({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Kt({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Kt({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},gz=function(t,r,n){return n=n||{},mz[t](r,n)},vz={full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},yz={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},bz={full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_z={date:z.buildFormatLongFn({formats:vz,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:yz,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:bz,defaultWidth:"full"})},a0=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function wz(e){var t=a0[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}function bC(e){var t=a0[e];return"'у "+t+" о' p"}function Cz(e){var t=a0[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}var xz=function(t,r,n){var i=z.toDate(t),a=i.getUTCDay();return Ni(i,r,n)?bC(a):wz(a)},Tz=function(t,r,n){var i=z.toDate(t),a=i.getUTCDay();return Ni(i,r,n)?bC(a):Cz(a)},Sz={lastWeek:xz,yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:Tz,other:"P"},Mz=function(t,r,n,i){var a=Sz[t];return typeof a=="function"?a(r,n,i):a},Ez={narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},Pz={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},Az={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},Rz={narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},Dz={narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},Nz={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},kz={narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},Lz=function(t,r){var n=String(r==null?void 0:r.unit),i=Number(t),a;return n==="date"?i===3||i===23?a="-є":a="-е":n==="minute"||n==="second"||n==="hour"?a="-а":a="-й",i+a},Oz={ordinalNumber:Lz,era:z.buildLocalizeFn({values:Ez,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:Pz,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:Az,defaultWidth:"wide",formattingValues:Rz,defaultFormattingWidth:"wide"}),day:z.buildLocalizeFn({values:Dz,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:Nz,defaultWidth:"any",formattingValues:kz,defaultFormattingWidth:"wide"})},Iz=/^(\d+)(-?(е|й|є|а|я))?/i,Fz=/\d+/i,$z={narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},Bz={any:[/^д/i,/^н/i]},zz={narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},Hz={any:[/1/i,/2/i,/3/i,/4/i]},Wz={narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},jz={narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},Uz={narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},Vz={narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},Gz={narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},qz={any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},Yz={ordinalNumber:z.buildMatchPatternFn({matchPattern:Iz,parsePattern:Fz,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:$z,defaultMatchWidth:"wide",parsePatterns:Bz,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:zz,defaultMatchWidth:"wide",parsePatterns:Hz,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:Wz,defaultMatchWidth:"wide",parsePatterns:jz,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:Uz,defaultMatchWidth:"wide",parsePatterns:Vz,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:Gz,defaultMatchWidth:"wide",parsePatterns:qz,defaultParseWidth:"any"})},Xz={code:"uk",formatDistance:gz,formatLong:_z,formatRelative:Mz,localize:Oz,match:Yz,options:{weekStartsOn:1,firstWeekContainsDate:1}},Zz={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},Kz=function(t,r,n){var i,a=Zz[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?i+"内":i+"前":i},Qz={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},Jz={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},eH={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},tH={date:z.buildFormatLongFn({formats:Qz,defaultWidth:"full"}),time:z.buildFormatLongFn({formats:Jz,defaultWidth:"full"}),dateTime:z.buildFormatLongFn({formats:eH,defaultWidth:"full"})};function B1(e,t,r){var n="eeee p";return Ni(e,t,r)?n:e.getTime()>t.getTime()?"'下个'"+n:"'上个'"+n}var rH={lastWeek:B1,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:B1,other:"PP p"},nH=function(t,r,n,i){var a=rH[t];return typeof a=="function"?a(r,n,i):a},iH={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},aH={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},oH={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},sH={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},lH={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},uH={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},cH=function(t,r){var n=Number(t);switch(r==null?void 0:r.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},dH={ordinalNumber:cH,era:z.buildLocalizeFn({values:iH,defaultWidth:"wide"}),quarter:z.buildLocalizeFn({values:aH,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:z.buildLocalizeFn({values:oH,defaultWidth:"wide"}),day:z.buildLocalizeFn({values:sH,defaultWidth:"wide"}),dayPeriod:z.buildLocalizeFn({values:lH,defaultWidth:"wide",formattingValues:uH,defaultFormattingWidth:"wide"})},hH=/^(第\s*)?\d+(日|时|分|秒)?/i,fH=/\d+/i,pH={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},mH={any:[/^(前)/i,/^(公元)/i]},gH={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},vH={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},yH={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},bH={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},_H={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},wH={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},CH={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},xH={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},TH={ordinalNumber:z.buildMatchPatternFn({matchPattern:hH,parsePattern:fH,valueCallback:function(t){return parseInt(t,10)}}),era:z.buildMatchFn({matchPatterns:pH,defaultMatchWidth:"wide",parsePatterns:mH,defaultParseWidth:"any"}),quarter:z.buildMatchFn({matchPatterns:gH,defaultMatchWidth:"wide",parsePatterns:vH,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:z.buildMatchFn({matchPatterns:yH,defaultMatchWidth:"wide",parsePatterns:bH,defaultParseWidth:"any"}),day:z.buildMatchFn({matchPatterns:_H,defaultMatchWidth:"wide",parsePatterns:wH,defaultParseWidth:"any"}),dayPeriod:z.buildMatchFn({matchPatterns:CH,defaultMatchWidth:"any",parsePatterns:xH,defaultParseWidth:"any"})},SH={code:"zh-CN",formatDistance:Kz,formatLong:tH,formatRelative:nH,localize:dH,match:TH,options:{weekStartsOn:1,firstWeekContainsDate:4}},MH=Math.ceil,EH=Math.max;function PH(e,t,r,n){for(var i=-1,a=EH(MH((t-e)/(r||1)),0),o=Array(a);a--;)o[++i]=e,e+=r;return o}function AH(e){return function(t,r,n){return n&&typeof n!="number"&&U.isIterateeCall(t,r,n)&&(r=n=void 0),t=P.toFinite(t),r===void 0?(r=t,t=0):r=P.toFinite(r),n=n===void 0?t<r?1:-1:P.toFinite(n),PH(t,r,n)}}var Ql=AH();const Zs=e=>{switch(e){case"de":case"de-DE":return i9;case"en":case"en-US":return z.locale;case"gb":case"en-GB":return u9;case"es":case"es-ES":case"es-AR":return z9;case"fr":case"fr-FR":return mI;case"it":case"it-IT":return qI;case"ja":case"ja-JP":return xF;case"ko":case"ko-KR":return JF;case"nl":case"nl-NL":return P$;case"pt":case"pt-BR":return iB;case"ru":case"ru-RU":return FB;case"tr":case"tr-TR":return fz;case"zh":case"zh-CN":return SH;case"uk":return Xz;default:return z.locale}};var _C=(e=>(e.YEAR="years",e.QUARTER="quarters",e.MONTH="months",e.WEEK="weeks",e.DATE="dates",e))(_C||{});const RH={dates:e=>z.startOfDay(e),months:e=>z.startOfMonth(e),quarters:e=>z.startOfQuarter(e),weeks:(e,t)=>z.startOfWeek(e,{locale:t}),years:e=>z.startOfYear(e)},DH=(e,t,r)=>RH[e](t,r),NH=e=>P.parseISOWithTimezoneCheck(e);Ql(4),Ql(12),Ql(7),Ql(24);function ai(e,t,r){const n=new RegExp("'[^']+'|("+t+")","g");return e.replace(n,function(a,o){return o?r(a):a})}const kH=["shortDate","shortTime","short","mediumDate","mediumTime","medium","longDate","fullDate"],LH=Object.freeze({fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"});function OH(e,t){if(!t.formatLong)return console.warn("Locale does not have formatLong property. Using default date formats."),LH[e];switch(e){case"fullDate":return t.formatLong.date({width:"full"});case"longDate":return t.formatLong.date({width:"long"});case"mediumDate":return t.formatLong.date({width:"medium"});case"shortDate":return t.formatLong.date({width:"short"});case"mediumTime":return t.formatLong.time({width:"medium"});case"shortTime":return t.formatLong.time({width:"short"});case"medium":return t.formatLong.dateTime({width:"medium"}).replace("{{date}}",t.formatLong.date({width:"medium"})).replace("{{time}}",t.formatLong.time({width:"medium"}));case"short":return t.formatLong.dateTime({width:"short"}).replace("{{date}}",t.formatLong.date({width:"short"})).replace("{{time}}",t.formatLong.time({width:"short"}))}}function IH(e,t){if(!(e.includes("short")||e.includes("medium")||e.includes("long")||e.includes("full")))return e;let r=e;return kH.forEach(n=>{const i=OH(n,t);r=ai(r,n,function(){return i})}),r}const wC="Etc/GMT-14";function FH(e,t,r){return CC(e,t,r)?yC(e,1):e}function $H(e,t){return t<=e.getMonth()}function CC(e,t,r){const n=![XH,o0].includes(t);return r>MC&&n&&$H(e,r)}function BH(e,t,r,n){return!n&&CC(e,t,r)?vC(e,1):e}function zH(e,t){if(t>0){const r=(e.getMonth()+t)%12;return AO(e,r)}return e}function HH(e,t,r,n,i,a){if(!e.includes("y"))return e;const o=BH(t,n,a,i);let s=e;if(["yyyy","yy","y","yp","yyyp"].some(c=>e.includes(c))&&(r=wC),e.includes("yp")){const c=yC(o,1);s=ai(e,"yp|yyyp",function(h){const p="y".repeat(h.length);return Di(c,r,p)})}return ai(s,"yyyy|yy|y",function(d){return Di(o,r,d)})}function WH(e,t,r,n){if(!e.includes("Q"))return e;const i=Di(t,wC,"M");let a=parseInt(i,10)-1;n&&[o0,ZH,KH,SC].includes(r)&&(a-=n>a?n-12:n);const o=parseInt(String(a/3))+1;return ai(e,"QQ|Q",function(c){return`${c.length===2?"'Quarter '":"'Q'"}${o}`})}function jH(e){return e.includes("sss")?ai(e,"sss",function(){return"SSS"}):e}function UH(e,t,r){if(!(e.includes("a")||e.includes("A")))return e;let n=ai(e,"a",function(){return`\0${Di(t,r,"a").toLowerCase()}\0`});return n=ai(n,"A",function(){return`\0${Di(t,r,"a").toUpperCase()}\0`}),n=n.replace(/\0\0/g,""),n=n.replace(/\0/g,"'"),n}const xC=new Set(["y","yy","yyy","yyyy","M","MM","MMM","MMMM","d","dd","EEE","EEEE","EEEEE","H","HH","h","hh","k","kk","m","mm","s","ss","S","SS","SSS","w","ww","o"]),VH=/^([a-zA-Z])\1*/;function TC(e){var t;return(t=e.match(VH))==null?void 0:t[0]}function GH(e,t){let r="",n=t;for(;n<e.length&&e[n]!=="'";){const i=TC(e.slice(n));if(i){if(xC.has(i))break;r+=i,n+=i.length}else r+=e[n],n++}return{literal:r,endIndex:n}}function qH(e){const t=[];let r=0;for(;r<e.length;){if(e[r]==="'"){const i=e.indexOf("'",r+1);if(i===-1){t.push(e.slice(r));break}t.push(e.slice(r,i+1)),r=i+1;continue}const n=TC(e.slice(r));if(n&&xC.has(n)){t.push(n),r+=n.length;continue}if(n){const{literal:i,endIndex:a}=GH(e,r);t.push(`'${i.replace(/'/g,"''")}'`),r=a;continue}t.push(e[r]),r++}return t.join("")}function YH(e,t,r,n){return e.includes("Z")?ai(e,"Z",function(){return Di(t,r,"xx",{locale:n})}):e}const XH="years",o0="quarters",ZH="months",KH="weeks",SC="days",MC=0,QH=1,Ks=Object.freeze({weekFirstDay:QH,isFiscalOn:!1,fiscalMonth:MC,selectedDateLevel:SC,timeZone:"UTC"});function Qs(e,t,r=Zs(),n=Ks){if(e===O.NOT_AVAILABLE_DATA_VALUE)return e;const i=e instanceof Date?e:P.parseISOWithTimezoneCheck(e);return JH(i,t,r,n)}function JH(e,t,r=Zs(),n=Ks){return e.getFullYear()<100?e=O1(e,1900+e.getFullYear()):e.getFullYear()===1111&&(e=O1(e,1970)),n.isFiscalOn||(e=FH(e,n.selectedDateLevel,n.fiscalMonth)),t=IH(t,r),t=jH(t),t=UH(t,e,n.timeZone),t=YH(t,e,n.timeZone,r),t=HH(t,e,n.timeZone,n.selectedDateLevel,n.isFiscalOn,n.fiscalMonth),!n.isFiscalOn&&n.selectedDateLevel===o0&&(e=zH(e,n.fiscalMonth)),t=WH(t,e,n.selectedDateLevel,n.fiscalMonth),t=qH(t),Di(e,n.timeZone,t,{locale:r,weekStartsOn:n.weekFirstDay})}function eW(e){switch(e){case U.DateLevels.Years:return"yyyy";case U.DateLevels.Quarters:return"Q yyyy";case U.DateLevels.Months:return"MM/yyyy";case U.DateLevels.Weeks:return"ww yyyy";case U.DateLevels.Days:return"shortDate";case U.DateLevels.Hours:case U.DateLevels.Minutes:case U.DateLevels.MinutesRoundTo15:case U.DateLevels.MinutesRoundTo30:case U.DateLevels.AggMinutesRoundTo1:case U.DateLevels.AggMinutesRoundTo15:case U.DateLevels.AggMinutesRoundTo30:case U.DateLevels.AggHours:return"HH:mm";case U.DateLevels.Seconds:return"HH:mm:ss";default:return"fullDate"}}const EC=(e,t=-1)=>{var n,i,a;return[...(n=e.rows)!=null?n:[],...(i=e.columns)!=null?i:[],...(a=e.values)!=null?a:[]][t]},tW=(e,t=-1)=>{const{rows:r=[],columns:n=[],values:i=[]}=e,a=Number(r.length)||0,o=Number(n.length)||0,s=Number(i.length)||0;if(t!==-1){if(t<a)return`rows.${t}`;if(t<a+o)return`columns.${t-a}`;if(t<a+o+s)return`values.${t-a-o}`}},rW=e=>{const t=P.normalizeColumn(e),r=P.getDataOptionGranularity(t);return(t==null?void 0:t.dateFormat)||P.getDefaultDateFormat(r)},nW=(e,t,r=!0)=>(n,i)=>{var d,h;const a=(i==null?void 0:i.panel)==="measures",o=n.userType===Tt.CORNER,s=EC(e,(d=i==null?void 0:i.field)==null?void 0:d.index);if(a||o||!s){n.content=n.value;return}const c="type"in s||"column"in s&&"type"in s.column?rW(s):void 0;switch((h=i==null?void 0:i.jaql)==null?void 0:h.datatype){case"numeric":{const p="numberFormatConfig"in s?s.numberFormatConfig:void 0,m=parseFloat(`${n.value}`);n.content=Number.isNaN(m)?"":P.formatNumberWithFallback(m,p,r,P.applyFormatPlainText);break}case"datetime":n.content=s0(n.value,t,c);break;default:n.content=n.value}s&&"isHtml"in s&&s.isHtml&&(n.contentType="html"),n.content===""&&(n.content=O.NOT_AVAILABLE_DATA_VALUE)};function s0(e,t,r){if(e===O.NOT_AVAILABLE_DATA_VALUE)return e;if(!r)return typeof e=="string"?e:e.toISOString();const n=typeof e=="string"?P.parseISOWithTimezoneCheck(e):e;return iW(n)?typeof e=="string"?e:e.toISOString():t(n,r)}function iW(e){return e.toString()==="Invalid Date"}function Mt(e){const t="type"in e.column?e.column.type:"numeric";let r=n=>`${n}`;if(U.isNumber(t)){const n=P.getCompleteNumberFormatConfig(e&&"numberFormatConfig"in e?e.numberFormatConfig:void 0);r=i=>P.applyFormatPlainText(n,parseFloat(`${i}`))}if(U.isDatetime(t)){const n=e.dateFormat||P.getDefaultDateFormat(P.getDataOptionGranularity(e)),i=(a,o)=>Qs(a,o);r=a=>s0(v7(a)?a.toISOString():a,i,n)}return n=>n===void 0?"":r(n)}function Fe(e,t){return R(R(R({dataOption:e},t&&{dataOptionLocation:t}),U.MetadataTypes.isAttribute(e.column)&&{attribute:e.column}),U.MetadataTypes.isMeasure(e.column)&&{measure:e.column})}const Bc=e=>{var t,r,n,i,a,o,s,u;return{value:(t=e.custom)==null?void 0:t.rawValue,categoryValue:(n=(r=e.custom)==null?void 0:r.xValue)==null?void 0:n[0],seriesValue:(s=(o=(a=(i=e.series)==null?void 0:i.options)==null?void 0:a.custom)==null?void 0:o.rawValue)==null?void 0:s[0],categoryDisplayValue:(u=e.name)!=null?u:e.category}},aW=(e,t)=>{const r=t.x.map((s,u)=>{var d,h;const c=(h=(d=e.custom)==null?void 0:d.xValue)==null?void 0:h[u];return H(R({},Fe(s)),{value:c,displayValue:Mt(s)(c)})}),n=t.y.length>=2,i=t.y.filter((s,u)=>!n||e.series.index===u).flatMap(s=>{const u=e.custom.rawValue;return H(R({},Fe(s)),{value:u,displayValue:Mt(s)(u)})}),a=t.breakBy.map(s=>{var c,d,h;const u=(h=(d=(c=e.series)==null?void 0:c.options.custom)==null?void 0:d.rawValue)==null?void 0:h[0];return H(R({},Fe(s)),{value:u,displayValue:Mt(s)(u)})}),o={category:r,value:i,breakBy:a};return H(R({},Bc(e)),{entries:o})},oW=(e,t)=>{const r=t.x.map((s,u)=>{var d,h;const c=(h=(d=e.custom)==null?void 0:d.xValue)==null?void 0:h[u];return H(R({},Fe(s)),{value:c,displayValue:Mt(s)(c)})}),n=t.rangeValues.length>=2,i=t.rangeValues.filter((s,u)=>!n||e.series.index===u).flatMap(s=>s.map((u,c)=>{var p,m;const h=c===0?(p=e.options)==null?void 0:p.low:(m=e.options)==null?void 0:m.high;return H(R({},Fe(u)),{value:h,displayValue:Mt(u)(h)})})),a=t.breakBy.map(s=>{var c,d,h;const u=(h=(d=(c=e.series)==null?void 0:c.options.custom)==null?void 0:d.rawValue)==null?void 0:h[0];return H(R({},Fe(s)),{value:u,displayValue:Mt(s)(u)})}),o={category:r,value:i,breakBy:a};return H(R({},Bc(e)),{entries:o})},sW=(e,t)=>{var n,i,a,o,s;const r={};if(t.x){const u=e.custom.maskedX;r.x=H(R({},Fe(t.x)),{value:u,displayValue:u})}if(t.y){const u=e.custom.maskedY;r.y=H(R({},Fe(t.y)),{value:u,displayValue:u})}if(t.breakByPoint){const u=(n=e.custom)==null?void 0:n.maskedBreakByPoint;r.breakByPoint=H(R({},Fe(t.breakByPoint)),{value:(i=e.custom)==null?void 0:i.maskedBreakByPoint,displayValue:u})}if(t.breakByColor){const u=(a=e.custom)==null?void 0:a.maskedBreakByColor;r.breakByColor=H(R({},Fe(t.breakByColor)),{value:u,displayValue:u})}if(t.size){const u=e.custom.maskedSize;r.size=H(R({},Fe(t.size)),{value:u,displayValue:u})}return{x:e.x,y:e.y,size:e.z,breakByPoint:(o=e.custom)==null?void 0:o.maskedBreakByPoint,breakByColor:(s=e.custom)==null?void 0:s.maskedBreakByColor,entries:r}},lW=(e,t)=>{const r=t.breakBy.map((a,o)=>{var u,c;const s=(c=(u=e.custom)==null?void 0:u.xValue)==null?void 0:c[o];return H(R({},Fe(a)),{value:s,displayValue:Mt(a)(s)})}),n=t.y.map(a=>{var s;const o=(s=e.custom)==null?void 0:s.rawValue;return H(R({},Fe(a)),{value:o,displayValue:Mt(a)(o)})}),i={category:r,value:n};return{value:e.options.custom.number1,categoryValue:e.options.name,categoryDisplayValue:e.name,entries:i}},uW=(e,t)=>{const r=t.breakBy.map((o,s)=>{var c,d;const u=(d=(c=e.custom)==null?void 0:c.xValue)==null?void 0:d[s];return H(R({},Fe(o)),{value:u,displayValue:Mt(o)(u)})}),n=t.y.length>=2,i=t.y.filter((o,s)=>!n||e.series.index===s).map(o=>{var u;const s=(u=e.custom)==null?void 0:u.rawValue;return H(R({},Fe(o)),{value:s,displayValue:Mt(o)(s)})}),a={category:r,value:i};return H(R({},Bc(e)),{entries:a})},cW=(e,t)=>{const r=e.options.custom.level,n=r!==e.options.custom.levelsCount,i=t.breakBy.slice(0,r).map((u,c)=>{var h,p,m,v;const d=n?(p=(h=e.custom)==null?void 0:h.rawValues)==null?void 0:p[c]:(v=(m=e.custom)==null?void 0:m.xValue)==null?void 0:v[c];return H(R({},Fe(u)),{value:d,displayValue:d})}),a=t.y.length>=2,o=t.y.filter((u,c)=>!a||e.series.index===c).map(u=>{var d;const c=n?e.value:(d=e.custom)==null?void 0:d.rawValue;return H(R({},Fe(u)),{value:c,displayValue:Mt(u)(c)})}),s={category:i,value:o};return H(R({},Bc(e)),{entries:s})},dW=(e,t)=>{var i;const r=e.series.type==="scatter",n={};if(r){const a=e.options.y;n.value=[H(R({},Fe(t.outliers)),{value:a,displayValue:Mt(t.outliers)(a)})]}else{const a=(o,s)=>o?H(R({},Fe(o)),{value:s,displayValue:Mt(o)(s)}):void 0;n.value=[a(t.boxMin,e.options.q1),a(t.boxMedian,e.options.median),a(t.boxMax,e.options.q3),a(t.whiskerMin,e.options.low),a(t.whiskerMax,e.options.high)].filter(o=>o!==void 0)}if(t.category){const a=(i=e.custom.xValue)==null?void 0:i[0];n.category=[H(R({},Fe(t.category)),{value:a,displayValue:Mt(t.category)(a)})]}return{boxMin:e.options.q1,boxMedian:e.options.median,boxMax:e.options.q3,whiskerMin:e.options.low,whiskerMax:e.options.high,outlier:e.options.y,categoryValue:e.category,categoryDisplayValue:e.category,entries:n}},hW=(e,t)=>{const r=new Date(e.options.date),n=e.options.dateString,i=e.options.value,a=H(R({},Fe(t.date)),{value:n,displayValue:Mt(t.date)(r)}),o=typeof i=="number",s=t.value&&o?H(R({},Fe(t.value)),{value:typeof i=="number"?i:0,displayValue:Mt(t.value)(i)}):void 0;return{entries:{date:a,value:s}}},fW=(e,t)=>{var m,v,b,_,w,C,S,T,M,E,D,N,F,B,G,Y,$,X,V,Z,j,q,te,Q,J,ne,ae,oe,se,ce,me,pe,we;const r=e;if(!!r.isNode){const Le=(v=(m=r.name)!=null?m:r.id)!=null?v:"",Ce=typeof r.column=="number"?r.column:0,le=(b=t.category[Ce])!=null?b:t.category[0],Ve=typeof((w=(_=r.options)==null?void 0:_.custom)==null?void 0:w.rawValue)=="string"||typeof((S=(C=r.options)==null?void 0:C.custom)==null?void 0:S.rawValue)=="number"?r.options.custom.rawValue:Le,Te=[H(R({},Fe(le)),{value:Ve,displayValue:Le})],Ne=(T=r.sum)!=null?T:0,Be=H(R({},Fe(t.value)),{value:Ne,displayValue:Mt(t.value)(Ne)});return{value:Ne,categoryValue:Ve,categoryDisplayValue:Le,entries:{category:Te,value:[Be]}}}const i=(N=(D=(M=r.fromNode)==null?void 0:M.name)!=null?D:(E=r.fromNode)==null?void 0:E.id)!=null?N:"",a=(Y=(G=(F=r.toNode)==null?void 0:F.name)!=null?G:(B=r.toNode)==null?void 0:B.id)!=null?Y:"",o=($=r.weight)!=null?$:0,s=typeof((X=r.fromNode)==null?void 0:X.column)=="number"?r.fromNode.column:0,u=typeof((V=r.toNode)==null?void 0:V.column)=="number"?r.toNode.column:s+1,c=(Z=t.category[s])!=null?Z:t.category[0],d=(j=t.category[u])!=null?j:t.category[t.category.length-1],h=typeof((Q=(te=(q=r.fromNode)==null?void 0:q.options)==null?void 0:te.custom)==null?void 0:Q.rawValue)=="string"||typeof((ae=(ne=(J=r.fromNode)==null?void 0:J.options)==null?void 0:ne.custom)==null?void 0:ae.rawValue)=="number"?r.fromNode.options.custom.rawValue:i,p=typeof((ce=(se=(oe=r.toNode)==null?void 0:oe.options)==null?void 0:se.custom)==null?void 0:ce.rawValue)=="string"||typeof((we=(pe=(me=r.toNode)==null?void 0:me.options)==null?void 0:pe.custom)==null?void 0:we.rawValue)=="number"?r.toNode.options.custom.rawValue:a;return{value:o,categoryValue:i,categoryDisplayValue:`${i} → ${a}`,entries:{category:[H(R({},Fe(c)),{value:h,displayValue:i}),H(R({},Fe(d)),{value:p,displayValue:a})],value:[H(R({},Fe(t.value)),{value:o,displayValue:Mt(t.value)(o)})]}}};function Rh(e,t){switch(e.series.chart.options.chart.type){case"bubble":case"scatter":return sW(e,t);case"funnel":return lW(e,t);case"pie":return uW(e,t);case"treemap":case"sunburst":return cW(e,t);case"boxplot":return dW(e,t);case"arearange":return oW(e,t);case"heatmap":return hW(e,t);case"sankey":return fW(e,t);default:return aW(e,t)}}function pW(e,t){const r={};return t.geo&&(r.geo=[H(R({},Fe(t.geo)),{value:e.geoName})]),t.color&&(r.color=[H(R({},Fe(t.color)),{value:e.originalValue})]),H(R({},e),{entries:r})}class zc{constructor(t,r){_t(this,"httpClient");_t(this,"defaultDataSource");_t(this,"getDashboards",(...r)=>pt(this,[...r],function*(t={}){const{fields:n,expand:i,searchByTitle:a}=t,o=new URLSearchParams(R(R(R({},a&&{name:a}),(n==null?void 0:n.length)&&{fields:n==null?void 0:n.join(",")}),(i==null?void 0:i.length)&&{expand:i==null?void 0:i.join(",")})).toString(),s=yield this.httpClient.get(`api/v1/dashboards?${o}`);if(!s)return[];const u=s.map(c=>pt(this,null,function*(){if(c.oid&&!c.datasource){const d=yield this.getDashboard(c.oid,{fields:["datasource"]});return d!=null&&d.datasource?H(R({},c),{datasource:d.datasource}):c}return c}));return Promise.all(u)}));_t(this,"getDashboard",(t,r={})=>{const{fields:n,sharedMode:i,adminAccess:a}=r,o=new URLSearchParams(R(R(R({},(n==null?void 0:n.length)&&{fields:n==null?void 0:n.join(",")}),i&&{sharedMode:"true"}),a&&{adminAccess:"true"})).toString();return this.httpClient.get(`api/v1/dashboards/${t}?${o}`).catch(()=>{throw new U.TranslatableError("errors.dashboardInvalidIdentifier",{dashboardOid:t})})});_t(this,"getDashboardLegacy",(t,r={})=>{const{adminAccess:n}=r,i=new URLSearchParams(R({},n&&{adminAccess:"true"})).toString();return this.httpClient.get(`api/dashboards/${t}?${i}`).catch(()=>{throw new U.TranslatableError("errors.dashboardInvalidIdentifier",{dashboardOid:t})})});_t(this,"getDashboardWidgets",(t,r)=>{const n=new URLSearchParams(R({},r&&{sharedMode:"true"})).toString();return this.httpClient.get(`api/v1/dashboards/${t}/widgets?${n}`).catch(()=>{throw new U.TranslatableError("errors.dashboardWidgetsInvalidIdentifiers",{dashboardOid:t})})});_t(this,"getWidget",(t,r,n)=>{const i=new URLSearchParams(R({},n&&{sharedMode:"true"})).toString();return this.httpClient.get(`api/v1/dashboards/${r}/widgets/${t}?${i}`).catch(()=>{throw new U.TranslatableError("errors.widgetByIdInvalidIdentifier",{dashboardOid:r,widgetOid:t})})});_t(this,"getCountriesGeoJson",()=>this.httpClient.get("api/v1/geo/geojson/world"));_t(this,"getUsaStatesGeoJson",()=>this.httpClient.get("api/v1/geo/geojson/usa"));_t(this,"getPalettes",()=>this.httpClient.get("api/palettes"));_t(this,"getHierarchies",({dataSource:t=this.defaultDataSource,dimension:r,ids:n,alwaysIncluded:i})=>{var u,c;const a="granularity"in r;let o="";if(!t)throw new U.TranslatableError("errors.missingDataSource");if(a){const{level:d,dateTimeLevel:h,dateTimePart:p}=r.translateGranularityToJaql();o=(c=(u=d!=null?d:h)!=null?u:p)!=null?c:""}const s=new URLSearchParams(R(R(R({elasticube:U.getDataSourceName(t),table:U.getTableNameFromAttribute(r),column:U.getColumnNameFromAttribute(r)},o&&{dateLevel:o}),i&&{alwaysIncluded:`${i}`}),(n==null?void 0:n.length)&&{ids:n.join(",")})).toString();return this.httpClient.get(`api/elasticubes/hierarchies?${s}`).then((d=[])=>P.isUndefined(i)&&(n==null?void 0:n.length)?d.filter(({_id:p})=>n.includes(p)):d)});_t(this,"patchDashboard",(t,r,n)=>{const i=new URLSearchParams(R({},n&&{sharedMode:"true"})).toString();return this.httpClient.patch(`api/v1/dashboards/${t}?${i}`,r)});_t(this,"addWidgetToDashboard",(t,r,n)=>{const i=new URLSearchParams(R({},n&&{sharedMode:"true"})).toString();return this.httpClient.post(`api/v1/dashboards/${t}/widgets?${i}`,r)});_t(this,"deleteWidgetFromDashboard",(t,r,n)=>{const i=new URLSearchParams(R({},n&&{sharedMode:"true"})).toString();return this.httpClient.delete(`api/v1/dashboards/${t}/widgets/${r}?${i}`)});_t(this,"patchWidgetInDashboard",(t,r,n,i)=>{const a=new URLSearchParams(R({},i&&{sharedMode:"true"})).toString();return this.httpClient.patch(`api/v1/dashboards/${t}/widgets/${r}?${a}`,n)});_t(this,"getSharedFormulas",t=>pt(this,null,function*(){return(yield Promise.all(t.map(this.getSharedFormula))).filter(mW).reduce((n,i)=>(n[i.oid]=i,n),{})}));_t(this,"getSharedFormula",t=>pt(this,null,function*(){return this.httpClient.get(`api/v1/formulas/${t}?flat=true`)}));_t(this,"getDataSourceFields",(t,r)=>{const{offset:n=0,count:i=9999}=r||{};return this.httpClient.post(`api/datasources/${encodeURIComponent(t)}/fields/search`,{offset:n,count:i,term:r==null?void 0:r.searchValue})});_t(this,"exportJaqlToXlsx",t=>this.httpClient.post("api/v1/export/jaql/xlsx",t,{},void 0,{returnBlob:!0}));if(!t)throw new U.TranslatableError("errors.httpClientNotFound");this.httpClient=t,this.defaultDataSource=r}}function mW(e){return!!e}const PC=()=>{const{app:e}=y.useSisenseContext();return{restApi:k.useMemo(()=>e&&new zc(e.httpClient,e.defaultDataSource),[e]),isReady:!!e}};class gW extends U.TranslatableError{constructor(){super("errors.restApiNotReady")}}const vW=e=>{const{isReady:t,restApi:r}=PC(),[n,i]=k.useState(),[a,o]=k.useState(),s=wW();return k.useEffect(()=>{if(!s||!t||!r)return;pt(exports,null,function*(){try{const c=CW(e,s),d=yW(c);if(d)i(d);else{xW(e);let h;switch(e){case"world":h=r.getCountriesGeoJson;break;case"usa":h=r.getUsaStatesGeoJson;break;default:throw new U.TranslatableError("errors.unsupportedMapType",{mapType:e})}const p=yield h();if(!p)throw new U.TranslatableError("errors.mapLoadingFailed");const m=e==="world"?_W(p):p;bW(m,c),i(m)}}catch(c){o(c)}})},[r,t,e,s]),{geoJson:n,error:a}};function yW(e){const t=localStorage.getItem(e);if(t)return JSON.parse(t)}function bW(e,t){localStorage.setItem(t,JSON.stringify(e))}function _W(e){const t=U.cloneDeep(e);return t.features.forEach(r=>{var n;r.id==="-99"&&(r.id=(n=r.properties)==null?void 0:n.name)}),t}function wW(){const{app:e}=y.useSisenseContext();return e==null?void 0:e.settings.serverVersion}function CW(e,t){return`geoJson_${e}_${t}`}function xW(e){Object.keys(localStorage).forEach(r=>{r.startsWith(`geoJson_${e}`)&&localStorage.removeItem(r)})}const TW=({chartData:e,dataOptions:t,designOptions:r,onDataPointClick:n})=>{const{themeSettings:i}=y.useThemeContext(),{geoJson:a}=vW(r.mapType),o=k.useMemo(()=>t.color?e.geoData:e.geoData.map(u=>H(R({},u),{color:P.getPaletteColor(i.palette.variantColors,0)})),[e.geoData,t,i]),s=k.useCallback((u,c)=>{if(!n)return;const d=pW(u,t);n(d,c)},[t,n]);return O.jsx(O.Fragment,{children:a&&O.jsx(u7,{geoJson:a,geoData:o,dataOptions:{originalValueTitle:t.color?P.getDataOptionTitle(t.color):"",onAreaClick:s},mapType:r.mapType})})},AC=e=>e.type==="areamap"&&"geoData"in e,SW=e=>"geo"in e,MW=e=>"mapType"in e,EW=e=>!!e.chartData&&AC(e.chartData)&&SW(e.dataOptions)&&MW(e.designOptions),PW={dataOptions:N4,data:h8,designOptions:m8,renderer:{ChartRendererComponent:TW,isCorrectRendererProps:EW}},AW={[U.DateLevels.Years]:"attribute.datetimeName.years",[U.DateLevels.Quarters]:"attribute.datetimeName.quarters",[U.DateLevels.Months]:"attribute.datetimeName.months",[U.DateLevels.Weeks]:"attribute.datetimeName.weeks",[U.DateLevels.Days]:"attribute.datetimeName.days",[U.DateLevels.AggHours]:"attribute.datetimeName.hours",[U.DateLevels.AggMinutesRoundTo15]:"attribute.datetimeName.minutes"};function RC(e,t,r){return r?e(AW[r],{columnName:t}):t}function DC(e,t,r){const n=U.getColumnNameFromAttribute(e),i=r?RC(r,n,t):n;return new U.DimensionalLevelAttribute(i,e.expression,t,U.DimensionalLevelAttribute.getDefaultFormatForGranularity(t),void 0,void 0,e.dataSource)}const Ui=e=>{var t;return{x:e.category.map(r=>P.normalizeColumn(r)),y:e.value.map(r=>P.normalizeMeasureColumn(r)),breakBy:((t=e.breakBy)==null?void 0:t.map(r=>P.normalizeColumn(r)))||[],seriesToColorMap:e.seriesToColorMap}};function eo(e){return[...e.x.map(fp),...e.breakBy.map(fp)].filter(NC)}function to(e){return e.y.map(fp).filter(P.isMeasureColumn)}function ro(e){return"category"in e&&U.isArray(e.category)&&"value"in e&&U.isArray(e.value)&&"breakBy"in e&&U.isArray(e.breakBy)}function no(e){return"x"in e&&U.isArray(e.x)&&e.x.every(P.isStyledColumn)&&"y"in e&&U.isArray(e.y)&&e.y.every(P.isStyledColumn)&&"breakBy"in e&&U.isArray(e.breakBy)&&e.breakBy.every(P.isStyledColumn)}function fp(e){return e.column}function NC(e){return!P.isMeasureColumn(e)}function Hc(e){return e.y.some(t=>t.showOnRightAxis)}function RW(e){const t=P.normalizeColumn(e.date),r=P.normalizeMeasureColumn(e.value),n=t.column;return U.isDimensionalLevelAttribute(n)&&n.granularity!==U.DateLevels.Days&&(console.warn('The calendar heatmap chart’s "date" data option supports only day level granularity. Converted to day level.'),t.column=DC(n,U.DateLevels.Days)),{date:t,value:r}}function DW(e){const t=e.date.column;return NC(t)?[t]:[]}function NW(e){const t=e.value.column;return P.isMeasureColumn(t)?[t]:[]}function kW(e){if(!("date"in e&&e.date&&"value"in e&&e.value))return!1;const r=P.normalizeColumn(e.date);return U.isDatetime(r.column.type)}function kC(e){return"date"in e&&"value"in e&&typeof e.date=="object"&&typeof e.value=="object"}function LW(e){const t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())}function OW(e,t){const r=P.getColumnByName(t,e.date.column.name),n=P.getColumnByName(t,e.value.column.name);if(!r||!n)return{type:P.CALENDAR_HEATMAP_DATA_TYPE,values:[]};const i=t.rows.map(a=>{const o=P.getValue(a,r),s=P.getValue(a,n),{compareValue:u,color:c}=P.getValues(a,[n])[0],h=!(u!=null&&u.valueIsNaN)&&!(u!=null&&u.valueUndefined)?s:void 0,p=P.isBlurred(a,n);return{date:LW(o),value:h,color:c,blur:p}});return{type:P.CALENDAR_HEATMAP_DATA_TYPE,values:i}}function LC(e){return e.type===P.CALENDAR_HEATMAP_DATA_TYPE}function IW(e){var t,r,n,i,a,o,s,u,c,d,h,p,m,v,b,_,w,C,S,T,M,E,D,N;return H(R({},rr),{width:e.width,height:e.height,subtype:e.subtype||P.CALENDAR_HEATMAP_DEFAULTS.SUBTYPE,viewType:e.viewType||P.CALENDAR_HEATMAP_DEFAULTS.VIEW_TYPE,startOfWeek:e.startOfWeek||P.CALENDAR_HEATMAP_DEFAULTS.START_OF_WEEK,cellLabels:{enabled:(r=(t=e.cellLabels)==null?void 0:t.enabled)!=null?r:P.CALENDAR_HEATMAP_DEFAULTS.SHOW_CELL_LABEL,style:((n=e.cellLabels)==null?void 0:n.textStyle)||((i=e.cellLabels)==null?void 0:i.style)},dayLabels:{enabled:(o=(a=e.dayLabels)==null?void 0:a.enabled)!=null?o:P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL,style:((s=e.dayLabels)==null?void 0:s.textStyle)||((u=e.dayLabels)==null?void 0:u.style)},monthLabels:{enabled:(d=(c=e.monthLabels)==null?void 0:c.enabled)!=null?d:P.CALENDAR_HEATMAP_DEFAULTS.SHOW_MONTH_LABEL,style:((h=e.monthLabels)==null?void 0:h.textStyle)||((p=e.monthLabels)==null?void 0:p.style)},weekends:{enabled:(v=(m=e.weekends)==null?void 0:m.enabled)!=null?v:P.CALENDAR_HEATMAP_DEFAULTS.WEEKEND_ENABLED,days:(_=(b=e.weekends)==null?void 0:b.days)!=null?_:[...P.CALENDAR_HEATMAP_DEFAULTS.WEEKEND_DAYS],cellColor:(C=(w=e.weekends)==null?void 0:w.cellColor)!=null?C:P.CALENDAR_HEATMAP_DEFAULTS.WEEKEND_CELL_COLOR,hideValues:(T=(S=e.weekends)==null?void 0:S.hideValues)!=null?T:P.CALENDAR_HEATMAP_DEFAULTS.WEEKEND_HIDE_VALUES},pagination:{enabled:(E=(M=e.pagination)==null?void 0:M.enabled)!=null?E:P.CALENDAR_HEATMAP_DEFAULTS.SHOW_PAGINATION,style:(D=e.pagination)==null?void 0:D.textStyle,startMonth:(N=e.pagination)==null?void 0:N.startMonth}})}function FW(e){return typeof e=="object"&&e!==null}function $W(e=Zs(),t=Ks){return(r,n)=>Qs(r,n,e,t)}function OC(){const{app:e}=y.useSisenseContext();return k.useCallback((t,r)=>$W(e==null?void 0:e.settings.locale,e==null?void 0:e.settings.dateConfig)(t,r),[e==null?void 0:e.settings.locale,e==null?void 0:e.settings.dateConfig])}var IC={exports:{}};(function(e,t){(function(r,n){e.exports=n(k)})(typeof self!="undefined"?self:O.commonjsGlobal,function(r){return function(n){function i(o){if(a[o])return a[o].exports;var s=a[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var a={};return i.m=n,i.c=a,i.d=function(o,s,u){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=0)}([function(n,i,a){function o(){return o=Object.assign?Object.assign.bind():function(C){for(var S=1;S<arguments.length;S++){var T=arguments[S];for(var M in T)Object.prototype.hasOwnProperty.call(T,M)&&(C[M]=T[M])}return C},o.apply(this,arguments)}function s(C){return h(C)||d(C)||c(C)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(C,S){if(C){if(typeof C=="string")return p(C,S);var T=Object.prototype.toString.call(C).slice(8,-1);return T==="Object"&&C.constructor&&(T=C.constructor.name),T==="Map"||T==="Set"?Array.from(C):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?p(C,S):void 0}}function d(C){if(typeof Symbol!="undefined"&&C[Symbol.iterator]!=null||C["@@iterator"]!=null)return Array.from(C)}function h(C){if(Array.isArray(C))return p(C)}function p(C,S){(S==null||S>C.length)&&(S=C.length);for(var T=0,M=new Array(S);T<S;T++)M[T]=C[T];return M}function m(C){"@babel/helpers - typeof";return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(C)}Object.defineProperty(i,"__esModule",{value:!0}),a.d(i,"HighchartsReact",function(){return w});var v=a(1),b=a.n(v),_=typeof window!="undefined"?v.useLayoutEffect:v.useEffect,w=Object(v.memo)(Object(v.forwardRef)(function(C,S){var T=Object(v.useRef)(),M=Object(v.useRef)(),E=Object(v.useRef)(C.constructorType),D=Object(v.useRef)(C.highcharts);return _(function(){function N(){var B=C.highcharts||(typeof window=="undefined"?"undefined":m(window))==="object"&&window.Highcharts,G=C.constructorType||"chart";B?B[G]?C.options?M.current=B[G](T.current,C.options,C.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(M.current){if(C.allowChartUpdate!==!1)if(C.constructorType!==E.current||C.highcharts!==D.current)E.current=C.constructorType,D.current=C.highcharts,N();else if(!C.immutable&&M.current){var F;(F=M.current).update.apply(F,[C.options].concat(s(C.updateArgs||[!0,!0])))}else N()}else N()},[C.options,C.allowChartUpdate,C.updateArgs,C.containerProps,C.highcharts,C.constructorType]),_(function(){return function(){M.current&&(M.current.destroy(),M.current=null)}},[]),Object(v.useImperativeHandle)(S,function(){return{get chart(){return M.current},container:T}},[]),b.a.createElement("div",o({},C.containerProps,{ref:T}))}));i.default=w},function(n,i){n.exports=r}])})})(IC);var BW=IC.exports;const zW=O.getDefaultExportFromCjs(BW);var FC={exports:{}};(function(e){(function(t){e.exports?e.exports=t:t(Highcharts)})(function(t){var r=t.relativeLength;t.wrap(t.seriesTypes.column.prototype,"translate",function(n){var i=this.options,a=i.topMargin||0,o=i.bottomMargin||0;n.call(this),this.points.forEach(function(s){var u=s.shapeArgs,c=u.width,d=u.height,h=u.x,p=u.y,m=r(i.borderRadiusTopLeft||0,c),v=r(i.borderRadiusTopRight||0,c),b=r(i.borderRadiusBottomRight||0,c),_=r(i.borderRadiusBottomLeft||0,c);if(m||v||b||_){var w=Math.min(c,d)/2;m>w&&(m=w),v>w&&(v=w),b>w&&(b=w),_>w&&(_=w),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",h+m,p+a],["L",h+c-v,p+a],["C",h+c-v/2,p,h+c,p+v/2,h+c,p+v],["L",h+c,p+d-b],["C",h+c,p+d-b/2,h+c-b/2,p+d,h+c-b,p+d+o],["L",h+_,p+d+o],["C",h+_/2,p+d,h,p+d-_/2,h,p+d-_],["L",h,p+m],["C",h,p+m/2,h+m/2,p,h+m,p],["Z"]]}}})})})})(FC);var HW=FC.exports;const WW=O.getDefaultExportFromCjs(HW);var $C={exports:{}};(function(e){(function(t){e.exports?(t.default=t,e.exports=t):t(typeof Highcharts!="undefined"?Highcharts:void 0)})(function(t){function r(n,i,a,o){n.hasOwnProperty(i)||(n[i]=o.apply(null,a),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:n[i]}})))}t=t?t._modules:{},r(t,"Series/NodesComposition.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,i){n=n.series;var a=n.prototype,o=n.prototype.pointClass.prototype,s=i.defined,u=i.extend,c=i.find,d=i.merge,h=i.pick,p;return function(m){function v(){return this.data=[].concat(this.points||[],this.nodes),a.destroy.apply(this,arguments)}function b(){this.nodes&&(this.nodes.forEach(function(S){S.destroy()}),this.nodes.length=0),a.setData.apply(this,arguments)}function _(S){var T=arguments,M=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];S!=="select"&&M.forEach(function(E){E&&E.series&&(o.setState.apply(E,T),E.isNode||(E.fromNode.graphic&&o.setState.apply(E.fromNode,T),E.toNode&&E.toNode.graphic&&o.setState.apply(E.toNode,T)))}),o.setState.apply(this,T)}function w(S,T,M,E){var D=this,N=this.series.options.nodes,F=this.series.options.data,B=F&&F.length||0,G=F&&F[this.index];o.update.call(this,S,this.isNode?!1:T,M,E),this.isNode&&(S=(N||[]).reduce(function(Y,$,X){return D.id===$.id?X:Y},-1),E=d(N&&N[S]||{},F&&F[this.index]||{}),F&&(G?F[this.index]=G:F.length=B),N?0<=S?N[S]=E:N.push(E):this.series.options.nodes=[E],h(T,!0)&&this.series.chart.redraw(M))}var C=[];m.compose=function(S,T){return C.indexOf(S)===-1&&(C.push(S),S=S.prototype,S.setNodeState=_,S.setState=_,S.update=w),C.indexOf(T)===-1&&(C.push(T),S=T.prototype,S.destroy=v,S.setData=b),T},m.createNode=function(S){var T=this.pointClass,M=function(N,F){return c(N,function(B){return B.id===F})},E=M(this.nodes,S);if(!E){M=this.options.nodes&&M(this.options.nodes,S);var D=new T().init(this,u({className:"highcharts-node",isNode:!0,id:S,y:1},M));D.linksTo=[],D.linksFrom=[],D.getSum=function(){var N=0,F=0;return D.linksTo.forEach(function(B){N+=B.weight||0}),D.linksFrom.forEach(function(B){F+=B.weight||0}),Math.max(N,F)},D.offset=function(N,F){for(var B=0,G=0;G<D[F].length;G++){if(D[F][G]===N)return B;B+=D[F][G].weight}},D.hasShape=function(){var N=0;return D.linksTo.forEach(function(F){F.outgoing&&N++}),!D.linksTo.length||N!==D.linksTo.length},D.index=this.nodes.push(D)-1,E=D}return E.formatPrefix="node",E.name=E.name||E.options.id||"",E.mass=h(E.options.mass,E.options.marker&&E.options.marker.radius,this.options.marker&&this.options.marker.radius,4),E},m.destroy=v,m.generatePoints=function(){var S=this,T=this.chart,M={};a.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(function(E){E.linksFrom.length=0,E.linksTo.length=0,E.level=E.options.level}),this.points.forEach(function(E){s(E.from)&&(M[E.from]||(M[E.from]=S.createNode(E.from)),M[E.from].linksFrom.push(E),E.fromNode=M[E.from],T.styledMode?E.colorIndex=h(E.options.colorIndex,M[E.from].colorIndex):E.color=E.options.color||M[E.from].color),s(E.to)&&(M[E.to]||(M[E.to]=S.createNode(E.to)),M[E.to].linksTo.push(E),E.toNode=M[E.to]),E.name=E.name||E.id},this),this.nodeLookup=M},m.setNodeState=_,m.updateNode=w}(p||(p={})),p}),r(t,"Series/Sankey/SankeyPoint.js",[t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,i,a){var o=this&&this.__extends||function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var m in p)p.hasOwnProperty(m)&&(h[m]=p[m])},u(c,d)};return function(c,d){function h(){this.constructor=c}u(c,d),c.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}}(),s=a.defined;return function(u){function c(){var d=u!==null&&u.apply(this,arguments)||this;return d.className=void 0,d.fromNode=void 0,d.level=void 0,d.linkBase=void 0,d.linksFrom=void 0,d.linksTo=void 0,d.mass=void 0,d.nodeX=void 0,d.nodeY=void 0,d.options=void 0,d.series=void 0,d.toNode=void 0,d}return o(c,u),c.prototype.applyOptions=function(d,h){return n.prototype.applyOptions.call(this,d,h),s(this.options.level)&&(this.options.column=this.column=this.options.level),this},c.prototype.getClassName=function(){return(this.isNode?"highcharts-node ":"highcharts-link ")+n.prototype.getClassName.call(this)},c.prototype.getFromNode=function(){for(var d=-1,h,p=0;p<this.linksTo.length;p++){var m=this.linksTo[p];m.fromNode.column>d&&m.fromNode!==this&&(h=m.fromNode,d=h.column)}return{fromNode:h,fromColumn:d}},c.prototype.setNodeColumn=function(){s(this.options.column)||(this.column=this.linksTo.length===0?0:this.getFromNode().fromColumn+1)},c.prototype.isValid=function(){return this.isNode||typeof this.weight=="number"},c}(i.seriesTypes.column.prototype.pointClass)}),r(t,"Series/Sankey/SankeySeriesDefaults.js",[],function(){return{borderWidth:0,colorByPoint:!0,curveFactor:.33,dataLabels:{enabled:!0,backgroundColor:"none",crop:!1,nodeFormat:void 0,nodeFormatter:function(){return this.point.name},format:void 0,formatter:function(){},inside:!0},inactiveOtherPoints:!0,linkOpacity:.5,opacity:1,minLinkWidth:0,nodeWidth:20,nodePadding:10,showInLegend:!1,states:{hover:{linkOpacity:1,opacity:1},inactive:{linkOpacity:.1,opacity:.1,animation:{duration:50}}},tooltip:{followPointer:!0,headerFormat:'<span style="font-size: 10px">{series.name}</span><br/>',pointFormat:"{point.fromNode.name} → {point.toNode.name}: <b>{point.weight}</b><br/>",nodeFormat:"{point.name}: <b>{point.sum}</b><br/>"}}}),r(t,"Series/Sankey/SankeyColumnComposition.js",[t["Core/Utilities.js"]],function(n){var i=n.defined,a=n.relativeLength,o;return function(s){s.compose=function(c,d){return c.sankeyColumn=new u(c,d),c};var u=function(){function c(d,h){this.points=d,this.series=h}return c.prototype.getTranslationFactor=function(d){for(var h=this.points,p=h.slice(),m=d.options.minLinkWidth||0,v=0,b,_=(d.chart.plotSizeY||0)-(d.options.borderWidth||0)-(h.length-1)*d.nodePadding;h.length;){for(v=_/h.sankeyColumn.sum(),d=!1,b=h.length;b--;)h[b].getSum()*v<m&&(h.splice(b,1),_-=m,d=!0);if(!d)break}return h.length=0,p.forEach(function(w){h.push(w)}),v},c.prototype.top=function(d){var h=this.series,p=h.nodePadding,m=this.points.reduce(function(v,b){return 0<v&&(v+=p),b=Math.max(b.getSum()*d,h.options.minLinkWidth||0),v+b},0);return((h.chart.plotSizeY||0)-m)/2},c.prototype.left=function(d){var h=this.series,p=h.chart,m=h.options.equalNodes,v=p.inverted?p.plotHeight:p.plotWidth,b=h.nodePadding,_=this.points.reduce(function(w,C){return 0<w&&(w+=b),C=m?v/C.series.nodes.length-b:Math.max(C.getSum()*d,h.options.minLinkWidth||0),w+C},0);return((p.plotSizeX||0)-Math.round(_))/2},c.prototype.sum=function(){return this.points.reduce(function(d,h){return d+h.getSum()},0)},c.prototype.offset=function(d,h){var p=this.points,m=this.series,v=m.nodePadding,b=0;if(m.is("organization")&&d.hangsFrom)return{absoluteTop:d.hangsFrom.nodeY};for(var _=0;_<p.length;_++){var w=p[_].getSum(),C=Math.max(w*h,m.options.minLinkWidth||0),S=d.options[m.chart.inverted?"offsetHorizontal":"offsetVertical"],T=d.options.offset||0;if(w=w?C+v:0,p[_]===d)return{relativeTop:b+(i(S)?a(S,C):a(T,w))};b+=w}},c}();s.SankeyColumnAdditions=u}(o||(o={})),o}),r(t,"Series/TreeUtilities.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(n,i){function a(p,m){var v=m.before,b=m.idRoot,_=m.mapIdToNode[b],w=m.points[p.i],C=w&&w.options||{},S=[],T=0;return p.levelDynamic=p.level-(m.levelIsConstant!==!1?0:_.level),p.name=h(w&&w.name,""),p.visible=b===p.id||m.visible===!0,typeof v=="function"&&(p=v(p,m)),p.children.forEach(function(M,E){var D=o({},m);o(D,{index:E,siblings:p.children.length,visible:p.visible}),M=a(M,D),S.push(M),M.visible&&(T+=M.val)}),v=h(C.value,T),p.visible=0<=v&&(0<T||p.visible),p.children=S,p.childrenTotal=T,p.isLeaf=p.visible&&!T,p.val=v,p}var o=i.extend,s=i.isArray,u=i.isNumber,c=i.isObject,d=i.merge,h=i.pick;return{getColor:function(p,m){var v=m.index,b=m.mapOptionsToLevel,_=m.parentColor,w=m.parentColorIndex,C=m.series,S=m.colors,T=m.siblings,M=C.points,E=C.chart.options.chart,D;if(p){if(M=M[p.i],p=b[p.level]||{},b=M&&p.colorByPoint)var N=M.index%(S?S.length:E.colorCount),F=S&&S[N];C.chart.styledMode||(S=M&&M.options.color,E=p&&p.color,(D=_)&&(D=(D=p&&p.colorVariation)&&D.key==="brightness"&&v&&T?n.parse(_).brighten(v/T*D.to).get():_),D=h(S,E,F,D,C.color));var B=h(M&&M.options.colorIndex,p&&p.colorIndex,N,w,m.colorIndex)}return{color:D,colorIndex:B}},getLevelOptions:function(p){var m={};if(c(p)){var v=u(p.from)?p.from:1,b=p.levels,_={},w=c(p.defaults)?p.defaults:{};for(s(b)&&(_=b.reduce(function(C,S){if(c(S)&&u(S.level)){var T=d({},S),M=h(T.levelIsConstant,w.levelIsConstant);delete T.levelIsConstant,delete T.level,S=S.level+(M?0:v-1),c(C[S])?d(!0,C[S],T):C[S]=T}return C},{})),b=u(p.to)?p.to:1,p=0;p<=b;p++)m[p]=d({},w,c(_[p])?_[p]:{})}return m},setTreeValues:a,updateRootId:function(p){if(c(p)){var m=c(p.options)?p.options:{};m=h(p.rootNode,m.rootId,""),c(p.userOptions)&&(p.userOptions.rootId=m),p.rootNode=m}return m}}}),r(t,"Series/Sankey/SankeySeries.js",[t["Core/Color/Color.js"],t["Core/Globals.js"],t["Series/NodesComposition.js"],t["Series/Sankey/SankeyPoint.js"],t["Series/Sankey/SankeySeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Series/Sankey/SankeyColumnComposition.js"],t["Series/TreeUtilities.js"],t["Core/Utilities.js"]],function(n,i,a,o,s,u,c,d,h){var p=this&&this.__extends||function(){var M=function(E,D){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,F){N.__proto__=F}||function(N,F){for(var B in F)F.hasOwnProperty(B)&&(N[B]=F[B])},M(E,D)};return function(E,D){function N(){this.constructor=E}M(E,D),E.prototype=D===null?Object.create(D):(N.prototype=D.prototype,new N)}}(),m=u.series,v=u.seriesTypes.column,b=d.getLevelOptions;d=h.extend;var _=h.isObject,w=h.merge,C=h.pick,S=h.relativeLength,T=h.stableSort;return h=function(M){function E(){var D=M!==null&&M.apply(this,arguments)||this;return D.colDistance=void 0,D.data=void 0,D.group=void 0,D.nodeLookup=void 0,D.nodePadding=void 0,D.nodes=void 0,D.nodeWidth=void 0,D.options=void 0,D.points=void 0,D.translationFactor=void 0,D}return p(E,M),E.getDLOptions=function(D){var N=_(D.optionsPoint)?D.optionsPoint.dataLabels:{};return D=_(D.level)?D.level.dataLabels:{},w({style:{}},D,N)},E.prototype.createNodeColumns=function(){var D=[];this.nodes.forEach(function(F){F.setNodeColumn(),D[F.column]||(D[F.column]=c.compose([],this)),D[F.column].push(F)},this);for(var N=0;N<D.length;N++)typeof D[N]=="undefined"&&(D[N]=c.compose([],this));return D},E.prototype.order=function(D,N){var F=this;typeof D.level=="undefined"&&(D.level=N,D.linksFrom.forEach(function(B){B.toNode&&F.order(B.toNode,N+1)}))},E.prototype.generatePoints=function(){a.generatePoints.apply(this,arguments);var D=this;this.orderNodes&&(this.nodes.filter(function(N){return N.linksTo.length===0}).forEach(function(N){D.order(N,0)}),T(this.nodes,function(N,F){return N.level-F.level}))},E.prototype.getNodePadding=function(){var D=this.options.nodePadding||0;if(this.nodeColumns){var N=this.nodeColumns.reduce(function(F,B){return Math.max(F,B.length)},0);N*D>this.chart.plotSizeY&&(D=this.chart.plotSizeY/N)}return D},E.prototype.hasData=function(){return!!this.processedXData.length},E.prototype.pointAttribs=function(D,N){if(!D)return{};var F=this,B=F.mapOptionsToLevel[(D.isNode?D.level:D.fromNode.level)||0]||{},G=D.options,Y=B.states&&B.states[N||""]||{};N=["colorByPoint","borderColor","borderWidth","linkOpacity","opacity"].reduce(function(X,V){return X[V]=C(Y[V],G[V],B[V],F.options[V]),X},{});var $=C(Y.color,G.color,N.colorByPoint?D.color:B.color);return D.isNode?{fill:$,stroke:N.borderColor,"stroke-width":N.borderWidth,opacity:N.opacity}:{fill:n.parse($).setOpacity(N.linkOpacity).get()}},E.prototype.drawTracker=function(){v.prototype.drawTracker.call(this,this.points),v.prototype.drawTracker.call(this,this.nodes)},E.prototype.drawPoints=function(){v.prototype.drawPoints.call(this,this.points),v.prototype.drawPoints.call(this,this.nodes)},E.prototype.drawDataLabels=function(){v.prototype.drawDataLabels.call(this,this.points),v.prototype.drawDataLabels.call(this,this.nodes)},E.prototype.translate=function(){this.processedXData||this.processData(),this.generatePoints(),this.nodeColumns=this.createNodeColumns(),this.nodeWidth=S(this.options.nodeWidth,this.chart.plotSizeX);var D=this,N=this.chart,F=this.options,B=this.nodeWidth,G=this.nodeColumns;this.nodePadding=this.getNodePadding(),this.translationFactor=G.reduce(function(Y,$){return Math.min(Y,$.sankeyColumn.getTranslationFactor(D))},1/0),this.colDistance=(N.plotSizeX-B-F.borderWidth)/Math.max(1,G.length-1),D.mapOptionsToLevel=b({from:1,levels:F.levels,to:G.length-1,defaults:{borderColor:F.borderColor,borderRadius:F.borderRadius,borderWidth:F.borderWidth,color:D.color,colorByPoint:F.colorByPoint,levelIsConstant:!0,linkColor:F.linkColor,linkLineWidth:F.linkLineWidth,linkOpacity:F.linkOpacity,states:F.states}}),G.forEach(function(Y){Y.forEach(function($){D.translateNode($,Y)})},this),this.nodes.forEach(function(Y){Y.linksFrom.forEach(function($){($.weight||$.isNull)&&$.to&&(D.translateLink($),$.allowShadow=!1)})})},E.prototype.translateLink=function(D){var N=function(Te,Ne){return Ne=Te.offset(D,Ne)*Y,Math.min(Te.nodeY+Ne,Te.nodeY+(Te.shapeArgs&&Te.shapeArgs.height||0)-$)},F=D.fromNode,B=D.toNode,G=this.chart,Y=this.translationFactor,$=Math.max(D.weight*Y,this.options.minLinkWidth),X=(G.inverted?-this.colDistance:this.colDistance)*this.options.curveFactor,V=N(F,"linksFrom");N=N(B,"linksTo");var Z=F.nodeX,j=this.nodeWidth;B=B.nodeX;var q=D.outgoing,te=B>Z+j;if(G.inverted&&(V=G.plotSizeY-V,N=(G.plotSizeY||0)-N,j=-j,$=-$,te=Z>B),D.shapeType="path",D.linkBase=[V,V+$,N,N+$],te&&typeof N=="number")D.shapeArgs={d:[["M",Z+j,V],["C",Z+j+X,V,B-X,N,B,N],["L",B+(q?j:0),N+$/2],["L",B,N+$],["C",B-X,N+$,Z+j+X,V+$,Z+j,V+$],["Z"]]};else if(typeof N=="number"){X=B-20-$,q=B-20,te=Z+j;var Q=te+20,J=Q+$,ne=V,ae=V+$,oe=ae+20,se=oe+(G.plotHeight-V-$),ce=se+20,me=ce+$,pe=N,we=pe+$,Le=we+20,Ce=ce+.7*$,le=B-.7*$,Ve=te+.7*$;D.shapeArgs={d:[["M",te,ne],["C",Ve,ne,J,ae-.7*$,J,oe],["L",J,se],["C",J,Ce,Ve,me,te,me],["L",B,me],["C",le,me,X,Ce,X,se],["L",X,Le],["C",X,we-.7*$,le,pe,B,pe],["L",B,we],["C",q,we,q,we,q,Le],["L",q,se],["C",q,ce,q,ce,B,ce],["L",te,ce],["C",Q,ce,Q,ce,Q,se],["L",Q,oe],["C",Q,ae,Q,ae,te,ae],["Z"]]}}D.dlBox={x:Z+(B-Z+j)/2,y:V+(N-V)/2,height:$,width:0},D.tooltipPos=G.inverted?[G.plotSizeY-D.dlBox.y-$/2,G.plotSizeX-D.dlBox.x]:[D.dlBox.x,D.dlBox.y+$/2],D.y=D.plotY=1,D.x=D.plotX=1,D.color||(D.color=F.color)},E.prototype.translateNode=function(D,N){var F=this.translationFactor,B=this.chart,G=this.options,Y=D.getSum(),$=Math.max(Math.round(Y*F),this.options.minLinkWidth),X=Math.round(this.nodeWidth),V=Math.round(G.borderWidth)%2/2,Z=N.sankeyColumn.offset(D,F);if(N=Math.floor(C(Z.absoluteTop,N.sankeyColumn.top(F)+Z.relativeTop))+V,V=Math.floor(this.colDistance*D.column+G.borderWidth/2)+S(D.options.offsetHorizontal||0,X)+V,V=B.inverted?B.plotSizeX-V:V,D.sum=Y){D.shapeType="rect",D.nodeX=V,D.nodeY=N,Y=V,F=N,Z=D.options.width||G.width||X;var j=D.options.height||G.height||$;B.inverted&&(Y=V-X,F=B.plotSizeY-N-$,Z=D.options.height||G.height||X,j=D.options.width||G.width||$),D.dlOptions=E.getDLOptions({level:this.mapOptionsToLevel[D.level],optionsPoint:D.options}),D.plotX=1,D.plotY=1,D.tooltipPos=B.inverted?[B.plotSizeY-F-j/2,B.plotSizeX-Y-Z/2]:[Y+Z/2,F+j/2],D.shapeArgs={x:Y,y:F,width:Z,height:j,display:D.hasShape()?"":"none"}}else D.dlOptions={enabled:!1}},E.defaultOptions=w(v.defaultOptions,s),E}(v),a.compose(o,h),d(h.prototype,{animate:m.prototype.animate,createNode:a.createNode,forceDL:!0,invertible:!0,isCartesian:!1,orderNodes:!0,noSharedTooltip:!0,pointArrayMap:["from","to","weight"],pointClass:o,searchPoint:i.noop}),u.registerSeriesType("sankey",h),h}),r(t,"masters/modules/sankey.src.js",[],function(){})})})($C);var jW=$C.exports;const UW=O.getDefaultExportFromCjs(jW);var BC={exports:{}};(function(e){(function(t){e.exports?(t.default=t,e.exports=t):t(typeof Highcharts!="undefined"?Highcharts:void 0)})(function(t){function r(n,i,a,o){n.hasOwnProperty(i)||(n[i]=o.apply(null,a),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:n[i]}})))}t=t?t._modules:{},r(t,"Extensions/SeriesLabel/SeriesLabelDefaults.js",[],function(){return{enabled:!0,connectorAllowed:!1,connectorNeighbourDistance:24,format:void 0,formatter:void 0,minFontSize:null,maxFontSize:null,onArea:null,style:{fontWeight:"bold"},useHTML:!1,boxesToAvoid:[]}}),r(t,"Extensions/SeriesLabel/SeriesLabelUtilities.js",[],function(){function n(a,o,s,u,c,d){return a=(d-o)*(s-a)-(u-o)*(c-a),0<a?!0:!(0>a)}function i(a,o,s,u,c,d,h,p){return n(a,o,c,d,h,p)!==n(s,u,c,d,h,p)&&n(a,o,s,u,c,d)!==n(a,o,s,u,h,p)}return{boxIntersectLine:function(a,o,s,u,c,d,h,p){return i(a,o,a+s,o,c,d,h,p)||i(a+s,o,a+s,o+u,c,d,h,p)||i(a,o+u,a+s,o+u,c,d,h,p)||i(a,o,a,o+u,c,d,h,p)},intersectRect:function(a,o){return!(o.left>a.right||o.right<a.left||o.top>a.bottom||o.bottom<a.top)}}}),r(t,"Extensions/SeriesLabel/SeriesLabel.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Chart/Chart.js"],t["Core/FormatUtilities.js"],t["Core/Defaults.js"],t["Extensions/SeriesLabel/SeriesLabelDefaults.js"],t["Extensions/SeriesLabel/SeriesLabelUtilities.js"],t["Core/Utilities.js"]],function(n,i,a,o,s,u,c){function d(Y,$,X,V,Z){var j=Y.chart,q=Y.options.label||{},te=F(q.onArea,!!Y.area),Q=te||q.connectorAllowed,J=j.boxesToAvoid,ne=Number.MAX_VALUE,ae=Number.MAX_VALUE,oe,se,ce;for(ce=0;J&&ce<J.length;ce+=1)if(T(J[ce],{left:$,right:$+V.width,top:X,bottom:X+V.height}))return!1;for(ce=0;ce<j.series.length;ce+=1){var me=j.series[ce];if(J=me.interpolatedPoints&&b([],me.interpolatedPoints,!0),me.visible&&J){var pe=j.plotHeight/10;for(se=j.plotTop;se<=j.plotTop+j.plotHeight;se+=pe)J.unshift({chartX:j.plotLeft,chartY:se}),J.push({chartX:j.plotLeft+j.plotWidth,chartY:se});for(pe=1;pe<J.length;pe+=1){if(J[pe].chartX>=$-16&&J[pe-1].chartX<=$+V.width+16){if(S($,X,V.width,V.height,J[pe-1].chartX,J[pe-1].chartY,J[pe].chartX,J[pe].chartY))return!1;Y===me&&!oe&&Z&&(oe=S($-16,X-16,V.width+32,V.height+32,J[pe-1].chartX,J[pe-1].chartY,J[pe].chartX,J[pe].chartY))}if((Q||oe)&&(Y!==me||te)){se=$+V.width/2-J[pe].chartX;var we=X+V.height/2-J[pe].chartY;ne=Math.min(ne,se*se+we*we)}}if(!te&&Q&&Y===me&&(Z&&!oe||ne<Math.pow(q.connectorNeighbourDistance||1,2))){for(pe=1;pe<J.length;pe+=1)if(oe=Math.min(Math.pow($+V.width/2-J[pe].chartX,2)+Math.pow(X+V.height/2-J[pe].chartY,2),Math.pow($-J[pe].chartX,2)+Math.pow(X-J[pe].chartY,2),Math.pow($+V.width-J[pe].chartX,2)+Math.pow(X-J[pe].chartY,2),Math.pow($+V.width-J[pe].chartX,2)+Math.pow(X+V.height-J[pe].chartY,2),Math.pow($-J[pe].chartX,2)+Math.pow(X+V.height-J[pe].chartY,2)),oe<ae){ae=oe;var Le=J[pe]}oe=!0}}}return!Z||oe?{x:$,y:X,weight:ne-(Le?ae:0),connectorPoint:Le}:!1}function h(Y){Y.boxesToAvoid=[];var $=Y.labelSeries||[],X=Y.boxesToAvoid;Y.series.forEach(function(V){return(V.points||[]).forEach(function(Z){return(Z.dataLabels||[]).forEach(function(j){var q=j.getBBox(),te=j.translateX+(V.xAxis?V.xAxis.pos:V.chart.plotLeft);j=j.translateY+(V.yAxis?V.yAxis.pos:V.chart.plotTop),X.push({left:te,top:j,right:te+q.width,bottom:j+q.height})})})}),$.forEach(function(V){var Z=V.options.label||{};V.interpolatedPoints=p(V),X.push.apply(X,Z.boxesToAvoid||[])}),Y.series.forEach(function(V){function Z(Ne,Be,Xe){var Je=Math.max(ae,F(Ve,-1/0)),pr=Math.min(ae+se,F(Te,1/0));return Ne>Je&&Ne<=pr-Xe.width&&Be>=oe&&Be<=oe+ce-Xe.height}var j=V.options.label;if(j&&(V.xAxis||V.yAxis)){var q="highcharts-color-"+F(V.colorIndex,"none"),te=!V.labelBySeries,Q=j.minFontSize,J=j.maxFontSize,ne=Y.inverted,ae=ne?V.yAxis.pos:V.xAxis.pos,oe=ne?V.xAxis.pos:V.yAxis.pos,se=Y.inverted?V.yAxis.len:V.xAxis.len,ce=Y.inverted?V.xAxis.len:V.yAxis.len,me=V.interpolatedPoints,pe=F(j.onArea,!!V.area),we=[],Le=V.xData||[],Ce,le=V.labelBySeries;if(pe&&!ne){ne=[V.xAxis.toPixels(Le[0]),V.xAxis.toPixels(Le[Le.length-1])];var Ve=Math.min.apply(Math,ne),Te=Math.max.apply(Math,ne)}if(V.visible&&!V.boosted&&me){for(le||(le=V.name,typeof j.format=="string"?le=w(j.format,V,Y):j.formatter&&(le=j.formatter.call(V)),V.labelBySeries=le=Y.renderer.label(le,0,0,"connector",0,0,j.useHTML).addClass("highcharts-series-label highcharts-series-label-"+V.index+" "+(V.options.className||"")+" "+q),Y.renderer.styledMode||(q=typeof V.color=="string"?V.color:"#666666",le.css(E({color:pe?Y.renderer.getContrast(q):q},j.style||{})),le.attr({opacity:Y.renderer.forExport?1:0,stroke:V.color,"stroke-width":1})),Q&&J&&le.css({fontSize:Q+(V.sum||0)/(V.chart.labelSeriesMaxSum||0)*(J-Q)+"px"}),le.attr({padding:0,zIndex:3}).add()),Q=le.getBBox(),Q.width=Math.round(Q.width),ne=me.length-1;0<ne;--ne)pe?(J=me[ne].chartX-Q.width/2,q=(me[ne].chartCenterY||0)-Q.height/2,Z(J,q,Q)&&(Ce=d(V,J,q,Q))):(J=me[ne].chartX+3,q=me[ne].chartY-Q.height-3,Z(J,q,Q)&&(Ce=d(V,J,q,Q,!0)),Ce&&we.push(Ce),J=me[ne].chartX+3,q=me[ne].chartY+3,Z(J,q,Q)&&(Ce=d(V,J,q,Q,!0)),Ce&&we.push(Ce),J=me[ne].chartX-Q.width-3,q=me[ne].chartY+3,Z(J,q,Q)&&(Ce=d(V,J,q,Q,!0)),Ce&&we.push(Ce),J=me[ne].chartX-Q.width-3,q=me[ne].chartY-Q.height-3,Z(J,q,Q)&&(Ce=d(V,J,q,Q,!0))),Ce&&we.push(Ce);if(j.connectorAllowed&&!we.length&&!pe)for(J=ae+se-Q.width;J>=ae;J-=16)for(q=oe;q<oe+ce-Q.height;q+=16)(Ce=d(V,J,q,Q,!0))&&we.push(Ce);we.length?(we.sort(function(Ne,Be){return Be.weight-Ne.weight}),Ce=we[0],(Y.boxesToAvoid||[]).push({left:Ce.x,right:Ce.x+Q.width,top:Ce.y,bottom:Ce.y+Q.height}),(me=Math.sqrt(Math.pow(Math.abs(Ce.x-(le.x||0)),2)+Math.pow(Math.abs(Ce.y-(le.y||0)),2)))&&V.labelBySeries&&(we={opacity:Y.renderer.forExport?1:0,x:Ce.x,y:Ce.y},j={opacity:1},10>=me&&(j={x:we.x,y:we.y},we={}),me=void 0,te&&(me=_(V.options.animation),me.duration*=.2),V.labelBySeries.attr(E(we,{anchorX:Ce.connectorPoint&&(Ce.connectorPoint.plotX||0)+ae,anchorY:Ce.connectorPoint&&(Ce.connectorPoint.plotY||0)+oe})).animate(j,me),V.options.kdNow=!0,V.buildKDTree(),V=V.searchPoint({chartX:Ce.x,chartY:Ce.y},!0))&&(le.closest=[V,Ce.x-(V.plotX||0),Ce.y-(V.plotY||0)])):le&&(V.labelBySeries=le.destroy())}else le&&(V.labelBySeries=le.destroy())}}),D(Y,"afterDrawSeriesLabels")}function p(Y){function $(pe){var we=Math.round((pe.plotX||0)/8)+","+Math.round((pe.plotY||0)/8);ae[we]||(ae[we]=1,V.push(pe))}if(Y.xAxis||Y.yAxis){var X=Y.points,V=[],Z=Y.graph||Y.area,j=Z&&Z.element,q=Y.chart.inverted,te=Y.xAxis,Q=Y.yAxis,J=q?Q.pos:te.pos;q=q?te.pos:Q.pos,te=F((Y.options.label||{}).onArea,!!Y.area);var ne=Q.getThreshold(Y.options.threshold),ae={};if(Y.getPointSpline&&j&&j.getPointAtLength&&!te&&X.length<(Y.chart.plotSizeX||0)/16){for(te=Z.toD&&Z.attr("d"),Z.toD&&Z.attr({d:Z.toD}),Q=j.getTotalLength(),Y=0;Y<Q;Y+=16)ne=j.getPointAtLength(Y),$({chartX:J+ne.x,chartY:q+ne.y,plotX:ne.x,plotY:ne.y});te&&Z.attr({d:te});var oe=X[X.length-1];$({chartX:J+(oe.plotX||0),chartY:q+(oe.plotY||0)})}else for(Q=X.length,Z=void 0,Y=0;Y<Q;Y+=1){oe=X[Y],j=oe.plotX;var se=oe.plotY;if(N(j)&&N(se)){var ce={plotX:j,plotY:se,chartX:J+j,chartY:q+se};if(te&&(ce.chartCenterY=q+(se+F(oe.yBottom,ne))/2),Z){oe=Math.abs(ce.chartX-Z.chartX);var me=Math.abs(ce.chartY-Z.chartY);if(oe=Math.max(oe,me),16<oe)for(oe=Math.ceil(oe/16),me=1;me<oe;me+=1)$({chartX:Z.chartX+me/oe*(ce.chartX-Z.chartX),chartY:Z.chartY+me/oe*(ce.chartY-Z.chartY),chartCenterY:(Z.chartCenterY||0)+me/oe*((ce.chartCenterY||0)-(Z.chartCenterY||0)),plotX:(Z.plotX||0)+me/oe*(j-(Z.plotX||0)),plotY:(Z.plotY||0)+me/oe*(se-(Z.plotY||0))})}$(ce),Z=ce}}return V}}function m(Y){if(this.renderer){var $=this,X=_($.renderer.globalAnimation).duration;$.labelSeries=[],$.labelSeriesMaxSum=0,$.seriesLabelTimer&&c.clearTimeout($.seriesLabelTimer),$.series.forEach(function(V){var Z=V.options.label||{},j=V.labelBySeries,q=j&&j.closest;Z.enabled&&V.visible&&(V.graph||V.area)&&!V.boosted&&$.labelSeries&&($.labelSeries.push(V),Z.minFontSize&&Z.maxFontSize&&V.yData&&(V.sum=V.yData.reduce(function(te,Q){return(te||0)+(Q||0)},0),$.labelSeriesMaxSum=Math.max($.labelSeriesMaxSum||0,V.sum||0)),Y.type==="load"&&(X=Math.max(X,_(V.options.animation).duration)),q&&(typeof q[0].plotX!="undefined"?j.animate({x:q[0].plotX+q[1],y:q[0].plotY+q[2]}):j.attr({opacity:0})))}),$.seriesLabelTimer=B(function(){$.series&&$.labelSeries&&h($)},$.renderer.forExport||!X?0:X)}}function v(Y,$,X,V,Z){var j=Z&&Z.anchorX;Z=Z&&Z.anchorY;var q=X/2;if(N(j)&&N(Z)){var te=[["M",j,Z]],Q=$-Z;0>Q&&(Q=-V-Q),Q<X&&(q=j<Y+X/2?Q:X-Q),Z>$+V?te.push(["L",Y+q,$+V]):Z<$?te.push(["L",Y+q,$]):j<Y?te.push(["L",Y,$+V/2]):j>Y+X&&te.push(["L",Y+X,$+V/2])}return te||[]}var b=this&&this.__spreadArray||function(Y,$,X){if(X||arguments.length===2)for(var V=0,Z=$.length,j;V<Z;V++)!j&&V in $||(j||(j=Array.prototype.slice.call($,0,V)),j[V]=$[V]);return Y.concat(j||Array.prototype.slice.call($))},_=n.animObject,w=a.format,C=o.setOptions,S=u.boxIntersectLine,T=u.intersectRect,M=c.addEvent,E=c.extend,D=c.fireEvent,N=c.isNumber,F=c.pick,B=c.syncTimeout,G=[];return{compose:function(Y,$){G.indexOf(Y)===-1&&(G.push(Y),M(i,"load",m),M(i,"redraw",m)),G.indexOf($)===-1&&(G.push($),$.prototype.symbols.connector=v),G.indexOf(C)===-1&&(G.push(C),C({plotOptions:{series:{label:s}}}))}}}),r(t,"masters/modules/series-label.src.js",[t["Core/Globals.js"],t["Extensions/SeriesLabel/SeriesLabel.js"]],function(n,i){i.compose(n.Chart,n.SVGRenderer)})})})(BC);var VW=BC.exports;const GW=O.getDefaultExportFromCjs(VW);var zC={exports:{}};(function(e){(function(t){e.exports?(t.default=t,e.exports=t):t(typeof Highcharts!="undefined"?Highcharts:void 0)})(function(t){function r(n,i,a,o){n.hasOwnProperty(i)||(n[i]=o.apply(null,a),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:n[i]}})))}t=t?t._modules:{},r(t,"Series/Streamgraph/StreamgraphSeries.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,i){var a=this&&this.__extends||function(){var c=function(d,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var v in m)m.hasOwnProperty(v)&&(p[v]=m[v])},c(d,h)};return function(d,h){function p(){this.constructor=d}c(d,h),d.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}(),o=n.seriesTypes.areaspline,s=i.merge;i=i.extend;var u=function(c){function d(){var h=c!==null&&c.apply(this,arguments)||this;return h.data=void 0,h.points=void 0,h.options=void 0,h}return a(d,c),d.prototype.streamStacker=function(h,p,m){h[0]-=p.total/2,h[1]-=p.total/2,this.stackedYData[m]=h},d.defaultOptions=s(o.defaultOptions,{fillOpacity:1,lineWidth:0,marker:{enabled:!1},stacking:"stream"}),d}(o);return i(u.prototype,{negStacks:!1}),n.registerSeriesType("streamgraph",u),u}),r(t,"masters/modules/streamgraph.src.js",[],function(){})})})(zC);var qW=zC.exports;const YW=O.getDefaultExportFromCjs(qW),XW=()=>{typeof P.Highcharts=="object"&&(GW(P.Highcharts),YW(P.Highcharts),UW(P.Highcharts)),function(e){e.seriesTypes.line.prototype.drawLegendSymbol=e.seriesTypes.area.prototype.drawLegendSymbol,P.Highcharts.wrap(P.Highcharts.Series.types.treemap.prototype,"pointAttribs",function(t,...r){var a;const n=t.call(this,...r),i=r[0];return(a=i.options.custom)!=null&&a.blur&&(n.fill=P.Highcharts.color(i.color).setOpacity(.2).get("rgba"),n.stroke=P.Highcharts.color(n.stroke).setOpacity(.2).get("rgba")),n})}(P.Highcharts),function(e){e.Point.prototype.importEvents=function(){const t=this;this.importedEvents&&this.importedEvents.forEach(function(i){i()}),this.importedEvents=[];const r=e.merge(t.series.options.point,t.options),n=r.events;t.events=n,e.objectEach(n,function(i,a){e.isFunction(i)&&t.importedEvents.push(e.addEvent(t,a,i))})}}(P.Highcharts),WW(P.Highcharts),P.Highcharts.setOptions({plotOptions:{sankey:{dataLabels:{align:"center",verticalAlign:"middle"}}}})};XW();function z1(e){var i,a,o,s;if(!e)return;const t=(a=(i=e.plotOptions)==null?void 0:i.series)==null?void 0:a.dataLabels,r=(s=(o=e.series)==null?void 0:o[0])==null?void 0:s.dataLabels,n=r&&typeof r=="object"?r:t&&typeof t=="object"?t:void 0;if(n)return{backgroundColor:n.backgroundColor,borderColor:n.borderColor}}function ZW(e,t){return e?JSON.stringify(z1(e))!==JSON.stringify(z1(t)):!1}const KW={style:{height:"100%",width:"100%"}},l0=({options:e})=>{var m,v,b,_,w,C,S,T,M,E,D,N,F,B,G,Y,$,X,V;const t=y.usePrevious(e),r=k.useCallback(Z=>{var q,te,Q,J,ne,ae,oe,se;const j=e;!((J=(Q=(te=(q=j==null?void 0:j.plotOptions)==null?void 0:q.series)==null?void 0:te.point)==null?void 0:Q.events)!=null&&J.click)&&!((se=(oe=(ae=(ne=j==null?void 0:j.plotOptions)==null?void 0:ne.series)==null?void 0:ae.point)==null?void 0:oe.events)!=null&&se.contextmenu)&&(Z.container.onclick=null)},[e]),n=Z=>Z==null?void 0:Z.some(({data:j})=>j.some(q=>!!q.marker)),i=(t==null?void 0:t.xAxis)&&(e==null?void 0:e.xAxis)&&((m=t==null?void 0:t.xAxis[0])==null?void 0:m.type)!==((v=e==null?void 0:e.xAxis[0])==null?void 0:v.type),a=!!t&&((b=t==null?void 0:t.navigator)==null?void 0:b.enabled)!==((_=e==null?void 0:e.navigator)==null?void 0:_.enabled),o=n(t==null?void 0:t.series)&&!n(e==null?void 0:e.series),s=!!t&&((w=t==null?void 0:t.chart)==null?void 0:w.type)!==((C=e==null?void 0:e.chart)==null?void 0:C.type),u=!!t&&((E=(M=(T=(S=t==null?void 0:t.xAxis)==null?void 0:S[0])==null?void 0:T.categories)==null?void 0:M.length)!=null?E:0)!==((B=(F=(N=(D=e==null?void 0:e.xAxis)==null?void 0:D[0])==null?void 0:N.categories)==null?void 0:F.length)!=null?B:0),c=!!t&&((G=t==null?void 0:t.series)!=null?G:[]).some((Z,j)=>{var q,te,Q,J,ne,ae;return((te=(q=Z==null?void 0:Z.data)==null?void 0:q.length)!=null?te:0)!==((ae=(ne=(J=(Q=e==null?void 0:e.series)==null?void 0:Q[j])==null?void 0:J.data)==null?void 0:ne.length)!=null?ae:0)}),d=!!t&&(($=(Y=t==null?void 0:t.series)==null?void 0:Y.length)!=null?$:0)!==((V=(X=e==null?void 0:e.series)==null?void 0:X.length)!=null?V:0),h=i||a||s||o||u||c||d||ZW(t,e),p=k.useMemo(()=>U.cloneDeep(e),[e]);return O.jsx(zW,{highcharts:P.Highcharts,options:p,containerProps:KW,immutable:h,callback:r})};function QW(e,t,r,n){return U.baseForOwn(e,function(i,a,o){t(n,r(i),a,o)}),n}function JW(e,t){return function(r,n){return QW(r,e,t(n),{})}}var ej=Object.prototype,tj=ej.toString,rj=JW(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=tj.call(t)),e[t]=r},U.constant(U.identity)),u0=(e=>(e.SUNDAY="sunday",e.MONDAY="monday",e.TUESDAY="tuesday",e.WEDNESDAY="wednesday",e.THURSDAY="thursday",e.FRIDAY="friday",e.SATURDAY="saturday",e))(u0||{});const HC={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},nj=rj(HC);function Js(e){return HC[e]}function ij(e){return nj[e]}function c0(e,t,r=P.SINGLE_LETTER_DAY_DATE_FORMAT){const n=new Date(P.REFERENCE_SUNDAY_DATE),i=Js(e),a=[];for(let o=i;o<i+P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK;o++){const s=new Date(n);s.setDate(n.getDate()+o);const u=t(s,r);a.push(u)}return a}function aj(e){const t=P.getPaletteColor(e.palette.variantColors,0),r=P.scaleBrightness(t,P.CALENDAR_HEATMAP_COLORS.MIN_COLOR_BRIGHTNESS_PERCENT),n=P.scaleBrightness(r,P.CALENDAR_HEATMAP_COLORS.MAX_COLOR_BRIGHTNESS_PERCENT);return{type:"range",minColor:r,maxColor:n}}function oj(e){if(!e)return r=>r;const t=P.createDataColoringFunction({getValueFromDataStructure:r=>{var n;return(n=r.value)!=null?n:0},applyColorToDataStructure:(r,n)=>H(R({},r),{color:r.color||n})});return r=>H(R({},r),{values:t(r.values,e)})}function WC(e,t){if(e==="calendar-heatmap/continuous"){let r;switch(t){case P.ViewType.MONTH:r=1;break;case P.ViewType.QUARTER:r=3;break;case P.ViewType.HALF_YEAR:r=6;break;case P.ViewType.YEAR:r=6;break;default:r=1}const n=Math.ceil(r*5);return{rows:P.CALENDAR_HEATMAP_SIZING.ROWS,cols:n}}else return{rows:P.CALENDAR_HEATMAP_SIZING.ROWS,cols:P.CALENDAR_HEATMAP_SIZING.COLUMNS}}function jC(e,t,r){if(r==="calendar-heatmap/continuous")return e===P.ViewType.YEAR?{cols:1,rows:2}:{cols:1,rows:1};const n=t.height>t.width;switch(e){case P.ViewType.MONTH:return{cols:1,rows:1};case P.ViewType.QUARTER:return n?{cols:1,rows:3}:{cols:3,rows:1};case P.ViewType.HALF_YEAR:return n?{cols:2,rows:3}:{cols:3,rows:2};case P.ViewType.YEAR:return n?{cols:3,rows:4}:t.width/t.height>2.5?{cols:6,rows:2}:{cols:4,rows:3};default:return{cols:1,rows:1}}}function sj(e,t,r){const n=jC(t,e,r),i=e.height-P.CALENDAR_HEATMAP_SIZING.PAGINATION_HEIGHT,a=(n.cols-1)*P.CALENDAR_HEATMAP_SIZING.GAP_WIDTH,o=(n.rows-1)*P.CALENDAR_HEATMAP_SIZING.GAP_HEIGHT,s=(e.width-a-P.CALENDAR_HEATMAP_SIZING.MARGINS.LEFT-P.CALENDAR_HEATMAP_SIZING.MARGINS.RIGHT)/n.cols,u=t!==P.ViewType.MONTH?P.CALENDAR_HEATMAP_SIZING.TITLE_HEIGHT:0,c=(i-o-P.CALENDAR_HEATMAP_SIZING.MARGINS.TOP-P.CALENDAR_HEATMAP_SIZING.MARGINS.BOTTOM)/n.rows-u;return{width:s,height:c}}function lj(e,t,r,n){var d;if(!((d=e.values)!=null&&d.length)){const h=WC(r,n);return{rows:h.rows,cols:h.cols}}const i=e.values.map(h=>new Date(h.date)).sort((h,p)=>h.getTime()-p.getTime()),a=i[0],o=Js(t),u=(a.getDay()-o+P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK)%P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK,c=Math.ceil((i.length+u)/P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK);return{rows:P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK,cols:c}}function uj(e,t){if(e==="calendar-heatmap/split")return{left:0,top:0,right:0};const r=t.width>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL_CHART_SIZE_THRESHOLD;return{left:r?60:0,top:r?30:0,right:10}}function cj(e,t,r,n){const i=e/r,a=t/n,o=Math.min(i,a);return Math.max(P.CALENDAR_HEATMAP_SIZING.MIN_CELL_SIZE,Math.min(P.CALENDAR_HEATMAP_SIZING.MAX_CELL_SIZE,o))}function dj(e,t,r,n,i){const a=sj(e,r,t),o=t==="calendar-heatmap/continuous"?lj(n,i,t,r):WC(t,r),s=uj(t,e),u=a.width-s.left-s.right,c=a.height-s.top,d=cj(u,c,o.cols,o.rows),h=o.cols*d,p=o.rows*d,m=Math.min(u,h)+s.left+s.right,v=Math.min(c,p)+s.top;if(t==="calendar-heatmap/continuous")return{width:Math.floor(m),height:Math.floor(v),cellSize:Math.floor(d)};const b=Math.floor(Math.min(m,v));return{width:b,height:b,cellSize:Math.floor(d)}}function hj(e){return new Date(e.year,e.month,2)}function Dh(e){return{year:e.getFullYear(),month:e.getMonth()}}function Dn(e,t){return e.year!==t.year?e.year-t.year:e.month-t.month}function fj(e,t,r){const n=Dn(e,t)>=0,i=Dn(e,r)<=0;return n&&i}function os(e,t){let{year:r,month:n}=e;for(n+=t;n>11;)n-=12,r++;for(;n<0;)n+=12,r--;return{year:r,month:n}}function Nh(e,t,r){if(e.length>=t)return e;if(e.length===0){const s=new Date,u={year:s.getFullYear(),month:s.getMonth()},c=os(u,t-1);return ki(u,c,r)}const n=e[e.length-1],i=t-e.length,a=os(n,i),o=ki(os(n,1),a,r);return[...e,...o]}function ki(e,t,r){const n=[],i={year:e.year,month:e.month};for(;Dn(i,t)<=0;){const a=hj(i);n.push({year:i.year,month:i.month,monthName:r(a,P.FULL_MONTH_DATE_FORMAT),shortMonthName:r(a,P.SHORT_MONTH_DATE_FORMAT)}),i.month++,i.month>11&&(i.month=0,i.year++)}return n}function pj(e,t,r){if(e.length===0)return ki(t,t,r);const n=e[0];if(Dn(t,n)>=0)return e;const i={year:n.month===0?n.year-1:n.year,month:n.month===0?11:n.month-1};return[...ki(t,i,r),...e]}function mj(e,t,r){if(e.length===0)return ki(t,t,r);const n=e[e.length-1];if(Dn(t,n)<=0)return e;const i={year:n.month===11?n.year+1:n.year,month:n.month===11?0:n.month+1},a=ki(i,t,r);return[...e,...a]}function gj(e){return e<=P.CALENDAR_HEATMAP_DEFAULTS.SHORT_MONTH_NAME_SPLIT_LAYOUT_WIDTH_THRESHOLD}function vj(e,t){if(!e.values||e.values.length===0)return[];const r=new Set,n=[];return e.values.forEach(i=>{const a=i.date.getFullYear(),o=i.date.getMonth(),s=`${a}-${o}`;r.has(s)||(r.add(s),n.push({year:a,month:o,monthName:t(i.date,P.FULL_MONTH_DATE_FORMAT),shortMonthName:t(i.date,P.SHORT_MONTH_DATE_FORMAT)}))}),n.sort((i,a)=>Dn(i,a))}function yj(e,t,r,n){const i=vj(e,t),a=n?d0(n):1;if(!r)return Nh(i,a,t);if(i.length===0){const c=os(r,a-1);return ki(r,c,t)}const o=i[0],s=i[i.length-1];if(fj(r,o,s))return Nh(i,a,t);let u;if(Dn(r,o)<0)u=pj(i,r,t);else{const c=os(r,a-1);u=mj(i,c,t)}return Nh(u,a,t)}function d0(e){switch(e){case P.ViewType.MONTH:return 1;case P.ViewType.QUARTER:return 3;case P.ViewType.HALF_YEAR:return 6;case P.ViewType.YEAR:return 12;default:return 1}}function h0(e,t,r){const n=d0(r),i=e.findIndex(u=>Dn(u,t)===0),a=i>=0?i:0;if(n===1)return e.slice(a,a+1);let o=a,s=Math.min(o+n,e.length);return s-o<n&&e.length>=n&&(o=Math.max(0,e.length-n),s=e.length),e.slice(o,s)}const bj=y.newStyled.div`
23
- display: grid;
24
- column-gap: 30px;
25
- row-gap: 10px;
26
- grid-template-columns: repeat(${e=>e.gridCols}, 1fr);
27
- grid-template-rows: repeat(${e=>e.gridRows}, 1fr);
28
- background-color: transparent;
29
- place-items: center; /* Center each grid item horizontally and vertically */
30
- `,_j=y.newStyled.div`
31
- display: flex;
32
- flex-direction: column;
33
- align-items: center;
34
- `,wj=y.newStyled.h3`
35
- font-size: 13px;
36
- font-weight: 400;
37
- color: #333;
38
- text-align: center;
39
- text-transform: capitalize;
40
- margin: 0;
41
- height: ${P.CALENDAR_HEATMAP_SIZING.TITLE_HEIGHT}px;
42
- `,Cj=({monthCharts:e,availableMonths:t,currentMonth:r,subtype:n,viewType:i,monthLabels:a,size:o})=>{const{themeSettings:s}=y.useThemeContext(),u=k.useMemo(()=>jC(i,o,n),[i,n,o]);if(t.length===0)return null;const c=h0(t,r,i);return O.jsx(bj,{viewType:i,gridCols:u.cols,gridRows:u.rows,children:e.map((d,h)=>{var v,b,_;if(!d)return null;const p=c[h];if(!p)return null;const m=gj((v=d.chart.width)!=null?v:0);return O.jsxs(_j,{children:[(a==null?void 0:a.enabled)&&i!==P.ViewType.MONTH&&n==="calendar-heatmap/split"&&O.jsx(wj,{style:H(R({},a.style),{color:((b=a.style)==null?void 0:b.color)||(s==null?void 0:s.chart.textColor),fontFamily:((_=a.style)==null?void 0:_.fontFamily)||(s==null?void 0:s.typography.fontFamily)}),children:m?p.shortMonthName:p.monthName}),O.jsx(l0,{options:d})]},`${p.year}-${p.month}`)})})},pp=e=>{var n;const t=e.direction==="left"?"csdk-scale-x-[-1]":"",r=e.disabled?"csdk-opacity-0":"";return O.jsx("svg",H(R({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{className:[e.className,t,r].join(" "),children:O.jsx("path",{fill:(n=e.fill)!=null?n:e.theme.typography.primaryTextColor,fillRule:"nonzero",d:"M13.34 12.5l-2.72-3.175a.5.5 0 1 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.998 3.5a.5.5 0 1 1-.76-.65l2.72-3.175z"})}))},mp=e=>{var n;const t=e.direction==="left"?"csdk-scale-x-[-1]":"",r=e.disabled?"csdk-opacity-0":"";return O.jsx("svg",H(R({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{className:[e.className,t,r].join(" "),children:O.jsx("path",{fill:(n=e.fill)!=null?n:e.theme.typography.primaryTextColor,fillRule:"nonzero",d:"M11.34 12.5L8.62 9.325a.5.5 0 0 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.998 3.5a.5.5 0 1 1-.76-.65l2.72-3.175zm.279-3.175a.5.5 0 0 1 .76-.65l2.998 3.5a.5.5 0 0 1 0 .65l-2.999 3.5a.5.5 0 1 1-.76-.65l2.72-3.175-2.72-3.175z"})}))},H1=e=>{var n;const t=e.direction==="left"?"csdk-scale-x-[-1]":"",r=e.disabled?"csdk-opacity-0":"";return O.jsx("svg",H(R({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{className:[e.className,t,r].join(" "),children:O.jsxs("g",{fill:(n=e.fill)!=null?n:e.theme.typography.primaryTextColor,fillRule:"nonzero",children:[O.jsx("path",{d:"M11.61 15.62l2.97-3.33-2.83-3.16a.39.39 0 1 1 .59-.5l3.05 3.42a.39.39 0 0 1 0 .5l-3.19 3.58a.39.39 0 1 1-.59-.5zm-3.87 0l2.97-3.33-2.83-3.16a.39.39 0 1 1 .59-.5l3.05 3.42a.39.39 0 0 1 0 .5l-3.19 3.58a.39.39 0 1 1-.59-.5z"}),O.jsx("path",{d:"M16.26 15.86a.39.39 0 0 1-.77 0v-6.97a.39.39 0 0 1 .77 0v6.97z"})]})}))};function xj(e,t,r){const n=h0(e,t,r);if(n.length===0)return"";if(r==="month"){const o=n[0];return o?`${o.monthName} ${o.year}`:""}const i=n[0].year,a=n[n.length-1].year;return i===a?`${i}`:`${i} - ${a}`}const Tj=y.newStyled.div`
43
- display: flex;
44
- justify-content: center;
45
- align-items: center;
46
- padding: 10px 20px;
47
- background-color: transparent;
48
- height: ${P.CALENDAR_HEATMAP_SIZING.PAGINATION_HEIGHT}px;
49
- opacity: 1;
50
- transition: opacity 0.3s ease;
51
- box-sizing: border-box;
52
- `,da=y.newStyled.button`
53
- padding: 0;
54
- background-color: transparent;
55
- border: none;
56
- border-radius: 4px;
57
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- transition: all 0.2s ease;
62
- opacity: ${e=>e.disabled?.3:1};
63
-
64
- &:hover {
65
- background-color: ${e=>e.disabled?"transparent":"rgba(0, 0, 0, 0.05)"};
66
- }
67
- `,Sj=y.newStyled.div`
68
- font-size: 15px;
69
- font-weight: 400;
70
- color: ${({theme:e})=>e.chart.textColor};
71
- font-family: ${({theme:e})=>e.typography.fontFamily};
72
- min-width: 110px;
73
- text-align: center;
74
- margin: 0 10px;
75
- text-transform: capitalize;
76
- `,Mj=({value:e,availableMonths:t,viewType:r,onChange:n,labelStyle:i})=>{const{themeSettings:a}=y.useThemeContext(),{t:o}=O.useTranslation(),s=d0(r),u=t.findIndex(G=>Dn(G,e)===0),c=()=>{const G=t[0];G&&n({year:G.year,month:G.month})},d=()=>{if(u>0){const G=t[u-1];n({year:G.year,month:G.month})}},h=()=>{if(u<t.length-1){const G=t[u+1];n({year:G.year,month:G.month})}},p=()=>{const G=Math.max(0,t.length-s),Y=t[G];Y&&n({year:Y.year,month:Y.month})},m=()=>{const G=Math.max(0,u-s),Y=t[G];Y&&n({year:Y.year,month:Y.month})},v=()=>{const G=Math.min(t.length-s,u+s),Y=t[G];Y&&n({year:Y.year,month:Y.month})},b=u===0,_=s===1?t.length-1:Math.max(0,t.length-s),w=u>=_,C=u>0,S=u<_,T=xj(t,e,r),M=o("calendarHeatmap.navigation.firstMonth"),E=o("calendarHeatmap.navigation.lastMonth"),D=o("calendarHeatmap.navigation.previousMonth"),N=o("calendarHeatmap.navigation.nextMonth"),F=o("calendarHeatmap.navigation.previousGroup"),B=o("calendarHeatmap.navigation.nextGroup");return O.jsxs(Tj,{children:[O.jsx(da,{disabled:b,onClick:c,title:M,"aria-label":M,theme:a,children:O.jsx(H1,{direction:"left",disabled:b,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})}),r!==P.ViewType.MONTH&&O.jsx(da,{disabled:b,onClick:m,title:F,"aria-label":F,children:O.jsx(mp,{direction:"left",disabled:b,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})}),O.jsx(da,{disabled:r===P.ViewType.MONTH?b:!C,onClick:d,title:D,"aria-label":D,children:O.jsx(pp,{direction:"left",disabled:r===P.ViewType.MONTH?b:!C,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})}),O.jsx(Sj,{theme:a,style:i,children:T}),O.jsx(da,{disabled:r===P.ViewType.MONTH?w:!S,onClick:h,title:N,"aria-label":N,children:O.jsx(pp,{direction:"right",disabled:r===P.ViewType.MONTH?w:!S,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})}),r!==P.ViewType.MONTH&&O.jsx(da,{disabled:w,onClick:v,title:B,"aria-label":B,children:O.jsx(mp,{direction:"right",disabled:w,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})}),O.jsx(da,{disabled:w,onClick:p,title:E,"aria-label":E,children:O.jsx(H1,{direction:"right",disabled:w,theme:a,fill:a.chart.secondaryTextColor,width:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.WIDTH,height:P.CALENDAR_HEATMAP_SIZING.PAGINATION_BUTTON_SIZE.HEIGHT})})]})};function Eu(e){return e===null}const Ej=e=>typeof e=="object"&&e!==null,W1=(e,t)=>{if(!Ej(e))return;const r=e[t];return typeof r=="string"?r:void 0},Pj=function(){const e=this.name,t=W1(this.options,"id"),r=!this.visible;this.chart.series.filter(i=>{if(i===this)return!1;const a=W1(i.options,"statisticalSeriesRelatesToSeries");return a===void 0?!1:a===e||t!==void 0&&a===t}).forEach(i=>i.setVisible(r,!1))},UC=(e,t,{onDataPointClick:r,onDataPointContextMenu:n,onDataPointsSelected:i}={})=>{var o,s;const a={chart:{events:{drilldown:function(){var u,c;((c=(u=this.options)==null?void 0:u.chart)==null?void 0:c.type)==="pie"&&(this.isDrillingDownAction=!0)},redraw:function(){var u,c;((c=(u=this.options)==null?void 0:u.chart)==null?void 0:c.type)==="pie"&&(this.isDrillingDownAction?delete this.isDrillingDownAction:this.drillUp())}}},plotOptions:{series:{events:{legendItemClick:Pj},point:{events:{click:()=>{}}}}}};return i&&(((o=e.chart)==null?void 0:o.type)!=="heatmap"&&(a.chart.zoomType="x"),["scatter","bubble"].includes((s=e.chart)==null?void 0:s.type)&&(a.chart.zoomType="xy"),a.chart.events.selection=u=>{u.preventDefault();const{xAxis:c,yAxis:d,originalEvent:h}=u,p=Rj(c[0],d[0]);p.forEach(m=>{m.state=""}),i(p.map(m=>Rh(m,t)),h)}),r&&(a.plotOptions.series.point.events.click=u=>{!!u.point.options&&(u.point.state="hover",r(Rh(u.point,t),u))}),n&&(a.plotOptions.series.point.events.contextmenu=u=>{u.preventDefault(),n(Rh(u.point,t),u)}),P.merge$1(e,a)};function Aj(e,{onDataPointClick:t,onDataPointContextMenu:r,onDataPointsSelected:n}={}){return i=>UC(i,e,{onDataPointClick:t,onDataPointContextMenu:r,onDataPointsSelected:n})}const Rj=(e,t)=>{const r=e.axis.series.flatMap(i=>i.points).filter(({x:i,y:a})=>{const o=i>=e.min&&i<=e.max,s=!Eu(a);return o&&s});if(!t)return r;const n=t.axis.series.flatMap(i=>i.points).filter(({y:i})=>i>=t.min&&i<=t.max);return r.filter(i=>n.includes(i))},Dj=600,Nj=300,VC=(e,t,r)=>{const n={duration:t.chart.animation.init.duration==="auto"?Dj:t.chart.animation.init.duration},i={duration:t.chart.animation.redraw.duration==="auto"?Nj:t.chart.animation.redraw.duration};return P.merge(e,{accessibility:{enabled:r},chart:{animation:i},plotOptions:{series:{animation:n}},boost:{useGPUTranslations:!0,usePreAllocated:!0}})};function kj(e,t){return r=>VC(r,e,t)}const GC=(e,t)=>{var p;if(!t)return e;const r={backgroundColor:t.chart.backgroundColor},n={style:{fontFamily:t.typography.fontFamily}},i={itemStyle:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},o={series:{dataLabels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}}},s={activeDataLabelStyle:{color:t.chart.textColor},breadcrumbs:{buttonTheme:{fill:t.general.brandColor,stroke:t.general.brandColor,style:{color:t.general.primaryButtonTextColor},states:{hover:{fill:t.general.primaryButtonHoverColor,stroke:t.general.primaryButtonHoverColor}}}}},u={chart:r,tooltip:n,legend:i,plotOptions:o,drilldown:s},c={labels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},title:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},d={color:t==null?void 0:t.chart.backgroundColor,label:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},h=P.merge(u,e);return h.xAxis=(p=h.xAxis)==null?void 0:p.map(m=>{var b;m.plotBands=(b=m.plotBands)==null?void 0:b.map(_=>P.merge(_,H(R({},d),{color:t==null?void 0:t.chart.backgroundColor})));const v=P.merge(m,c);return v.stackLabels&&(v.stackLabels.style=R({color:t.chart.textColor,fontFamily:t.typography.fontFamily},v.stackLabels.style)),v}),h.yAxis&&(h.yAxis=h.yAxis.map(m=>{var b;m.plotBands=(b=m.plotBands)==null?void 0:b.map(_=>P.merge(_,H(R({},d),{color:_.color||(t==null?void 0:t.chart.backgroundColor)})));const v=P.merge(m,c);return v.stackLabels&&(v.stackLabels.style=R({color:t.chart.textColor,fontFamily:t.typography.fontFamily},v.stackLabels.style)),v})),h};function Lj(e){return t=>GC(t,e)}const qC=({highchartsOptionsBuilder:e,chartData:t,dataOptions:r,designOptions:n,extraConfig:i,dataPointsEventHandlers:a,onBeforeRender:o})=>{const s={chartData:t,dataOptions:r,designOptions:n,extraConfig:i};return O.flow(kj(i.themeSettings,i.accessibilityEnabled),Aj(r,a),Lj(i.themeSettings),Oj(o))(R(H(R({chart:e.getChart(s),series:e.getSeries(s)},e.getAxes(s)),{legend:e.getLegend(s),plotOptions:e.getPlotOptions(s),tooltip:e.getTooltip(s)}),e.getExtras(s)))};function Oj(e){return e||(t=>t)}function YC(){var i,a,o,s,u;const{app:e}=y.useSisenseContext(),{t}=O.useTranslation(),{themeSettings:r}=y.useThemeContext(),n=OC();return k.useMemo(()=>{var c,d,h,p,m,v;return{translate:t,themeSettings:r,dateFormatter:n,accessibilityEnabled:((d=(c=e==null?void 0:e.settings)==null?void 0:c.accessibilityConfig)==null?void 0:d.enabled)||!1,defaultNumberFormattingEnabled:(v=(m=(p=(h=e==null?void 0:e.settings)==null?void 0:h.chartConfig)==null?void 0:p.defaultNumberFormatting)==null?void 0:m.enabled)!=null?v:!0}},[t,r,n,(a=(i=e==null?void 0:e.settings)==null?void 0:i.accessibilityConfig)==null?void 0:a.enabled,(u=(s=(o=e==null?void 0:e.settings)==null?void 0:o.chartConfig)==null?void 0:s.defaultNumberFormatting)==null?void 0:u.enabled])}function gp(e){const t=e*P.CALENDAR_TYPOGRAPHY.FONT_SIZE_RATIO;return Math.max(P.CALENDAR_TYPOGRAPHY.MIN_AXIS_FONT_SIZE,Math.min(P.CALENDAR_TYPOGRAPHY.MAX_FONT_SIZE,t))}function Ij(e){return e<30?e*.5:0}function Fj(e,t,r,n=0){if(!e.values||e.values.length===0)return[];const i=e.values.map(m=>new Date(m.date)).sort((m,v)=>m.getTime()-v.getTime()),a=i[0],o=Js(r),u=(a.getDay()-o+P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK)%P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK,c=new Map;i.forEach((m,v)=>{const b=`${m.getFullYear()}-${m.getMonth()}`,_=Math.floor((v+u)/P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK);if(!c.has(b))c.set(b,{firstDate:m,lastDate:m,firstColumn:_,lastColumn:_});else{const w=c.get(b);w.lastDate=m,w.lastColumn=_}});const d=i.length,h=Math.ceil((d+u)/P.CALENDAR_HEATMAP_DEFAULTS.DAYS_IN_WEEK),p=new Array(h).fill("");return Array.from(c.entries()).forEach(([m,v])=>{const{firstDate:b,firstColumn:_,lastColumn:w}=v,C=(w-_)*n,S=_+Math.floor((w-_)/2),T=t(b,C>P.CALENDAR_HEATMAP_DEFAULTS.SHORT_MONTH_NAME_CONTINUES_LAYOUT_WIDTH_THRESHOLD?P.FULL_MONTH_DATE_FORMAT:P.SHORT_MONTH_DATE_FORMAT);S>=0&&S<p.length&&(p[S]=T)}),p}function $j(e){var v,b,_,w,C,S,T,M,E,D,N,F,B,G,Y,$,X,V,Z,j,q;const t=(v=e.designOptions.cellSize)!=null?v:0,r=e.designOptions.startOfWeek,n=e.designOptions.dayLabels,i=e.designOptions.monthLabels,a=e.designOptions.viewType,o=c0(r,e.extraConfig.dateFormatter,P.THREE_LETTER_DAY_DATE_FORMAT).reverse(),s=((b=n.style)==null?void 0:b.color)||((_=e.extraConfig.themeSettings)==null?void 0:_.chart.textColor),u=((w=n.style)==null?void 0:w.fontFamily)||((C=e.extraConfig.themeSettings)==null?void 0:C.typography.fontFamily),c=(T=(S=n.style)==null?void 0:S.fontSize)!=null?T:`${gp(t)}px`,d=((M=i.style)==null?void 0:M.color)||((E=e.extraConfig.themeSettings)==null?void 0:E.chart.textColor),h=((D=i.style)==null?void 0:D.fontFamily)||((N=e.extraConfig.themeSettings)==null?void 0:N.typography.fontFamily),p=(B=(F=i.style)==null?void 0:F.fontSize)!=null?B:`${gp(t)}px`;return{xAxis:[{categories:Fj(e.chartData,e.extraConfig.dateFormatter,r,e.designOptions.cellSize),opposite:!0,lineWidth:0,gridLineWidth:0,offset:0,labels:{enabled:i.enabled&&a!==P.ViewType.MONTH,rotation:0,overflow:"justify",style:R(R({fontSize:p,color:d,fontFamily:h,textOverflow:"none"},((G=i.style)==null?void 0:G.fontWeight)&&{fontWeight:i.style.fontWeight}),((Y=i.style)==null?void 0:Y.fontStyle)&&{fontStyle:i.style.fontStyle})},accessibility:{description:"months",rangeDescription:"X Axis shows months in chronological order."}}],yAxis:[{categories:n.enabled?[...o]:[],opposite:!1,lineWidth:0,gridLineWidth:0,offset:15,title:{text:null},labels:{rotation:0,style:R(R(R(R(R({fontSize:c,color:s,fontFamily:u},(($=n.style)==null?void 0:$.fontWeight)&&{fontWeight:n.style.fontWeight}),((X=n.style)==null?void 0:X.fontStyle)&&{fontStyle:n.style.fontStyle}),((V=n.style)==null?void 0:V.textOutline)&&{textOutline:n.style.textOutline}),((Z=n.style)==null?void 0:Z.pointerEvents)&&{pointerEvents:n.style.pointerEvents}),((j=n.style)==null?void 0:j.textOverflow)&&{textOverflow:n.style.textOverflow}),enabled:n.enabled&&((q=e.designOptions.height)!=null?q:0)>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL_CHART_SIZE_THRESHOLD},accessibility:{description:"days of week",rangeDescription:`Y Axis shows days of the week, starting with ${r===u0.MONDAY?"Monday":"Sunday"}.`}}]}}function Bj(e){var c,d,h,p,m,v,b,_,w,C,S,T,M;const t=(c=e.designOptions.cellSize)!=null?c:0,r=e.designOptions.startOfWeek,n=e.designOptions.dayLabels,i=Ij(t),a=c0(r,e.extraConfig.dateFormatter,P.SINGLE_LETTER_DAY_DATE_FORMAT),o=((d=n.style)==null?void 0:d.color)||((h=e.extraConfig.themeSettings)==null?void 0:h.chart.textColor),s=((p=n.style)==null?void 0:p.fontFamily)||((m=e.extraConfig.themeSettings)==null?void 0:m.typography.fontFamily),u=(b=(v=n.style)==null?void 0:v.fontSize)!=null?b:`${gp(t)}px`;return{xAxis:[{categories:n.enabled?[...a]:[],opposite:!0,lineWidth:0,offset:0,labels:{rotation:0,y:i,style:R(R(R(R(R({fontSize:u,color:o,fontFamily:s},((_=n.style)==null?void 0:_.fontWeight)&&{fontWeight:n.style.fontWeight}),((w=n.style)==null?void 0:w.fontStyle)&&{fontStyle:n.style.fontStyle}),((C=n.style)==null?void 0:C.textOutline)&&{textOutline:n.style.textOutline}),((S=n.style)==null?void 0:S.pointerEvents)&&{pointerEvents:n.style.pointerEvents}),((T=n.style)==null?void 0:T.textOverflow)&&{textOverflow:n.style.textOverflow}),enabled:n.enabled&&((M=e.designOptions.width)!=null?M:0)>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL_CHART_SIZE_THRESHOLD},accessibility:{description:"weekdays",rangeDescription:`X Axis is showing all 7 days of the week, starting with ${r===u0.MONDAY?"Monday":"Sunday"}.`}}],yAxis:[{categories:[],min:0,max:5,tickInterval:1,gridLineWidth:0,title:{text:null},accessibility:{description:"weeks"},visible:!1}]}}function XC(e){var n,i;const t=(n=e.designOptions.width)!=null?n:0,r=(i=e.designOptions.height)!=null?i:0;return{type:"heatmap",plotBorderWidth:P.CALENDAR_HEATMAP_DEFAULTS.BORDER_WIDTH,backgroundColor:"transparent",marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,spacing:[0,0,0,0],width:t,height:r,polar:!1}}function zj(e){var i,a;const t=(i=e.designOptions.cellSize)!=null?i:0,n=((a=e.designOptions.width)!=null?a:0)>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL_CHART_SIZE_THRESHOLD;return H(R({},XC(e)),{marginTop:n?t:0})}function Hj(e){var n;const r=((n=e.designOptions.width)!=null?n:0)>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_DAY_LABEL_CHART_SIZE_THRESHOLD;return H(R({},XC(e)),{marginLeft:r?60:0,marginTop:r?30:0,marginRight:10})}function ZC(){return{title:{text:null},accessibility:{landmarkVerbosity:"one"}}}function KC(){return{enabled:!1}}function Wj(e){const t=e*P.CALENDAR_TYPOGRAPHY.FONT_SIZE_RATIO;return Math.max(P.CALENDAR_TYPOGRAPHY.MIN_FONT_SIZE,Math.min(P.CALENDAR_TYPOGRAPHY.MAX_FONT_SIZE,t))}function QC(e){var u,c,d,h,p,m,v,b,_,w,C,S,T,M,E,D,N;const t=e.designOptions.cellLabels,r=(c=(u=e.designOptions)==null?void 0:u.cellSize)!=null?c:0,n=((d=t==null?void 0:t.style)==null?void 0:d.fontSize)||`${Wj(r)}px`,i=(p=(h=t==null?void 0:t.style)==null?void 0:h.fontWeight)!=null?p:"normal",a=(v=(m=t==null?void 0:t.style)==null?void 0:m.textOutline)!=null?v:"none",o=(w=(b=t==null?void 0:t.style)==null?void 0:b.fontFamily)!=null?w:(_=e.extraConfig.themeSettings)==null?void 0:_.typography.fontFamily,s=((C=t==null?void 0:t.style)==null?void 0:C.color)||((S=e.extraConfig.themeSettings)==null?void 0:S.chart.textColor);return{series:{},heatmap:{dataLabels:{enabled:t.enabled&&((M=(T=e.designOptions)==null?void 0:T.cellSize)!=null?M:0)>=P.CALENDAR_HEATMAP_DEFAULTS.SHOW_CELL_LABEL_SIZE_THRESHOLD,style:R(R(R({color:s,fontSize:n,fontWeight:i,textOutline:a,fontFamily:o},((E=t.style)==null?void 0:E.fontStyle)&&{fontStyle:t.style.fontStyle}),((D=t.style)==null?void 0:D.pointerEvents)&&{pointerEvents:t.style.pointerEvents}),((N=t.style)==null?void 0:N.textOverflow)&&{textOverflow:t.style.textOverflow}),formatter:function(){const F=this.point;return F.custom&&F.custom.monthDay?F.custom.monthDay.toString():""}}}}}const jj="yyyy-MM-dd'T'HH:mm:ss";function Uj(e,t){const r=ij(e.getDay());return t.includes(r)}function JC(e,t,r,n){if(e.values.length===0)return[];const i=new Date(e.values[0].date),a=i.getFullYear(),o=i.getMonth(),u=new Date(a,o,1).getDay(),c=Js(r),d=(u-c+7)%7,h=c0(r,t),p=[];return e.values.forEach(m=>{var N;const v=new Date(m.date),b=v.getDate(),_=t(v,jj),w=(d+b-1)%h.length,C=Math.floor((d+b-1)/h.length),S=(N=m.value)!=null?N:null,T=m.value!==void 0,M=Uj(v,n.days);let E;T?n.enabled&&n.days.length>0&&M?E=n.cellColor||P.CALENDAR_HEATMAP_DEFAULTS.WEEKEND_CELL_COLOR:m.color&&(E=m.color):E=P.CALENDAR_HEATMAP_DEFAULTS.NO_DATA_COLOR;const D=n.enabled&&n.hideValues&&M;p.push({x:w,y:5-C,value:S,date:v.getTime(),dateString:_,color:E,custom:{monthDay:b,hasData:!D&&T,blur:m.blur},className:T&&m.blur?"csdk-highcharts-point-blured":""})}),p}function Vj(e,t,r,n){if(e.values.length===0)return[];const i=e.values.map(_=>new Date(_.date)).sort((_,w)=>_.getTime()-w.getTime()),a=i[0],o=i[i.length-1],s=new Date(a.getFullYear(),a.getMonth(),1),u=new Date(o.getFullYear(),o.getMonth()+1,0),c=new Map;for(let _=new Date(s);_<=u;_.setMonth(_.getMonth()+1)){const w=`${_.getFullYear()}-${_.getMonth()}`;c.set(w,[])}e.values.forEach(_=>{const w=new Date(_.date),C=`${w.getFullYear()}-${w.getMonth()}`;c.has(C)&&c.get(C).push(_)});const d=[],h=Js(r),p=new Date(s),m=(s.getDay()-h+7)%7;p.setDate(s.getDate()-m);for(const[_,w]of c){const[C,S]=_.split("-"),T=parseInt(C,10),M=parseInt(S,10),E={type:"calendar-heatmap",values:w.length>0?w:[{date:new Date(T,M,1),value:void 0}]},D=JC(E,t,r,n);d.push(...D)}let v=P.CALENDAR_HEATMAP_SIZING.ROWS-1-d[0].x,b=0;for(let _=0;_<d.length;_++)d[_].y=v,d[_].x=b,v--,v<0&&(v=P.CALENDAR_HEATMAP_SIZING.ROWS-1,b++);return d}function Gj(e){const t=e.designOptions.startOfWeek,r=e.designOptions.weekends,n=JC(e.chartData,e.extraConfig.dateFormatter,t,r);return[{name:"Calendar Heatmap",type:"heatmap",keys:["x","y","value","date","color","custom"],data:n,nullColor:P.CALENDAR_HEATMAP_DEFAULTS.NO_DATA_COLOR,borderWidth:P.CALENDAR_HEATMAP_DEFAULTS.BORDER_WIDTH,borderColor:"transparent",colsize:1,rowsize:1}]}function qj(e){const t=e.designOptions.startOfWeek,r=e.designOptions.weekends,n=Vj(e.chartData,e.extraConfig.dateFormatter,t,r);return[{name:"Calendar Heatmap",type:"heatmap",keys:["x","y","value","date","color","custom"],data:n,nullColor:P.CALENDAR_HEATMAP_DEFAULTS.NO_DATA_COLOR,borderWidth:1,borderColor:"white",colsize:1,rowsize:1}]}function e3(e){const{dateFormatter:t}=e.extraConfig,r=e.dataOptions.value.column.title||e.dataOptions.value.column.name,n=e.designOptions.width&&e.designOptions.width<P.CALENDAR_HEATMAP_SIZING.MIN_TOOLTIP_WIDTH;return{animation:!1,backgroundColor:P.colorWhite,borderColor:P.colorChineseSilver,borderRadius:10,borderWidth:1,useHTML:!0,style:{width:n?P.CALENDAR_HEATMAP_SIZING.MIN_TOOLTIP_WIDTH:void 0},position:{relativeTo:"chart"},followPointer:!0,outside:!0,formatter:function(){var m;const i=this.point,a=i.date&&new Date(i.date);if(!(a&&!isNaN(a.getTime())))return!1;const s=e.dataOptions.date,u=P.getDataOptionGranularity(s),c=s.dateFormat||P.getDefaultDateFormat(u),d=t(a,c);let h="";if(i.value!==null&&i.value!==void 0&&((m=i.custom)!=null&&m.hasData)){const v=e.dataOptions.value.numberFormatConfig,b=v!==void 0;if(e.extraConfig.defaultNumberFormattingEnabled||b){const _=P.getCompleteNumberFormatConfig(v);h=P.applyFormat(_,i.value)}else h=String(i.value)}else h="—";const p=i.color&&P.scaleBrightness(i.color,P.CALENDAR_HEATMAP_COLORS.TOOLTIP_COLOR_BRIGHTNESS_PERCENT);return P.tooltipWrapper(`
77
- ${r}
78
- <br />
79
- <span style="color: ${p!=null?p:"inherit"}">${h}</span>
80
- ${P.tooltipSeparator()}
81
- ${d}
82
- `)}}}const Yj={getChart:zj,getSeries:Gj,getAxes:Bj,getLegend:KC,getPlotOptions:QC,getTooltip:e3,getExtras:ZC},Xj={getChart:Hj,getSeries:qj,getAxes:$j,getLegend:KC,getPlotOptions:QC,getTooltip:e3,getExtras:ZC};function Zj(e){return e==="calendar-heatmap/continuous"?Xj:Yj}function j1(e,t){const r=new Map;e.values.forEach(a=>{if(a.date.getFullYear()===t.year&&a.date.getMonth()===t.month){const o=`${t.year}-${t.month}-${a.date.getDate()}`;r.set(o,a)}});const n=new Date(t.year,t.month+1,0).getDate(),i=[];for(let a=1;a<=n;a++){const o=`${t.year}-${t.month}-${a}`,s=r.get(o);s?i.push(s):i.push({date:new Date(t.year,t.month,a)})}return H(R({},e),{values:i})}function U1(e,t){if(!e.values||e.values.length===0){const r=H(R({},e),{values:[]});return j1(r,t)}return j1(e,t)}function Kj(e,t,r,n){if(e==="calendar-heatmap/continuous"){let i=[];switch(t){case"month":i=[r.slice(0,1)];break;case"quarter":i=[r.slice(0,3)];break;case"half-year":i=[r.slice(0,6)];break;case"year":i=[r.slice(0,6),r.slice(6,12)].filter(a=>a.length>0);break;default:i=[r]}return i.map(a=>a.reduce((o,s)=>{const u=U1(n,s);return H(R({},o),{values:[...o.values,...u.values]})},{type:"calendar-heatmap",values:[]}))}else return r.map(i=>U1(n,i))}const Qj=()=>{const e=YC();return k.useMemo(()=>H(R({},e),{themeSettings:H(R({},e.themeSettings),{chart:H(R({},e.themeSettings.chart),{animation:H(R({},e.themeSettings.chart.animation),{redraw:H(R({},e.themeSettings.chart.animation.redraw),{duration:0})})})})}),[e])};function Jj({chartData:e,dataOptions:t,designOptions:r,availableMonths:n,currentMonth:i,subtype:a,viewType:o,containerSize:s,eventHandlers:u,onBeforeRender:c}){const d=Qj(),h=k.useMemo(()=>{var m;const p=(m=t.value.color)!=null?m:aj(d.themeSettings);return oj(p)(e)},[e,t.value.color,d.themeSettings]);return k.useMemo(()=>{if(n.length===0)return[];const p=h0(n,i,o);return Kj(a,o,p,h).map(v=>{const b=dj(s,a,o,v,r.startOfWeek),_=Zj(a);return qC({highchartsOptionsBuilder:_,chartData:v,dataOptions:t,designOptions:H(R({},r),{width:b.width,height:b.height,cellSize:b.cellSize}),dataPointsEventHandlers:{onDataPointClick:u.onDataPointClick,onDataPointContextMenu:u.onDataPointContextMenu,onDataPointsSelected:u.onDataPointsSelected},extraConfig:d,onBeforeRender:c})})},[n,i,o,a,h,t,r,s,u.onDataPointClick,u.onDataPointContextMenu,u.onDataPointsSelected,d,c])}const eU=e=>{const{chartData:t,startMonth:r}=e,n=y.usePrevious(r),i=r?Dh(r):t.values.length>0?Dh(t.values[0].date):{year:new Date().getFullYear(),month:new Date().getMonth()},[a,o]=k.useState(i);return k.useEffect(()=>{r&&(!n||r.getTime()!==n.getTime())&&o(Dh(r))},[r,n,o]),{currentMonth:a,setCurrentMonth:o}},tU=y.newStyled.div`
83
- display: flex;
84
- flex-direction: column;
85
- width: 100%;
86
- height: 100%;
87
- margin: 0 auto;
88
- background-color: ${({theme:e})=>e.chart.backgroundColor};
89
- `,rU=y.newStyled.div`
90
- display: flex;
91
- flex-direction: column;
92
- align-items: center;
93
- justify-content: center;
94
- flex: 1;
95
- `;function nU({chartData:e,dataOptions:t,designOptions:r,onDataPointClick:n,onDataPointContextMenu:i,onDataPointsSelected:a,onBeforeRender:o,size:s}){var _,w,C;const{themeSettings:u}=y.useThemeContext(),c=OC(),d=r.subtype,h=r.viewType,{currentMonth:p,setCurrentMonth:m}=eU({chartData:e,startMonth:(_=r.pagination)==null?void 0:_.startMonth}),v=k.useMemo(()=>yj(e,c,p,h),[e,c,p,h]),b=Jj({chartData:e,dataOptions:t,designOptions:r,availableMonths:v,currentMonth:p,subtype:d,viewType:h,containerSize:s,eventHandlers:{onDataPointClick:n,onDataPointContextMenu:i,onDataPointsSelected:a},onBeforeRender:o});return O.jsxs(tU,{theme:u,children:[v.length>0&&((w=r.pagination)==null?void 0:w.enabled)&&O.jsx(Mj,{value:p,availableMonths:v,viewType:h,onChange:m,labelStyle:(C=r.pagination)==null?void 0:C.style}),O.jsx(rU,{children:O.jsx(Cj,{monthCharts:b,availableMonths:v,currentMonth:p,viewType:h,subtype:d,monthLabels:r.monthLabels,size:s})})]})}const iU=e=>!!e.chartData&&LC(e.chartData)&&kC(e.dataOptions),aU={dataOptions:{translateDataOptionsToInternal:RW,getAttributes:DW,getMeasures:NW,isCorrectDataOptions:kW,isCorrectDataOptionsInternal:kC},data:{loadData:Ir,getChartData:OW},designOptions:{translateStyleOptionsToDesignOptions:IW,isCorrectStyleOptions:FW},renderer:{ChartRendererComponent:nU,isCorrectRendererProps:iU}};var t3=O.metaMap?function(e,t){return O.metaMap.set(e,t),e}:U.identity;function Ss(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=U.baseCreate(e.prototype),n=e.apply(r,t);return U.isObject(n)?n:r}}var oU=1;function sU(e,t,r){var n=t&oU,i=Ss(e);function a(){var o=this&&this!==U.root&&this instanceof a?i:e;return o.apply(n?r:this,arguments)}return a}var lU=Math.max;function r3(e,t,r,n){for(var i=-1,a=e.length,o=r.length,s=-1,u=t.length,c=lU(a-o,0),d=Array(u+c),h=!n;++s<u;)d[s]=t[s];for(;++i<o;)(h||i<a)&&(d[r[i]]=e[i]);for(;c--;)d[s++]=e[i++];return d}var uU=Math.max;function n3(e,t,r,n){for(var i=-1,a=e.length,o=-1,s=r.length,u=-1,c=t.length,d=uU(a-s,0),h=Array(d+c),p=!n;++i<d;)h[i]=e[i];for(var m=i;++u<c;)h[m+u]=t[u];for(;++o<s;)(p||i<a)&&(h[m+r[o]]=e[i++]);return h}function cU(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var i3=U.shortOut(t3),dU=/\{\n\/\* \[wrapped with (.+)\] \*/,hU=/,? & /;function fU(e){var t=e.match(dU);return t?t[1].split(hU):[]}var pU=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function mU(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(pU,`{
96
- /* [wrapped with `+t+`] */
97
- `)}function gU(e,t,r,n){for(var i=e.length,a=r+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function vU(e){return e!==e}function yU(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function f0(e,t,r){return t===t?yU(e,t,r):gU(e,vU,r)}function a3(e,t){var r=e==null?0:e.length;return!!r&&f0(e,t,0)>-1}var bU=1,_U=2,wU=8,CU=16,xU=32,TU=64,SU=128,MU=256,EU=512,PU=[["ary",SU],["bind",bU],["bindKey",_U],["curry",wU],["curryRight",CU],["flip",EU],["partial",xU],["partialRight",TU],["rearg",MU]];function AU(e,t){return U.arrayEach(PU,function(r){var n="_."+r[0];t&r[1]&&!a3(e,n)&&e.push(n)}),e.sort()}function o3(e,t,r){var n=t+"";return U.setToString(e,mU(n,AU(fU(n),r)))}var RU=1,DU=2,NU=4,kU=8,V1=32,G1=64;function s3(e,t,r,n,i,a,o,s,u,c){var d=t&kU,h=d?o:void 0,p=d?void 0:o,m=d?a:void 0,v=d?void 0:a;t|=d?V1:G1,t&=~(d?G1:V1),t&NU||(t&=~(RU|DU));var b=[e,t,i,m,h,v,p,s,u,c],_=r.apply(void 0,b);return O.isLaziable(e)&&i3(_,b),_.placeholder=n,o3(_,e,t)}function l3(e){var t=e;return t.placeholder}var LU=Math.min;function OU(e,t){for(var r=e.length,n=LU(t.length,r),i=U.copyArray(e);n--;){var a=t[n];e[n]=U.isIndex(a,r)?i[a]:void 0}return e}var q1="__lodash_placeholder__";function Ju(e,t){for(var r=-1,n=e.length,i=0,a=[];++r<n;){var o=e[r];(o===t||o===q1)&&(e[r]=q1,a[i++]=r)}return a}var IU=1,FU=2,$U=8,BU=16,zU=128,HU=512;function p0(e,t,r,n,i,a,o,s,u,c){var d=t&zU,h=t&IU,p=t&FU,m=t&($U|BU),v=t&HU,b=p?void 0:Ss(e);function _(){for(var w=arguments.length,C=Array(w),S=w;S--;)C[S]=arguments[S];if(m)var T=l3(_),M=cU(C,T);if(n&&(C=r3(C,n,i,m)),a&&(C=n3(C,a,o,m)),w-=M,m&&w<c){var E=Ju(C,T);return s3(e,t,p0,_.placeholder,r,C,E,s,u,c-w)}var D=h?r:this,N=p?D[e]:e;return w=C.length,s?C=OU(C,s):v&&w>1&&C.reverse(),d&&u<w&&(C.length=u),this&&this!==U.root&&this instanceof _&&(N=b||Ss(N)),N.apply(D,C)}return _}function WU(e,t,r){var n=Ss(e);function i(){for(var a=arguments.length,o=Array(a),s=a,u=l3(i);s--;)o[s]=arguments[s];var c=a<3&&o[0]!==u&&o[a-1]!==u?[]:Ju(o,u);if(a-=c.length,a<r)return s3(e,t,p0,i.placeholder,void 0,o,c,void 0,void 0,r-a);var d=this&&this!==U.root&&this instanceof i?n:e;return U.apply(d,this,o)}return i}var jU=1;function UU(e,t,r,n){var i=t&jU,a=Ss(e);function o(){for(var s=-1,u=arguments.length,c=-1,d=n.length,h=Array(d+u),p=this&&this!==U.root&&this instanceof o?a:e;++c<d;)h[c]=n[c];for(;u--;)h[c++]=arguments[++s];return U.apply(p,i?r:this,h)}return o}var Y1="__lodash_placeholder__",kh=1,VU=2,GU=4,X1=8,Fo=128,Z1=256,qU=Math.min;function YU(e,t){var r=e[1],n=t[1],i=r|n,a=i<(kh|VU|Fo),o=n==Fo&&r==X1||n==Fo&&r==Z1&&e[7].length<=t[8]||n==(Fo|Z1)&&t[7].length<=t[8]&&r==X1;if(!(a||o))return e;n&kh&&(e[2]=t[2],i|=r&kh?0:GU);var s=t[3];if(s){var u=e[3];e[3]=u?r3(u,s,t[4]):s,e[4]=u?Ju(e[3],Y1):t[4]}return s=t[5],s&&(u=e[5],e[5]=u?n3(u,s,t[6]):s,e[6]=u?Ju(e[5],Y1):t[6]),s=t[7],s&&(e[7]=s),n&Fo&&(e[8]=e[8]==null?t[8]:qU(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}var XU="Expected a function",K1=1,ZU=2,Lh=8,Oh=16,Ih=32,Q1=64,J1=Math.max;function KU(e,t,r,n,i,a,o,s){var u=t&ZU;if(!u&&typeof e!="function")throw new TypeError(XU);var c=n?n.length:0;if(c||(t&=~(Ih|Q1),n=i=void 0),o=o===void 0?o:J1(P.toInteger(o),0),s=s===void 0?s:P.toInteger(s),c-=i?i.length:0,t&Q1){var d=n,h=i;n=i=void 0}var p=u?void 0:O.getData(e),m=[e,t,r,n,i,d,h,a,o,s];if(p&&YU(m,p),e=m[0],t=m[1],r=m[2],n=m[3],i=m[4],s=m[9]=m[9]===void 0?u?0:e.length:J1(m[9]-c,0),!s&&t&(Lh|Oh)&&(t&=~(Lh|Oh)),!t||t==K1)var v=sU(e,t,r);else t==Lh||t==Oh?v=WU(e,t,s):(t==Ih||t==(K1|Ih))&&!i.length?v=UU(e,t,r,n):v=p0.apply(void 0,m);var b=p?t3:i3;return o3(b(v,m),e,t)}var QU=8;function el(e,t,r){t=r?void 0:t;var n=KU(e,QU,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=el.placeholder,n}el.placeholder={};const JU="_alert_box_10ttx_1",eV="_content_10ttx_8",tV="_alert_10ttx_1",Fh={alert_box:JU,content:eV,alert:tV},u3=({alerts:e=[]})=>O.jsx("div",{className:Fh.alert_box,children:O.jsx("div",{className:Fh.content,children:[...new Set(e)].map((t,r)=>O.jsx("div",{className:Fh.alert,children:t},`alert-${r}`))})}),rV=e=>["column","bar","line","area","polar","pie","funnel","treemap","calendar-heatmap","sunburst","streamgraph","sankey"].includes(e);function Vr({highchartsOptionsBuilder:e,getAlerts:t}){return function({chartData:n,dataOptions:i,designOptions:a,onDataPointClick:o,onDataPointContextMenu:s,onDataPointsSelected:u,onBeforeRender:c,size:d}){const{t:h}=O.useTranslation(),p=YC(),m=k.useMemo(()=>qC({highchartsOptionsBuilder:e,chartData:n,dataOptions:i,designOptions:a,dataPointsEventHandlers:{onDataPointClick:o,onDataPointContextMenu:s,onDataPointsSelected:u},extraConfig:p,onBeforeRender:c}),[n,i,a,o,s,u,p,c]),v=k.useMemo(()=>m?H(R({},m),{chart:R(R(R({},m.chart),(d==null?void 0:d.width)&&{width:d.width}),(d==null?void 0:d.height)&&{height:d.height})}):null,[m,d]),b=t({chartData:n,dataOptions:i,designOptions:a,extraConfig:p});return v&&O.jsxs("div",{"data-testid":"chart-root",role:"img","aria-label":h("chart.visualization.label"),style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!b.length&&O.jsx(u3,{alerts:b}),O.jsx(l0,{options:v})]})}}function Gr(e){return!!e.chartData&&!!e.chartType&&rV(e.chartType)}var nV="[object String]";function Wc(e){return typeof e=="string"||!U.isArray(e)&&U.isObjectLike(e)&&U.baseGetTag(e)==nV}const io=e=>{const{chartData:t,designOptions:r}=e,{seriesCapacity:n,categoriesCapacity:i}=r.dataLimits,a=t.xValues.length>i?P.categoriesSliceWarning("x",t.xValues.length,i):null,o=t.series.length>n?P.seriesSliceWarning(t.series.length,n):null;return[a,o].filter(Wc)};function ao(e,t,r){return P.cartesianData(e,t,r==null?void 0:r.defaultNumberFormattingEnabled)}const jc=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"line/step":{lineType:"straight"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}}),vp=(e,t)=>{var r,n,i,a,o;return e?{enabled:e.enabled,gridLine:e.gridLines,labels:(r=e.labels)==null?void 0:r.enabled,type:e.logarithmic?"logarithmic":"linear",titleEnabled:(n=e.title)==null?void 0:n.enabled,title:((i=e==null?void 0:e.title)==null?void 0:i.text)||null,min:(a=e.min)!=null?a:null,max:(o=e.max)!=null?o:null,tickInterval:e.isIntervalEnabled&&(e!=null&&e.intervalJumps)?e==null?void 0:e.intervalJumps:null}:t},iV=e=>e!=null&&e.enabled?{enabled:!0,scrollerLocation:e==null?void 0:e.scrollerLocation,onScrollerChange:e==null?void 0:e.onScrollerChange}:{enabled:!1},aV=e=>{const t=vp(e,rr.yAxis);return t.gridLine=e.templateMainYHasGridLines||!1,t},m0=e=>{let t=1;switch(e.width){case"thin":t=1;break;case"bold":t=3;break;case"thick":t=5;break}return t},c3="classic",qr=(e,t)=>{var u,c,d,h;const r=cV(),n=vp(e.xAxis,rr.xAxis);let i=null;(c=(u=e==null?void 0:e.xAxis)==null?void 0:u.x2Title)!=null&&c.enabled&&((h=(d=e==null?void 0:e.xAxis)==null?void 0:d.x2Title)!=null&&h.text)&&(i=H(R({},rr.xAxis),{title:e.xAxis.x2Title.text}));const a=vp(e.yAxis,rr.yAxis),o=t&&e.y2Axis?R({type:"linear",enabled:!0,titleEnabled:!0,title:"Y2 Axis title",gridLine:!0,labels:!0,min:null,max:null,tickInterval:null},aV(e.y2Axis)):void 0,s=iV(e.navigator);return H(R(R(H(R(H(R({},rr),{legend:e.legend,autoZoom:s}),e.seriesLabels&&{seriesLabels:e.seriesLabels}),{xAxis:n,yAxis:a}),o&&{y2Axis:o}),i&&{x2Axis:i}),{dataLimits:r})},Uc=e=>({enabled:e.enabled,fill:e.fill==="filled"?"full":"hollow",size:e.size==="small"?"small":"large"}),oV=(e,t,r,n)=>{const i=qr(e,r),a=pn(e!=null?e:{},P.getDefaultStyleOptions()),o=si(t,n,a);return H(R({},i),{designPerSeries:o,stackType:c3,totalLabels:e.totalLabels})},sV=(e,t)=>{var n,i,a,o,s,u,c;const r=qr(t,!1);if(e==="line"){const d=t;d.line&&(r.line={width:(a=(n=d.line)==null?void 0:n.width)!=null?a:m0((i=d.lineWidth)!=null?i:{width:"bold"}),dashStyle:(o=d.line)==null?void 0:o.dashStyle,endCap:(s=d.line)==null?void 0:s.endCap,shadow:(u=d.line)==null?void 0:u.shadow}),r.marker=Uc((c=d==null?void 0:d.markers)!=null?c:{enabled:!0,fill:"filled",size:"small"}),d.subtype==="line/step"&&(r.step=d.stepPosition||"left")}return r},lV=(e,t,r)=>{var s,u,c,d,h,p,m;const n=qr(e,r);n.marker=Uc((s=e==null?void 0:e.markers)!=null?s:{enabled:!0,fill:"filled",size:"small"});const i=pn(e!=null?e:{},P.getDefaultStyleOptions()),a=si(t,"line",i),o=H(R({},n),{designPerSeries:a,line:{width:(d=(u=e.line)==null?void 0:u.width)!=null?d:m0((c=e.lineWidth)!=null?c:{width:"bold"}),dashStyle:(h=e.line)==null?void 0:h.dashStyle,endCap:(p=e.line)==null?void 0:p.endCap,shadow:(m=e.line)==null?void 0:m.shadow}});return e.subtype==="line/step"&&(o.step=e.stepPosition||"left"),o},uV=(e,t,r)=>{var n,i,a,o,s,u,c;return H(R({},oV(e,t,r,"area")),{marker:Uc((n=e==null?void 0:e.markers)!=null?n:{enabled:!0,fill:"filled",size:"small"}),line:{width:(o=(i=e.line)==null?void 0:i.width)!=null?o:m0((a=e.lineWidth)!=null?a:{width:"thin"}),dashStyle:(s=e.line)==null?void 0:s.dashStyle,endCap:(u=e.line)==null?void 0:u.endCap,shadow:(c=e.line)==null?void 0:c.shadow}})},g0=(e,t)=>{var i;const r={seriesCapacity:t==="categorical"?Vu:t==="pie"?f8:Ym,categoriesCapacity:t==="scatter"?p8:Vu},n=(i=e==null?void 0:e.dataLimits)!=null?i:{};return"categoriesCapacity"in n&&(n==null?void 0:n.categoriesCapacity)!==void 0&&(r.categoriesCapacity=n==null?void 0:n.categoriesCapacity),(n==null?void 0:n.seriesCapacity)!==void 0&&(r.seriesCapacity=n==null?void 0:n.seriesCapacity),r};function cV(){return{seriesCapacity:Ym,categoriesCapacity:Vu}}const ha={enabled:!0,showCategory:!0,showValue:!0,percentageLabels:{enabled:!0,showDecimals:!1}},dV="classic",hV=e=>{var d,h,p,m,v,b,_,w,C,S,T,M,E,D,N,F;const{legend:t,labels:r,subtype:n,seriesLabels:i}=e;let a=ha;(i||r)&&(a=H(R({},i),{enabled:(h=(d=i==null?void 0:i.enabled)!=null?d:r==null?void 0:r.enabled)!=null?h:ha.enabled,showCategory:(m=(p=i==null?void 0:i.showCategory)!=null?p:r==null?void 0:r.categories)!=null?m:ha.showCategory,showValue:(b=(v=i==null?void 0:i.showValue)!=null?v:r==null?void 0:r.value)!=null?b:ha.showValue,percentageLabels:H(R({},i==null?void 0:i.percentageLabels),{enabled:(T=(S=(w=(_=i==null?void 0:i.percentageLabels)==null?void 0:_.enabled)!=null?w:r==null?void 0:r.percent)!=null?S:(C=ha.percentageLabels)==null?void 0:C.enabled)!=null?T:!1,showDecimals:(F=(N=(E=(M=i==null?void 0:i.percentageLabels)==null?void 0:M.showDecimals)!=null?E:r==null?void 0:r.decimals)!=null?N:(D=ha.percentageLabels)==null?void 0:D.showDecimals)!=null?F:!1})}));const o=n?jc[n]:void 0,s=(o==null?void 0:o.pieType)||dV,u=e!=null&&e.convolution?e.convolution:{enabled:!1},c=g0(e,"pie");return H(R({},rr),{seriesLabels:a,pieType:s,convolution:u,legend:t,dataLimits:c})},fV=e=>{var u,c,d,h,p,m,v,b,_,w;const{funnelType:t=P.DefaultFunnelType,funnelSize:r=P.DefaultFunnelSize,funnelDirection:n=P.DefaultFunnelDirection,legend:i,labels:a,seriesLabels:o}=e,s=g0(e,"categorical");return H(R({},rr),{funnelSize:r,funnelType:t,funnelDirection:n,legend:i,dataLimits:s,seriesLabels:H(R({},o!=null?o:{}),{enabled:(c=(u=o==null?void 0:o.enabled)!=null?u:a==null?void 0:a.enabled)!=null?c:P.DefaultFunnelSeriesLabels.enabled,showCategory:(h=(d=o==null?void 0:o.showCategory)!=null?d:a==null?void 0:a.categories)!=null?h:P.DefaultFunnelSeriesLabels.showCategory,showValue:(m=(p=o==null?void 0:o.showValue)!=null?p:a==null?void 0:a.value)!=null?m:P.DefaultFunnelSeriesLabels.showValue,showPercentage:(b=(v=o==null?void 0:o.showPercentage)!=null?v:a==null?void 0:a.percent)!=null?b:P.DefaultFunnelSeriesLabels.showPercentage,showPercentDecimals:(w=(_=o==null?void 0:o.showPercentDecimals)!=null?_:a==null?void 0:a.decimals)!=null?w:P.DefaultFunnelSeriesLabels.showPercentDecimals})})},d3=e=>e,h3=e=>e,pV="column",mV=(e,t)=>{const r=qr(e,!1),n=pn(e!=null?e:{},P.getDefaultStyleOptions()),i=si(t,"polar",n),a=H(R({},r),{polarType:pV,designPerSeries:i});return P.withYAxisNormalizationForPolar(a)},gV=e=>R(R({},P.defaultScatterMarkerSize),e),vV=e=>{var t;return H(R({},qr(e,!1)),{lineWidth:0,marker:Uc((t=e==null?void 0:e.markers)!=null?t:{enabled:!0,fill:"filled",size:"small"}),dataLimits:g0(e,"scatter"),markerSize:gV(e.markerSize),legend:e.legend})},yV=e=>H(R({},qr(e,!1)),{boxplotType:e.subtype==="boxplot/hollow"?"hollow":"full"}),bV={fill:"filled",size:{defaultSize:4,minSize:4,maxSize:24}},_V=e=>H(R({},rr),{markers:P.merge(bV,e.markers||{})}),wV={"line/basic":"straight","line/spline":"smooth","line/step":"straight"},CV=e=>({thin:1,bold:3,thick:5})[e.width],xV=e=>({enabled:e.enabled,fill:e.fill==="filled"?"full":"hollow",size:e.size==="small"?"small":"large"}),TV=(e,t)=>qr(e,Hc(t)),SV=e=>t=>{var r,n,i,a,o,s;return H(R({},t),{line:{width:(n=(r=e.line)==null?void 0:r.width)!=null?n:CV(e.lineWidth||{width:"bold"}),dashStyle:(i=e.line)==null?void 0:i.dashStyle,endCap:(a=e.line)==null?void 0:a.endCap,shadow:(o=e.line)==null?void 0:o.shadow},marker:xV((s=e==null?void 0:e.markers)!=null?s:{enabled:!0,fill:"filled",size:"small"})})},MV=(e,t)=>r=>{const n=pn(e!=null?e:{},P.getDefaultStyleOptions()),i=si(t,"line",n);return H(R({},r),{designPerSeries:i})},EV=e=>t=>{const r=e.subtype||"line/basic",n=wV[r];return n?H(R({},t),{lineType:n}):t},PV=e=>t=>{const r=e.subtype==="line/step"?{step:e.stepPosition||"left"}:{};return R(R({},t),r)};function AV(e,t){const r=TV(e,t);return O.flow(SV(e),MV(e,t),EV(e),PV(e))(r)}const RV=["line/basic","line/spline","line/step"];function DV(e){return"subtype"in e&&e.subtype?RV.includes(e.subtype):!0}const st=(e,t)=>P.getCartesianChartOptions(e.chartData,t,e.designOptions,e.dataOptions,e.extraConfig.translate,e.extraConfig.themeSettings,e.extraConfig.dateFormatter).options,NV={fontSize:"13px",fontWeight:"normal",textOutline:"none",pointerEvents:"auto"},kV=e=>{switch(e){case"bottom":return{enabled:!0,align:"center",verticalAlign:"bottom",layout:"horizontal"};case"left":return{enabled:!0,align:"left",verticalAlign:"middle",layout:"vertical"};case"right":return{enabled:!0,align:"right",verticalAlign:"middle",layout:"vertical"};case"top":return{enabled:!0,align:"center",verticalAlign:"top",layout:"horizontal"};default:return{enabled:!0,align:"center",verticalAlign:"bottom",layout:"horizontal"}}},LV=e=>{if((e==null?void 0:e.enabled)===!1||!e)return;const{text:t,textStyle:r}=e;return{title:{text:t,style:r}}},OV=e=>{if(!e)return;const{layout:t,textStyle:r,marginBottom:n,marginTop:i,distance:a,width:o,hoverTextStyle:s,hiddenTextStyle:u}=e||{};return{layout:t,itemStyle:r,itemMarginBottom:n,itemMarginTop:i,itemDistance:a,itemWidth:o,itemHoverStyle:s,itemHiddenStyle:u}},IV=e=>{if(!e)return;const{radius:t,height:r,width:n,padding:i,squared:a}=e;return{symbolRadius:t,symbolHeight:r,symbolWidth:n,symbolPadding:i,squareSymbol:a}},FV=e=>{const c=e,{title:t,items:r,symbols:n,xOffset:i,yOffset:a,backgroundColor:o,borderColor:s}=c,u=Ge(c,["title","items","symbols","xOffset","yOffset","backgroundColor","borderColor"]);return P.omitUndefinedAndEmpty(H(R(R(R(R({},u),LV(t)),OV(r)),IV(n)),{x:i,y:a,backgroundColor:P.withGradientConversion(o),borderColor:P.withGradientConversion(s)}))},oo=e=>{const t={enabled:!1,symbolRadius:0,backgroundColor:"transparent",borderColor:"transparent",borderWidth:0,align:"center",verticalAlign:"bottom",layout:"horizontal"};if(!e)return t;const o=e,{position:r}=o,n=Ge(o,["position"]),i=kV(r||null),a=FV(n);return P.omitUndefinedAndEmpty(H(R(R(R({},t),i),a),{itemStyle:R(R({},NV),a.itemStyle)}))},so=e=>P.getCartesianTooltipSettings(e.dataOptions,e.extraConfig.translate),lo=(e,t)=>{var i;const r=P.buildCategoriesMeta(e.chartData,e.dataOptions,e.designOptions,P.isContinuousDatetimeXAxis(e.dataOptions.x),e.extraConfig.dateFormatter),n=P.buildXAxisSettings({designOptions:e.designOptions,dataOptions:e.dataOptions,chartData:e.chartData,categoriesMeta:r,orientation:t,isContinuous:P.isContinuousDatetimeXAxis(e.dataOptions.x),dateFormatter:e.extraConfig.dateFormatter});return P.withScrollerEvent((i=e.designOptions.autoZoom)==null?void 0:i.onScrollerChange)(n)},uo=(e,t)=>{const r=P.buildYAxisMeta(e.chartData,e.dataOptions),n=P.buildYAxisMinMax(0,t,e.chartData,e.designOptions,r.side,r.treatNullAsZero),i=P.hasSecondaryYAxis(r.side)?P.buildYAxisMinMax(1,t,e.chartData,e.designOptions,r.side,r.treatNullAsZero):void 0;return P.getYAxisSettings(e.designOptions.yAxis,e.designOptions.y2Axis,n,i,e.dataOptions,e.extraConfig.themeSettings)},$V=e=>{const t=lo(e,"horizontal"),r=uo(e,"line");return{xAxis:t,yAxis:r}},BV={getChart:function(e){return st(e,"line").chart},getSeries:function(e){return st(e,"line").series},getAxes:$V,getLegend:function(e){return oo(e.designOptions.legend)},getPlotOptions:function(e){return st(e,"line").plotOptions},getTooltip:so,getExtras:function(e){const t=st(e,"line");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},zV={dataOptions:{translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},data:{loadData:Ir,getChartData:ao},designOptions:{translateStyleOptionsToDesignOptions:el(AV),isCorrectStyleOptions:DV},renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:BV,getAlerts:io}),isCorrectRendererProps:Gr}},HV={translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},WV={loadData:Ir,getChartData:ao};function jV(e,t){const r=qr(e,!1),n=pn(e,P.getDefaultStyleOptions()),i=si(t,"polar",n),a=e.subtype||"polar/column",o=jc[a],s=(o==null?void 0:o.polarType)||"column",u=H(R({},r),{polarType:s,designPerSeries:i});return P.withYAxisNormalizationForPolar(u)}function UV(e){return typeof e=="object"&&e!==null&&(!("subtype"in e)||!e.subtype||e.subtype.startsWith("polar/"))}const VV={translateStyleOptionsToDesignOptions:jV,isCorrectStyleOptions:UV};function GV(e){const t=lo(e,"horizontal"),r=uo(e,"polar");return{xAxis:P.withPolarSpecificAxisSettings(t),yAxis:r}}const qV={getChart:function(e){const t=st(e,"polar");return H(R({},t.chart),{polar:!0})},getSeries:function(e){return st(e,"polar").series},getAxes:GV,getLegend:function(e){return oo(e.designOptions.legend)},getPlotOptions:function(e){return st(e,"polar").plotOptions},getTooltip:so,getExtras:function(e){const t=st(e,"polar");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},YV={dataOptions:HV,data:WV,designOptions:VV,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:qV,getAlerts:io}),isCorrectRendererProps:Gr}},XV={"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"}},ZV=e=>({thin:1,bold:3,thick:5})[e.width],KV=e=>({enabled:e.enabled,fill:e.fill==="filled"?"full":"hollow",size:e.size==="small"?"small":"large"}),QV=(e,t)=>qr(e,Hc(t)),JV=e=>t=>{var r,n,i,a,o,s;return H(R({},t),{line:{width:(n=(r=e.line)==null?void 0:r.width)!=null?n:ZV(e.lineWidth||{width:"thin"}),dashStyle:(i=e.line)==null?void 0:i.dashStyle,endCap:(a=e.line)==null?void 0:a.endCap,shadow:(o=e.line)==null?void 0:o.shadow},marker:KV((s=e==null?void 0:e.markers)!=null?s:{enabled:!0,fill:"filled",size:"small"})})},eG=(e,t)=>r=>{const n=pn(e!=null?e:{},P.getDefaultStyleOptions()),i=si(t,"area",n);return H(R({},r),{designPerSeries:i})},tG=e=>t=>{const r=e.subtype||"area/basic",n=XV[r];return n?H(R({},t),{lineType:n.lineType,stackType:n.stackType}):t},rG=e=>t=>{var r;return H(R({},t),{totalLabels:(r=e.totalLabels)!=null?r:{enabled:!1,rotation:0}})};function nG(e,t){const r=QV(e,t);return O.flow(JV(e),eG(e,t),tG(e),rG(e))(r)}const iG=["area/basic","area/stacked","area/stacked100","area/spline","area/stackedspline","area/stackedspline100"];function aG(e){return"subtype"in e&&e.subtype?iG.includes(e.subtype):!0}const oG=e=>{var r,n;const t={enabled:!1};switch(e.stackType){case"stacked":return{stacking:"normal",totalLabels:(r=e.totalLabels)!=null?r:t};case"stack100":return{stacking:"percent",totalLabels:(n=e.totalLabels)!=null?n:t};default:return{totalLabels:t}}},v0=e=>t=>{const r=e.designOptions,n=oG(r),{stacking:i,totalLabels:a}=n;if(!(a!=null&&a.enabled)&&!i)return t;const{defaultNumberFormattingEnabled:o}=e.extraConfig,s=e.dataOptions,u=s.y.find(({showOnRightAxis:h})=>!h),c=s.y.find(({showOnRightAxis:h})=>!!h);function d(h,p,m=!1){return function(){var C,S;const v=typeof this.value=="number"?this.value:parseFloat(this.value),b=m&&this.total||v,_=P.formatNumberWithFallback(b,h,o,P.applyFormatPlainText),w=p==="percent"?`${_}%`:_;return m?`${(C=a==null?void 0:a.prefix)!=null?C:""}${w}${(S=a==null?void 0:a.suffix)!=null?S:""}`:w}}return t.map((h,p)=>{var b;const v=(b=p===1?c:u)==null?void 0:b.numberFormatConfig;return H(R({},h),{labels:i?H(R({},h.labels),{formatter:d(v,i)}):h.labels,stackLabels:a!=null&&a.enabled?H(R(R({},h.stackLabels),P.prepareStackLabels(a)),{formatter:d(v,"normal",!0),style:R(R(R({},P.stackTotalFontStyleDefault),e.extraConfig.themeSettings?{color:e.extraConfig.themeSettings.typography.primaryTextColor}:null),P.prepareStackLabels(a).style),crop:!0,allowOverlap:!1,labelrank:99999}):h.stackLabels})})},Jl={HORIZONTAL:20,DIAGONAL:70,VERTICAL:110,INVERTED_DIAGONAL:160},sG={FULL_ROTATION:180};function f3(e){var n;let r=0;if((n=e.totalLabels)!=null&&n.enabled&&e.stackType==="stack100"){const i=Math.abs(e.totalLabels.rotation||0)%sG.FULL_ROTATION;i<Jl.HORIZONTAL?r=10:i<Jl.DIAGONAL?r=30:i<Jl.VERTICAL?r=40:i<Jl.INVERTED_DIAGONAL?r=30:r=10}return{rightSpacing:0,topSpacing:r}}const lG=e=>{const t=lo(e,"horizontal"),r=uo(e,"area");return{xAxis:uG(e)(t),yAxis:O.flow(v0(e),cG(e))(r)}};function uG(e){const{rightSpacing:t,topSpacing:r}=f3(e.designOptions);return P.withXAxisLabelPositioning({totalLabelRightSpacing:t,totalLabelTopSpacing:r})}function cG(e){const t=dG(e);return P.withYAxisLabelPositioning({rightShift:0,topShift:t})}function dG(e){var i;const t=e.designOptions;if(!(((i=t.totalLabels)==null?void 0:i.enabled)&&t.stackType==="stack100"))return 0;const{topSpacing:n}=f3(e.designOptions);return-1*(n/2)}const hG={getChart:function(e){return st(e,"area").chart},getSeries:function(e){return st(e,"area").series},getAxes:lG,getLegend:function(e){return oo(e.designOptions.legend)},getPlotOptions:function(e){return st(e,"area").plotOptions},getTooltip:so,getExtras:function(e){const t=st(e,"area");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},fG={dataOptions:{translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},data:{loadData:Ir,getChartData:ao},designOptions:{translateStyleOptionsToDesignOptions:nG,isCorrectStyleOptions:aG},renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:hG,getAlerts:io}),isCorrectRendererProps:Gr}};function p3(e,t,r){var o,s,u,c,d,h;const n=qr(t,Hc(r)),i=pn(t!=null?t:{},P.getDefaultStyleOptions()),a=si(r,e,i);return H(R({},n),{designPerSeries:a,stackType:t.subtype?m3[t.subtype]:c3,totalLabels:t.totalLabels,itemPadding:(s=(o=t.series)==null?void 0:o.padding)!=null?s:.01,groupPadding:(c=(u=t.series)==null?void 0:u.groupPadding)!=null?c:.1,borderRadius:(h=(d=t.series)==null?void 0:d.borderRadius)!=null?h:0})}const m3={"bar/classic":"classic","bar/stacked":"stacked","bar/stacked100":"stack100","column/classic":"classic","column/stackedcolumn":"stacked","column/stackedcolumn100":"stack100"};function g3(e){return"subtype"in e&&e.subtype?Object.keys(m3).includes(e.subtype):!0}const eu={HORIZONTAL:20,DIAGONAL:70,VERTICAL:110,INVERTED_DIAGONAL:160},pG={FULL_ROTATION:180};function mG(e){var n;let t=0;const r=0;if((n=e.totalLabels)!=null&&n.enabled&&e.stackType==="stack100"){const i=Math.abs(e.totalLabels.rotation||0)%pG.FULL_ROTATION;i<eu.HORIZONTAL?t=40:i<eu.DIAGONAL?t=25:i<eu.VERTICAL?t=15:i<eu.INVERTED_DIAGONAL?t=25:t=40}return{rightSpacing:t,topSpacing:r}}const gG=e=>{const t=lo(e,"vertical"),r=uo(e,"bar");return{xAxis:vG(e)(t),yAxis:O.flow(v0(e),yG(e))(r)}};function vG(e){const{rightSpacing:t,topSpacing:r}=mG(e.designOptions);return P.withXAxisLabelPositioning({totalLabelRightSpacing:t,totalLabelTopSpacing:r})}function yG(e){var a;const t=e.designOptions,n=((a=t.totalLabels)==null?void 0:a.enabled)&&t.stackType==="stack100"?.1:0;return P.withYAxisLabelPositioning({rightShift:n,topShift:0})}const bG=e=>_G(e)(oo(e.designOptions.legend));function _G(e){return r=>{var n,i;return e.dataOptions.x.length>1&&P.isLegendOnRight(e.designOptions.legend)?H(R({},r),{margin:(i=(n=e.designOptions.legend)==null?void 0:n.margin)!=null?i:80}):r}}const wG={getChart:function(e){return st(e,"bar").chart},getSeries:function(e){return st(e,"bar").series},getAxes:gG,getLegend:bG,getPlotOptions:function(e){return st(e,"bar").plotOptions},getTooltip:so,getExtras:function(e){const t=st(e,"bar");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},CG={dataOptions:{translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},data:{loadData:Ir,getChartData:ao},designOptions:{translateStyleOptionsToDesignOptions:el(p3)("bar"),isCorrectStyleOptions:g3},renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:wG,getAlerts:io}),isCorrectRendererProps:Gr}},tu={HORIZONTAL:20,DIAGONAL:70,VERTICAL:110,INVERTED_DIAGONAL:160},xG={FULL_ROTATION:180};function v3(e){var n;let r=0;if((n=e.totalLabels)!=null&&n.enabled&&e.stackType==="stack100"){const i=Math.abs(e.totalLabels.rotation||0)%xG.FULL_ROTATION;i<tu.HORIZONTAL?r=10:i<tu.DIAGONAL?r=30:i<tu.VERTICAL?r=40:i<tu.INVERTED_DIAGONAL?r=30:r=10}return{rightSpacing:0,topSpacing:r}}const TG=e=>{const t=lo(e,"horizontal"),r=uo(e,"column");return{xAxis:SG(e)(t),yAxis:O.flow(v0(e),MG(e))(r)}};function SG(e){const{rightSpacing:t,topSpacing:r}=v3(e.designOptions);return P.withXAxisLabelPositioning({totalLabelRightSpacing:t,totalLabelTopSpacing:r})}function MG(e){var a;const t=e.designOptions,r=((a=t.totalLabels)==null?void 0:a.enabled)&&t.stackType==="stack100";let n=0;if(r){const{topSpacing:o}=v3(e.designOptions);n=-1*(o/2)}return P.withYAxisLabelPositioning({rightShift:0,topShift:n})}const EG={getChart:function(e){return st(e,"column").chart},getSeries:function(e){return st(e,"column").series},getAxes:TG,getLegend:function(e){return oo(e.designOptions.legend)},getPlotOptions:function(e){return st(e,"column").plotOptions},getTooltip:so,getExtras:function(e){const t=st(e,"column");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},PG={dataOptions:{translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},data:{loadData:Ir,getChartData:ao},designOptions:{translateStyleOptionsToDesignOptions:el(p3)("column"),isCorrectStyleOptions:g3},renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:EG,getAlerts:io}),isCorrectRendererProps:Gr}},AG=e=>{const t=n=>typeof n=="number"&&Number.isNaN(n)||n==null?0:n,r=n=>{const i=t(n.value);return H(R({},n),{value:i})};return H(R({},e),{series:e.series.map(n=>H(R({},n),{data:n.data.map(r)}))})},RG=O.flow(ao,AG),DG=e=>({thin:1,bold:3,thick:5})[e.width],NG=e=>({enabled:e.enabled,fill:e.fill==="filled"?"full":"hollow",size:e.size==="small"?"small":"large"}),kG=(e,t)=>qr(e,Hc(t)),LG=e=>t=>{var r,n,i,a,o,s,u,c,d;return H(R({},t),{seriesTitles:{enabled:(n=(r=e.seriesTitles)==null?void 0:r.enabled)!=null?n:!0,textStyle:(i=e.seriesTitles)==null?void 0:i.textStyle},line:{width:(o=(a=e.line)==null?void 0:a.width)!=null?o:DG(e.lineWidth||{width:"thin"}),dashStyle:(s=e.line)==null?void 0:s.dashStyle,endCap:(u=e.line)==null?void 0:u.endCap,shadow:(c=e.line)==null?void 0:c.shadow},marker:NG((d=e==null?void 0:e.markers)!=null?d:{enabled:!1,fill:"filled",size:"small"})})},OG=(e,t)=>r=>{const n=si(t,"area",e);return H(R({},r),{designPerSeries:n})},IG=e=>t=>{var r,n,i,a,o,s,u,c,d,h,p,m;return H(R({},t),{seriesLabels:H(R({},e.seriesLabels),{enabled:(n=(r=e.seriesLabels)==null?void 0:r.enabled)!=null?n:!1,rotation:(a=(i=e.seriesLabels)==null?void 0:i.rotation)!=null?a:0,showValue:(c=(u=(o=e.seriesLabels)==null?void 0:o.showValue)!=null?u:(s=e.seriesLabels)==null?void 0:s.enabled)!=null?c:!1,textStyle:H(R({},(d=e.seriesLabels)==null?void 0:d.textStyle),{color:(m=(p=(h=e.seriesLabels)==null?void 0:h.textStyle)==null?void 0:p.color)!=null?m:"#000000"})})})};function FG(e,t){const r=kG(e,t);return O.flow(LG(e),OG(e,t),IG(e))(r)}function $G(e){return!0}function BG(){const e=P.getDefaultStyleOptions();return P.merge(e,{yAxis:{enabled:!0,gridLines:!0,labels:{enabled:!1},title:{enabled:!1,text:""}},xAxis:{gridLines:!1},legend:{enabled:!1}})}const zG=e=>{const t=lo(e,"horizontal"),r=uo(e,"area"),n=t.map(a=>{var o;return H(R({},a),{gridLineWidth:e.designOptions.xAxis.gridLine?1:0,labels:H(R({},a.labels),{enabled:(o=e.designOptions.xAxis.labels)!=null?o:!0})})}),i=r.map(a=>H(R({},a),{visible:e.designOptions.yAxis.enabled,gridLineWidth:e.designOptions.yAxis.gridLine?1:0,labels:H(R({},a.labels),{enabled:e.designOptions.yAxis.labels}),startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.15,min:void 0,max:void 0}));return{xAxis:n,yAxis:i}},HG=e=>{var n,i,a,o,s;const t=st(e,"area").plotOptions,r=(i=(n=e.designOptions.line)==null?void 0:n.width)!=null?i:1;return H(R({},t),{series:H(R({},t.series),{stacking:"stream",lineWidth:r,fillOpacity:1,label:{enabled:(o=(a=e.designOptions.seriesTitles)==null?void 0:a.enabled)!=null?o:!0,minFontSize:5,maxFontSize:15,style:(s=e.designOptions.seriesTitles)==null?void 0:s.textStyle}})})},WG={getChart:function(e){const t=st(e,"area");return H(R({},t.chart),{type:"streamgraph"})},getSeries:function(e){return st(e,"area").series},getAxes:zG,getLegend:function(e){return oo(e.designOptions.legend)},getPlotOptions:HG,getTooltip:so,getExtras:function(e){const t=st(e,"area");return U.omit(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},jG={dataOptions:{translateDataOptionsToInternal:Ui,getAttributes:eo,getMeasures:to,isCorrectDataOptions:ro,isCorrectDataOptionsInternal:no},data:{loadData:Ir,getChartData:RG},designOptions:{translateStyleOptionsToDesignOptions:FG,isCorrectStyleOptions:$G,getDefaultStyleOptions:BG},renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:WG,getAlerts:io}),isCorrectRendererProps:Gr}},UG=e=>P.getAlerts(e.chartData,e.designOptions);function VG(e,t){const r=GG[e],n=e!=="pie"||t.category.length>0,i=[y3(r.category),n?b3(r.value):a=>a];return O.flow(...i)(t)}const GG={pie:{category:3,value:1},funnel:{category:1,value:1},treemap:{category:3,value:1},sunburst:{category:6,value:1}};function y3(e){return t=>(t.category.length>e&&console.warn(`Maximum 'category' length is limited to ${e}. Taken first ${e} categories`),H(R({},t),{category:t.category.slice(0,e)}))}function b3(e){return t=>(t.value.length>e&&console.warn(`Maximum 'value' length is limited to ${e}. Taken first ${e} values`),H(R({},t),{value:t.value.slice(0,e)}))}function _3(e){return{y:e.value.map(t=>P.normalizeMeasureColumn(t)),breakBy:e.category.map(t=>P.normalizeColumn(t)),seriesToColorMap:e.seriesToColorMap}}function Vc(e){return[...e.breakBy.map(w3)].filter(qG)}function Gc(e){return e.y.map(w3).filter(P.isMeasureColumn)}function qc(e){return"category"in e&&"value"in e&&Array.isArray(e.category)&&Array.isArray(e.value)}function Yc(e){return e&&"y"in e&&Array.isArray(e.y)&&e.y.every(P.isMeasureColumn)&&"breakBy"in e&&Array.isArray(e.breakBy)&&e.breakBy.every(P.isStyledColumn)}function w3(e){return e.column}function qG(e){return!P.isMeasureColumn(e)}function Xc({maxCategories:e,maxValues:t}){return O.flow(y3(e),b3(t))}const YG={translateDataOptionsToInternal:e=>{const t=e.category.length>0?Xc({maxCategories:1,maxValues:1})(e):e;return _3(t)},getAttributes:e=>Vc(e),getMeasures:e=>Gc(e),isCorrectDataOptions:e=>qc(e),isCorrectDataOptionsInternal:e=>Yc(e)},Zc=(e,t,r=!0)=>{const n=H(R({},e),{x:e.breakBy,breakBy:[]});let i=P.cartesianData(n,t,r);if(e.breakBy.some(({column:{type:o},numberFormatConfig:s})=>U.isNumber(o)&&(r||s))){const o=i.xValues.map(s=>{const u=[];return e.breakBy.forEach(({column:{type:c},numberFormatConfig:d},h)=>{const p=d!==void 0,m=s.xValues[h];if(U.isNumber(c)&&(r||p)){const v=P.getCompleteNumberFormatConfig(d);u.push(P.applyFormatPlainText(v,parseFloat(m)))}else u.push(m)}),H(R({},s),{xValues:u})});i=H(R({},i),{xValues:o})}return H(R({},i),{type:"categorical"})},C3=Ir;function x3(e,t,r){return Zc(e,t,r==null?void 0:r.defaultNumberFormattingEnabled)}const ey=50,XG=e=>(...t)=>{var s;const[r,...n]=t,i=(s=r.queryDescription)==null?void 0:s.count,a=Math.min(i!=null?i:ey,ey),o=H(R({},r),{queryDescription:H(R({},r.queryDescription),{count:a})});return e(o,...n)},ZG={loadData:XG(C3),getChartData:(e,t)=>x3(e,t)},KG=e=>{var r,n;const{dataLimits:t}=e;return{categoriesCapacity:(r=t==null?void 0:t.categoriesCapacity)!=null?r:5e4,seriesCapacity:(n=t==null?void 0:t.seriesCapacity)!=null?n:5e4}};function QG(e){var s,u,c,d,h;const{funnelType:t=P.DefaultFunnelType,funnelSize:r=P.DefaultFunnelSize,funnelDirection:n=P.DefaultFunnelDirection,legend:i,seriesLabels:a}=e,o=KG(e);return H(R({},rr),{funnelSize:r,funnelType:t,funnelDirection:n,legend:i,dataLimits:o,seriesLabels:H(R({},a!=null?a:{}),{enabled:(s=a==null?void 0:a.enabled)!=null?s:P.DefaultFunnelSeriesLabels.enabled,showCategory:(u=a==null?void 0:a.showCategory)!=null?u:P.DefaultFunnelSeriesLabels.showCategory,showValue:(c=a==null?void 0:a.showValue)!=null?c:P.DefaultFunnelSeriesLabels.showValue,showPercentage:(d=a==null?void 0:a.showPercentage)!=null?d:P.DefaultFunnelSeriesLabels.showPercentage,showPercentDecimals:(h=a==null?void 0:a.showPercentDecimals)!=null?h:P.DefaultFunnelSeriesLabels.showPercentDecimals})})}function JG(e){return!e||typeof e=="object"}function eq(){return{legend:{enabled:!0,position:"bottom"},funnelType:P.DefaultFunnelType,funnelSize:P.DefaultFunnelSize,funnelDirection:P.DefaultFunnelDirection,seriesLabels:P.DefaultFunnelSeriesLabels}}function tq(e={}){var a,o,s,u,c;const i=e,{labels:t,seriesLabels:r}=i,n=Ge(i,["labels","seriesLabels"]);return P.omitUndefinedAndEmpty(H(R({},n),{seriesLabels:H(R({},r!=null?r:{}),{enabled:(a=r==null?void 0:r.enabled)!=null?a:t==null?void 0:t.enabled,showCategory:(o=r==null?void 0:r.showCategory)!=null?o:t==null?void 0:t.categories,showValue:(s=r==null?void 0:r.showValue)!=null?s:t==null?void 0:t.value,showPercentage:(u=r==null?void 0:r.showPercentage)!=null?u:t==null?void 0:t.percent,showPercentDecimals:(c=r==null?void 0:r.showPercentDecimals)!=null?c:t==null?void 0:t.decimals})}))}const rq={translateStyleOptionsToDesignOptions:QG,isCorrectStyleOptions:JG,getDefaultStyleOptions:eq,translateLegacyStyleOptionsToModern:tq},nq={getChart:function(e){return{type:P.determineHighchartsChartType("funnel",e.designOptions),spacing:[30,30,30,30],alignTicks:!1,polar:!1}},getSeries:function(e){const{series:t}=P.formatFunnelChartData(e.chartData,e.dataOptions,e.designOptions,e.extraConfig.themeSettings);return t},getAxes:function(){return{xAxis:[],yAxis:[]}},getLegend:function(e){return P.getLegendSettings(e.designOptions.legend)},getPlotOptions:function(e){return P.getFunnelPlotOptions(e.designOptions,e.dataOptions,e.extraConfig.defaultNumberFormattingEnabled)},getTooltip:function(e){var t;return P.getCategoryTooltipSettings((t=e.designOptions.seriesLabels)==null?void 0:t.showPercentDecimals,e.dataOptions,e.extraConfig.defaultNumberFormattingEnabled)},getExtras:function(){return{title:{text:null}}}},iq={dataOptions:YG,data:ZG,designOptions:rq,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:nq,getAlerts:UG}),isCorrectRendererProps:Gr}},aq=e=>{const{seriesCapacity:t}=e.designOptions.dataLimits;return P.getPieAlerts(e.chartData,t)},oq={translateDataOptionsToInternal:e=>{const t=e.category.length>0?Xc({maxCategories:1,maxValues:1})(e):e;return _3(t)},getAttributes:e=>Vc(e),getMeasures:e=>Gc(e),isCorrectDataOptions:e=>qc(e),isCorrectDataOptionsInternal:e=>Yc(e)},sq={loadData:C3,getChartData:(e,t)=>x3(e,t)},lq="classic",$o={enabled:!0,showCategory:!0,showValue:!1,percentageLabels:{enabled:!0,showDecimals:!1}},uq=e=>{var r,n;const{dataLimits:t}=e;return{categoriesCapacity:(r=t==null?void 0:t.categoriesCapacity)!=null?r:5e4,seriesCapacity:(n=t==null?void 0:t.seriesCapacity)!=null?n:5e4}};function cq(e){var d,h,p,m,v,b,_,w,C,S,T,M;const{legend:t,labels:r,subtype:n,seriesLabels:i,semiCircle:a}=e,o=n?jc[n]:void 0,s=(o==null?void 0:o.pieType)||lq,u=e!=null&&e.convolution?e.convolution:{enabled:!1},c=uq(e);return H(R({},rr),{seriesLabels:H(R({},i),{enabled:(h=(d=i==null?void 0:i.enabled)!=null?d:r==null?void 0:r.enabled)!=null?h:$o.enabled,showCategory:(m=(p=i==null?void 0:i.showCategory)!=null?p:r==null?void 0:r.categories)!=null?m:$o.showCategory,showValue:(b=(v=i==null?void 0:i.showValue)!=null?v:r==null?void 0:r.value)!=null?b:$o.showValue,percentageLabels:H(R({},i==null?void 0:i.percentageLabels),{enabled:(C=(w=(_=i==null?void 0:i.percentageLabels)==null?void 0:_.enabled)!=null?w:r==null?void 0:r.percent)!=null?C:$o.percentageLabels.enabled,showDecimals:(M=(T=(S=i==null?void 0:i.percentageLabels)==null?void 0:S.showDecimals)!=null?T:r==null?void 0:r.decimals)!=null?M:$o.percentageLabels.showDecimals})}),pieType:s,convolution:u,legend:t,dataLimits:c,semiCircle:a})}function dq(e){return!e||typeof e=="object"}function hq(){return{legend:{enabled:!0,position:"bottom"},labels:{enabled:!0,categories:!0,percent:!0,decimals:!1,value:!1}}}const fq={translateStyleOptionsToDesignOptions:cq,isCorrectStyleOptions:dq,getDefaultStyleOptions:hq},pq={getChart:function(e){return{type:P.determineHighchartsChartType("pie",e.designOptions),spacing:[20,20,20,20],alignTicks:!1,polar:!1}},getSeries:function(e){return P.getPieSeries({chartData:e.chartData,dataOptions:e.dataOptions,seriesCapacity:e.designOptions.dataLimits.seriesCapacity,convolution:e.designOptions.convolution,themeSettings:e.extraConfig.themeSettings})},getAxes:function(){return{xAxis:[],yAxis:[]}},getLegend:function(e){return P.getLegendSettings(e.designOptions.legend)},getPlotOptions:function(e){return P.getPiePlotOptions({pieType:e.designOptions.pieType,seriesLabels:e.designOptions.seriesLabels,chartDataOptions:e.dataOptions,themeSettings:e.extraConfig.themeSettings,semiCircle:e.designOptions.semiCircle,defaultNumberFormattingEnabled:e.extraConfig.defaultNumberFormattingEnabled})},getTooltip:function(e){var t,r;return P.getCategoryTooltipSettings((r=(t=e.designOptions.seriesLabels)==null?void 0:t.percentageLabels)==null?void 0:r.showDecimals,e.dataOptions,e.extraConfig.defaultNumberFormattingEnabled)},getExtras:function(e){const t=P.getPieConvolutionSeries({chartData:e.chartData,dataOptions:e.dataOptions,seriesCapacity:e.designOptions.dataLimits.seriesCapacity,convolution:e.designOptions.convolution,themeSettings:e.extraConfig.themeSettings});return{title:{text:null},drilldown:{activeDataLabelStyle:{cursor:"pointer",fontWeight:"bold",textDecoration:"none"},series:t}}}},mq={dataOptions:oq,data:sq,designOptions:fq,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:pq,getAlerts:aq}),isCorrectRendererProps:Gr}};function gq(){return[]}const vq=(e,t)=>{if(P.emptyTable(t))return{rows:[],columns:[]};const r=P.getColumnsByName(t,e);return P.selectColumns(t,r)},yp=({column:e,sortType:t})=>{switch("getSort"in e?e.getSort():t){case"sortAsc":case U.Sort.Ascending:return 1;case"sortDesc":case U.Sort.Descending:return-1;default:return 0}},yq=(e,t)=>{const r=e.columns.find(n=>yp(n)!==0);if(r){const n=P.getColumnByName(t,r.column.name);n&&(n.direction=yp(r))}return t},T3=e=>{if(!("sortType"in e))return e;const t=e.sortType,r=U.convertSortDirectionToSort(t);return H(R({},e),{sortType:t,column:bq(e.column,r)})};function bq(e,t){return wq(e)?_q(e,t):e}function _q(e,t){const r=e.sort(t);return P.isMeasureColumn(r)&&P.isMeasureColumn(e)&&(r.title=e.title),r}function wq(e){return"sort"in e&&typeof e.sort=="function"}const Cq=(e,t)=>({columns:e.columns.map(r=>{const n=r.column.name===t.name,i=yp(r),a=n?i===1?"sortDesc":"sortAsc":"sortNone";return r.sortType=a,T3(r)})}),xq=(e,t)=>{const r=vq(e.columns.map(({column:{name:n}})=>n),t);return yq(e,r)},Tq=(e,t)=>{switch(t){case"iqr":return zP(e);case"extremums":return HP(e);case"standardDeviation":return WP(e)}},Sq=(e,t)=>{switch(t){case"iqr":return jP(e);case"standardDeviation":return UP(e)}},Mq=(e,t,r)=>{const{column:n,style:i}=P.splitColumn(e);let a=Tq(n,t),o;return i&&(a=a.map(s=>R({column:s},i))),r&&(o=Sq(n,t),o&&i&&(o=R({column:o},i))),{values:a,outliers:o}},Eq=e=>e.value.length>1,Pq=()=>({valueTitle:""}),S3=e=>{var h;const{category:t}=e;if(e.value.length===0)return Pq();let r,n,i;if(Eq(e))r=e.value,i=e.valueTitle,n=(h=e.outliers)==null?void 0:h[0];else{const{outliersEnabled:p,boxType:m}=e,v=P.normalizeColumn(e.value[0]),{values:b,outliers:_}=Mq(v,m,!!p);r=b,n=_,i=P.getDataOptionTitle(v)}const[a,o,s,u,c,d]=r;return{category:t[0]&&P.normalizeColumn(t[0]),boxMin:a&&P.normalizeMeasureColumn(a),boxMedian:o&&P.normalizeMeasureColumn(o),boxMax:s&&P.normalizeMeasureColumn(s),whiskerMin:u&&P.normalizeMeasureColumn(u),whiskerMax:c&&P.normalizeMeasureColumn(c),outliersCount:d&&P.normalizeMeasureColumn(d),outliers:n&&P.normalizeColumn(n),valueTitle:i}};function Aq(e){var a;const t=e.value.map(o=>{if(o!=null&&o.chartType)return[P.normalizeMeasureColumn(o)];const h=o,{lowerBound:s,upperBound:u,title:c}=h,d=Ge(h,["lowerBound","upperBound","title"]);return[P.normalizeMeasureColumn(R({column:P.safeMerge(s,{title:c})},d)),P.normalizeMeasureColumn(R({column:P.safeMerge(u,{title:c})},d))]}),r=t.flat(),n=t.filter(o=>o.length===2),i=t.filter(o=>o.length===1).flat();return{x:e.category.map(o=>P.normalizeColumn(o)),breakBy:((a=e.breakBy)==null?void 0:a.map(o=>P.normalizeColumn(o)))||[],y:r,rangeValues:n,seriesValues:i,seriesToColorMap:e.seriesToColorMap}}const ty={city:4,state:3,country:2,auto:1};function Rq(e){return e.filter(r=>"geoLevel"in r&&r.geoLevel).map(r=>r.geoLevel).reduce((r,n)=>ty[n]>ty[r]?n:r,"auto")}function Dq(e){const{geo:t,size:r,colorBy:n,details:i}=e;return{locations:t.map(a=>P.normalizeColumn(a)),size:r&&P.normalizeMeasureColumn(r),colorBy:n&&P.normalizeMeasureColumn(n),details:i&&P.normalizeAnyColumn(i),locationLevel:Rq(t)}}const M3=e=>`$measure${e}_`,E3=e=>{const t={};return e.forEach((r,n)=>{const i=r.name,a=`${M3(n)}${i}`;r.name=a,t[a]=i}),t},Nq=e=>{const t={};return{measures:e.map((n,i)=>{const a=n.name,o=`${M3(i)}${a}`;return t[o]=a,Object.assign(Object.create(n),{name:o})}),mapping:t}},P3=(e,t)=>{if(t==="funnel"){const r=P.merge(e);if(r.breakBy.length>0&&r.breakBy[0].sortType===void 0&&r.y.length>0&&r.y[0].sortType===void 0)return r.y[0].sortType="sortDesc",r}return e},A3=(e,t,r,n,i,a)=>{if(!e)return!0;if(t.length+r.length===0)throw new U.TranslatableError("errors.dataOptions.noDimensionsAndMeasures");return t.forEach(o=>{if(e.columns.findIndex(u=>u.name===o.name)===-1)throw new U.TranslatableError("errors.dataOptions.attributeNotFound",{attributeName:o.name})}),r.forEach(o=>{if(e.columns.findIndex(u=>u.name===o.name||u.name===n[o.name])===-1)throw new U.TranslatableError("errors.dataOptions.measureNotFound",{measureName:n[o.name]})}),i&&i.forEach(o=>{if(e.columns.findIndex(u=>u.name===o.attribute.name)===-1)throw new U.TranslatableError("errors.dataOptions.filterAttributeNotFound",{attributeName:o.attribute.name})}),a&&a.forEach(o=>{if(e.columns.findIndex(u=>u.name===o.attribute.name)===-1)throw new U.TranslatableError("errors.dataOptions.highlightAttributeNotFound",{attributeName:o.attribute.name})}),!0};function R3(e,t){switch(e){case"pie":case"funnel":case"treemap":return VG(e,t);default:return t}}function D3(e,t){if(z.isCartesian(e))return Ui(t);if(z.isCategorical(e))return y0(t);if(z.isIndicator(e))return kq(t);if(z.isScatter(e))return Lq(t);if(z.isBoxplot(e))return S3(t);if(z.isScattermap(e))return Dq(t);if(z.isRange(e))return Aq(t);throw new U.TranslatableError("errors.unexpectedChartType",{chartType:e})}const y0=e=>({y:e.value.map(t=>P.normalizeMeasureColumn(t)),breakBy:e.category.map(t=>P.normalizeColumn(t)),seriesToColorMap:e.seriesToColorMap}),kq=e=>{var t,r,n,i,a,o;return{value:(t=e.value)==null?void 0:t.map(s=>P.normalizeMeasureColumn(s)),secondary:(r=e.secondary)==null?void 0:r.map(s=>P.normalizeMeasureColumn(s)),min:(i=(n=e.min)==null?void 0:n.map(s=>P.normalizeMeasureColumn(s)))==null?void 0:i.map(ry("min")),max:(o=(a=e.max)==null?void 0:a.map(s=>P.normalizeMeasureColumn(s)))==null?void 0:o.map(ry("max"))}},ry=e=>t=>{const{column:r}=t,n="aggregation"in r&&r.aggregation||e;return H(R({},t),{column:P.safeMerge(r,{aggregation:n})})},Lq=e=>{const{x:t,y:r,breakByPoint:n,breakByColor:i,size:a,seriesToColorMap:o}=e;return{x:t&&P.normalizeAnyColumn(t),y:r&&P.normalizeAnyColumn(r),breakByPoint:n&&P.normalizeColumn(n),breakByColor:i&&P.normalizeAnyColumn(i),size:a&&P.normalizeMeasureColumn(a),seriesToColorMap:o}};function N3(e,t){const r=e[t];return r==null?[]:Array.isArray(r)?r:[r]}function k3(e,t){let r=[];return z.isScatter(t)?r=["x","y","breakByPoint","breakByColor"]:z.isCartesian(t)||z.isCategorical(t)||z.isRange(t)?r=["x","breakBy"]:z.isBoxplot(t)?r=["category","outliers"]:z.isScattermap(t)&&(r=["locations"]),r.flatMap(n=>N3(e,n)).filter(n=>!P.isMeasureColumn(n))}function L3(e,t){let r=[];return z.isIndicator(t)?r=["value","secondary","min","max"]:z.isScatter(t)?r=["x","y","breakByColor","size"]:z.isCartesian(t)||z.isCategorical(t)||z.isRange(t)?r=["y"]:z.isBoxplot(t)?r=["boxMin","boxMedian","boxMax","whiskerMin","whiskerMax","outliersCount"]:z.isScattermap(t)&&(r=["size","colorBy","details"]),r.flatMap(n=>N3(e,n)).filter(P.isMeasureColumn)}function Oq(e,t){return k3(e,t).map(({column:r})=>r)}function Iq(e,t){return L3(e,t).map(({column:r})=>r)}function tl(e){return{columns:e.columns.map(t=>P.normalizeAnyColumn(t)).map(T3)}}function Fq(e){const t=e.columns.filter(P.isMeasureColumn),{measures:r,mapping:n}=Nq(t.map(P.translateColumnToMeasure));let i=0;const a=e.columns.map(o=>P.isMeasureColumn(o)?H(R({},o),{column:r[i++]}):o);return{dataOptions:H(R({},e),{columns:a}),mapping:n}}function O3(e){var t,r,n;return{rows:(t=e.rows)==null?void 0:t.map(i=>P.normalizeColumn(i)),columns:(r=e.columns)==null?void 0:r.map(i=>P.normalizeColumn(i)),values:(n=e.values)==null?void 0:n.map(i=>P.normalizeMeasureColumn(i)),grandTotals:e.grandTotals}}const $q={translateDataOptionsToInternal:e=>y0(Xc({maxCategories:6,maxValues:1})(e)),getAttributes:Vc,getMeasures:Gc,isCorrectDataOptions:e=>qc(e),isCorrectDataOptionsInternal:e=>Yc(e)},Bq={loadData:Ir,getChartData:(e,t,r)=>Zc(e,t,r==null?void 0:r.defaultNumberFormattingEnabled)},zq={translateStyleOptionsToDesignOptions:e=>h3(e),getDefaultStyleOptions:()=>({seriesLabels:{enabled:!1},legend:{enabled:!0}}),translateLegacyStyleOptionsToModern:e=>{var r;const t=e!=null?e:{};return t!=null&&t.labels&&!(t!=null&&t.seriesLabels)?H(R({},t),{seriesLabels:(r=t.labels.category)==null?void 0:r.map(n=>{var i;return{enabled:(i=n==null?void 0:n.enabled)!=null?i:!0}})}):t},isCorrectStyleOptions:e=>!(!e||typeof e!="object")},Hq={getChart:()=>({type:"sunburst",spacing:[20,20,20,20],alignTicks:!1,polar:!1,animation:{duration:300}}),getSeries:e=>P.prepareSunburstSeries(e.chartData,e.dataOptions,e.designOptions,e.extraConfig.themeSettings,e.extraConfig.defaultNumberFormattingEnabled),getAxes:()=>({xAxis:void 0,yAxis:void 0}),getLegend:e=>P.getLegendSettings(e.designOptions.legend),getPlotOptions:()=>({series:{},sunburst:{events:{legendItemClick:function(e){e.preventDefault()}}}}),getTooltip:e=>P.prepareSunburstTooltip(e.dataOptions,e.designOptions,e.extraConfig.translate),getExtras:()=>({title:{text:null}})},Wq={dataOptions:$q,data:Bq,designOptions:zq,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:Hq,getAlerts:gq}),isCorrectRendererProps:Gr}};function jq(){return[]}const Uq={translateDataOptionsToInternal:e=>y0(Xc({maxCategories:3,maxValues:1})(e)),getAttributes:Vc,getMeasures:Gc,isCorrectDataOptions:e=>qc(e),isCorrectDataOptionsInternal:e=>Yc(e)},Vq={loadData:Ir,getChartData:(e,t,r)=>Zc(e,t,r==null?void 0:r.defaultNumberFormattingEnabled)},Gq={translateStyleOptionsToDesignOptions:e=>d3(e),getDefaultStyleOptions:()=>({seriesLabels:{enabled:!0},tooltip:{mode:"value"}}),translateLegacyStyleOptionsToModern:e=>{var r;const t=e!=null?e:{};return t!=null&&t.labels&&!(t!=null&&t.seriesLabels)?H(R({},t),{seriesLabels:(r=t.labels.category)==null?void 0:r.map(n=>{var i;return{enabled:(i=n==null?void 0:n.enabled)!=null?i:!0}})}):t},isCorrectStyleOptions:e=>!(!e||typeof e!="object")},qq="rgb(0, 206, 230)",Yq={getChart:()=>({type:"treemap",spacing:[20,20,20,20],alignTicks:!1,polar:!1,animation:{duration:300}}),getSeries:e=>[{type:"treemap",layoutAlgorithm:"strip",layoutStartingDirection:"horizontal",clip:!1,color:qq,name:e.dataOptions.y[0]?P.getDataOptionTitle(e.dataOptions.y[0]):"",data:P.prepareTreemapDataItems(e.chartData,e.dataOptions,e.extraConfig.themeSettings),levels:P.prepareTreemapLevels(e.dataOptions,e.designOptions,e.extraConfig.themeSettings),dataLabels:{style:{textOutline:"none"}}}],getAxes:()=>({xAxis:void 0,yAxis:void 0}),getLegend:()=>({enabled:!1}),getPlotOptions:()=>({series:{}}),getTooltip:e=>P.getTreemapTooltipSettings(e.dataOptions,e.designOptions,e.extraConfig.translate,void 0,e.extraConfig.defaultNumberFormattingEnabled),getExtras:()=>({title:{text:null}})},Xq={dataOptions:Uq,data:Vq,designOptions:Gq,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:Yq,getAlerts:jq}),isCorrectRendererProps:Gr}};function Zq(e){const t=Object.values(e);return t.length>0&&t.every(r=>typeof r=="string")}function Kq(e){const t=e.indexOf("__");if(t<=0)return;const r=Number.parseInt(e.slice(0,t),10);return Number.isNaN(r)?void 0:r}function Qq(e){const t=new Set,r=P.getDataOptionTitle(e);return r&&t.add(r),t.add(e.column.name),"title"in e.column&&typeof e.column.title=="string"&&t.add(e.column.title),[...t]}function I3(e,t,r,n){if(!n)return;if(Zq(n)){const a=n[t];return typeof a=="string"?a:void 0}const i=Kq(e);if(!(i===void 0||i>=r.length))for(const a of Qq(r[i])){const o=n[a],s=o==null?void 0:o[t];if(typeof s=="string")return s}}const bp=1e3;function Jq(e,t){var v,b,_,w,C,S;const r=e.category.map(T=>T.column.name),n=e.value.column.name,i=new Map;for(const T of t.columns)i.set(T.name,T.index);const a=i.get(n),o=[],s=(T,M)=>`${T}__${M}`,u=new Map;for(let T=0;T<r.length-1;T++){const M=i.get(r[T]),E=i.get(r[T+1]);if(M===void 0||E===void 0||a===void 0)continue;const D=new Map;for(const N of t.rows){const F=N[M],B=N[E],G=String((v=F==null?void 0:F.displayValue)!=null?v:""),Y=String((b=B==null?void 0:B.displayValue)!=null?b:"");if(!G||!Y)continue;const $=s(T,G),X=s(T+1,Y),V=(_=N[a])==null?void 0:_.rawValue,Z=Math.max(0,typeof V=="number"?V:Number(V)||0),j=`${$}\0${X}`;D.set(j,((w=D.get(j))!=null?w:0)+Z),u.has($)?(F==null?void 0:F.blur)===!1&&(u.get($).blur=!1):u.set($,{rawValue:F==null?void 0:F.rawValue,blur:F==null?void 0:F.blur,name:G}),u.has(X)?(B==null?void 0:B.blur)===!1&&(u.get(X).blur=!1):u.set(X,{rawValue:B==null?void 0:B.rawValue,blur:B==null?void 0:B.blur,name:Y})}for(const[N,F]of D.entries()){const B=N.indexOf("\0");o.push({from:N.slice(0,B),to:N.slice(B+1),weight:F})}}const c=o.length>bp?o.length:void 0,d=c!==void 0?o.slice(0,bp):o,h=new Set,p=[],m=Array.from(u.values()).some(T=>T.blur!==void 0);for(const T of d)for(const M of[T.from,T.to])if(!h.has(M)){h.add(M);const E=u.get(M),D=(C=E==null?void 0:E.name)!=null?C:M,N=I3(M,D,e.category,e.seriesToColorMap);p.push(H(R({id:M,name:D},N?{color:N}:{}),{rawValue:E==null?void 0:E.rawValue,blur:m?(S=E==null?void 0:E.blur)!=null?S:!1:void 0}))}return{type:"sankey",links:d,nodes:p,totalLinksBeforeTruncation:c}}const eY={loadData:Ir,getChartData:Jq},ny=6;function tY(e){const{translate:t}=e.extraConfig,r=[],n=e.dataOptions.category.length;return n>ny&&r.push(t("chart.sankey.alerts.tooManyStages",{stageCount:String(n),softLimit:String(ny)})),e.chartData.totalLinksBeforeTruncation!==void 0&&console.warn(`Sankey chart: query returned ${e.chartData.totalLinksBeforeTruncation} links; only the first ${bp} are displayed.`),r}function rY(e){return{category:e.category.map(t=>P.normalizeColumn(t)),value:P.normalizeMeasureColumn(e.value),seriesToColorMap:e.seriesToColorMap}}function nY(e){return e.category.map(t=>P.translateColumnToAttribute(t)).filter(Boolean)}function iY(e){return[P.translateColumnToMeasure(e.value)]}function aY(e){if(!("category"in e&&"value"in e)||"breakBy"in e)return!1;const{category:t,value:r}=e;if(!Array.isArray(t)||Array.isArray(r)||t.length<2)return!1;const n=i=>i!=null&&typeof i=="object"&&!Array.isArray(i);return t.every(n)&&n(r)}function oY(e){if(!("category"in e&&"value"in e))return!1;const{category:t,value:r}=e;return!Array.isArray(t)||Array.isArray(r)?!1:t.every(n=>P.isStyledColumn(n))&&P.isStyledColumn(r)}const sY={translateDataOptionsToInternal:rY,getAttributes:nY,getMeasures:iY,isCorrectDataOptions:aY,isCorrectDataOptionsInternal:oY};function lY(e){return e.orientation==="vertical"?"vertical":"horizontal"}function uY(e){var t;return H(R({},rr),{orientation:lY(e),curveFactor:e.curveFactor,linkOpacity:e.linkOpacity,nodeWidth:e.nodeWidth,nodePadding:e.nodePadding,nodeAlignment:e.nodeAlignment,legend:(t=e.legend)!=null?t:{enabled:!1}})}function cY(e){return e!==null&&!Array.isArray(e)&&typeof e=="object"}function dY(){return{orientation:"horizontal",nodeAlignment:"top",curveFactor:.33,linkOpacity:.5,nodeWidth:20,nodePadding:10,legend:{enabled:!1}}}const hY={translateStyleOptionsToDesignOptions:uY,isCorrectStyleOptions:cY,getDefaultStyleOptions:dY};function fY(e,t,r,n){var o;const i=(o=e.name)!=null?o:e.id;if(t.has(i)||t.set(i,t.size),e.color)return e.color;const a=I3(e.id,i,r.category,r.seriesToColorMap);return a||P.getPaletteColor(n,t.get(i))}const pY={getChart(e){return{type:"sankey",polar:!1,spacing:[20,20,20,20],alignTicks:!1,inverted:e.designOptions.orientation==="vertical"}},getSeries(e){var d,h,p,m,v,b;const{links:t,nodes:r}=e.chartData,{designOptions:n,dataOptions:i,extraConfig:a}=e,o=.1,s=(d=n.linkOpacity)!=null?d:.5,u=new Map,c=(p=(h=a.themeSettings)==null?void 0:h.palette)==null?void 0:p.variantColors;return[R({type:"sankey",name:i.value.column.name,data:t.map(_=>{var M,E;const w=(M=r.find(D=>D.id===_.from))==null?void 0:M.blur,C=(E=r.find(D=>D.id===_.to))==null?void 0:E.blur,S=w===!0||C===!0,T=r.some(D=>D.blur!==void 0);return R({from:_.from,to:_.to,weight:_.weight},T?{linkOpacity:S?o:s}:{})}),nodes:r.map(_=>{var w;return H(R({id:_.id,name:(w=_.name)!=null?w:_.id,color:fY(_,u,i,c)},_.blur!==void 0?{opacity:_.blur?o:1}:{}),{custom:{rawValue:_.rawValue}})}),linkOpacity:s,curveFactor:(m=n.curveFactor)!=null?m:.33,nodePadding:(v=n.nodePadding)!=null?v:10,nodeWidth:(b=n.nodeWidth)!=null?b:20,turboThreshold:0},n.nodeAlignment?{nodeAlignment:n.nodeAlignment}:{})]},getAxes(){return{xAxis:void 0,yAxis:void 0}},getLegend(e){return P.getLegendSettings(e.designOptions.legend)},getPlotOptions(){return{series:{}}},getTooltip(e){var u;const{column:t,numberFormatConfig:r}=e.dataOptions.value,n=(u=t.title)==null?void 0:u.trim(),i=n!==void 0&&n.length>0?n:t.name,a=P.getCompleteNumberFormatConfig(r),o=c=>P.applyFormat(a,c),s=c=>{const d=c==null?void 0:c.trim();return d!==void 0&&d.length>0?d:"—"};return{useHTML:!0,formatter:function(){var p,m;const c=this;if(c.point.isNode)return P.purify.sanitize(`<span style="font-size:11px">${i}</span><br/><b>${c.point.name}</b>: ${o(c.point.sum)}`);const d=s((p=c.point.fromNode)==null?void 0:p.name),h=s((m=c.point.toNode)==null?void 0:m.name);return P.purify.sanitize(`<span style="font-size:11px">${i}</span><br/>${d} → ${h}: <b>${o(c.point.weight)}</b>`)}}},getExtras(){return{title:{text:null}}}},mY={dataOptions:sY,data:eY,designOptions:hY,renderer:{ChartRendererComponent:Vr({highchartsOptionsBuilder:pY,getAlerts:tY}),isCorrectRendererProps:Gr}},gY={areamap:PW,area:fG,column:PG,bar:CG,line:zV,polar:YV,streamgraph:jG,pie:mq,funnel:iq,treemap:Xq,sunburst:Wq,"calendar-heatmap":aU,sankey:mY};function rl(e){const t=gY[e];if(t)return t;throw new Error(`Unsupported chart type: ${e}`)}function vY(e,t){return z.isCartesian(t)?e.value.some(n=>(n==null?void 0:n.forecast)!==void 0||(n==null?void 0:n.trend)!==void 0):!1}function nl(e){return["areamap","area","column","bar","line","polar","pie","funnel","calendar-heatmap","treemap","sunburst","streamgraph","sankey"].includes(e)}function yY(e){let t;switch(e.subtype){case"indicator/numeric":t=R({indicatorType:"numeric",numericSubtype:e.numericSubtype},e.numericSubtype==="numericSimple"?{skin:e.skin}:null);break;case"indicator/gauge":t=R({indicatorType:"gauge",skin:e.skin},e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null);break}return H(R(R({},rr),t),{indicatorComponents:e.indicatorComponents||rr.indicatorComponents,forceTickerView:!!e.forceTickerView})}const bY=(e,t,r)=>{const n="y"in r&&Array.isArray(r.y)?r.y.some(s=>s.showOnRightAxis):!1;let i;switch(e){case"area":i=uV(t,r,n);break;case"arearange":case"line":i=lV(t,r,n);break;case"pie":i=hV(t);break;case"funnel":i=fV(t);break;case"treemap":i=d3(t);break;case"sunburst":i=h3(t);break;case"polar":i=mV(t,r);break;case"indicator":i=yY(t);break;case"scatter":i=vV(t);break;case"boxplot":i=yV(t);break;case"scattermap":i=_V(t);break;default:throw new U.TranslatableError("errors.chartTypeNotSupported",{chartType:e})}const a="subtype"in t&&t.subtype?t.subtype:"line/basic",o=jc[a];return R(R({},i),o)};function _Y(e,t,r){var n,i,a,o,s,u,c;if(nl(e)){const d=rl(e),h=pn((o=(a=(i=(n=d.designOptions).translateLegacyStyleOptionsToModern)==null?void 0:i.call(n,r))!=null?a:r)!=null?o:{},(c=(u=(s=d.designOptions).getDefaultStyleOptions)==null?void 0:u.call(s))!=null?c:P.getDefaultStyleOptions());if(!d.designOptions.isCorrectStyleOptions(h))throw new U.TranslatableError("errors.optionsTranslation.invalidStyleOptions",{chartType:e});if(!d.dataOptions.isCorrectDataOptionsInternal(t))throw new U.TranslatableError("errors.optionsTranslation.invalidInternalDataOptions",{chartType:e});return d.designOptions.translateStyleOptionsToDesignOptions(h,t)}else{const d=pn(r!=null?r:{},P.getDefaultStyleOptions());return bY(e,d,t)}}function pn(e,t){return P.merge.withOptions({mergeArrays:!1},t,e)}function si(e,t,r){return wY(e).map(i=>{const a=i.seriesId,o=i.seriesStyleOptions,s=sV(t,pn(o,r));return{seriesId:a,designOptions:D4(s,["line","marker"])}}).reduce((i,{seriesId:a,designOptions:o})=>H(R({},i),{[a]:o}),{})}function wY(e){return e.y.filter(CY).map(({column:{name:t},seriesStyleOptions:r})=>({seriesId:t,seriesStyleOptions:r}))}function CY(e){return e.seriesStyleOptions!==void 0}const xY=2e4;function Bo(e,t){if(e&&t){const r=t.column.name,n=e.findIndex(i=>i.name===r);return n===-1?null:n}return null}const F3=(e,t,r)=>{if(!e)return{columns:[],rows:[]};let n=0,i=4,a=5,o=0,s=1;if(r&&(n=Bo(e.columns,r.category),i=Bo(e.columns,r.whiskerMin),a=Bo(e.columns,r.whiskerMax),o=Bo(t.columns,r.category),s=Bo(t.columns,r.outliers)),Eu(s))return e;const u=s;return{columns:[...e.columns,t.columns[u]],rows:e.rows.map(d=>{const h=Eu(n)?null:d[n].data,p=d[a].data,m=d[i].data,v=t.rows.filter(b=>{const _=Eu(o)?null:b[o].data,w=b[u].data;return _===h&&(w<m||w>p)}).map(b=>b[u].data).join(",");return[...d,{data:v}]})}};function TY(e,t,r){const n=r&&S3(r);return F3(e,t,n)}const SY=(c,d)=>pt(exports,[c,d],function*({app:e,chartDataOptions:t,dataSource:r,attributes:n,measures:i,filters:a,filterRelations:o,highlights:s},u){var b;const h={dataSource:r,dimensions:t.category?[n[0]]:[],measures:i,filters:a,filterRelations:o,highlights:s},p=yield u(h,e);let m=p;const v=t.outliersCount?MY(p,t.outliersCount.column.name):0;if(t.outliers&&v<xY){const _={dataSource:r,dimensions:n,measures:[],filters:a,filterRelations:o,highlights:s};try{const w=yield u(_,e);m=F3(p,w,t)}catch(w){if((b=w==null?void 0:w.message)!=null&&b.includes("UnsupportedFunctionalityException"))console.warn("Functionality not supported by platform: Boxplot outliers");else throw w}}return m}),MY=(e,t)=>{if(!(e!=null&&e.columns))return 0;const r=e.columns.findIndex(({name:i})=>i===t);let n=0;return e.rows.forEach(i=>{n+=parseInt(i[r].data)}),n};function EY(e,t){return nl(e)&&!t?rl(e).data.loadData:e==="boxplot"?AY:PY}const PY=n=>pt(exports,[n],function*({app:e,queryDescription:t,executionConfig:r}){var o,s;return(((s=(o=e==null?void 0:e.settings.queryCacheConfig)==null?void 0:o.enabled)!=null?s:!1)?U.executeQueryWithCache:U.executeQuery)(t,e,r)}),AY=n=>pt(exports,[n],function*({app:e,chartDataOptionsInternal:t,queryDescription:r}){var o,s,u,c;const a=((s=(o=e==null?void 0:e.settings.queryCacheConfig)==null?void 0:o.enabled)!=null?s:!1)?U.executeQueryWithCache:U.executeQuery;return SY({app:e,chartDataOptions:t,dataSource:r.dataSource,attributes:(u=r.dimensions)!=null?u:[],measures:(c=r.measures)!=null?c:[],filters:r.filters,highlights:r.highlights,filterRelations:r.filterRelations},a)}),ru=(e,t)=>{if(!t||t.length!==1)return[void 0,void 0];const r=P.getColumnByName(e,t[0].column.name);return r?[P.getValue(e.rows[0],r),t[0].column.name]:[void 0,void 0]},RY=(e,t)=>{var s;const r={type:"indicator"};if(!((s=e.value)!=null&&s.length)||t.rows.length===0)return r;const[n]=ru(t,e.value);if(n===void 0)return r;const[i]=ru(t,e.secondary),[a]=ru(t,e.min),[o]=ru(t,e.max);return{type:"indicator",value:n,secondary:i,min:a,max:o}};function $3(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:U.baseSlice(e,t,r)}function DY(e,t){for(var r=e.length;r--&&f0(t,e[r],0)>-1;);return r}function NY(e,t){for(var r=-1,n=e.length;++r<n&&f0(t,e[r],0)>-1;);return r}function kY(e){return e.split("")}var LY="\\ud800-\\udfff",OY="\\u0300-\\u036f",IY="\\ufe20-\\ufe2f",FY="\\u20d0-\\u20ff",$Y=OY+IY+FY,BY="\\ufe0e\\ufe0f",zY="\\u200d",HY=RegExp("["+zY+LY+$Y+BY+"]");function B3(e){return HY.test(e)}var z3="\\ud800-\\udfff",WY="\\u0300-\\u036f",jY="\\ufe20-\\ufe2f",UY="\\u20d0-\\u20ff",VY=WY+jY+UY,GY="\\ufe0e\\ufe0f",qY="["+z3+"]",_p="["+VY+"]",wp="\\ud83c[\\udffb-\\udfff]",YY="(?:"+_p+"|"+wp+")",H3="[^"+z3+"]",W3="(?:\\ud83c[\\udde6-\\uddff]){2}",j3="[\\ud800-\\udbff][\\udc00-\\udfff]",XY="\\u200d",U3=YY+"?",V3="["+GY+"]?",ZY="(?:"+XY+"(?:"+[H3,W3,j3].join("|")+")"+V3+U3+")*",KY=V3+U3+ZY,QY="(?:"+[H3+_p+"?",_p,W3,j3,qY].join("|")+")",JY=RegExp(wp+"(?="+wp+")|"+QY+KY,"g");function eX(e){return e.match(JY)||[]}function Cp(e){return B3(e)?eX(e):kY(e)}function tX(e,t,r){if(e=U.toString(e),e&&(r||t===void 0))return P.baseTrim(e);if(!e||!(t=U.baseToString(t)))return e;var n=Cp(e),i=Cp(t),a=NY(n,i),o=DY(n,i)+1;return $3(n,a,o).join("")}const G3=",";function rX(e){return e.join(`${G3} `)}function nX(e){return e.split(G3).map(tX)}function iX(e){switch(e){case"city":return"city";case"state":return"adm";case"country":return"country"}}function aX(e,t){const{name:r,rawName:n,coordinates:i,value:a,colorValue:o,details:s}=e,c={geo:t.locations.map((d,h)=>H(R({},Fe(d)),{value:n[h]}))};if(t.size&&(c.size=H(R({},Fe(t.size)),{value:a})),t.colorBy&&(c.colorBy=H(R({},Fe(t.colorBy)),{value:o})),t.details){const d=Fe(t.details);d.measure&&(c.details=H(R({},d),{value:s}))}return{categories:n,displayName:r,coordinates:{lat:i.lat,lng:i.lng},value:a,entries:c}}const oX=1,sX=(e,t)=>{const r=lX(e),n=e.locations&&P.getColumnsByName(t,e.locations.map(({column:{name:u}})=>u)),i=e.size&&P.getColumnByName(t,e.size.column.name),a=e.colorBy&&P.getColumnByName(t,e.colorBy.column.name),o=e.details&&P.getColumnByName(t,e.details.column.name);return{type:"scattermap",locations:t.rows.filter(u=>n.some(c=>P.getValue(u,c)!==O.NOT_AVAILABLE_DATA_VALUE)).map(u=>{const c=n.map(m=>P.getValue(u,m)),d=rX(c);let h;r&&(h={lat:P.getValue(u,n[0]),lng:P.getValue(u,n[1])});const p=n[0]&&!!P.isBlurred(u,n[0]);return R(H(R(R({name:d,rawName:c,value:i?P.getValue(u,i):oX},a&&{colorValue:P.getValue(u,a)}),o&&{details:P.getValue(u,o)}),{blur:p}),h?{coordinates:h}:null)})}};function lX(e){return e.locations.length===2&&e.locations.filter(({column:{type:t}})=>U.isNumber(t)).length===2}const uX=(e,t,r,n=!0)=>{if(z.isCartesian(e))return P.isForecastChart(t)?P.advancedAnalyticsData(t,r):P.cartesianData(t,r,n);if(z.isCategorical(e))return Zc(t,r,n);if(z.isScatter(e))return P.scatterData(t,r,n);if(z.isScattermap(e))return sX(t,r);if(z.isIndicator(e))return RY(t,r);if(z.isBoxplot(e))return GP(t,r);if(z.isRange(e))return P.rangeData(t,r);throw new U.TranslatableError("errors.unexpectedChartType",{chartType:e})};var cX=1/0,dX=U.Set&&1/U.setToArray(new U.Set([,-0]))[1]==cX?function(e){return new U.Set(e)}:O.noop,hX=200;function b0(e,t,r){var n=-1,i=a3,a=e.length,o=!0,s=[],u=s;if(a>=hX){var c=t?null:dX(e);if(c)return U.setToArray(c);o=!1,i=U.cacheHas,u=new U.SetCache}else u=t?[]:s;e:for(;++n<a;){var d=e[n],h=t?t(d):d;if(d=d!==0?d:0,o&&h===h){for(var p=u.length;p--;)if(u[p]===h)continue e;t&&u.push(h),s.push(d)}else i(u,h,r)||(u!==s&&u.push(h),s.push(d))}return s}var fX=U.baseRest(function(e){return b0(U.baseFlatten(e,1,U.isArrayLikeObject,!0))});const q3=(e,t,r,n={})=>{if(P.emptyTable(e))return{rows:[],columns:[]};const i=fX(P.getColumnsByName(e,t.map(d=>d.name))),a=e,s=[...r.map(d=>{var h,p;return{column:(h=n[d.name])!=null?h:d.name,title:d.name,agg:(p=d.aggregation)!=null?p:"sum"}}),{column:P.rownumColumnName,title:P.rownumColumnName,agg:"min"}],u=P.groupBy(a,i,s),c=P.getColumnByName(u,P.rownumColumnName);if(!c)throw new U.TranslatableError("errors.noRowNumColumn",{columnName:P.rownumColumnName});return P.orderBy(u,[c])};function pX({dataSet:e,data:t,chartDataOptions:r,chartType:n,isForecastOrTrendChart:i,attributes:a,measures:o,dataColumnNamesMapping:s,onDataReady:u}){var h,p,m,v;const{app:c}=y.useSisenseContext(),d=(v=(m=(p=(h=c==null?void 0:c.settings)==null?void 0:h.chartConfig)==null?void 0:p.defaultNumberFormatting)==null?void 0:m.enabled)!=null?v:!0;return k.useMemo(()=>{if(!t||!r)return null;let b;if(u&&(b=u(t),!ix(b)))throw new U.TranslatableError("errors.incorrectOnDataReadyHandler");const _=b||t;let w=P.createDataTableFromData(_);return z.isDataSource(e)||(w=q3(w,a,o,s)),mX(n,r,w,i,d)},[t,n,i,d])}function mX(e,t,r,n=!1,i=!0){if(nl(e)&&!n){const a=rl(e);if(a.dataOptions.isCorrectDataOptionsInternal(t))return a.data.getChartData(t,r,{defaultNumberFormattingEnabled:i});throw new Error("Incorrect internal data options for restructured chart")}return uX(e,t,r,i)}function gX(e){const{dataSet:t,chartType:r,chartData:n,internalDataOptions:i,designOptions:a,onBeforeRender:o,onDataPointClick:s,onDataPointContextMenu:u,onDataPointsSelected:c}=e;return k.useMemo(()=>!i||!a?null:{dataSource:z.isDataSource(t)?t:null,chartType:r,chartData:n,dataOptions:i,designOptions:a,onBeforeRender:o,onDataPointClick:s,onDataPointContextMenu:u,onDataPointsSelected:c},[t,r,n,i,a,o,s,u,c])}const _0=()=>{const[e,t]=k.useState();if(e)throw e;return t};function xp(e,t,r=Zs(),n=Ks){const i=new Map;return[...t.breakBy?t.breakBy:[],...t.x?Array.isArray(t.x)?t.x:[t.x]:[],...t.columns?t.columns:[]].forEach(function(o){if(P.isMeasureColumn(o)||!o.dateFormat||!(e!=null&&e.columns))return;const s=e.columns.findIndex(function(c){return c.name===o.column.name&&U.isDatetime(o.column.type)&&U.isDatetime(c.type)});s!==-1&&i.set(s,o.dateFormat)}),i.size===0||(e.rows=e.rows.map(function(o){return o.map(function(u,c){const d=i.get(c);if(!d||u===O.NOT_AVAILABLE_DATA_VALUE)return u;let h,p;if(P.isCell(u)){if(u.data===O.NOT_AVAILABLE_DATA_VALUE)return u;h=R({},u)}else{const v=P.createCompareValue(`${u}`,"datetime");p=new Date(v.value),h={data:p.toISOString(),text:`${u}`}}if(!h.data)return u;let m=h.text;try{m=Qs(h.data,d,r,n)}catch(v){console.error(v)}return h.text=m,h})})),e}const vX=e=>e==="funnel"?e:P.deriveChartFamily(e),yX=({dataSet:e,chartDataOptions:t,chartType:r,attributes:n,measures:i,dataColumnNamesMapping:a,filters:o,highlights:s,refreshCounter:u,enabled:c=!0,loadData:d})=>{const h=_0(),[p,m]=k.useState(!1),v=k.useMemo(()=>vX(r),[r]),b=k.useMemo(()=>[void 0,t],[t]),[_,w]=k.useState({}),{app:C}=y.useSisenseContext();k.useEffect(()=>{if(!c)return;let M=!1;const{filters:E,relations:D}=U.getFilterListAndRelationsJaql(o);if(z.isDataSource(e)){if(!C)return;m(!0),d({app:C,chartDataOptionsInternal:t,queryDescription:{dataSource:e,dimensions:n,measures:i,filters:E,filterRelations:D,highlights:s,count:C.settings.queryLimit}}).then(F=>{const B=xp(F,t,C==null?void 0:C.settings.locale,C==null?void 0:C.settings.dateConfig);M||w({[v]:[B,t]})}).catch(F=>{h(F)}).finally(()=>{m(!1)})}else{A3(e,n,i,a,E,s);const N=xp(e,t,C==null?void 0:C.settings.locale,C==null?void 0:C.settings.dateConfig);w({[v]:[N,t]})}return()=>{M=!0}},[r,t,e,o,s,C,u,c]);const[S,T]=_[v]||b;return{isLoading:p,data:S,dataOptions:T}};function Y3(e,t){{const r=R3(t,e),n=D3(t,r),i=P3(n,t),a=Oq(i,t),o=Iq(i,t);return{dataOptions:i,attributes:a,measures:o}}}const bX=(e,t,r)=>k.useMemo(()=>w0(e,t,{isForecastOrTrendChart:r,shouldHaveUniqueDataColumnNames:!0}),[e,t,r]);function w0(e,t,r){if(nl(t)&&!(r!=null&&r.isForecastOrTrendChart)){const n=rl(t);if(!n.dataOptions.isCorrectDataOptions(e))throw new Error("Incorrect data options");return _X(n,e,r)}else return wX(e,t,r)}function _X(e,t,r){const n=e.dataOptions.translateDataOptionsToInternal(t),i=e.dataOptions.getAttributes(n),a=e.dataOptions.getMeasures(n),o=r!=null&&r.shouldHaveUniqueDataColumnNames?E3(a):{};return{dataOptions:n,attributes:i,measures:a,dataColumnNamesMapping:o}}function wX(e,t,r){const{dataOptions:n,attributes:i,measures:a}=Y3(e,t),o=r!=null&&r.shouldHaveUniqueDataColumnNames?E3(a):{};return{dataOptions:n,attributes:i,measures:a,dataColumnNamesMapping:o}}const CX=e=>e.type==="sankey",iy={fontFamily:"opensansregular, sans-serif",title:{color:"rgb(68, 81, 102)",fontSizes:{big:22,medium:18,small:15,micro:12}},value:{color:"rgb(0,206,230)",fontSizes:{big:66,medium:46,small:32,micro:23}},secondaryTitle:{color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},secondaryValue:{fontWeight:800,color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},textKeys:["title","value","secondaryTitle","secondaryValue"],backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(215, 215, 215)",borderWidth:1,relativeSizes:[{key:"titleSectionHeight",value:.5,decimals:0},{key:"titleSectionMarginTop",value:.13,decimals:0},{key:"titleSectionMinWidth",value:.29,decimals:0},{key:"numericMinWidth",value:4.69,decimals:0},{key:"valueSectionHeight",value:1,decimals:0},{key:"valueSectionMarginRight",value:.14,decimals:0},{key:"valueSectionMarginBottom",value:.07,decimals:0},{key:"secSectionHeight",value:.34,decimals:0},{key:"secSectionMarginTop",value:.14,decimals:0},{key:"secDividerWidth",value:.14,decimals:0},{key:"secTitleMinWidth",value:.29,decimals:0},{key:"indicatorHorizontalMargin",value:.31,decimals:0},{key:"indicatorVerticalMargin",value:.46,decimals:0}],measureKeys:["indicatorMargin","numericMinWidth","titleSectionHeight","secSectionHeight","valueSectionMarginBottom","secSectionMarginTop","indicatorHorizontalMargin","indicatorVerticalMargin"],sizes:[{size:"big",value:70},{size:"medium",value:49},{size:"small",value:34},{size:"micro",value:24}],fitMeasures:[{key:"fitTitleMeasure",prop:"string",dataKey:"title"},{key:"fitValueMeasure",prop:"string",dataKey:"value"},{key:"fitSecondaryMeasure",prop:"titleString",dataKey:"secondaryTitle"},{key:"fitSecondaryMeasure",prop:"valueString",dataKey:"secondary"}]},xX={fontFamily:"opensansregular, sans-serif",title:{color:"rgb(68, 81, 102)",fontSizes:{big:22,medium:18,small:15,micro:12}},value:{color:"rgb(255, 255, 255)",fontSizes:{big:45,medium:31,small:22,micro:15}},secondaryTitle:{color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},secondaryValue:{fontWeight:800,color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},textKeys:["title","value","secondaryTitle","secondaryValue"],backgroundColor:"rgb(255, 255, 255)",bracketColor:"rgb(198, 198, 198)",bracketThickness:1,relativeSizes:[{key:"titleSectionHeight",value:1,decimals:0},{key:"titleHorizontalMargin",value:.16,decimals:0},{key:"numericMinWidth",value:4.69,decimals:0},{key:"valueSectionHeight",value:1,decimals:0},{key:"secSectionHeight",value:1,decimals:0},{key:"secBottomMargin",value:.14,decimals:0},{key:"secDividerWidth",value:.14,decimals:0},{key:"secTitleMinWidth",value:.29,decimals:0},{key:"bracketWidth",value:.21,decimals:0},{key:"indicatorMargin",value:.64,decimals:0}],measureKeys:["indicatorMargin","numericMinWidth","bracketWidth","titleSectionHeight","secSectionHeight"],sizes:[{size:"big",value:70,maxWidth:1261,maxHeight:665},{size:"medium",value:49},{size:"small",value:34},{size:"micro",value:24}]},TX={fontFamily:"opensansregular, sans-serif",title:{color:"rgb(68, 81, 102)",fontSizes:{big:22,medium:18,small:15,micro:12}},value:{color:"rgb(255, 255, 255)",fontSizes:{big:45,medium:31,small:22,micro:15}},secondaryTitle:{color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},secondaryValue:{fontWeight:800,color:"rgb(163, 163, 163)",fontSizes:{big:20,medium:14,small:10,micro:10}},label:{color:"rgb(68, 81, 102)",fontSizes:{big:18,medium:13,small:9,micro:9}},textKeys:["title","value","secondaryTitle","secondaryValue","label"],backgroundColor:"rgb(255, 255, 255)",tickColor:"rgb(0, 0, 0)",needleColor:"rgb(43, 51, 66)",bracketColor:"rgb(198, 198, 198)",defaultDialColor:"rgb(179, 179, 179)",gaugeOpacity:.5,startAngle:20,endAngle:160,overDegrees:5,tickDegreesIncrement:10,bracketThickness:1,relativeSizes:[{key:"titleSectionHeight",value:.26,decimals:0},{key:"titleHorizontalMargin",value:.08,decimals:0},{key:"titleBottomMargin",value:.1,decimals:0},{key:"gaugeWidth",value:1.33,decimals:0},{key:"gaugeBottomMargin",value:.19,decimals:0},{key:"outerArcRadius",value:.63,decimals:0},{key:"innerArcRadius",dataKey:"skin",values:{1:.24,2:.51},decimals:0},{key:"lengthToTick",value:.7,decimals:0},{key:"tickRadius",value:.01,decimals:1},{key:"needleLength",dataKey:"skin",values:{1:.52,2:.58},decimals:0},{key:"needleBaseRadius",value:.04,decimals:0},{key:"labelMargin",value:.26,decimals:0},{key:"valueSectionHeight",value:.36,decimals:0},{key:"secSectionHeight",value:.36,decimals:0},{key:"secBottomMargin",value:.05,decimals:0},{key:"secDividerWidth",value:.05,decimals:0},{key:"secTitleMinWidth",value:.1,decimals:0},{key:"bracketWidth",value:.08,decimals:0},{key:"indicatorMargin",value:.14,decimals:0}],gaugeHeights:[{size:"big",value:192,maxWidth:1297,maxHeight:1075},{size:"medium",value:134},{size:"small",value:94},{size:"micro",value:66}],measureKeys:["indicatorMargin","gaugeWidth","bracketWidth","titleSectionHeight","valueSectionHeight","secSectionHeight"]},SX={fontFamily:"Open Sans",fontSize:15,title:{color:"rgb(68, 81, 102)"},value:{fontWeight:800},secondaryTitle:{color:"rgb(163, 163, 163)"},secondaryValue:{color:"rgb(163, 163, 163)"},textKeys:["title","value","secondaryTitle","secondaryValue"],backgroundColor:"transparent",dividerColor:"rgb(39, 42, 52)",barHandleColor:"rgb(43, 51, 66)",height:35,horizontalMargin:15,barWidth:100,barHeight:11,barOpacity:.5,tickerBarWidth:2,tickerBarHeight:13,horizontalPadding:9,textPadding:6,sectionMinWidth:20,dividerWidth:1,dividerHeight:13,forceTickerView:!1};function MX(e,t){const r=U.cloneDeep(SX);if(r.forceTickerView=t.forceTickerView,r.fontFamily=t.fontFamily,r.backgroundColor=t.backgroundColor,r.value.color=t.value.color,r.title.color=t.title.color,r.secondaryTitle.color=t.secondaryTitle.color,r.secondaryValue.color=t.secondaryTitle.color,t.tickerBarHeight){const n=t.tickerBarHeight;r.barHeight=n,r.tickerBarHeight=n+2}return r.forceTickerView&&(r.height=e.offsetHeight),r}class il{degToRad(t){return t*Math.PI/180}getFitStringMeasure(t,r,n,i){t.font=i;let a=this.getStringWidth(t,r);const o="…",s=this.getStringWidth(t,o);if(a<=n)return{string:r,width:a};if(s>=n)return{string:o,width:s};do r=r.slice(0,r.length-1),a=this.getStringWidth(t,r);while(a+s>n);return{string:r+o,width:a+s}}getStringWidth(t,r){return Math.ceil(t.measureText(r).width)}floor(t,r){r=typeof r=="number"?r:0;const n=Math.pow(10,r);return Math.round(t*n)/n}setCanvasSizes(t,r,n,i){const a=window.devicePixelRatio||1;t.width=n*a,t.height=i*a,t.style.width=n+"px",t.style.height=i+"px",r.scale(a,a)}}const ut=new il,fa=function(e,t){return ut.floor(e*t.value,t.decimals)};function EX(e,t){const r={};return e.forEach(n=>{t.some(function(i){return i.key===n?(r[n]=i,!0):!1})}),r}function PX(e,t,r){const{maxWidth:n,maxHeight:i,showTitle:a,showSecondary:o}=r;for(let s=0;s<t.length;s++){const u=t[s],c=u.value,d=fa(c,e.valueSectionHeight),h=fa(c,e.indicatorMargin),p=Math.ceil(h*1.5);let m=c+d+p;if(a){const v=fa(c,e.titleSectionHeight);m+=v}if(o){const v=fa(c,e.secSectionHeight);m+=v}if(m<=i){const v=fa(c,e.gaugeWidth),b=fa(c,e.bracketWidth),_=h*2;if(v+b*2+_<=n)return H(R({},u),{maxWidth:n-_,maxHeight:i-p})}}return null}class AX{getBaseMeasure(t,r,n){const i=r,a="gaugeHeights"in i?i.gaugeHeights:void 0;if(!a)return null;const o=i.relativeSizes,s=i.measureKeys.concat(),u=Math.floor(n.clientWidth),c=Math.floor(n.clientHeight),d=EX(s,o);return PX(d,a,{maxWidth:u,maxHeight:c,showTitle:t.showTitle,showSecondary:t.showSecondary})}render(t,r,n,i){const a=t.getContext("2d");let o=0,s;n.gaugeHeight=i.value,n.size=i.size,n.maxWidth=i.maxWidth,n.maxHeight=i.maxHeight,n.offsetY=0,s=n.gaugeHeight+n.valueSectionHeight,r.showTitle&&(n.fitTitleMeasure=this.getFitTitleMeasure(a,r,n),s+=n.titleSectionHeight),n.fitValueMeasure=this.getFitValueMeasure(a,r,n),r.showSecondary&&(n.fitSecondaryMeasure=this.getFitSecondaryMeasure(a,r,n),s+=n.secSectionHeight),o=this.getCanvasWidth(r,n),n.width=o,n.height=s,ut.setCanvasSizes(t,a,o,s),this.draw(a,r,n)}getFitTitleMeasure(t,r,n){const i=n.bracketWidth*2+n.titleHorizontalMargin*2,a=n.maxWidth-i,o=ut.getFitStringMeasure(t,r.title.text,a,n.titleFont);return o.width+=i,o.key="title",o}getFitValueMeasure(t,r,n){const i=n.bracketThickness*2,a=n.maxWidth-i,o=ut.getFitStringMeasure(t,r.value.text,a,n.valueFont);return o.width+=i,o.key="value",o}getFitSecondaryMeasure(t,r,n){const i=n.bracketWidth*2+n.secDividerWidth,a=n.maxWidth-i,o=a-n.secTitleMinWidth,s=ut.getFitStringMeasure(t,r.secondary.text,o,n.secondaryValueFont),u=a-s.width,c=ut.getFitStringMeasure(t,r.secondaryTitle.text,u,n.secondaryTitleFont);return{width:c.width+s.width+i,titleString:c.string,valueString:s.string,key:"secondary"}}getCanvasWidth(t,r){let n=r.gaugeWidth+r.bracketWidth*2;const i=r.fitTitleMeasure,a=r.fitValueMeasure;let s=i&&i.width>a.width?i:a;const u=r.fitSecondaryMeasure,c=u&&u.width>s.width;let d;return s=c?u:s,c?d=s.titleString!==t.secondaryTitle.text||s.valueString!==t.secondary.text:d=s.string!==t[s.key].text,d?n=r.maxWidth:s.width>n&&(n=s.width),n}draw(t,r,n){this.clearCanvas(t,n),r.showTitle&&this.drawTitle(t,n),this.drawGauge(t,r,n),this.drawValue(t,r,n),r.showSecondary&&this.drawSecondary(t,n),this.drawBrackets(t,r,n)}clearCanvas(t,r){t.fillStyle=r.backgroundColor,t.fillRect(0,0,r.width,r.height)}drawTitle(t,r){t.font=r.titleFont,t.fillStyle=r.titleColor,t.textAlign="center",t.textBaseline="middle",t.fillText(r.fitTitleMeasure.string,r.width/2,(r.titleSectionHeight-r.titleBottomMargin)/2),r.offsetY+=r.titleSectionHeight}drawGauge(t,r,n){n.gaugeCenterX=n.width/2,n.gaugeCenterY=n.offsetY+n.gaugeHeight-n.gaugeBottomMargin,n.needleAngle=this.getNeedleAngle(r,n),r.skin===2&&r.conditions&&r.conditions.length?this.drawConditionalDial(t,r,n):this.drawSimpleDial(t,r,n),r.showTicks&&n.size!=="micro"&&this.drawTicks(t,r,n),this.drawNeedle(t,n),r.showLabels&&n.size!=="micro"&&this.drawLabels(t,r,n),n.offsetY+=n.gaugeHeight}drawValue(t,r,n){t.fillStyle=n.valueColor,t.fillRect(1,n.offsetY,n.width-n.bracketThickness*2,n.valueSectionHeight),t.font=n.valueFont,t.fillStyle="white",t.textAlign="center",t.textBaseline="middle",t.fillText(n.fitValueMeasure.string,n.width/2,n.offsetY+n.valueSectionHeight/2)}drawSecondary(t,r){const n=r.height-r.secBottomMargin;t.font=r.secondaryTitleFont,t.fillStyle=r.secondaryTitleColor,t.textAlign="left",t.textBaseline="bottom",t.fillText(r.fitSecondaryMeasure.titleString,r.bracketWidth,n),t.font=r.secondaryValueFont,t.fillStyle=r.secondaryValueColor,t.textAlign="right",t.textBaseline="bottom",t.fillText(r.fitSecondaryMeasure.valueString,r.width-r.bracketWidth,n)}drawBrackets(t,r,n){const i=r.showTitle?(n.titleSectionHeight-n.titleBottomMargin)/2:0;t.strokeStyle=n.bracketColor,t.beginPath(),t.moveTo(n.bracketWidth+.5,i+.5),t.lineTo(.5,i+.5),t.lineTo(.5,n.height-.5),r.showSecondary&&t.lineTo(n.bracketWidth+.5,n.height-.5),t.stroke(),t.moveTo(n.width-(n.bracketWidth+.5),i+.5),t.lineTo(n.width-.5,i+.5),t.lineTo(n.width-.5,n.height-.5),r.showSecondary&&t.lineTo(n.width-(n.bracketWidth+.5),n.height-.5),t.stroke(),t.closePath()}getNeedleAngle(t,r){const n=+t.min.data,i=+t.max.data,a=+(t.value.data||0);return a<n?r.startAngle-r.overDegrees:a>i?r.endAngle+r.overDegrees:this.getAngle(r,a,n,i)}getAngle(t,r,n,i){const a=(t.endAngle-t.startAngle)/(i-n);return(r-n)*a+t.startAngle}drawConditionalDial(t,r,n){const i=r.conditions,a=+r.min.data,o=+r.max.data,s=ut.degToRad(n.startAngle+180),u=ut.degToRad(n.endAngle+180);let c;const d=h=>this.getAngle(n,h,a,o);for(this.drawArc(t,n,s,u,n.defaultDialColor),c=i.length-1;c>=0;c--){const h=i[c];let p=+h.data,m,v=NaN,b=NaN,_=NaN,w=NaN;const C=.25;switch(h.operator){case"<":if(p<=a)break;p=p>o?o:p,m=d(p),v=s,b=ut.degToRad(m+180);break;case">":if(p>=o)break;p=p<a?a:p,m=d(p),v=ut.degToRad(m+180),b=u;break;case"≤":if(p<a)break;p=p>o?o:p,m=d(p),v=s,b=ut.degToRad(m+(m+C<=n.endAngle?C:0)+180);break;case"≥":if(p>o)break;p=p<a?a:p,m=d(p),v=ut.degToRad(m-(m-C>=n.startAngle?C:0)+180),b=u;break;case"=":if(p<a||p>o)break;m=d(p),v=ut.degToRad(m-(m-C>=n.startAngle?C:0)+180),b=ut.degToRad(m+(m+C<=n.endAngle?C:0)+180);break;case"≠":if(p<a||p>o)v=s,b=u;else if(p===a||p===o){const S=p===a;v=ut.degToRad(n.startAngle+(S?C:0)+180),b=ut.degToRad(n.endAngle-(S?0:C)+180)}else m=d(p),v=s,b=ut.degToRad(m-(m-C>=n.startAngle?C:0)+180),_=ut.degToRad(m+(m+C<=n.endAngle?C:0)+180),w=u}!isNaN(v)&&!isNaN(b)&&this.drawArc(t,n,v,b,h.color),!isNaN(_)&&!isNaN(w)&&this.drawArc(t,n,_,w,h.color)}}drawSimpleDial(t,r,n){const i=ut.degToRad(n.startAngle+180),a=ut.degToRad(n.needleAngle+180),o=ut.degToRad(n.endAngle+180);n.needleAngle>n.startAngle&&n.needleAngle<n.endAngle?(this.drawArc(t,n,i,a,n.valueColor),t.globalAlpha=n.gaugeOpacity,this.drawArc(t,n,a,o,n.valueColor)):(n.needleAngle<=n.startAngle&&(t.globalAlpha=n.gaugeOpacity),this.drawArc(t,n,i,o,n.valueColor)),t.globalAlpha=1}drawArc(t,r,n,i,a){t.fillStyle=a,t.beginPath(),t.arc(r.gaugeCenterX,r.gaugeCenterY,r.outerArcRadius,n,i),t.arc(r.gaugeCenterX,r.gaugeCenterY,r.innerArcRadius,i,n,!0),t.fill()}drawTicks(t,r,n){const i=n.startAngle,a=n.endAngle,o=n.tickDegreesIncrement,s=n.needleAngle;let u;for(u=i;u<=a;u+=o){const c=ut.degToRad(u),d=n.gaugeCenterX-n.lengthToTick*Math.cos(c),h=n.gaugeCenterY-n.lengthToTick*Math.sin(c),p=s<i,m=s>=u-o/2&&s<u+o/2,v=u===a&&s>=u;t.fillStyle=!p&&m||v?r.color:n.tickColor,t.beginPath(),t.arc(d,h,n.tickRadius,0,2*Math.PI),t.fill()}}drawNeedle(t,r){const n=ut.degToRad(r.needleAngle);t.fillStyle=r.needleColor,t.save(),t.translate(r.gaugeCenterX,r.gaugeCenterY),t.rotate(n),t.translate(-r.gaugeCenterX,-r.gaugeCenterY),t.beginPath(),t.arc(r.gaugeCenterX,r.gaugeCenterY,r.needleBaseRadius,.5*Math.PI,1.5*Math.PI,!0),t.lineTo(r.gaugeCenterX-r.needleLength,r.gaugeCenterY),t.fill(),t.restore()}drawLabels(t,r,n){t.font=n.labelFont,t.fillStyle=n.labelColor,t.textAlign="right",t.textBaseline="middle",t.fillText(r.min.text,n.gaugeCenterX-n.labelMargin,n.gaugeCenterY),t.textAlign="left",t.fillText(r.max.text,n.gaugeCenterX+n.labelMargin,n.gaugeCenterY)}}const ba=new il,nu=function(e,t){return ba.floor(e*t.value,t.decimals)};function RX(e,t){const r={};return e.forEach(n=>{t.some(function(i){return i.key===n?(r[n]=i,!0):!1})}),r}function DX(e,t,r){const{showTitle:n,showSecondary:i,maxHeight:a,maxWidth:o,bracketThickness:s}=r;for(let u=0;u<t.length;u++){const c=t[u],d=c.value,h=nu(d,e.indicatorMargin);let p=d+h;if(n){const m=nu(d,e.titleSectionHeight);p+=m}if(i){const m=nu(d,e.secSectionHeight);p+=m}if(p<=a){const m=nu(d,e.numericMinWidth),v=h*2;if(m+s*2+v<=o)return H(R({},c),{maxWidth:o-v,maxHeight:a-h})}}return null}class NX{getBaseMeasure(t,r,n){const i=r,a="sizes"in i?i.sizes:[],o=i.relativeSizes,s=i.measureKeys.concat(),u=Math.floor(n.clientWidth),c=Math.floor(n.clientHeight),d=RX(s,o);return DX(d,a,{maxWidth:u,maxHeight:c,showTitle:t.showTitle,showSecondary:t.showSecondary,bracketThickness:i.bracketThickness})}render(t,r,n,i){const a=t.getContext("2d");let o;n.height=i.value,n.maxWidth=i.maxWidth,n.maxHeight=i.maxHeight,n.offsetY=0,o=n.height,r.showTitle&&(n.fitTitleMeasure=this.getFitTitleMeasure(a,r,n),o+=n.titleSectionHeight),n.fitValueMeasure=this.getFitValueMeasure(a,r,n),r.showSecondary&&(n.fitSecondaryMeasure=this.getFitSecondaryMeasure(a,r,n),o+=n.secSectionHeight);const s=this.getCanvasWidth(r,n);n.width=s,n.height=o,ba.setCanvasSizes(t,a,s,o),this.draw(a,r,n)}getFitTitleMeasure(t,r,n){const i=n.bracketWidth*2+n.titleHorizontalMargin*2,a=n.maxWidth-i,o=ba.getFitStringMeasure(t,r.title.text,a,n.titleFont);return o.width+=i,o.key="title",o}getFitValueMeasure(t,r,n){const i=n.bracketThickness*2,a=n.maxWidth-i,o=ba.getFitStringMeasure(t,r.value.text,a,n.valueFont);return o.width+=i,o.key="value",o}getFitSecondaryMeasure(t,r,n){const i=n.bracketWidth*2+n.secDividerWidth,a=n.maxWidth-i,o=a-n.secTitleMinWidth,s=ba.getFitStringMeasure(t,r.secondary.text,o,n.secondaryValueFont),u=a-s.width,c=ba.getFitStringMeasure(t,r.secondaryTitle.text,u,n.secondaryTitleFont);return{width:c.width+s.width+i,titleString:c.string,valueString:s.string,key:"secondary"}}getCanvasWidth(t,r){let n=r.numericMinWidth+r.bracketThickness*2;const i=r.fitTitleMeasure,a=r.fitValueMeasure;let s=i&&i.width>a.width?i:a;const u=r.fitSecondaryMeasure,c=u&&u.width>s.width;let d;return s=c?u:s,c?d=s.titleString!==t.secondaryTitle.text||s.valueString!==t.secondary.text:d=s.string!==t[s.key].text,d?n=r.maxWidth:s.width>n&&(n=s.width),n}draw(t,r,n){this.clearCanvas(t,n),r.showTitle&&this.drawTitle(t,n),this.drawValue(t,r,n),r.showSecondary&&this.drawSecondary(t,n),(r.showTitle||r.showSecondary)&&this.drawBrackets(t,r,n)}clearCanvas(t,r){t.fillStyle=r.backgroundColor,t.fillRect(0,0,r.width,r.height)}drawTitle(t,r){t.font=r.titleFont,t.fillStyle=r.titleColor,t.textAlign="center",t.textBaseline="middle",t.fillText(r.fitTitleMeasure.string,r.width/2,r.titleSectionHeight/2),r.offsetY+=r.titleSectionHeight}drawValue(t,r,n){const i=n.offsetY;t.fillStyle=n.valueColor,t.fillRect(1,i,n.width-n.bracketThickness*2,n.valueSectionHeight),t.font=n.valueFont,t.fillStyle="white",t.textAlign="center",t.textBaseline="middle",t.fillText(n.fitValueMeasure.string,n.width/2,i+n.valueSectionHeight/2)}drawSecondary(t,r){const n=r.height-r.secBottomMargin;t.font=r.secondaryTitleFont,t.fillStyle=r.secondaryTitleColor,t.textAlign="left",t.textBaseline="bottom",t.fillText(r.fitSecondaryMeasure.titleString,r.bracketWidth,n),t.font=r.secondaryValueFont,t.fillStyle=r.secondaryValueColor,t.textAlign="right",t.textBaseline="bottom",t.fillText(r.fitSecondaryMeasure.valueString,r.width-r.bracketWidth,n)}drawBrackets(t,r,n){t.strokeStyle=n.bracketColor,t.beginPath(),r.showTitle?(t.moveTo(n.bracketWidth+.5,.5),t.lineTo(.5,.5)):t.moveTo(.5,.5),t.lineTo(.5,n.height-.5),r.showSecondary&&t.lineTo(n.bracketWidth+.5,n.height-.5),t.stroke(),r.showTitle?(t.moveTo(n.width-(n.bracketWidth+.5),.5),t.lineTo(n.width-.5,.5)):t.moveTo(n.width-.5,.5),t.lineTo(n.width-.5,n.height-.5),r.showSecondary&&t.lineTo(n.width-(n.bracketWidth+.5),n.height-.5),t.stroke(),t.closePath()}}const _a=new il,vi=function(e,t){return _a.floor(e*t.value,t.decimals)};function kX(e,t){const r={};return e.forEach(n=>{t.some(function(i){return i.key===n?(r[n]=i,!0):!1})}),r}function LX(e,t,r){const{showTitle:n,showSecondary:i,skin:a,maxHeight:o,maxWidth:s,borderWidth:u}=r;for(let c=0;c<t.length;c++){const d=t[c],h=d.value,p=vi(h,e.valueSectionMarginBottom),v=vi(h,e.indicatorVerticalMargin)*2;let b=h+p+v;if(n&&a==="vertical"){const _=vi(h,e.titleSectionHeight);b+=_}if(i){const _=vi(h,e.secSectionHeight),w=vi(h,e.secSectionMarginTop);b+=_+w+(u||0)}if(b<=o){const _=vi(h,e.numericMinWidth),C=vi(h,e.indicatorHorizontalMargin)*2;if(_+C<=s)return H(R({},d),{maxWidth:s-C,maxHeight:o-v})}}return null}class OX{getBaseMeasure(t,r,n){const i=r,a="sizes"in i?i.sizes:[],o=i.relativeSizes,s=i.measureKeys.concat(),u=Math.floor(n.clientWidth),c=Math.floor(n.clientHeight),d=kX(s,o);return LX(d,a,{maxWidth:u,maxHeight:c,showTitle:t.showTitle,showSecondary:t.showSecondary,skin:t.skin,borderWidth:"borderWidth"in i?i.borderWidth:0})}render(t,r,n,i){const a=t.getContext("2d");let o;n.height=i.value,n.maxWidth=i.maxWidth,n.maxHeight=i.maxHeight,o=n.height,n.fitValueMeasure=this.getFitValueMeasure(a,r,n),r.showTitle&&(n.fitTitleMeasure=this.getFitTitleMeasure(a,r,n),o+=r.skin==="vertical"?n.titleSectionHeight:0),r.showSecondary&&(n.fitSecondaryMeasure=this.getFitSecondaryMeasure(a,r,n),o+=n.valueSectionMarginBottom+n.secSectionHeight+n.secSectionMarginTop+n.borderWidth);const s=this.getCanvasWidth(r,n);n.width=s,n.height=o,_a.setCanvasSizes(t,a,s,o),this.draw(a,r,n)}getFitTitleMeasure(t,r,n){const i=r.skin==="horizontal",a=n.maxWidth-(i?n.fitValueMeasure.width+n.valueSectionMarginRight:0);if(i&&a+n.titleSectionMinWidth<=0)return;const o=_a.getFitStringMeasure(t,r.title.text,a,n.titleFont);return o.width+=i?n.valueSectionMarginRight:0,o.key="title",o}getFitValueMeasure(t,r,n){const i=_a.getFitStringMeasure(t,r.value.text,n.maxWidth,n.valueFont);return i.key="value",i}getFitSecondaryMeasure(t,r,n){const i=n.secDividerWidth,a=n.maxWidth-i,o=a-n.secTitleMinWidth,s=_a.getFitStringMeasure(t,r.secondary.text,o,n.secondaryValueFont),u=a-s.width,c=_a.getFitStringMeasure(t,r.secondaryTitle.text,u,n.secondaryTitleFont);return{width:c.width+s.width+i,titleString:c.string,valueString:s.string,key:"secondary"}}getCanvasWidth(t,r){let n;const i=r.fitTitleMeasure,a=r.fitValueMeasure,o=r.fitSecondaryMeasure;if(r.fitMeasures.some(u=>{const c=r[u.key],d=t[u.dataKey];return!!(c&&d&&c[u.prop]!==d.text)}))return r.maxWidth;if(t.skin==="vertical"){let c=i&&i.width>a.width?i:a;c=o&&o.width>c.width?o:c,n=c.width}else n=a.width,i&&(n+=i.width),o&&o.width>n&&(n=o.width);return n}draw(t,r,n){this.clearCanvas(t,n),this.drawValue(t,r,n),r.showTitle&&this.drawTitle(t,r,n),r.showSecondary&&this.drawSecondary(t,n)}clearCanvas(t,r){t.fillStyle=r.backgroundColor,t.fillRect(0,0,r.width,r.height)}drawTitle(t,r,n){!n.fitTitleMeasure||r.skin==="horizontal"&&n.fitValueMeasure.string!==r[n.fitValueMeasure.key].text||(t.font=n.titleFont,t.fillStyle=n.titleColor,r.skin==="vertical"?(t.textAlign="center",t.textBaseline="middle",t.fillText(n.fitTitleMeasure.string,n.width/2,n.titleSectionHeight/2)):(t.textAlign="left",t.textBaseline="top",t.fillText(n.fitTitleMeasure.string,n.fitValueMeasure.width+n.valueSectionMarginRight,n.titleSectionMarginTop)))}drawValue(t,r,n){const i=r.skin==="vertical";t.fillStyle=n.valueColor||r.color,t.font=n.valueFont,t.textAlign=i?"center":"left",t.textBaseline="middle",t.fillText(n.fitValueMeasure.string,i?n.width/2:0,(r.showTitle&&i?n.titleSectionHeight:0)+n.valueSectionHeight/2)}drawSecondary(t,r){let n=r.height-r.secSectionHeight/2;t.font=r.secondaryTitleFont,t.fillStyle=r.secondaryTitleColor,t.textAlign="left",t.textBaseline="middle",t.fillText(r.fitSecondaryMeasure.titleString,0,n),t.font=r.secondaryValueFont,t.fillStyle=r.secondaryValueColor,t.textAlign="right",t.fillText(r.fitSecondaryMeasure.valueString,r.width,n),t.strokeStyle=r.borderColor,t.beginPath(),n=r.height-r.secSectionHeight-r.secSectionMarginTop-r.borderWidth,t.moveTo(0,n),t.lineTo(r.width,n),t.stroke()}}const nn=new il;class IX{render(t,r,n,i){const a=t.getContext("2d"),o=Math.floor(i.clientWidth)-n.horizontalMargin*2,s=n.sectionMinWidth;let u=0,c=0,d=0,h=0,p=0,m=0,v=0,b=0,_;if(a.font=n.valueFont,_=nn.getStringWidth(a,r.value.text),n.offsetX=0,r.title.text+=":",r.secondaryTitle&&(r.secondaryTitle.text+=":"),r.showTitle&&(a.font=n.titleFont,m=nn.getStringWidth(a,r.value.text),p=nn.getStringWidth(a,r.title.text),c=p<s?p:s,_+=c+n.textPadding),r.showSecondary&&(a.font=n.secondaryValueFont,b=nn.getStringWidth(a,r.secondary.text),h=b<s?b:s,_+=h,a.font=n.secondaryTitleFont||"",v=nn.getStringWidth(a,r.secondaryTitle.text),d=v<s?v:s,_+=d+n.horizontalPadding*2+n.dividerWidth+n.textPadding),r.type==="gauge"){const C=n.horizontalPadding*2+n.dividerWidth;if(n.forceTickerView){const T=m+p+v+b+n.textPadding*4+C,M=o-C-T;n.barWidth=Math.max(M,n.barWidth)}const S=n.barWidth+C;_+=S,n.showTickerBar=_<=o||!0,u+=n.showTickerBar?S:0}u+=r.showTitle?n.textPadding:0,u+=r.showSecondary?n.horizontalPadding*2+n.dividerWidth+n.textPadding:0;const w=o-u-c-d-h;if(n.fitValueMeasure=nn.getFitStringMeasure(a,r.value.text,w,n.valueFont),u+=n.fitValueMeasure.width,r.showSecondary){const C=o-u-c-d;let S;n.fitSecValueMeasure=nn.getFitStringMeasure(a,r.secondary.text,C,n.secondaryValueFont),u+=n.fitSecValueMeasure.width;const T=o-u,M=T/2;r.showTitle?p+v>T?p>M&&v>M?S=M:v>M&&p<=M?S=T-p:S=v:S=v:S=T,n.fitSecTitleMeasure=nn.getFitStringMeasure(a,r.secondaryTitle.text,S,n.secondaryTitleFont),u+=n.fitSecTitleMeasure.width}if(r.showTitle){const C=o-u;n.fitTitleMeasure=nn.getFitStringMeasure(a,r.title.text,C,n.titleFont),u+=n.fitTitleMeasure.width}n.width=u,nn.setCanvasSizes(t,a,u,n.height),this.draw(a,r,n)}draw(t,r,n){this.clearCanvas(t,n),r.type==="gauge"&&n.showTickerBar&&(this.drawTickerBar(t,r,n),this.drawDivider(t,n)),t.textBaseline="middle",r.showTitle&&this.drawTitle(t,n),this.drawValue(t,r,n),r.showSecondary&&(this.drawDivider(t,n),this.drawSecondary(t,n))}clearCanvas(t,r){t.fillStyle=r.backgroundColor,t.fillRect(0,0,r.width,r.height)}drawTickerBar(t,r,n){var c;const i=+r.min.data,a=+r.max.data,o=+(((c=r.value)==null?void 0:c.data)||0),s=Math.round((n.height-n.barHeight)/2);let u;if(t.fillStyle=n.valueColor,o<=i)t.globalAlpha=n.barOpacity,t.fillRect(n.offsetX,s,n.barWidth,n.barHeight),u=0;else if(o>=a)t.fillRect(n.offsetX,s,n.barWidth,n.barHeight),u=n.barWidth-n.tickerBarWidth;else{const d=(o-Math.abs(i))/(a-i),h=n.barWidth*d;t.fillRect(n.offsetX,s,h,n.barHeight),t.globalAlpha=n.barOpacity,t.fillRect(n.offsetX+h,s,n.barWidth-h,n.barHeight),h>n.barWidth-n.tickerBarWidth?u=n.barWidth-n.tickerBarWidth:h<n.tickerBarWidth?u=0:u=h-1}t.globalAlpha=1,t.fillStyle=n.barHandleColor,t.fillRect(n.offsetX+u,Math.round((n.height-n.tickerBarHeight)/2),n.tickerBarWidth,n.tickerBarHeight),n.offsetX+=n.barWidth}drawDivider(t,r){t.fillStyle=r.dividerColor,t.fillRect(r.offsetX+r.horizontalPadding,Math.round((r.height-r.dividerHeight)/2),r.dividerWidth,r.dividerHeight),r.offsetX+=r.horizontalPadding*2+r.dividerWidth}drawTitle(t,r){t.font=r.titleFont,t.fillStyle=r.titleColor,t.fillText(r.fitTitleMeasure.string,r.offsetX,Math.floor(r.height/2)),r.offsetX+=r.fitTitleMeasure.width+r.textPadding}drawValue(t,r,n){t.font=n.valueFont,t.fillStyle=n.valueColor||r.color,t.fillText(n.fitValueMeasure.string,n.offsetX,Math.floor(n.height/2)),n.offsetX+=n.fitValueMeasure.width}drawSecondary(t,r){t.font=r.secondaryTitleFont,t.fillStyle=r.secondaryTitleColor,t.fillText(r.fitSecTitleMeasure.string,r.offsetX,Math.floor(r.height/2)),r.offsetX+=r.fitSecTitleMeasure.width+r.textPadding,t.font=r.secondaryValueFont,t.fillStyle=r.secondaryValueColor,t.fillText(r.fitSecValueMeasure.string,r.offsetX,Math.floor(r.height/2))}}const FX=new il,$X=new OX,BX=new NX,zX=new AX,HX=new IX;class WX{getService(t){switch(t){case"numericSimple":return $X;case"numericBar":return BX;case"gauge":return zX;case"ticker":return HX}}render(t,r,n,i){let a=this.getService(r.type);const o="getBaseMeasure"in a?a.getBaseMeasure(r,n,i):void 0;if(!o||n.forceTickerView){a=this.getService("ticker");const s=MX(t,n);this.setTextOptions(s),a.render(t,r,s,i);return}this.calculateRelativeSizes(r,n,o.value),this.setTextOptions(n,o.size),a.render(t,r,n,o)}calculateRelativeSizes(t,r,n){const{relativeSizes:i}=r;i.forEach(function(a){let o;if("dataKey"in a&&"values"in a&&a.dataKey in t)o=a.values[String(t[a.dataKey])];else if("value"in a)o=a.value;else throw new U.TranslatableError("errors.indicatorInvalidRelativeSize");const s=o*n;r[a.key]=FX.floor(s,a.decimals)})}setTextOptions(t,r){t.textKeys.forEach(function(n){const i=t[n],a=i.fontStyle?`${i.fontStyle} `:"",o=i.fontVariant?`${i.fontVariant} `:"",s=i.fontWeight?`${i.fontWeight} `:"",u=`${Number.parseFloat(i.fontSizes&&i.fontSizes[r]||i.fontSize||t.fontSize)}px `,c=i.fontFamily||t.fontFamily,{color:d}=i,h=t;h[`${n}Font`]=a+o+s+u+c,h[`${n}Color`]=d})}}function X3(e){var r;const t=(r=e.value)==null?void 0:r[0];if(t&&"color"in t)return t.color}function jX(e,t,r){if(!UX(e))return r;const i=P.getColoringServiceByColorOptions(e).getColor(t);return i?H(R({},r),{value:H(R({},r.value),{color:i})}):r}function UX(e){return typeof e=="string"||e.type==="uniform"||e.type==="conditional"}const VX=(e,t)=>{const r=X3(t);return r&&e.value?P.getColoringServiceByColorOptions(r).getColor(P.isNumber(e.value)?e.value:0):null},GX=(e,t,r)=>{var h,p,m,v,b,_,w,C,S,T,M,E;const n=P.isNumber(e.min)?e.min:0,i=P.isNumber(e.max)?e.max:100,a=iu(r,"value"),o=iu(r,"secondary"),s=iu(r,"min"),u=iu(r,"max"),c=VX(e,r),d=t.indicatorType==="gauge"?1:"vertical";return H(R(R({},YX),c?{color:c}:null),{type:qX(t.indicatorType,"numericSubtype"in t?t.numericSubtype:void 0)||"numericSimple",skin:t.skin||d,title:{text:(m=(p=(h=t.indicatorComponents)==null?void 0:h.title)==null?void 0:p.text)!=null?m:""},min:{data:n,text:P.applyFormatPlainText(s,n)},max:{data:i,text:P.applyFormatPlainText(u,i)},value:{data:e.value,text:ay(e.value,a)},secondary:{data:e.secondary,text:ay(e.secondary,o)},secondaryTitle:{text:(_=(b=(v=t.indicatorComponents)==null?void 0:v.secondaryTitle)==null?void 0:b.text)!=null?_:""},showSecondary:e.secondary!==void 0,showTitle:!!((C=(w=t.indicatorComponents)==null?void 0:w.title)!=null&&C.shouldBeShown),showLabels:!!((T=(S=t.indicatorComponents)==null?void 0:S.labels)!=null&&T.shouldBeShown),showTicks:!!((E=(M=t.indicatorComponents)==null?void 0:M.ticks)!=null&&E.shouldBeShown)})};function qX(e,t){return e==="numeric"?t:e}function iu(e,t){var n;const r=(n=e[t])==null?void 0:n[0];return P.getCompleteNumberFormatConfig(r&&"numberFormatConfig"in r?r.numberFormatConfig:{})}const YX={color:"#00cee6",showSecondary:!1};function ay(e,t){return e===void 0?"":isNaN(e)?`#${O.NOT_AVAILABLE_TEXT}`:P.applyFormatPlainText(t,e)}const XX={fontFamily:"typography.fontFamily","title.color":"chart.textColor",backgroundColor:"chart.backgroundColor","label.color":"chart.textColor","secondaryTitle.color":"chart.secondaryTextColor","secondaryValue.color":"chart.secondaryTextColor","value.color":"palette.variantColors.0"};function Tp(e,t,r){const n=U.cloneDeep(r);for(const i in t){const a=t[i],o=ZX(e,a);o&&Z3(n,i,o)}return n}function Z3(e,t,r){const n=t.split(".");if(n.length===1)if(n[0]in e)e[n[0]]=r;else return;else{const[i,...a]=n;if(!(i in e))return;const o=e[i];if(!K3(o))return;Z3(o,a.join("."),r)}}function ZX(e,t){const r=t.split(".");let n=e;for(const i of r){if(!K3(n)||!(i in n))return;n=n[i]}return n}function K3(e){return typeof e=="object"&&e!==null}function KX(e,t,r){return Tp(e,t,r)}const QX=(e,t)=>{const{chartData:r,dataOptions:n,themeSettings:i}=t,{type:a}=e;let o;switch(a){case"gauge":o=TX;break;case"numeric":e.numericSubtype==="numericBar"?o=xX:o=iy;break;default:o=iy}i&&(o=KX(i,XX,o));const s=X3(n);return s&&r.value&&P.isNumber(r.value)&&(o=jX(s,r.value,o)),R(H(R({},o),{forceTickerView:e.forceTickerView}),e.type==="gauge"&&e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null)};function JX(e,t,r){return e==null?e:u_(e,t,r)}const Q3={"value.data":"value.data","value.text":"value.text","secondary.data":"secondary.data","secondary.text":"secondary.text","title.text":"title.text","secondaryTitle.text":"secondaryTitle.text"},J3={"value.color":"value.color","secondaryValue.color":"secondary.color","secondaryValue.fontWeight":"secondary.fontWeight","title.color":"title.color","secondaryTitle.color":"secondaryTitle.color"};function eZ(e,t){const r={};return O.flow(oy(e,Q3),oy(t,J3))(r)}function oy(e,t){return r=>{const n=R({},r);for(const[i,a]of Object.entries(t))JX(n,a,U.get(e,i));return n}}const tZ=(e,t,r)=>{const n=Tp(e,Q3,t),i=Tp(e,J3,r);return{legacyDataOptions:n,legacyChartOptions:i}},rZ=e=>e,nZ=(e,t)=>{var i;const r={},n=(a,o)=>{if(a===void 0)return;const s=P.getCompleteNumberFormatConfig(o);return P.applyFormatPlainText(s,a)};return t.value&&t.value.length>0&&(r.value=H(R({},Fe(t.value[0])),{value:(i=e.value)!=null?i:0,displayValue:n(e.value,t.value[0])})),t.secondary&&t.secondary.length>0&&e.secondary!==void 0&&(r.secondary=H(R({},Fe(t.secondary[0])),{value:e.secondary,displayValue:n(e.secondary,t.secondary[0])})),t.min&&t.min.length>0&&e.min!==void 0&&(r.min=H(R({},Fe(t.min[0])),{value:e.min,displayValue:n(e.min,t.min[0])})),t.max&&t.max.length>0&&e.max!==void 0&&(r.max=H(R({},Fe(t.max[0])),{value:e.max,displayValue:n(e.max,t.max[0])})),{entries:r}},iZ=({chartData:e,dataOptions:t,designOptions:r,onBeforeRender:n=rZ,onDataPointClick:i})=>{var d;const a=k.useRef(null),o=k.useRef(null),{t:s}=O.useTranslation(),{themeSettings:u}=y.useThemeContext();k.useEffect(()=>{if(!o.current||!a.current)return;const h=new WX,p=GX(e,r,t),m=QX({type:r.indicatorType,numericSubtype:"numericSubtype"in r?r.numericSubtype:void 0,forceTickerView:r.forceTickerView,tickerBarHeight:r.tickerBarHeight},{chartData:e,dataOptions:t,themeSettings:u}),v=eZ(p,m),b=n(v),{legacyDataOptions:_,legacyChartOptions:w}=tZ(b,p,m);h.render(o.current,_,w,a.current)},[e,t,r,u,n]);const c=h=>{if(i){const p=nZ(e,t);i(p,h.nativeEvent)}};return O.jsx("div",{ref:a,"data-testid":"indicator-root",role:"img","aria-label":s("chart.indicator.label"),style:{display:"flex",justifyContent:"center",width:"100%",height:"100%",alignItems:"center",backgroundColor:(d=u==null?void 0:u.chart)==null?void 0:d.backgroundColor,cursor:i?"pointer":"default"},onClick:c,children:O.jsx("canvas",{ref:o})})},aZ=e=>e.type==="indicator",oZ=e=>"min"in e,sZ=e=>"indicatorComponents"in e,lZ=e=>!!e.chartData&&aZ(e.chartData)&&oZ(e.dataOptions)&&sZ(e.designOptions),uZ=Object.freeze({usa:"united states",switzerland:"switzerland country",uk:"united kingdom"});function cZ(e,t){const r=uZ[e.toLowerCase()];return r&&(t[r]=e),r||e}function dZ(e,t){return t[e.toLowerCase()]||e}const hZ=(e,t)=>{const{app:r}=y.useSisenseContext(),[n,i]=k.useState([]),a=k.useRef(e),o=k.useCallback(()=>pt(exports,null,function*(){if(!r||!e)return;const s={},u=iX(t),c=yield r.httpClient.post("api/v1/geo/locations",R({locations:e.map(v=>({name:cZ(v.name,s)}))},u&&{geoLevel:u})),d=a.current!==e;if(!c||d)return;const h=c.reduce((v,b)=>{const _=H(R({},b),{name:dZ(b.name,s)});return v[_.name]=_,v},{}),p=[],m=e.map(v=>(h[v.name]||p.push(v.name),R(R({},v),h[v.name]?{coordinates:h[v.name].latLng}:null)));p.length&&console.warn(`Locations "${p.join(", ")}" coordinates not found`),i(m)}),[r,i,e,t]);return k.useEffect(()=>{e&&(a.current=e,e.some(u=>!!u.coordinates)?i(e):o())},[e,r,o,i]),n},fZ=()=>{const{app:e}=y.useSisenseContext(),[t,r]=k.useState(null),n=k.useCallback(()=>pt(exports,null,function*(){if(!e)return;const i=yield e.httpClient.get("api/v1/settings/system");i&&r(i.geo)}),[r,e]);return k.useEffect(()=>{n()},[e,n]),t};var pZ="Expected a function";function mZ(e,t,r){if(typeof e!="function")throw new TypeError(pZ);return setTimeout(function(){e.apply(void 0,r)},t)}var gZ=U.baseRest(function(e,t,r){return mZ(e,P.toNumber(t)||0,r)}),Pu=(e=>(e[e.YES=0]="YES",e[e.NO=1]="NO",e[e.LOADING=2]="LOADING",e))(Pu||{});const $h=10,vZ=`
98
- <svg
99
- xmlns="http://www.w3.org/2000/svg"
100
- width="24"
101
- height="24"
102
- viewBox="0 0 24 24"
103
- fill="green"
104
- class="csdk-animate-spin"
105
- >
106
- <path
107
- fillRule="evenodd"
108
- clipRule="evenodd"
109
- d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"
110
- fill="transparent"
111
- fillOpacity="0.3"
112
- />
113
- <path
114
- fillRule="evenodd"
115
- clipRule="evenodd"
116
- d="M20 12C20 16.4183 16.4183 20 12 20C11.2844 20 10.5908 19.906 9.93078 19.7298C9.96227 19.5889 9.97888 19.4423 9.97888 19.2918C9.97888 18.1873 9.08345 17.2918 7.97888 17.2918C6.87431 17.2918 5.97888 18.1873 5.97888 19.2918C5.97888 20.3964 6.87431 21.2918 7.97888 21.2918C8.56576 21.2918 9.0936 21.0391 9.45946 20.6364C10.2652 20.8731 11.1178 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3V4C16.4183 4 20 7.58172 20 12Z"
117
- fill="#22C3C3"
118
- />
119
- </svg>
120
- `,Pn=e=>`<span class="csdk-scattermap-tooltip-label">${e}</span>`,yZ=e=>{const t=`
121
- <div>
122
- <div>${Pn("...")}</div>
123
- <div>${Pn(`Showing first ${$h} results`)}</div>
124
- </div>
125
- `;return`
126
- <div>
127
- ${e.slice(0,$h).map(r=>`<div>${Pn(r)}</div>`).join("")}
128
- ${e.length>$h?t:""}
129
- </div>
130
- `},Bh=e=>`
131
- <span class="csdk-scattermap-tooltip-category">
132
- ${Pn(e)}
133
- </span>
134
- `,bZ=()=>Pn(vZ),au=(e,t,r=1)=>{const n=P.formatTooltipValue(t.size,e.value,`${e.value}`),i=P.formatTooltipValue(t.colorBy,e.colorValue,`${e.colorValue}`),a=t.details&&P.formatTooltipValue(t.details,e.details,`${e.details}`),o=`
135
- <div class="csdk-scattermap-tooltip-container">
136
- <div class="csdk-scattermap-tooltip-content">
137
- <div>${Pn(e.name)}</div>
138
- <div class="csdk-scattermap-tooltip-row">
139
- ${t.size?Bh(P.getDataOptionTitle(t.size)):""}
140
- ${t.size?Pn(n):""}
141
- </div>
142
- <div class="csdk-scattermap-tooltip-row">
143
- ${t.colorBy?Bh(P.getDataOptionTitle(t.colorBy)):""}
144
- ${t.colorBy?Pn(i||O.NOT_AVAILABLE_TEXT):""}
145
- </div>
146
- <div class="csdk-scattermap-tooltip-row">
147
- ${(r===2||r===0)&&t.details?Bh(P.getDataOptionTitle(t.details)):""}
148
- ${r===2?bZ():""}
149
- ${r===0&&t.details&&P.isMeasureColumn(t.details)?Pn(a||O.NOT_AVAILABLE_TEXT):""}
150
- </div>
151
- <div>
152
- ${r===0&&t.details&&!P.isMeasureColumn(t.details)?yZ(e.details):""}
153
- </div>
154
- </div>
155
- </div>
156
- `;return P.purify.sanitize(o)},_Z=600,wZ=11,CZ=({dataOptions:e,dataSource:t,filters:r=[]})=>{const{app:n}=y.useSisenseContext(),i=k.useCallback(o=>pt(exports,null,function*(){if(!n||!e.details||P.isMeasureColumn(e.details))return[];const s=e.locations.map((d,h)=>{const p=P.translateColumnToAttribute(d),m=nX(o)[h];return U.members(p,[m])}),u={dataSource:t,dimensions:[P.translateColumnToAttribute(e.details)],filters:z.mergeFilters(r,s),count:wZ};return(yield U.executeQuery(u,n)).rows.map(([d])=>d.text)}),[n,e,t,r]);return k.useCallback(o=>{if(!e.details||e.details&&!P.isMeasureColumn(e.details)&&!t)return{content:au(o,e)};if(P.isMeasureColumn(e.details))return{content:au(o,e,Pu.YES)};const s=new Promise(c=>gZ(c,_Z)),u=Promise.all([i(o.name),s]).then(([c])=>au(H(R({},o),{details:c}),e,Pu.YES));return{content:au(o,e,Pu.LOADING),postponedContent:u}},[e,t,i])},xZ="#00cee6",TZ=P.createDataColoringFunction({getValueFromDataStructure:({colorValue:e})=>parseFloat(`${e}`),applyColorToDataStructure:(e,t)=>H(R({},e),{color:t})});function SZ(e,t){return t?TZ(e.map(({colorValue:r})=>({colorValue:r})),t).map(({color:r})=>r):e.map(()=>xZ)}function MZ(e,t){const r=`
157
- © <a href='https://www.mapbox.com/about/maps/'>Mapbox</a>
158
- © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>
159
- <strong>
160
- <a href='https://www.mapbox.com/map-feedback/' target='_blank' aria-label='Improve this map (opens in a new tab)'>
161
- Improve this map
162
- </a>
163
- </strong>`,n="© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>",i=An.control.attribution();return t.indexOf("mapbox")>-1?i.addAttribution(r).addTo(e):t.indexOf("openstreetmap")>-1&&i.addAttribution(n).addTo(e),i}function ex(e){return{isLight:["hollow","filled-light"].includes(e),isFilled:["filled","filled-light"].includes(e)}}function tx(e){const{color:t,size:r,fill:n,blur:i}=e,{isFilled:a}=ex(n),u=i?{filled:.1,"filled-light":.1,hollow:.2,"hollow-bold":.25}[n]:{filled:.5,"filled-light":.2,hollow:.35,"hollow-bold":.9}[n];return{radius:r,fillOpacity:u,opacity:u,fillColor:a?t:"transparent",color:a?"transparent":t,stroke:!a,weight:a?0:2,customStyle:e}}function EZ({coordinates:e,style:t}){const r=new An.CircleMarker({lat:e.lat,lng:e.lng},tx(t));return r.on("mouseover",PZ),r.on("mouseout",AZ),r}function PZ(e){const t=e.target,r=t.options.customStyle,{isFilled:n,isLight:i}=ex(r.fill);return t.setStyle(n?{stroke:!0,weight:2,opacity:i?.5:.7,fillOpacity:i?.5:.7}:{weight:3,opacity:i?.6:1}),t}function AZ(e){const t=e.target,r=t.options.customStyle;t.setStyle(tx(r))}function RZ(e){e.forEach(t=>t.remove())}function DZ(e){let t=Number.MAX_VALUE,r=Number.MIN_VALUE;return e.forEach(n=>{isNaN(n)||(t=Math.min(t,n),r=Math.max(r,n))}),{min:t,max:r}}function NZ(e,t=4,r=24){let n=0;const{min:i,max:a}=DZ(e.map(({value:s})=>s)),o=r-t;return n=a-i,e.map(s=>n===0?t:(s.value-i)/n*o+t)}const kZ=({chartData:e,dataOptions:t,dataSource:r,filters:n=[],designOptions:i,onDataPointClick:a})=>{const{locations:o}=e,s=fZ(),{themeSettings:u}=y.useThemeContext(),c=hZ(o,t.locationLevel),{filters:d}=U.getFilterListAndRelationsJaql(n),h=CZ({dataOptions:t,dataSource:r,filters:d}),p=k.useRef(null),m=k.useRef(null),v=k.useMemo(()=>NZ(c,t.size?i.markers.size.minSize:i.markers.size.defaultSize,t.size?i.markers.size.maxSize:i.markers.size.defaultSize),[c,t,i]),b=k.useMemo(()=>{var T;return SZ(c,(T=t.colorBy)==null?void 0:T.color)},[c,t]),_=k.useRef([]),w=k.useRef(An.layerGroup([])),C=k.useRef(null),S=k.useRef(null);return k.useEffect(()=>{p.current&&!m.current&&(m.current=An.map(p.current,{attributionControl:!1,scrollWheelZoom:!0,minZoom:1,worldCopyJump:!0}),w.current.addTo(m.current),m.current.fitWorld())},[]),k.useEffect(()=>{_.current&&(RZ(_.current),_.current=[]),c&&(c.forEach((T,M)=>{if(!T.coordinates)return;const E=EZ({coordinates:T.coordinates,style:{color:b[M],size:v[M],fill:i.markers.fill,blur:!!T.blur}});_.current.push(E),E.addTo(w.current),a&&E.on("click",D=>{a(aX(T,t),D.originalEvent)}),E.bindTooltip(()=>{const{content:D,postponedContent:N}=h(T);return N==null||N.then(F=>E.setTooltipContent(F)),D})}),n7(m.current,_.current,aC(u)))},[c,b,v,i,u,t,h,a]),k.useEffect(()=>{var T;s&&(C.current&&C.current.remove(),C.current=An.tileLayer(s.maps_api_provider,{zoomOffset:-1,tileSize:512}),m.current&&(C.current.addTo(m.current),(T=S.current)==null||T.remove(),S.current=MZ(m.current,s.maps_api_provider)))},[s]),O.jsx("div",{className:"csdk-map-container",ref:p,style:{width:"100%",height:"100%"}})},rx=e=>e.type==="scattermap"&&"locations"in e,LZ=e=>"locations"in e,OZ=e=>"markers"in e,IZ=e=>!!e.chartData&&rx(e.chartData)&&LZ(e.dataOptions)&&OZ(e.designOptions),FZ=e=>e,$Z=({chartType:e,chartData:t,dataOptions:r,designOptions:n,onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:o,onBeforeRender:s=FZ,size:u})=>{const{app:c}=y.useSisenseContext(),{t:d}=O.useTranslation(),h=[],p=k.useCallback((_,w)=>Qs(_,w,c==null?void 0:c.settings.locale,c==null?void 0:c.settings.dateConfig),[c==null?void 0:c.settings.locale,c==null?void 0:c.settings.dateConfig]),{themeSettings:m}=y.useThemeContext(),v=k.useMemo(()=>{var E;const{options:_,alerts:w}=P.highchartsOptionsService(t,e,n,r,d,m,p);h.push(...w);const C=((E=c==null?void 0:c.settings.accessibilityConfig)==null?void 0:E.enabled)||!1,S=VC(_,m,C),T=UC(S,r,{onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:o}),M=GC(T,m);return s(M)},[e,t,r,n,m,i,a,s,d]),b=k.useMemo(()=>v?H(R({},v),{chart:R(R(R({},v.chart),(u==null?void 0:u.width)&&{width:u.width}),(u==null?void 0:u.height)&&{height:u.height})}):null,[v,u]);return b&&O.jsxs("div",{"data-testid":"chart-root",role:"img","aria-label":d("chart.visualization.label"),style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!h.length&&O.jsx(u3,{alerts:h}),O.jsx(l0,{options:b})]})},BZ=[...z.CARTESIAN_CHART_TYPES,...z.CATEGORICAL_CHART_TYPES,...z.SCATTER_CHART_TYPES,...z.BOXPLOT_CHART_TYPES,...z.RANGE_CHART_TYPES],nx=e=>BZ.includes(e),zZ=e=>!!e.chartType&&nx(e.chartType)&&!!e.chartData,HZ=e=>e==="indicator",WZ=(e,t)=>e==="scatter"&&"scatterDataTable"in t?t.scatterDataTable.length===0:e==="areamap"&&AC(t)?t.geoData.length===0:e==="scattermap"&&rx(t)?t.locations.length===0:e==="boxplot"&&qP(t)?t.xValues.length===0:e==="calendar-heatmap"&&LC(t)?t.values.length===0:e==="sankey"&&CX(t)?t.links.length===0:"series"in t&&t.series.length===0,Au=e=>{const{chartType:t,dataSet:r,dataOptions:n,filters:i,highlights:a,styleOptions:o,refreshCounter:s,onDataPointClick:u,onDataPointContextMenu:c,onDataPointsSelected:d,onBeforeRender:h,onDataReady:p}=e,{width:m,height:v}=o||{},b=yc(t),_=k.useMemo(()=>({width:m,height:v}),[m,v]),w=vY(n,t),{dataOptions:C,attributes:S,measures:T,dataColumnNamesMapping:M}=bX(n,t,w),E=S.length===0&&T.length===0,D=k.useMemo(()=>EY(t,w),[t,w]),{data:N,dataOptions:F,isLoading:B}=yX({dataSet:r,chartDataOptions:C,chartType:t,attributes:S,measures:T,dataColumnNamesMapping:M,filters:i,highlights:a,refreshCounter:s,enabled:!E,loadData:D}),G=k.useMemo(()=>n?_Y(t,F,o):null,[n,t,F,o]),Y=pX({dataSet:r,data:N,chartDataOptions:C,chartType:t,isForecastOrTrendChart:w,attributes:S,measures:T,dataColumnNamesMapping:M,onDataReady:p}),$=gX({dataSet:r,chartType:t,chartData:Y,internalDataOptions:F,designOptions:G,onBeforeRender:h,onDataPointClick:u,onDataPointContextMenu:c,onDataPointsSelected:d,filters:i}),X=k.useCallback(V=>{if(!$)return null;if(!Y&&B)return O.jsx(y.LoadingOverlay,{});if(Y&&WZ(t,Y)||E)return O.jsx(Mm,{iconType:t});if(nl(t)&&!w){const j=rl(t);return j.renderer.isCorrectRendererProps($)?O.jsx(y.LoadingOverlay,{isVisible:B,children:O.jsx(j.renderer.ChartRendererComponent,H(R({},$),{size:V}))}):null}return t==="scattermap"&&IZ($)?O.jsx(y.LoadingOverlay,{isVisible:B,children:O.jsx(kZ,R({},$))}):t==="indicator"&&lZ($)?O.jsx(y.LoadingOverlay,{isVisible:B,children:O.jsx(iZ,R({},$))}):nx(t)&&zZ($)?O.jsx(y.LoadingOverlay,{isVisible:B,children:O.jsx($Z,H(R({},$),{designOptions:R({},$.designOptions),size:V}))}):null},[Y,B,t,E,w,$]);return $?O.jsx(vc,{defaultSize:b,size:_,rerenderOnResize:HZ(t),children:X}):null};function ix(e){return e&&typeof e=="object"&&"columns"in e&&U.isArray(e.columns)&&"rows"in e&&U.isArray(e.rows)}const C0=e=>{const t=[],r=[];for(const n of e.columns)P.isMeasureColumn(n)?r.push(P.translateColumnToMeasure(n)):t.push(P.translateColumnToAttribute(n));return{attributes:t,measures:r}},jZ=({dataSet:e,dataOptions:t,dataColumnNamesMapping:r,filters:n,filterRelations:i,count:a,offset:o})=>{const s=_0(),[u,c]=k.useState(z.isDataSource(e)?null:e),[d,h]=k.useState(!1),p=k.useRef(!0),{isInitialized:m,app:v}=y.useSisenseContext(),[b,_]=k.useState(t),[w,C]=k.useState(r);return k.useEffect(()=>{var E;let S=!1;if(!t)return;const{attributes:T,measures:M}=C0(t);if(z.isDataSource(e)){if(!m){s(new U.TranslatableError("errors.chartNoSisenseContext"));return}if(!v||!p.current&&o>0)return;h(!0),((E=v.settings.queryCacheConfig)!=null&&E.enabled?U.executeQueryWithCache:U.executeQuery)({dataSource:e,dimensions:T,measures:M,filters:n,filterRelations:i,count:a+1,offset:o,ungroup:!0},v).then(N=>{if(S)return;p.current=N.rows.length>a;const F=p.current?N.rows.slice(0,a):N.rows;o>0?c(B=>{const G=B==null?void 0:B.rows.length,Y=G?G>o?B.rows.slice(0,o):B.rows:null;return{columns:N.columns,rows:Y?[...Y,...F]:F}}):c({columns:N.columns,rows:F}),_(t),C(r)}).finally(()=>{h(!1)}).catch(N=>{S||s(N)})}else c(e),_(t),C(r);return()=>{S=!0}},[v,e,t,r,n,i,o,a,m,s]),[d?null:u,b,w]},UZ=({data:e,innerDataOptions:t,dataColumnNamesMapping:r,needToAggregate:n=!1})=>{const{app:i}=y.useSisenseContext();return k.useMemo(()=>{if(!e||!t)return null;let a=P.createDataTableFromData(xp(e,t,i==null?void 0:i.settings.locale,i==null?void 0:i.settings.dateConfig));const o=t.columns.filter(u=>!P.isMeasureColumn(u)).map(P.translateColumnToAttribute),s=t.columns.filter(u=>P.isMeasureColumn(u)).map(P.translateColumnToMeasure);return A3(a,o,s,r),n&&(a=q3(a,o,s,r)),xq(t,a)},[e,t,n,r,i])};var dr="top",Lr="bottom",Or="right",hr="left",x0="auto",al=[dr,Lr,Or,hr],za="start",Ms="end",VZ="clippingParents",ax="viewport",zo="popper",GZ="reference",sy=al.reduce(function(e,t){return e.concat([t+"-"+za,t+"-"+Ms])},[]),ox=[].concat(al,[x0]).reduce(function(e,t){return e.concat([t,t+"-"+za,t+"-"+Ms])},[]),qZ="beforeRead",YZ="read",XZ="afterRead",ZZ="beforeMain",KZ="main",QZ="afterMain",JZ="beforeWrite",eK="write",tK="afterWrite",rK=[qZ,YZ,XZ,ZZ,KZ,QZ,JZ,eK,tK];function mn(e){return e?(e.nodeName||"").toLowerCase():null}function _r(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Li(e){var t=_r(e).Element;return e instanceof t||e instanceof Element}function Nr(e){var t=_r(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function T0(e){if(typeof ShadowRoot=="undefined")return!1;var t=_r(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nK(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!Nr(a)||!mn(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function iK(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(u,c){return u[c]="",u},{});!Nr(i)||!mn(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const aK={name:"applyStyles",enabled:!0,phase:"write",fn:nK,effect:iK,requires:["computeStyles"]};function dn(e){return e.split("-")[0]}var Si=Math.max,ec=Math.min,Ha=Math.round;function Sp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sx(){return!/^((?!chrome|android).)*safari/i.test(Sp())}function Wa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&Nr(e)&&(i=e.offsetWidth>0&&Ha(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ha(n.height)/e.offsetHeight||1);var o=Li(e)?_r(e):window,s=o.visualViewport,u=!sx()&&r,c=(n.left+(u&&s?s.offsetLeft:0))/i,d=(n.top+(u&&s?s.offsetTop:0))/a,h=n.width/i,p=n.height/a;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function S0(e){var t=Wa(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function lx(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&T0(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Nn(e){return _r(e).getComputedStyle(e)}function oK(e){return["table","td","th"].indexOf(mn(e))>=0}function li(e){return((Li(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kc(e){return mn(e)==="html"?e:e.assignedSlot||e.parentNode||(T0(e)?e.host:null)||li(e)}function ly(e){return!Nr(e)||Nn(e).position==="fixed"?null:e.offsetParent}function sK(e){var t=/firefox/i.test(Sp()),r=/Trident/i.test(Sp());if(r&&Nr(e)){var n=Nn(e);if(n.position==="fixed")return null}var i=Kc(e);for(T0(i)&&(i=i.host);Nr(i)&&["html","body"].indexOf(mn(i))<0;){var a=Nn(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function ol(e){for(var t=_r(e),r=ly(e);r&&oK(r)&&Nn(r).position==="static";)r=ly(r);return r&&(mn(r)==="html"||mn(r)==="body"&&Nn(r).position==="static")?t:r||sK(e)||t}function M0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ss(e,t,r){return Si(e,ec(t,r))}function lK(e,t,r){var n=ss(e,t,r);return n>r?r:n}function ux(){return{top:0,right:0,bottom:0,left:0}}function cx(e){return Object.assign({},ux(),e)}function dx(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var uK=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,cx(typeof t!="number"?t:dx(t,al))};function cK(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=dn(r.placement),u=M0(s),c=[hr,Or].indexOf(s)>=0,d=c?"height":"width";if(!(!a||!o)){var h=uK(i.padding,r),p=S0(a),m=u==="y"?dr:hr,v=u==="y"?Lr:Or,b=r.rects.reference[d]+r.rects.reference[u]-o[u]-r.rects.popper[d],_=o[u]-r.rects.reference[u],w=ol(a),C=w?u==="y"?w.clientHeight||0:w.clientWidth||0:0,S=b/2-_/2,T=h[m],M=C-p[d]-h[v],E=C/2-p[d]/2+S,D=ss(T,E,M),N=u;r.modifiersData[n]=(t={},t[N]=D,t.centerOffset=D-E,t)}}function dK(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||lx(t.elements.popper,i)&&(t.elements.arrow=i))}const hK={name:"arrow",enabled:!0,phase:"main",fn:cK,effect:dK,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ja(e){return e.split("-")[1]}var fK={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pK(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Ha(r*i)/i||0,y:Ha(n*i)/i||0}}function uy(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=o.x,m=p===void 0?0:p,v=o.y,b=v===void 0?0:v,_=typeof d=="function"?d({x:m,y:b}):{x:m,y:b};m=_.x,b=_.y;var w=o.hasOwnProperty("x"),C=o.hasOwnProperty("y"),S=hr,T=dr,M=window;if(c){var E=ol(r),D="clientHeight",N="clientWidth";if(E===_r(r)&&(E=li(r),Nn(E).position!=="static"&&s==="absolute"&&(D="scrollHeight",N="scrollWidth")),E=E,i===dr||(i===hr||i===Or)&&a===Ms){T=Lr;var F=h&&E===M&&M.visualViewport?M.visualViewport.height:E[D];b-=F-n.height,b*=u?1:-1}if(i===hr||(i===dr||i===Lr)&&a===Ms){S=Or;var B=h&&E===M&&M.visualViewport?M.visualViewport.width:E[N];m-=B-n.width,m*=u?1:-1}}var G=Object.assign({position:s},c&&fK),Y=d===!0?pK({x:m,y:b},_r(r)):{x:m,y:b};if(m=Y.x,b=Y.y,u){var $;return Object.assign({},G,($={},$[T]=C?"0":"",$[S]=w?"0":"",$.transform=(M.devicePixelRatio||1)<=1?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",$))}return Object.assign({},G,(t={},t[T]=C?b+"px":"",t[S]=w?m+"px":"",t.transform="",t))}function mK(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,u=s===void 0?!0:s,c={placement:dn(t.placement),variation:ja(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,uy(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,uy(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const gK={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mK,data:{}};var ou={passive:!0};function vK(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,u=_r(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",r.update,ou)}),s&&u.addEventListener("resize",r.update,ou),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",r.update,ou)}),s&&u.removeEventListener("resize",r.update,ou)}}const yK={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vK,data:{}};var bK={left:"right",right:"left",bottom:"top",top:"bottom"};function Ru(e){return e.replace(/left|right|bottom|top/g,function(t){return bK[t]})}var _K={start:"end",end:"start"};function cy(e){return e.replace(/start|end/g,function(t){return _K[t]})}function E0(e){var t=_r(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function P0(e){return Wa(li(e)).left+E0(e).scrollLeft}function wK(e,t){var r=_r(e),n=li(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;var c=sx();(c||!c&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s+P0(e),y:u}}function CK(e){var t,r=li(e),n=E0(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Si(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Si(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+P0(e),u=-n.scrollTop;return Nn(i||r).direction==="rtl"&&(s+=Si(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:u}}function A0(e){var t=Nn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function hx(e){return["html","body","#document"].indexOf(mn(e))>=0?e.ownerDocument.body:Nr(e)&&A0(e)?e:hx(Kc(e))}function ls(e,t){var r;t===void 0&&(t=[]);var n=hx(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=_r(n),o=i?[a].concat(a.visualViewport||[],A0(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(ls(Kc(o)))}function Mp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function xK(e,t){var r=Wa(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function dy(e,t,r){return t===ax?Mp(wK(e,r)):Li(t)?xK(t,r):Mp(CK(li(e)))}function TK(e){var t=ls(Kc(e)),r=["absolute","fixed"].indexOf(Nn(e).position)>=0,n=r&&Nr(e)?ol(e):e;return Li(n)?t.filter(function(i){return Li(i)&&lx(i,n)&&mn(i)!=="body"}):[]}function SK(e,t,r,n){var i=t==="clippingParents"?TK(e):[].concat(t),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(u,c){var d=dy(e,c,n);return u.top=Si(d.top,u.top),u.right=ec(d.right,u.right),u.bottom=ec(d.bottom,u.bottom),u.left=Si(d.left,u.left),u},dy(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function fx(e){var t=e.reference,r=e.element,n=e.placement,i=n?dn(n):null,a=n?ja(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,u;switch(i){case dr:u={x:o,y:t.y-r.height};break;case Lr:u={x:o,y:t.y+t.height};break;case Or:u={x:t.x+t.width,y:s};break;case hr:u={x:t.x-r.width,y:s};break;default:u={x:t.x,y:t.y}}var c=i?M0(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case za:u[c]=u[c]-(t[d]/2-r[d]/2);break;case Ms:u[c]=u[c]+(t[d]/2-r[d]/2);break}}return u}function Es(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,s=r.boundary,u=s===void 0?VZ:s,c=r.rootBoundary,d=c===void 0?ax:c,h=r.elementContext,p=h===void 0?zo:h,m=r.altBoundary,v=m===void 0?!1:m,b=r.padding,_=b===void 0?0:b,w=cx(typeof _!="number"?_:dx(_,al)),C=p===zo?GZ:zo,S=e.rects.popper,T=e.elements[v?C:p],M=SK(Li(T)?T:T.contextElement||li(e.elements.popper),u,d,o),E=Wa(e.elements.reference),D=fx({reference:E,element:S,strategy:"absolute",placement:i}),N=Mp(Object.assign({},S,D)),F=p===zo?N:E,B={top:M.top-F.top+w.top,bottom:F.bottom-M.bottom+w.bottom,left:M.left-F.left+w.left,right:F.right-M.right+w.right},G=e.modifiersData.offset;if(p===zo&&G){var Y=G[i];Object.keys(B).forEach(function($){var X=[Or,Lr].indexOf($)>=0?1:-1,V=[dr,Lr].indexOf($)>=0?"y":"x";B[$]+=Y[V]*X})}return B}function MK(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?ox:u,d=ja(n),h=d?s?sy:sy.filter(function(v){return ja(v)===d}):al,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,b){return v[b]=Es(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[dn(b)],v},{});return Object.keys(m).sort(function(v,b){return m[v]-m[b]})}function EK(e){if(dn(e)===x0)return[];var t=Ru(e);return[cy(e),t,cy(t)]}function PK(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,u=r.fallbackPlacements,c=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,m=r.flipVariations,v=m===void 0?!0:m,b=r.allowedAutoPlacements,_=t.options.placement,w=dn(_),C=w===_,S=u||(C||!v?[Ru(_)]:EK(_)),T=[_].concat(S).reduce(function(oe,se){return oe.concat(dn(se)===x0?MK(t,{placement:se,boundary:d,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:b}):se)},[]),M=t.rects.reference,E=t.rects.popper,D=new Map,N=!0,F=T[0],B=0;B<T.length;B++){var G=T[B],Y=dn(G),$=ja(G)===za,X=[dr,Lr].indexOf(Y)>=0,V=X?"width":"height",Z=Es(t,{placement:G,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),j=X?$?Or:hr:$?Lr:dr;M[V]>E[V]&&(j=Ru(j));var q=Ru(j),te=[];if(a&&te.push(Z[Y]<=0),s&&te.push(Z[j]<=0,Z[q]<=0),te.every(function(oe){return oe})){F=G,N=!1;break}D.set(G,te)}if(N)for(var Q=v?3:1,J=function(se){var ce=T.find(function(me){var pe=D.get(me);if(pe)return pe.slice(0,se).every(function(we){return we})});if(ce)return F=ce,"break"},ne=Q;ne>0;ne--){var ae=J(ne);if(ae==="break")break}t.placement!==F&&(t.modifiersData[n]._skip=!0,t.placement=F,t.reset=!0)}}const AK={name:"flip",enabled:!0,phase:"main",fn:PK,requiresIfExists:["offset"],data:{_skip:!1}};function hy(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function fy(e){return[dr,Or,Lr,hr].some(function(t){return e[t]>=0})}function RK(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Es(t,{elementContext:"reference"}),s=Es(t,{altBoundary:!0}),u=hy(o,n),c=hy(s,i,a),d=fy(u),h=fy(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const DK={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:RK};function NK(e,t,r){var n=dn(e),i=[hr,dr].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[hr,Or].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function kK(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=ox.reduce(function(d,h){return d[h]=NK(h,t.rects,a),d},{}),s=o[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}const LK={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kK};function OK(e){var t=e.state,r=e.name;t.modifiersData[r]=fx({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const IK={name:"popperOffsets",enabled:!0,phase:"read",fn:OK,data:{}};function FK(e){return e==="x"?"y":"x"}function $K(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,m=p===void 0?!0:p,v=r.tetherOffset,b=v===void 0?0:v,_=Es(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:d}),w=dn(t.placement),C=ja(t.placement),S=!C,T=M0(w),M=FK(T),E=t.modifiersData.popperOffsets,D=t.rects.reference,N=t.rects.popper,F=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,B=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(E){if(a){var $,X=T==="y"?dr:hr,V=T==="y"?Lr:Or,Z=T==="y"?"height":"width",j=E[T],q=j+_[X],te=j-_[V],Q=m?-N[Z]/2:0,J=C===za?D[Z]:N[Z],ne=C===za?-N[Z]:-D[Z],ae=t.elements.arrow,oe=m&&ae?S0(ae):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ux(),ce=se[X],me=se[V],pe=ss(0,D[Z],oe[Z]),we=S?D[Z]/2-Q-pe-ce-B.mainAxis:J-pe-ce-B.mainAxis,Le=S?-D[Z]/2+Q+pe+me+B.mainAxis:ne+pe+me+B.mainAxis,Ce=t.elements.arrow&&ol(t.elements.arrow),le=Ce?T==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ve=($=G==null?void 0:G[T])!=null?$:0,Te=j+we-Ve-le,Ne=j+Le-Ve,Be=ss(m?ec(q,Te):q,j,m?Si(te,Ne):te);E[T]=Be,Y[T]=Be-j}if(s){var Xe,Je=T==="x"?dr:hr,pr=T==="x"?Lr:Or,Pt=E[M],Ht=M==="y"?"height":"width",or=Pt+_[Je],xr=Pt-_[pr],Lt=[dr,hr].indexOf(w)!==-1,Fn=(Xe=G==null?void 0:G[M])!=null?Xe:0,Tr=Lt?or:Pt-D[Ht]-N[Ht]-Fn+B.altAxis,Sr=Lt?Pt+D[Ht]+N[Ht]-Fn-B.altAxis:xr,Yr=m&&Lt?lK(Tr,Pt,Sr):ss(m?Tr:or,Pt,m?Sr:xr);E[M]=Yr,Y[M]=Yr-Pt}t.modifiersData[n]=Y}}const BK={name:"preventOverflow",enabled:!0,phase:"main",fn:$K,requiresIfExists:["offset"]};function zK(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function HK(e){return e===_r(e)||!Nr(e)?E0(e):zK(e)}function WK(e){var t=e.getBoundingClientRect(),r=Ha(t.width)/e.offsetWidth||1,n=Ha(t.height)/e.offsetHeight||1;return r!==1||n!==1}function jK(e,t,r){r===void 0&&(r=!1);var n=Nr(t),i=Nr(t)&&WK(t),a=li(t),o=Wa(e,i,r),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((mn(t)!=="body"||A0(a))&&(s=HK(t)),Nr(t)?(u=Wa(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=P0(a))),{x:o.left+s.scrollLeft-u.x,y:o.top+s.scrollTop-u.y,width:o.width,height:o.height}}function UK(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var u=t.get(s);u&&i(u)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function VK(e){var t=UK(e);return rK.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function GK(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function qK(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var py={placement:"bottom",modifiers:[],strategy:"absolute"};function my(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function YK(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?py:i;return function(s,u,c){c===void 0&&(c=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},py,a),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},h=[],p=!1,m={state:d,setOptions:function(w){var C=typeof w=="function"?w(d.options):w;b(),d.options=Object.assign({},a,d.options,C),d.scrollParents={reference:Li(s)?ls(s):s.contextElement?ls(s.contextElement):[],popper:ls(u)};var S=VK(qK([].concat(n,d.options.modifiers)));return d.orderedModifiers=S.filter(function(T){return T.enabled}),v(),m.update()},forceUpdate:function(){if(!p){var w=d.elements,C=w.reference,S=w.popper;if(my(C,S)){d.rects={reference:jK(C,ol(S),d.options.strategy==="fixed"),popper:S0(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(B){return d.modifiersData[B.name]=Object.assign({},B.data)});for(var T=0;T<d.orderedModifiers.length;T++){if(d.reset===!0){d.reset=!1,T=-1;continue}var M=d.orderedModifiers[T],E=M.fn,D=M.options,N=D===void 0?{}:D,F=M.name;typeof E=="function"&&(d=E({state:d,options:N,name:F,instance:m})||d)}}}},update:GK(function(){return new Promise(function(_){m.forceUpdate(),_(d)})}),destroy:function(){b(),p=!0}};if(!my(s,u))return m;m.setOptions(c).then(function(_){!p&&c.onFirstUpdate&&c.onFirstUpdate(_)});function v(){d.orderedModifiers.forEach(function(_){var w=_.name,C=_.options,S=C===void 0?{}:C,T=_.effect;if(typeof T=="function"){var M=T({state:d,name:w,instance:m,options:S}),E=function(){};h.push(M||E)}})}function b(){h.forEach(function(_){return _()}),h=[]}return m}}var XK=[yK,IK,gK,aK,LK,AK,BK,hK,DK],ZK=YK({defaultModifiers:XK});function KK(e){return y.generateUtilityClass("MuiPopper",e)}y.generateUtilityClasses("MuiPopper",["root"]);function QK(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function tc(e){return typeof e=="function"?e():e}function Qc(e){return e.nodeType!==void 0}function JK(e){return!Qc(e)}const eQ=e=>{const{classes:t}=e,r={root:["root"]};return y.composeClasses(r,KK,t)},tQ={},rQ=de.forwardRef(function(t,r){var Z;const V=t,{anchorEl:n,children:i,direction:a,disablePortal:o,modifiers:s,open:u,placement:c,popperOptions:d,popperRef:h,slotProps:p={},slots:m={},TransitionProps:v,ownerState:b}=V,_=Ge(V,["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"]),w=de.useRef(null),C=y.useForkRef(w,r),S=de.useRef(null),T=y.useForkRef(S,h),M=de.useRef(T);y.useEnhancedEffect(()=>{M.current=T},[T]),de.useImperativeHandle(h,()=>S.current,[]);const E=QK(c,a),[D,N]=de.useState(E),[F,B]=de.useState(tc(n));de.useEffect(()=>{S.current&&S.current.forceUpdate()}),de.useEffect(()=>{n&&B(tc(n))},[n]),y.useEnhancedEffect(()=>{if(!F||!u)return;const j=Q=>{N(Q.placement)};if(process.env.NODE_ENV!=="production"&&F&&Qc(F)&&F.nodeType===1){const Q=F.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Q.top===0&&Q.left===0&&Q.right===0&&Q.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
164
- `))}let q=[{name:"preventOverflow",options:{altBoundary:o}},{name:"flip",options:{altBoundary:o}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Q})=>{j(Q)}}];s!=null&&(q=q.concat(s)),d&&d.modifiers!=null&&(q=q.concat(d.modifiers));const te=ZK(F,w.current,H(R({placement:E},d),{modifiers:q}));return M.current(te),()=>{te.destroy(),M.current(null)}},[F,o,s,u,d,E]);const G={placement:D};v!==null&&(G.TransitionProps=v);const Y=eQ(t),$=(Z=m.root)!=null?Z:"div",X=y.useSlotProps({elementType:$,externalSlotProps:p.root,externalForwardedProps:_,additionalProps:{role:"tooltip",ref:C},ownerState:t,className:Y.root});return _e.jsx($,H(R({},X),{children:typeof i=="function"?i(G):i}))}),px=de.forwardRef(function(t,r){const B=t,{anchorEl:n,children:i,container:a,direction:o="ltr",disablePortal:s=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=tQ,popperRef:m,style:v,transition:b=!1,slotProps:_={},slots:w={}}=B,C=Ge(B,["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"]),[S,T]=de.useState(!0),M=()=>{T(!1)},E=()=>{T(!0)};if(!u&&!d&&(!b||S))return null;let D;if(a)D=a;else if(n){const G=tc(n);D=G&&Qc(G)?y.ownerDocument(G).body:y.ownerDocument(null).body}const N=!d&&u&&(!b||S)?"none":void 0,F=b?{in:d,onEnter:M,onExited:E}:void 0;return _e.jsx(y.Portal,{disablePortal:s,container:D,children:_e.jsx(rQ,H(R({anchorEl:n,direction:o,disablePortal:s,modifiers:c,ref:r,open:b?!S:d,placement:h,popperOptions:p,popperRef:m,slotProps:_,slots:w},C),{style:R({position:"fixed",top:0,left:0,display:N},v),TransitionProps:F,children:i}))})});process.env.NODE_ENV!=="production"&&(px.propTypes={anchorEl:y.chainPropTypes(y.PropTypes.oneOfType([y.HTMLElementType,y.PropTypes.object,y.PropTypes.func]),e=>{if(e.open){const t=tc(e.anchorEl);if(t&&Qc(t)&&t.nodeType===1){const r=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&r.top===0&&r.left===0&&r.right===0&&r.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
165
- `))}else if(!t||typeof t.getBoundingClientRect!="function"||JK(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
166
- `))}return null}),children:y.PropTypes.oneOfType([y.PropTypes.node,y.PropTypes.func]),container:y.PropTypes.oneOfType([y.HTMLElementType,y.PropTypes.func]),direction:y.PropTypes.oneOf(["ltr","rtl"]),disablePortal:y.PropTypes.bool,keepMounted:y.PropTypes.bool,modifiers:y.PropTypes.arrayOf(y.PropTypes.shape({data:y.PropTypes.object,effect:y.PropTypes.func,enabled:y.PropTypes.bool,fn:y.PropTypes.func,name:y.PropTypes.any,options:y.PropTypes.object,phase:y.PropTypes.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.PropTypes.arrayOf(y.PropTypes.string),requiresIfExists:y.PropTypes.arrayOf(y.PropTypes.string)})),open:y.PropTypes.bool.isRequired,placement:y.PropTypes.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.PropTypes.shape({modifiers:y.PropTypes.array,onFirstUpdate:y.PropTypes.func,placement:y.PropTypes.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.PropTypes.oneOf(["absolute","fixed"])}),popperRef:y.refType,slotProps:y.PropTypes.shape({root:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({root:y.PropTypes.elementType}),transition:y.PropTypes.bool});const nQ=y.styled(px,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sl=de.forwardRef(function(t,r){var N;const n=y.useRtl(),D=y.useDefaultProps({props:t,name:"MuiPopper"}),{anchorEl:a,component:o,components:s,componentsProps:u,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:m,placement:v,popperOptions:b,popperRef:_,transition:w,slots:C,slotProps:S}=D,T=Ge(D,["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"]),M=(N=C==null?void 0:C.root)!=null?N:s==null?void 0:s.Root,E=R({anchorEl:a,container:c,disablePortal:d,keepMounted:h,modifiers:p,open:m,placement:v,popperOptions:b,popperRef:_,transition:w},T);return _e.jsx(nQ,H(R({as:o,direction:n?"rtl":"ltr",slots:{root:M},slotProps:S!=null?S:u},E),{ref:r}))});process.env.NODE_ENV!=="production"&&(sl.propTypes={anchorEl:y.PropTypes.oneOfType([y.HTMLElementType,y.PropTypes.object,y.PropTypes.func]),children:y.PropTypes.oneOfType([y.PropTypes.node,y.PropTypes.func]),component:y.PropTypes.elementType,components:y.PropTypes.shape({Root:y.PropTypes.elementType}),componentsProps:y.PropTypes.shape({root:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),container:y.PropTypes.oneOfType([y.HTMLElementType,y.PropTypes.func]),disablePortal:y.PropTypes.bool,keepMounted:y.PropTypes.bool,modifiers:y.PropTypes.arrayOf(y.PropTypes.shape({data:y.PropTypes.object,effect:y.PropTypes.func,enabled:y.PropTypes.bool,fn:y.PropTypes.func,name:y.PropTypes.any,options:y.PropTypes.object,phase:y.PropTypes.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.PropTypes.arrayOf(y.PropTypes.string),requiresIfExists:y.PropTypes.arrayOf(y.PropTypes.string)})),open:y.PropTypes.bool.isRequired,placement:y.PropTypes.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.PropTypes.shape({modifiers:y.PropTypes.array,onFirstUpdate:y.PropTypes.func,placement:y.PropTypes.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.PropTypes.oneOf(["absolute","fixed"])}),popperRef:y.refType,slotProps:y.PropTypes.shape({root:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({root:y.PropTypes.elementType}),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),transition:y.PropTypes.bool});function iQ(e){return y.generateUtilityClass("MuiTooltip",e)}const ht=y.generateUtilityClasses("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function aQ(e){return Math.round(e*1e5)/1e5}const oQ=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:i,placement:a}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",i&&"touch",`tooltipPlacement${y.capitalize(a.split("-")[0])}`],arrow:["arrow"]};return y.composeClasses(o,iQ,t)},sQ=y.styled(sl,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(y.memoTheme(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${ht.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ht.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ht.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ht.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${ht.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${ht.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${ht.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${ht.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),lQ=y.styled("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${y.capitalize(r.placement.split("-")[0])}`]]}})(y.memoTheme(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:y.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${ht.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${ht.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ht.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${aQ(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${ht.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${ht.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),uQ=y.styled("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(y.memoTheme(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:y.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let su=!1;const gy=new y.Timeout;let Ho={x:0,y:0};function lu(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const Oi=de.forwardRef(function(t,r){var bl,Zi,_l;const n=y.useDefaultProps({props:t,name:"MuiTooltip"}),yl=n,{arrow:i=!1,children:a,classes:o,components:s={},componentsProps:u={},describeChild:c=!1,disableFocusListener:d=!1,disableHoverListener:h=!1,disableInteractive:p=!1,disableTouchListener:m=!1,enterDelay:v=100,enterNextDelay:b=0,enterTouchDelay:_=700,followCursor:w=!1,id:C,leaveDelay:S=0,leaveTouchDelay:T=1500,onClose:M,onOpen:E,open:D,placement:N="bottom",PopperComponent:F,PopperProps:B={},slotProps:G={},slots:Y={},title:$,TransitionComponent:X,TransitionProps:V}=yl,Z=Ge(yl,["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"]),j=de.isValidElement(a)?a:_e.jsx("span",{children:a}),q=y.useTheme(),te=y.useRtl(),[Q,J]=de.useState(),[ne,ae]=de.useState(null),oe=de.useRef(!1),se=p||w,ce=y.useTimeout(),me=y.useTimeout(),pe=y.useTimeout(),we=y.useTimeout(),[Le,Ce]=Tm({controlled:D,default:!1,name:"Tooltip",state:"open"});let le=Le;if(process.env.NODE_ENV!=="production"){const{current:Ae}=de.useRef(D!==void 0);de.useEffect(()=>{Q&&Q.disabled&&!Ae&&$!==""&&Q.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
167
- `))},[$,Q,Ae])}const Ve=gc(C),Te=de.useRef(),Ne=y.useEventCallback(()=>{Te.current!==void 0&&(document.body.style.WebkitUserSelect=Te.current,Te.current=void 0),we.clear()});de.useEffect(()=>Ne,[Ne]);const Be=Ae=>{gy.clear(),su=!0,Ce(!0),E&&!le&&E(Ae)},Xe=y.useEventCallback(Ae=>{gy.start(800+S,()=>{su=!1}),Ce(!1),M&&le&&M(Ae),ce.start(q.transitions.duration.shortest,()=>{oe.current=!1})}),Je=Ae=>{oe.current&&Ae.type!=="touchstart"||(Q&&Q.removeAttribute("title"),me.clear(),pe.clear(),v||su&&b?me.start(su?b:v,()=>{Be(Ae)}):Be(Ae))},pr=Ae=>{me.clear(),pe.start(S,()=>{Xe(Ae)})},[,Pt]=de.useState(!1),Ht=Ae=>{y.isFocusVisible(Ae.target)||(Pt(!1),pr(Ae))},or=Ae=>{Q||J(Ae.currentTarget),y.isFocusVisible(Ae.target)&&(Pt(!0),Je(Ae))},xr=Ae=>{oe.current=!0;const mr=j.props;mr.onTouchStart&&mr.onTouchStart(Ae)},Lt=Ae=>{xr(Ae),pe.clear(),ce.clear(),Ne(),Te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",we.start(_,()=>{document.body.style.WebkitUserSelect=Te.current,Je(Ae)})},Fn=Ae=>{j.props.onTouchEnd&&j.props.onTouchEnd(Ae),Ne(),pe.start(T,()=>{Xe(Ae)})};de.useEffect(()=>{if(!le)return;function Ae(mr){mr.key==="Escape"&&Xe(mr)}return document.addEventListener("keydown",Ae),()=>{document.removeEventListener("keydown",Ae)}},[Xe,le]);const Tr=y.useForkRef(y.getReactElementRef(j),J,r);!$&&$!==0&&(le=!1);const Sr=de.useRef(),Yr=Ae=>{const mr=j.props;mr.onMouseMove&&mr.onMouseMove(Ae),Ho={x:Ae.clientX,y:Ae.clientY},Sr.current&&Sr.current.update()},$r={},wn=typeof $=="string";c?($r.title=!le&&wn&&!h?$:null,$r["aria-describedby"]=le?Ve:null):($r["aria-label"]=wn?$:null,$r["aria-labelledby"]=le&&!wn?Ve:null);const At=R(H(R(R(R({},$r),Z),j.props),{className:y.clsx(Z.className,j.props.className),onTouchStart:xr,ref:Tr}),w?{onMouseMove:Yr}:{});process.env.NODE_ENV!=="production"&&(At["data-mui-internal-clone-element"]=!0,de.useEffect(()=>{Q&&!Q.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
168
- `))},[Q]));const Xr={};m||(At.onTouchStart=Lt,At.onTouchEnd=Fn),h||(At.onMouseOver=lu(Je,At.onMouseOver),At.onMouseLeave=lu(pr,At.onMouseLeave),se||(Xr.onMouseOver=Je,Xr.onMouseLeave=pr)),d||(At.onFocus=lu(or,At.onFocus),At.onBlur=lu(Ht,At.onBlur),se||(Xr.onFocus=or,Xr.onBlur=Ht)),process.env.NODE_ENV!=="production"&&j.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${j.props.title}\` or the Tooltip component.`].join(`
169
- `));const He=H(R({},n),{isRtl:te,arrow:i,disableInteractive:se,placement:N,PopperComponentProp:F,touch:oe.current}),vt=typeof G.popper=="function"?G.popper(He):G.popper,ci=de.useMemo(()=>{var mr,wl;let Ae=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return(mr=B.popperOptions)!=null&&mr.modifiers&&(Ae=Ae.concat(B.popperOptions.modifiers)),(wl=vt==null?void 0:vt.popperOptions)!=null&&wl.modifiers&&(Ae=Ae.concat(vt.popperOptions.modifiers)),H(R(R({},B.popperOptions),vt==null?void 0:vt.popperOptions),{modifiers:Ae})},[ne,B.popperOptions,vt==null?void 0:vt.popperOptions]),bo=oQ(He),Cn=typeof G.transition=="function"?G.transition(He):G.transition,Xi={slots:R({popper:s.Popper,transition:(bl=s.Transition)!=null?bl:X,tooltip:s.Tooltip,arrow:s.Arrow},Y),slotProps:{arrow:(Zi=G.arrow)!=null?Zi:u.arrow,popper:R(R({},B),vt!=null?vt:u.popper),tooltip:(_l=G.tooltip)!=null?_l:u.tooltip,transition:R(R({},V),Cn!=null?Cn:u.transition)}},[Ad,ml]=y.useSlot("popper",{elementType:sQ,externalForwardedProps:Xi,ownerState:He,className:y.clsx(bo.popper,B==null?void 0:B.className)}),[gl,vl]=y.useSlot("transition",{elementType:y.Grow,externalForwardedProps:Xi,ownerState:He}),[Rd,Dd]=y.useSlot("tooltip",{elementType:lQ,className:bo.tooltip,externalForwardedProps:Xi,ownerState:He}),[Nd,kd]=y.useSlot("arrow",{elementType:uQ,className:bo.arrow,externalForwardedProps:Xi,ownerState:He,ref:ae});return _e.jsxs(de.Fragment,{children:[de.cloneElement(j,At),_e.jsx(Ad,H(R(R({as:F!=null?F:sl,placement:N,anchorEl:w?{getBoundingClientRect:()=>({top:Ho.y,left:Ho.x,right:Ho.x,bottom:Ho.y,width:0,height:0})}:Q,popperRef:Sr,open:Q?le:!1,id:Ve,transition:!0},Xr),ml),{popperOptions:ci,children:({TransitionProps:Ae})=>_e.jsx(gl,H(R(R({timeout:q.transitions.duration.shorter},Ae),vl),{children:_e.jsxs(Rd,H(R({},Dd),{children:[$,i?_e.jsx(Nd,R({},kd)):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Oi.propTypes={arrow:y.PropTypes.bool,children:y.elementAcceptingRef.isRequired,classes:y.PropTypes.object,className:y.PropTypes.string,components:y.PropTypes.shape({Arrow:y.PropTypes.elementType,Popper:y.PropTypes.elementType,Tooltip:y.PropTypes.elementType,Transition:y.PropTypes.elementType}),componentsProps:y.PropTypes.shape({arrow:y.PropTypes.object,popper:y.PropTypes.object,tooltip:y.PropTypes.object,transition:y.PropTypes.object}),describeChild:y.PropTypes.bool,disableFocusListener:y.PropTypes.bool,disableHoverListener:y.PropTypes.bool,disableInteractive:y.PropTypes.bool,disableTouchListener:y.PropTypes.bool,enterDelay:y.PropTypes.number,enterNextDelay:y.PropTypes.number,enterTouchDelay:y.PropTypes.number,followCursor:y.PropTypes.bool,id:y.PropTypes.string,leaveDelay:y.PropTypes.number,leaveTouchDelay:y.PropTypes.number,onClose:y.PropTypes.func,onOpen:y.PropTypes.func,open:y.PropTypes.bool,placement:y.PropTypes.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:y.PropTypes.elementType,PopperProps:y.PropTypes.object,slotProps:y.PropTypes.shape({arrow:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),popper:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),tooltip:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object]),transition:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({arrow:y.PropTypes.elementType,popper:y.PropTypes.elementType,tooltip:y.PropTypes.elementType,transition:y.PropTypes.elementType}),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),title:y.PropTypes.node,TransitionComponent:y.PropTypes.elementType,TransitionProps:y.PropTypes.object});var mx={exports:{}};/*!
170
- Copyright (c) 2018 Jed Watson.
171
- Licensed under the MIT License (MIT), see
172
- http://jedwatson.github.io/classnames
173
- */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,n(s)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)t.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(mx);var cQ=mx.exports;const Ps=O.getDefaultExportFromCjs(cQ);function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ot.apply(null,arguments)}function rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function dQ(e,t){if(kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gx(e){var t=dQ(e,"string");return kn(t)=="symbol"?t:t+""}function vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gx(n.key),n)}}function nt(e,t,r){return t&&vy(e.prototype,t),r&&vy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ep(e,t){return Ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ep(e,t)}function Ct(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ep(e,t)}function he(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t){if(t&&(kn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return he(e)}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$e(e)}function ie(e,t,r){return(t=gx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var on=function(t,r,n,i,a,o,s,u){if(process.env.NODE_ENV!=="production"&&r===void 0)throw new Error("invariant requires an error message argument");if(!t){var c;if(r===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,i,a,o,s,u],h=0;c=new Error("Invariant Violation: "+r.replace(/%s/g,function(){return d[h++]}))}throw c.framesToPop=1,c}},uu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},hQ=Array.isArray,Fr=hQ,fQ=typeof uu=="object"&&uu&&uu.Object===Object&&uu,vx=fQ,pQ=vx,mQ=typeof self=="object"&&self&&self.Object===Object&&self,gQ=pQ||mQ||Function("return this")(),bn=gQ,vQ=bn,yQ=vQ.Symbol,ll=yQ,yy=ll,yx=Object.prototype,bQ=yx.hasOwnProperty,_Q=yx.toString,Wo=yy?yy.toStringTag:void 0;function wQ(e){var t=bQ.call(e,Wo),r=e[Wo];try{e[Wo]=void 0;var n=!0}catch(a){}var i=_Q.call(e);return n&&(t?e[Wo]=r:delete e[Wo]),i}var CQ=wQ,xQ=Object.prototype,TQ=xQ.toString;function SQ(e){return TQ.call(e)}var MQ=SQ,by=ll,EQ=CQ,PQ=MQ,AQ="[object Null]",RQ="[object Undefined]",_y=by?by.toStringTag:void 0;function DQ(e){return e==null?e===void 0?RQ:AQ:_y&&_y in Object(e)?EQ(e):PQ(e)}var Vi=DQ;function NQ(e){return e!=null&&typeof e=="object"}var ui=NQ,kQ=Vi,LQ=ui,OQ="[object Symbol]";function IQ(e){return typeof e=="symbol"||LQ(e)&&kQ(e)==OQ}var Jc=IQ,FQ=Fr,$Q=Jc,BQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zQ=/^\w*$/;function HQ(e,t){if(FQ(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$Q(e)?!0:zQ.test(e)||!BQ.test(e)||t!=null&&e in Object(t)}var WQ=HQ;function jQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gi=jQ,UQ=Vi,VQ=Gi,GQ="[object AsyncFunction]",qQ="[object Function]",YQ="[object GeneratorFunction]",XQ="[object Proxy]";function ZQ(e){if(!VQ(e))return!1;var t=UQ(e);return t==qQ||t==YQ||t==GQ||t==XQ}var bx=ZQ,KQ=bn,QQ=KQ["__core-js_shared__"],JQ=QQ,zh=JQ,wy=function(){var e=/[^.]+$/.exec(zh&&zh.keys&&zh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function eJ(e){return!!wy&&wy in e}var tJ=eJ,rJ=Function.prototype,nJ=rJ.toString;function iJ(e){if(e!=null){try{return nJ.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var _x=iJ,aJ=bx,oJ=tJ,sJ=Gi,lJ=_x,uJ=/[\\^$.*+?()[\]{}|]/g,cJ=/^\[object .+?Constructor\]$/,dJ=Function.prototype,hJ=Object.prototype,fJ=dJ.toString,pJ=hJ.hasOwnProperty,mJ=RegExp("^"+fJ.call(pJ).replace(uJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gJ(e){if(!sJ(e)||oJ(e))return!1;var t=aJ(e)?mJ:cJ;return t.test(lJ(e))}var vJ=gJ;function yJ(e,t){return e==null?void 0:e[t]}var bJ=yJ,_J=vJ,wJ=bJ;function CJ(e,t){var r=wJ(e,t);return _J(r)?r:void 0}var qi=CJ,xJ=qi,TJ=xJ(Object,"create"),ed=TJ,Cy=ed;function SJ(){this.__data__=Cy?Cy(null):{},this.size=0}var MJ=SJ;function EJ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var PJ=EJ,AJ=ed,RJ="__lodash_hash_undefined__",DJ=Object.prototype,NJ=DJ.hasOwnProperty;function kJ(e){var t=this.__data__;if(AJ){var r=t[e];return r===RJ?void 0:r}return NJ.call(t,e)?t[e]:void 0}var LJ=kJ,OJ=ed,IJ=Object.prototype,FJ=IJ.hasOwnProperty;function $J(e){var t=this.__data__;return OJ?t[e]!==void 0:FJ.call(t,e)}var BJ=$J,zJ=ed,HJ="__lodash_hash_undefined__";function WJ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zJ&&t===void 0?HJ:t,this}var jJ=WJ,UJ=MJ,VJ=PJ,GJ=LJ,qJ=BJ,YJ=jJ;function co(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}co.prototype.clear=UJ;co.prototype.delete=VJ;co.prototype.get=GJ;co.prototype.has=qJ;co.prototype.set=YJ;var XJ=co;function ZJ(){this.__data__=[],this.size=0}var KJ=ZJ;function QJ(e,t){return e===t||e!==e&&t!==t}var wx=QJ,JJ=wx;function eee(e,t){for(var r=e.length;r--;)if(JJ(e[r][0],t))return r;return-1}var td=eee,tee=td,ree=Array.prototype,nee=ree.splice;function iee(e){var t=this.__data__,r=tee(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():nee.call(t,r,1),--this.size,!0}var aee=iee,oee=td;function see(e){var t=this.__data__,r=oee(t,e);return r<0?void 0:t[r][1]}var lee=see,uee=td;function cee(e){return uee(this.__data__,e)>-1}var dee=cee,hee=td;function fee(e,t){var r=this.__data__,n=hee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var pee=fee,mee=KJ,gee=aee,vee=lee,yee=dee,bee=pee;function ho(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ho.prototype.clear=mee;ho.prototype.delete=gee;ho.prototype.get=vee;ho.prototype.has=yee;ho.prototype.set=bee;var rd=ho,_ee=qi,wee=bn,Cee=_ee(wee,"Map"),R0=Cee,xy=XJ,xee=rd,Tee=R0;function See(){this.size=0,this.__data__={hash:new xy,map:new(Tee||xee),string:new xy}}var Mee=See;function Eee(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Pee=Eee,Aee=Pee;function Ree(e,t){var r=e.__data__;return Aee(t)?r[typeof t=="string"?"string":"hash"]:r.map}var nd=Ree,Dee=nd;function Nee(e){var t=Dee(this,e).delete(e);return this.size-=t?1:0,t}var kee=Nee,Lee=nd;function Oee(e){return Lee(this,e).get(e)}var Iee=Oee,Fee=nd;function $ee(e){return Fee(this,e).has(e)}var Bee=$ee,zee=nd;function Hee(e,t){var r=zee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Wee=Hee,jee=Mee,Uee=kee,Vee=Iee,Gee=Bee,qee=Wee;function fo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}fo.prototype.clear=jee;fo.prototype.delete=Uee;fo.prototype.get=Vee;fo.prototype.has=Gee;fo.prototype.set=qee;var Cx=fo,xx=Cx,Yee="Expected a function";function D0(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Yee);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(D0.Cache||xx),r}D0.Cache=xx;var Xee=D0,Zee=Xee,Kee=500;function Qee(e){var t=Zee(e,function(n){return r.size===Kee&&r.clear(),n}),r=t.cache;return t}var Jee=Qee,ete=Jee,tte=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rte=/\\(\\)?/g,nte=ete(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tte,function(r,n,i,a){t.push(i?a.replace(rte,"$1"):n||r)}),t}),ite=nte;function ate(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var ote=ate,Ty=ll,ste=ote,lte=Fr,ute=Jc,cte=1/0,Sy=Ty?Ty.prototype:void 0,My=Sy?Sy.toString:void 0;function Tx(e){if(typeof e=="string")return e;if(lte(e))return ste(e,Tx)+"";if(ute(e))return My?My.call(e):"";var t=e+"";return t=="0"&&1/e==-cte?"-0":t}var dte=Tx,hte=dte;function fte(e){return e==null?"":hte(e)}var Sx=fte,pte=Fr,mte=WQ,gte=ite,vte=Sx;function yte(e,t){return pte(e)?e:mte(e,t)?[e]:gte(vte(e))}var id=yte,bte=Jc,_te=1/0;function wte(e){if(typeof e=="string"||bte(e))return e;var t=e+"";return t=="0"&&1/e==-_te?"-0":t}var N0=wte,Cte=id,xte=N0;function Tte(e,t){t=Cte(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[xte(t[r++])];return r&&r==n?e:void 0}var Mx=Tte,Ste=qi,Mte=function(){try{var e=Ste(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ex=Mte,Ey=Ex;function Ete(e,t,r){t=="__proto__"&&Ey?Ey(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Px=Ete,Pte=Px,Ate=wx,Rte=Object.prototype,Dte=Rte.hasOwnProperty;function Nte(e,t,r){var n=e[t];(!(Dte.call(e,t)&&Ate(n,r))||r===void 0&&!(t in e))&&Pte(e,t,r)}var k0=Nte,kte=9007199254740991,Lte=/^(?:0|[1-9]\d*)$/;function Ote(e,t){var r=typeof e;return t=t==null?kte:t,!!t&&(r=="number"||r!="symbol"&&Lte.test(e))&&e>-1&&e%1==0&&e<t}var L0=Ote,Ite=k0,Fte=id,$te=L0,Py=Gi,Bte=N0;function zte(e,t,r,n){if(!Py(e))return e;t=Fte(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var u=Bte(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var d=s[u];c=n?n(d,u,s):void 0,c===void 0&&(c=Py(d)?d:$te(t[i+1])?[]:{})}Ite(s,u,c),s=s[u]}return e}var Hte=zte,Wte=Mx,jte=Hte,Ute=id;function Vte(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var o=t[n],s=Wte(e,o);r(s,o)&&jte(a,Ute(o,e),s)}return a}var Gte=Vte;function qte(e,t){return e!=null&&t in Object(e)}var Yte=qte,Xte=Vi,Zte=ui,Kte="[object Arguments]";function Qte(e){return Zte(e)&&Xte(e)==Kte}var Jte=Qte,Ay=Jte,ere=ui,Ax=Object.prototype,tre=Ax.hasOwnProperty,rre=Ax.propertyIsEnumerable,nre=Ay(function(){return arguments}())?Ay:function(e){return ere(e)&&tre.call(e,"callee")&&!rre.call(e,"callee")},ad=nre,ire=9007199254740991;function are(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ire}var O0=are,ore=id,sre=ad,lre=Fr,ure=L0,cre=O0,dre=N0;function hre(e,t,r){t=ore(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=dre(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&cre(i)&&ure(o,i)&&(lre(e)||sre(e)))}var fre=hre,pre=Yte,mre=fre;function gre(e,t){return e!=null&&mre(e,t,pre)}var vre=gre,yre=Gte,bre=vre;function _re(e,t){return yre(e,t,function(r,n){return bre(e,n)})}var wre=_re;function Cre(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var od=Cre,Ry=ll,xre=ad,Tre=Fr,Dy=Ry?Ry.isConcatSpreadable:void 0;function Sre(e){return Tre(e)||xre(e)||!!(Dy&&e&&e[Dy])}var Mre=Sre,Ere=od,Pre=Mre;function Rx(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Pre),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?Rx(s,t-1,r,n,i):Ere(i,s):n||(i[i.length]=s)}return i}var Dx=Rx,Are=Dx;function Rre(e){var t=e==null?0:e.length;return t?Are(e,1):[]}var Dre=Rre;function Nre(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var kre=Nre,Lre=kre,Ny=Math.max;function Ore(e,t,r){return t=Ny(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Ny(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),Lre(e,this,s)}}var Ire=Ore;function Fre(e){return function(){return e}}var $re=Fre;function Bre(e){return e}var Nx=Bre,zre=$re,ky=Ex,Hre=Nx,Wre=ky?function(e,t){return ky(e,"toString",{configurable:!0,enumerable:!1,value:zre(t),writable:!0})}:Hre,jre=Wre,Ure=800,Vre=16,Gre=Date.now;function qre(e){var t=0,r=0;return function(){var n=Gre(),i=Vre-(n-r);if(r=n,i>0){if(++t>=Ure)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Yre=qre,Xre=jre,Zre=Yre,Kre=Zre(Xre),Qre=Kre,Jre=Dre,ene=Ire,tne=Qre;function rne(e){return tne(ene(e,void 0,Jre),e+"")}var nne=rne,ine=wre,ane=nne,one=ane(function(e,t){return e==null?{}:ine(e,t)}),Zo=one;function Ly(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ly(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ly(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ft(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 Iy=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Hh=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mi={INIT:"@@redux/INIT"+Hh(),REPLACE:"@@redux/REPLACE"+Hh(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Hh()}};function kx(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sne(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(cne(e))return"date";if(une(e))return"error";var r=lne(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function lne(e){return typeof e.constructor=="function"?e.constructor.name:null}function une(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function cne(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=sne(e)),t}function Lx(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ft(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r=="undefined"&&(r=t,t=void 0),typeof r!="undefined"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Ft(1):"Expected the enhancer to be a function. Instead, received: '"+jn(r)+"'");return r(Lx)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ft(2):"Expected the root reducer to be a function. Instead, received: '"+jn(e)+"'");var i=e,a=t,o=[],s=o,u=!1;function c(){s===o&&(s=o.slice())}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?Ft(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function h(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Ft(4):"Expected the listener to be a function. Instead, received: '"+jn(b)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?Ft(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var _=!0;return c(),s.push(b),function(){if(_){if(u)throw new Error(process.env.NODE_ENV==="production"?Ft(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");_=!1,c();var C=s.indexOf(b);s.splice(C,1),o=null}}}function p(b){if(!kx(b))throw new Error(process.env.NODE_ENV==="production"?Ft(7):"Actions must be plain objects. Instead, the actual type was: '"+jn(b)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof b.type=="undefined")throw new Error(process.env.NODE_ENV==="production"?Ft(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?Ft(9):"Reducers may not dispatch actions.");try{u=!0,a=i(a,b)}finally{u=!1}for(var _=o=s,w=0;w<_.length;w++){var C=_[w];C()}return b}function m(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?Ft(10):"Expected the nextReducer to be a function. Instead, received: '"+jn(b));i=b,p({type:Mi.REPLACE})}function v(){var b,_=h;return b={subscribe:function(C){if(typeof C!="object"||C===null)throw new Error(process.env.NODE_ENV==="production"?Ft(11):"Expected the observer to be an object. Instead, received: '"+jn(C)+"'");function S(){C.next&&C.next(d())}S();var T=_(S);return{unsubscribe:T}}},b[Iy]=function(){return this},b}return p({type:Mi.INIT}),n={dispatch:p,subscribe:h,getState:d,replaceReducer:m},n[Iy]=v,n}function Pp(e){typeof console!="undefined"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch(t){}}function dne(e,t,r,n){var i=Object.keys(t),a=r&&r.type===Mi.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!kx(e))return"The "+a+' has unexpected type of "'+jn(e)+'". Expected argument to be an object with the following '+('keys: "'+i.join('", "')+'"');var o=Object.keys(e).filter(function(s){return!t.hasOwnProperty(s)&&!n[s]});if(o.forEach(function(s){n[s]=!0}),!(r&&r.type===Mi.REPLACE)&&o.length>0)return"Unexpected "+(o.length>1?"keys":"key")+" "+('"'+o.join('", "')+'" found in '+a+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.')}function hne(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Mi.INIT});if(typeof n=="undefined")throw new Error(process.env.NODE_ENV==="production"?Ft(12):'The slice reducer for key "'+t+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Mi.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(process.env.NODE_ENV==="production"?Ft(13):'The slice reducer for key "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle '"+Mi.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function fne(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];process.env.NODE_ENV!=="production"&&typeof e[i]=="undefined"&&Pp('No reducer provided for key "'+i+'"'),typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),o;process.env.NODE_ENV!=="production"&&(o={});var s;try{hne(r)}catch(u){s=u}return function(c,d){if(c===void 0&&(c={}),s)throw s;if(process.env.NODE_ENV!=="production"){var h=dne(c,r,d,o);h&&Pp(h)}for(var p=!1,m={},v=0;v<a.length;v++){var b=a[v],_=r[b],w=c[b],C=_(w,d);if(typeof C=="undefined"){var S=d&&d.type;throw new Error(process.env.NODE_ENV==="production"?Ft(14):"When called with an action of type "+(S?'"'+String(S)+'"':"(unknown type)")+', the slice reducer for key "'+b+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}m[b]=C,p=p||C!==w}return p=p||a.length!==Object.keys(c).length,p?m:c}}function Fy(e,t){return function(){return t(e.apply(this,arguments))}}function Ox(e,t){if(typeof e=="function")return Fy(e,t);if(typeof e!="object"||e===null)throw new Error(process.env.NODE_ENV==="production"?Ft(16):"bindActionCreators expected an object or a function, but instead received: '"+jn(e)+`'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);var r={};for(var n in e){var i=e[n];typeof i=="function"&&(r[n]=Fy(i,t))}return r}function rc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function pne(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(process.env.NODE_ENV==="production"?Ft(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=t.map(function(u){return u(o)});return a=rc.apply(void 0,s)(i.dispatch),Oy(Oy({},i),{},{dispatch:a})}}}function $y(){}process.env.NODE_ENV!=="production"&&typeof $y.name=="string"&&$y.name!=="isCrushed"&&Pp('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');var mne=rd;function gne(){this.__data__=new mne,this.size=0}var vne=gne;function yne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var bne=yne;function _ne(e){return this.__data__.get(e)}var wne=_ne;function Cne(e){return this.__data__.has(e)}var xne=Cne,Tne=rd,Sne=R0,Mne=Cx,Ene=200;function Pne(e,t){var r=this.__data__;if(r instanceof Tne){var n=r.__data__;if(!Sne||n.length<Ene-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Mne(n)}return r.set(e,t),this.size=r.size,this}var Ane=Pne,Rne=rd,Dne=vne,Nne=bne,kne=wne,Lne=xne,One=Ane;function po(e){var t=this.__data__=new Rne(e);this.size=t.size}po.prototype.clear=Dne;po.prototype.delete=Nne;po.prototype.get=kne;po.prototype.has=Lne;po.prototype.set=One;var Ine=po;function Fne(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Ix=Fne,$ne=k0,Bne=Px;function zne(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?Bne(r,s,u):$ne(r,s,u)}return r}var sd=zne;function Hne(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Wne=Hne,As={exports:{}};function jne(){return!1}var Une=jne;(function(e,t){var r=bn,n=Une,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;e.exports=c})(As,As.exports);var Vne=Vi,Gne=O0,qne=ui,Yne="[object Arguments]",Xne="[object Array]",Zne="[object Boolean]",Kne="[object Date]",Qne="[object Error]",Jne="[object Function]",eie="[object Map]",tie="[object Number]",rie="[object Object]",nie="[object RegExp]",iie="[object Set]",aie="[object String]",oie="[object WeakMap]",sie="[object ArrayBuffer]",lie="[object DataView]",uie="[object Float32Array]",cie="[object Float64Array]",die="[object Int8Array]",hie="[object Int16Array]",fie="[object Int32Array]",pie="[object Uint8Array]",mie="[object Uint8ClampedArray]",gie="[object Uint16Array]",vie="[object Uint32Array]",it={};it[uie]=it[cie]=it[die]=it[hie]=it[fie]=it[pie]=it[mie]=it[gie]=it[vie]=!0;it[Yne]=it[Xne]=it[sie]=it[Zne]=it[lie]=it[Kne]=it[Qne]=it[Jne]=it[eie]=it[tie]=it[rie]=it[nie]=it[iie]=it[aie]=it[oie]=!1;function yie(e){return qne(e)&&Gne(e.length)&&!!it[Vne(e)]}var bie=yie;function _ie(e){return function(t){return e(t)}}var I0=_ie,Rs={exports:{}};(function(e,t){var r=vx,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch(c){}}();e.exports=s})(Rs,Rs.exports);var wie=bie,Cie=I0,By=Rs.exports,zy=By&&By.isTypedArray,xie=zy?Cie(zy):wie,Fx=xie,Tie=Wne,Sie=ad,Mie=Fr,Eie=As.exports,Pie=L0,Aie=Fx,Rie=Object.prototype,Die=Rie.hasOwnProperty;function Nie(e,t){var r=Mie(e),n=!r&&Sie(e),i=!r&&!n&&Eie(e),a=!r&&!n&&!i&&Aie(e),o=r||n||i||a,s=o?Tie(e.length,String):[],u=s.length;for(var c in e)(t||Die.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Pie(c,u)))&&s.push(c);return s}var $x=Nie,kie=Object.prototype;function Lie(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kie;return e===r}var ld=Lie;function Oie(e,t){return function(r){return e(t(r))}}var Bx=Oie,Iie=Bx,Fie=Iie(Object.keys,Object),$ie=Fie,Bie=ld,zie=$ie,Hie=Object.prototype,Wie=Hie.hasOwnProperty;function jie(e){if(!Bie(e))return zie(e);var t=[];for(var r in Object(e))Wie.call(e,r)&&r!="constructor"&&t.push(r);return t}var F0=jie,Uie=bx,Vie=O0;function Gie(e){return e!=null&&Vie(e.length)&&!Uie(e)}var ul=Gie,qie=$x,Yie=F0,Xie=ul;function Zie(e){return Xie(e)?qie(e):Yie(e)}var ud=Zie,Kie=sd,Qie=ud;function Jie(e,t){return e&&Kie(t,Qie(t),e)}var eae=Jie;function tae(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var rae=tae,nae=Gi,iae=ld,aae=rae,oae=Object.prototype,sae=oae.hasOwnProperty;function lae(e){if(!nae(e))return aae(e);var t=iae(e),r=[];for(var n in e)n=="constructor"&&(t||!sae.call(e,n))||r.push(n);return r}var uae=lae,cae=$x,dae=uae,hae=ul;function fae(e){return hae(e)?cae(e,!0):dae(e)}var $0=fae,pae=sd,mae=$0;function gae(e,t){return e&&pae(t,mae(t),e)}var vae=gae,Ap={exports:{}};(function(e,t){var r=bn,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var h=c.length,p=s?s(h):new c.constructor(h);return c.copy(p),p}e.exports=u})(Ap,Ap.exports);function yae(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var zx=yae;function bae(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var _ae=bae;function wae(){return[]}var Hx=wae,Cae=_ae,xae=Hx,Tae=Object.prototype,Sae=Tae.propertyIsEnumerable,Hy=Object.getOwnPropertySymbols,Mae=Hy?function(e){return e==null?[]:(e=Object(e),Cae(Hy(e),function(t){return Sae.call(e,t)}))}:xae,B0=Mae,Eae=sd,Pae=B0;function Aae(e,t){return Eae(e,Pae(e),t)}var Rae=Aae,Dae=Bx,Nae=Dae(Object.getPrototypeOf,Object),Wx=Nae,kae=od,Lae=Wx,Oae=B0,Iae=Hx,Fae=Object.getOwnPropertySymbols,$ae=Fae?function(e){for(var t=[];e;)kae(t,Oae(e)),e=Lae(e);return t}:Iae,jx=$ae,Bae=sd,zae=jx;function Hae(e,t){return Bae(e,zae(e),t)}var Wae=Hae,jae=od,Uae=Fr;function Vae(e,t,r){var n=t(e);return Uae(e)?n:jae(n,r(e))}var Ux=Vae,Gae=Ux,qae=B0,Yae=ud;function Xae(e){return Gae(e,Yae,qae)}var Zae=Xae,Kae=Ux,Qae=jx,Jae=$0;function eoe(e){return Kae(e,Jae,Qae)}var toe=eoe,roe=qi,noe=bn,ioe=roe(noe,"DataView"),aoe=ioe,ooe=qi,soe=bn,loe=ooe(soe,"Promise"),uoe=loe,coe=qi,doe=bn,hoe=coe(doe,"Set"),foe=hoe,poe=qi,moe=bn,goe=poe(moe,"WeakMap"),voe=goe,Rp=aoe,Dp=R0,Np=uoe,kp=foe,Lp=voe,Vx=Vi,mo=_x,Wy="[object Map]",yoe="[object Object]",jy="[object Promise]",Uy="[object Set]",Vy="[object WeakMap]",Gy="[object DataView]",boe=mo(Rp),_oe=mo(Dp),woe=mo(Np),Coe=mo(kp),xoe=mo(Lp),_i=Vx;(Rp&&_i(new Rp(new ArrayBuffer(1)))!=Gy||Dp&&_i(new Dp)!=Wy||Np&&_i(Np.resolve())!=jy||kp&&_i(new kp)!=Uy||Lp&&_i(new Lp)!=Vy)&&(_i=function(e){var t=Vx(e),r=t==yoe?e.constructor:void 0,n=r?mo(r):"";if(n)switch(n){case boe:return Gy;case _oe:return Wy;case woe:return jy;case Coe:return Uy;case xoe:return Vy}return t});var cl=_i,Toe=Object.prototype,Soe=Toe.hasOwnProperty;function Moe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Soe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Eoe=Moe,Poe=bn,Aoe=Poe.Uint8Array,Roe=Aoe,qy=Roe;function Doe(e){var t=new e.constructor(e.byteLength);return new qy(t).set(new qy(e)),t}var z0=Doe,Noe=z0;function koe(e,t){var r=t?Noe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Loe=koe,Ooe=/\w*$/;function Ioe(e){var t=new e.constructor(e.source,Ooe.exec(e));return t.lastIndex=e.lastIndex,t}var Foe=Ioe,Yy=ll,Xy=Yy?Yy.prototype:void 0,Zy=Xy?Xy.valueOf:void 0;function $oe(e){return Zy?Object(Zy.call(e)):{}}var Boe=$oe,zoe=z0;function Hoe(e,t){var r=t?zoe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Woe=Hoe,joe=z0,Uoe=Loe,Voe=Foe,Goe=Boe,qoe=Woe,Yoe="[object Boolean]",Xoe="[object Date]",Zoe="[object Map]",Koe="[object Number]",Qoe="[object RegExp]",Joe="[object Set]",ese="[object String]",tse="[object Symbol]",rse="[object ArrayBuffer]",nse="[object DataView]",ise="[object Float32Array]",ase="[object Float64Array]",ose="[object Int8Array]",sse="[object Int16Array]",lse="[object Int32Array]",use="[object Uint8Array]",cse="[object Uint8ClampedArray]",dse="[object Uint16Array]",hse="[object Uint32Array]";function fse(e,t,r){var n=e.constructor;switch(t){case rse:return joe(e);case Yoe:case Xoe:return new n(+e);case nse:return Uoe(e,r);case ise:case ase:case ose:case sse:case lse:case use:case cse:case dse:case hse:return qoe(e,r);case Zoe:return new n;case Koe:case ese:return new n(e);case Qoe:return Voe(e);case Joe:return new n;case tse:return Goe(e)}}var pse=fse,mse=Gi,Ky=Object.create,gse=function(){function e(){}return function(t){if(!mse(t))return{};if(Ky)return Ky(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),vse=gse,yse=vse,bse=Wx,_se=ld;function wse(e){return typeof e.constructor=="function"&&!_se(e)?yse(bse(e)):{}}var Cse=wse,xse=cl,Tse=ui,Sse="[object Map]";function Mse(e){return Tse(e)&&xse(e)==Sse}var Ese=Mse,Pse=Ese,Ase=I0,Qy=Rs.exports,Jy=Qy&&Qy.isMap,Rse=Jy?Ase(Jy):Pse,Dse=Rse,Nse=cl,kse=ui,Lse="[object Set]";function Ose(e){return kse(e)&&Nse(e)==Lse}var Ise=Ose,Fse=Ise,$se=I0,eb=Rs.exports,tb=eb&&eb.isSet,Bse=tb?$se(tb):Fse,zse=Bse,Hse=Ine,Wse=Ix,jse=k0,Use=eae,Vse=vae,Gse=Ap.exports,qse=zx,Yse=Rae,Xse=Wae,Zse=Zae,Kse=toe,Qse=cl,Jse=Eoe,ele=pse,tle=Cse,rle=Fr,nle=As.exports,ile=Dse,ale=Gi,ole=zse,sle=ud,lle=$0,ule=1,cle=2,dle=4,Gx="[object Arguments]",hle="[object Array]",fle="[object Boolean]",ple="[object Date]",mle="[object Error]",qx="[object Function]",gle="[object GeneratorFunction]",vle="[object Map]",yle="[object Number]",Yx="[object Object]",ble="[object RegExp]",_le="[object Set]",wle="[object String]",Cle="[object Symbol]",xle="[object WeakMap]",Tle="[object ArrayBuffer]",Sle="[object DataView]",Mle="[object Float32Array]",Ele="[object Float64Array]",Ple="[object Int8Array]",Ale="[object Int16Array]",Rle="[object Int32Array]",Dle="[object Uint8Array]",Nle="[object Uint8ClampedArray]",kle="[object Uint16Array]",Lle="[object Uint32Array]",tt={};tt[Gx]=tt[hle]=tt[Tle]=tt[Sle]=tt[fle]=tt[ple]=tt[Mle]=tt[Ele]=tt[Ple]=tt[Ale]=tt[Rle]=tt[vle]=tt[yle]=tt[Yx]=tt[ble]=tt[_le]=tt[wle]=tt[Cle]=tt[Dle]=tt[Nle]=tt[kle]=tt[Lle]=!0;tt[mle]=tt[qx]=tt[xle]=!1;function Du(e,t,r,n,i,a){var o,s=t&ule,u=t&cle,c=t&dle;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!ale(e))return e;var d=rle(e);if(d){if(o=Jse(e),!s)return qse(e,o)}else{var h=Qse(e),p=h==qx||h==gle;if(nle(e))return Gse(e,s);if(h==Yx||h==Gx||p&&!i){if(o=u||p?{}:tle(e),!s)return u?Xse(e,Vse(o,e)):Yse(e,Use(o,e))}else{if(!tt[h])return i?e:{};o=ele(e,h,s)}}a||(a=new Hse);var m=a.get(e);if(m)return m;a.set(e,o),ole(e)?e.forEach(function(_){o.add(Du(_,t,r,_,e,a))}):ile(e)&&e.forEach(function(_,w){o.set(w,Du(_,t,r,w,e,a))});var v=c?u?Kse:Zse:u?lle:sle,b=d?void 0:v(e);return Wse(b||e,function(_,w){b&&(w=_,_=e[w]),jse(o,w,Du(_,t,r,w,e,a))}),o}var Ole=Du,Ile=Ole,Fle=4;function $le(e){return Ile(e,Fle)}var Ble=$le;function zle(e,t){return e<t}var cu=function(){function e(t,r){rt(this,e),this._items=t||[],this._size=this._items.length,this._comparator=r||zle,this._heapify()}return nt(e,[{key:"empty",value:function(){return this._size===0}},{key:"pop",value:function(){if(this._size!==0){var r=this._items[0],n=this._items.pop();return this._size--,this._size>0&&(this._items[0]=n,this._sinkDown(0)),r}}},{key:"push",value:function(r){this._items[this._size++]=r,this._bubbleUp(this._size-1)}},{key:"size",value:function(){return this._size}},{key:"peek",value:function(){if(this._size!==0)return this._items[0]}},{key:"_heapify",value:function(){for(var r=Math.floor((this._size+1)/2);r>=0;r--)this._sinkDown(r)}},{key:"_bubbleUp",value:function(r){for(var n=this._items[r];r>0;){var i=Math.floor((r+1)/2)-1,a=this._items[i];if(this._comparator(a,n))return;this._items[i]=n,this._items[r]=a,r=i}}},{key:"_sinkDown",value:function(r){for(var n=this._items[r];;){var i=2*(r+1)-1,a=2*(r+1),o=-1;if(i<this._size){var s=this._items[i];this._comparator(s,n)&&(o=i)}if(a<this._size){var u=this._items[a];this._comparator(u,n)&&(o===-1||this._comparator(u,this._items[o]))&&(o=a)}if(o===-1)return;this._items[r]=this._items[o],this._items[o]=n,r=o}}}]),e}(),Xx=function(){function e(){rt(this,e),this._valueToPositionMap={},this._size=0,this._smallValues=new cu([],this._smallerComparator),this._largeValues=new cu([],this._greaterComparator),this.getNewPositionForValue=this.getNewPositionForValue.bind(this),this.getValuePosition=this.getValuePosition.bind(this),this.getSize=this.getSize.bind(this),this.replaceFurthestValuePosition=this.replaceFurthestValuePosition.bind(this)}return nt(e,[{key:"getSize",value:function(){return this._size}},{key:"getValuePosition",value:function(r){return this._valueToPositionMap[r]===void 0?null:this._valueToPositionMap[r]}},{key:"getNewPositionForValue",value:function(r){on(this._valueToPositionMap[r]===void 0,"Shouldn't try to find new position for value already stored in BufferSet");var n=this._size;return this._size++,this._pushToHeaps(n,r),this._valueToPositionMap[r]=n,n}},{key:"replaceFurthestValuePosition",value:function(r,n,i){if(on(this._valueToPositionMap[i]===void 0,"Shouldn't try to replace values with value already stored value in BufferSet"),this._cleanHeaps(),this._smallValues.empty()||this._largeValues.empty())return null;var a=this._smallValues.peek().value,o=this._largeValues.peek().value;if(a>=r&&o<=n)return null;var s;r-a>o-n?(s=a,this._smallValues.pop()):(s=o,this._largeValues.pop());var u=this._valueToPositionMap[s];return delete this._valueToPositionMap[s],this._valueToPositionMap[i]=u,this._pushToHeaps(u,i),u}},{key:"_pushToHeaps",value:function(r,n){var i={position:r,value:n};this._smallValues.push(i),this._largeValues.push(i)}},{key:"_cleanHeaps",value:function(){this._cleanHeap(this._smallValues),this._cleanHeap(this._largeValues);var r=Math.min(this._smallValues.size(),this._largeValues.size()),n=Math.max(this._smallValues.size(),this._largeValues.size());n>10*r&&this._recreateHeaps()}},{key:"_recreateHeaps",value:function(){for(var r=this._smallValues.size()<this._largeValues.size()?this._smallValues:this._largeValues,n=new cu([],this._smallerComparator),i=new cu([],this._greaterComparator);!r.empty();){var a=r.pop();this._valueToPositionMap[a.value]!==void 0&&(n.push(a),i.push(a))}this._smallValues=n,this._largeValues=i}},{key:"_cleanHeap",value:function(r){for(;!r.empty()&&this._valueToPositionMap[r.peek().value]===void 0;)r.pop()}},{key:"_smallerComparator",value:function(r,n){return r.value<n.value}},{key:"_greaterComparator",value:function(r,n){return r.value>n.value}}]),e}(),er=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Wh=function(t){return Math.floor(t/2)},Hle=er.Int32Array||function(e){for(var t=[],r=e-1;r>=0;--r)t[r]=0;return t};function Wle(e){for(var t=1;t<e;)t*=2;return t}var jle=function(){function e(t){rt(this,e),this._size=t.length,this._half=Wle(this._size),this._heap=new Hle(2*this._half);var r;for(r=0;r<this._size;++r)this._heap[this._half+r]=t[r];for(r=this._half-1;r>0;--r)this._heap[r]=this._heap[2*r]+this._heap[2*r+1]}return nt(e,[{key:"set",value:function(r,n){on(0<=r&&r<this._size,"Index out of range %s",r);var i=this._half+r;for(this._heap[i]=n,i=Wh(i);i!==0;i=Wh(i))this._heap[i]=this._heap[2*i]+this._heap[2*i+1]}},{key:"get",value:function(r){on(0<=r&&r<this._size,"Index out of range %s",r);var n=this._half+r;return this._heap[n]}},{key:"getSize",value:function(){return this._size}},{key:"sumUntil",value:function(r){if(on(0<=r&&r<this._size+1,"Index out of range %s",r),r===0)return 0;for(var n=this._half+r-1,i=this._heap[n];n!==1;n=Wh(n))n%2===1&&(i+=this._heap[n-1]);return i}},{key:"sumTo",value:function(r){return on(0<=r&&r<this._size,"Index out of range %s",r),this.sumUntil(r+1)}},{key:"sum",value:function(r,n){return on(r<=n,"Begin must precede end"),this.sumUntil(n)-this.sumUntil(r)}},{key:"greatestLowerBound",value:function(r){if(r<0)return-1;var n=1;if(this._heap[n]<=r)return this._size;for(;n<this._half;){var i=this._heap[2*n];r<i?n=2*n:(n=2*n+1,r-=i)}return n-this._half}},{key:"greatestStrictLowerBound",value:function(r){if(r<=0)return-1;var n=1;if(this._heap[n]<r)return this._size;for(;n<this._half;){var i=this._heap[2*n];r<=i?n=2*n:(n=2*n+1,r-=i)}return n-this._half}},{key:"leastUpperBound",value:function(r){return this.greatestStrictLowerBound(r)+1}},{key:"leastStrictUpperBound",value:function(r){return this.greatestLowerBound(r)+1}}],[{key:"uniform",value:function(r,n){for(var i=[],a=r-1;a>=0;--a)i[a]=n;return new e(i)}},{key:"empty",value:function(r){return e.uniform(r,0)}}]),e}();function Ds(e,t){if(e===t)return!0;if(kn(e)!=="object"||e===null||kn(t)!=="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<r.length;a++)if(!i(r[a])||e[r[a]]!==t[r[a]])return!1;return!0}var Ee={FIXED:"fixed",FIXED_RIGHT:"fixedRight",SCROLLABLE:"scrollable"};function Op(e,t){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ule(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
174
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return a=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Ule(e,t){if(e){if(typeof e=="string")return rb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rb(e,t)}}function rb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jh(e){var t=e.props,r=t.align,n=t.allowCellsRecycling,i=t.cellClassName,a=t.columnKey,o=t.flexGrow,s=t.fixed,u=t.fixedRight,c=t.maxWidth,d=t.minWidth,h=t.isReorderable,p=t.isResizable,m=t.pureRendering,v=t.width;return{align:r,allowCellsRecycling:n,cellClassName:i,columnKey:a,flexGrow:o,fixed:s,fixedRight:u,maxWidth:c,minWidth:d,isReorderable:h,isResizable:p,pureRendering:m,width:v}}function nb(e,t){e.cell.push(t.props.cell),e.footer.push(t.props.footer),e.header.push(t.props.header)}function Ip(e){var t,r;return e!=null&&(t=e.props)!==null&&t!==void 0&&t.fixed?Ee.FIXED:e!=null&&(r=e.props)!==null&&r!==void 0&&r.fixedRight?Ee.FIXED_RIGHT:Ee.SCROLLABLE}function Ns(){var e;return e={},ie(e,Ee.FIXED,[]),ie(e,Ee.SCROLLABLE,[]),ie(e,Ee.FIXED_RIGHT,[]),e}function Vle(){return{groupHeader:[],header:[],cell:[],footer:[]}}function ib(e){var t=Ns(),r=Op(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,a=Ip(i);t[a].push(i)}}catch(s){r.e(s)}finally{r.f()}var o=[];return o.push.apply(o,t[Ee.FIXED]),o.push.apply(o,t[Ee.SCROLLABLE]),o.push.apply(o,t[Ee.FIXED_RIGHT]),o}function ab(e,t){return t===Ee.FIXED?e[Ee.FIXED].length:t===Ee.SCROLLABLE?e[Ee.FIXED].length+e[Ee.SCROLLABLE].length:e[Ee.FIXED].length+e[Ee.SCROLLABLE].length+e[Ee.FIXED_RIGHT].length}function Gle(e){var t,r,n=[];k.Children.forEach(e,function(m,v){m!=null&&(on(m.type.__TableColumnGroup__||m.type.__TableColumn__,"child type should be <FixedDataTableColumn /> or <FixedDataTableColumnGroup />"),n.push(m))});var i=Ns(),a=Ns(),o=Vle(),s=(t=(r=n[0])===null||r===void 0?void 0:r.type.__TableColumnGroup__)!==null&&t!==void 0?t:!1;if(s)(function(){var m=0,v=Op(ib(n)),b;try{var _=function(){var C=b.value,S=Ip(C),T=jh(C);T.index=ab(a,S),a[S].push(T),o.groupHeader.push(C.props.header),k.Children.forEach(C.props.children,function(M){var E=jh(M);E.index=m++,E.groupIdx=T.index,i[S].push(E),nb(o,M)})};for(v.s();!(b=v.n()).done;)_()}catch(w){v.e(w)}finally{v.f()}})();else{var u=Op(ib(n)),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=Ip(d),p=jh(d);p.index=ab(i,h),i[h].push(p),nb(o,d)}}catch(m){u.e(m)}finally{u.f()}}return{columnGroupElements:a,columnElements:i,elementTemplates:o,useGroupHeader:s}}function cd(e,t,r){return e<t?t:e>r?r:e}var nc="NOT_FOUND";function qle(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:nc},put:function(n,i){t={key:n,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function Yle(e,t){var r=[];function n(s){var u=r.findIndex(function(d){return t(s,d.key)});if(u>-1){var c=r[u];return u>0&&(r.splice(u,1),r.unshift(c)),c.value}return nc}function i(s,u){n(s)===nc&&(r.unshift({key:s,value:u}),r.length>e&&r.pop())}function a(){return r}function o(){r=[]}return{get:n,put:i,getEntries:a,clear:o}}var Xle=function(t,r){return t===r};function Zle(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var i=r.length,a=0;a<i;a++)if(!e(r[a],n[a]))return!1;return!0}}function Kle(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,i=n===void 0?Xle:n,a=r.maxSize,o=a===void 0?1:a,s=r.resultEqualityCheck,u=Zle(i),c=o===1?qle(u):Yle(o,u);function d(){var h=c.get(arguments);if(h===nc){if(h=e.apply(null,arguments),s){var p=c.getEntries(),m=p.find(function(v){return s(v.value,h)});m&&(h=m.value)}c.put(arguments,h)}return h}return d.clearCache=function(){return c.clear()},d}function Qle(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function Jle(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];var c=0,d,h={memoizeOptions:void 0},p=s.pop();if(typeof p=="object"&&(h=p,p=s.pop()),typeof p!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof p+"]");var m=h,v=m.memoizeOptions,b=v===void 0?r:v,_=Array.isArray(b)?b:[b],w=Qle(s),C=e.apply(void 0,[function(){return c++,p.apply(null,arguments)}].concat(_)),S=e(function(){for(var M=[],E=w.length,D=0;D<E;D++)M.push(w[D].apply(null,arguments));return d=C.apply(null,M),d});return Object.assign(S,{resultFunc:p,memoizedResultFunc:C,dependencies:w,lastResult:function(){return d},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),S};return i}var dd=Jle(Kle),In=dd;function eue(e,t){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=tue(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
175
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return a=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function tue(e,t){if(e){if(typeof e=="string")return ob(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ob(e,t)}}function ob(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Zx=[],rue={},H0={memoizeOptions:{maxSize:12}},Nu=dd(function(e){return e||Zx},function(e){return e.reduce(function(t,r){return t+r.props.width},0)},H0),Oa=dd(function(e){return e||Zx},function(e){return e.reduce(function(t,r){return t+r.width},0)},H0);function Kx(e){return Oa(e.fixed)+Oa(e.fixedRight)+Oa(e.scrollable)}var nue=dd(function(e){return e||rue},function(e){var t=Array.prototype.concat.call(e.fixed,e.scrollable,e.fixedRight),r=0,n=eue(t),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;r+=a.flexGrow||0}}catch(o){n.e(o)}finally{n.f()}return r},H0),iue=1,aue=3,oue=6,Qn={HIDDEN:"hidden",JOINT_SCROLLBARS:"JOINT_SCROLLBARS",VISIBLE:"visible"};function sue(e,t,r,n,i,a,o){var s=t.cellGroupWrapperHeight,u=t.footerHeight,c=t.headerHeight,d=t.groupHeaderHeight,h=s?0:2*iue,p=u+c+d+h,m=i.height,v=i.maxHeight,b=i.useMaxHeight,_=i.width,w=Math.round(b?v:m),C=w-p,S=lue(e,n,_,o),T=C,M=C;switch(S){case Qn.VISIBLE:{T-=a,M-=a;break}case Qn.JOINT_SCROLLBARS:{T-=a;break}}return{bufferRowCount:uue(M,r),minAvailableHeight:Math.max(T,0),maxAvailableHeight:Math.max(M,0),reservedHeight:p,scrollStateX:S}}function lue(e,t,r,n){var i=t.overflowX,a=t.showScrollbarX,o=Kx(e);return i==="hidden"||a===!1?Qn.HIDDEN:o>r?Qn.VISIBLE:o>r-n?Qn.JOINT_SCROLLBARS:Qn.HIDDEN}function uue(e,t){var r=t.bufferRowCount,n=t.rowHeight,i=t.subRowHeight;if(r!==void 0)return r;var a=n+i,o=Math.ceil(e/a)+1;return cd(Math.floor(o/2),aue,oue)}var W0=In([function(e){return e.columnElements},function(e){return e.elementHeights},function(e){return e.rowSettings},function(e){return e.scrollFlags},function(e){return e.tableSize},function(e){return e.scrollbarXHeight},function(e){return e.scrollbarYWidth}],sue);function cue(e,t,r){var n=r.overflowY,i=r.showScrollbarY,a=n!=="hidden"&&i!==!1,o=e.minAvailableHeight,s=e.maxAvailableHeight,u=e.scrollStateX,c=!1,d=!1;u===Qn.VISIBLE&&(d=!0),a&&t>s&&(c=!0),c&&u===Qn.JOINT_SCROLLBARS&&(d=!0);var h=s;return d&&(h=o),{availableHeight:h,scrollEnabledX:d,scrollEnabledY:c}}var Ii=In([W0,function(e){return e.scrollContentHeight},function(e){return e.scrollFlags}],cue);function Ci(e,t){var r=e.rowSettings,n=e.getInternal(),i=n.storedHeights,a=n.rowOffsetIntervalTree,o=r.rowHeightGetter,s=r.subRowHeightGetter,u=o(t)+s(t),c=i[t];return u!==c&&(a.set(t,u),i[t]=u,e.scrollContentHeight+=u-c),i[t]}function sb(e,t,r){return t.scrollToRow!==void 0&&t.scrollToRow!==null&&(!r||t.scrollToRow!==r.scrollToRow)?due(e,t.scrollToRow):t.scrollTop!==void 0&&t.scrollTop!==null&&(!r||t.scrollTop!==r.scrollTop)?Fp(e,t.scrollTop):{firstIndex:e.firstRowIndex,firstOffset:e.firstRowOffset,lastIndex:void 0,changed:!1}}function Fp(e,t){var r=Ii(e),n=r.availableHeight,i=e.rowSettings,a=e.scrollContentHeight,o=e.getInternal(),s=o.rowOffsetIntervalTree,u=i.rowsCount;if(e.rowSettings.rowHeightGetter!=null&&e.isVerticalScrollExact){for(var c=e.getInternal(),d=c.rowUntilOffsetsAreExact;d<u;)Ci(e,d++);e.getInternal().rowUntilOffsetsAreExact=u}if(u===0)return{firstIndex:0,firstOffset:0,lastIndex:void 0,changed:e.firstRowIndex!==0||e.firstRowOffset!==0};var h=0,p=0,m=void 0;if(!(t<=0))if(t>=a-n)h=void 0,m=u-1;else{var v=s.greatestLowerBound(t);h=cd(v,0,Math.max(u-1,0));var b=s.sumUntil(h);p=b-t}return{firstIndex:h,firstOffset:p,lastIndex:m,changed:!0}}function due(e,t){var r=Ii(e),n=r.availableHeight,i=e.rowSettings,a=e.scrollY,o=e.getInternal(),s=o.rowOffsetIntervalTree,u=o.storedHeights,c=i.rowsCount;if(c===0)return{firstIndex:0,firstOffset:0,lastIndex:void 0,changed:e.firstRowIndex!==0||e.firstRowOffset!==0};t=cd(t,0,Math.max(c-1,0)),Ci(e,t);var d=s.sumUntil(t),h=d+u[t],p=t,m=void 0;if(!(d<a))if(a+n<h)p=void 0,m=t;else return{firstIndex:e.firstRowIndex,firstOffset:e.firstRowOffset,lastIndex:void 0,changed:!1};return{firstIndex:p,firstOffset:0,lastIndex:m,changed:!0}}function hue(e){return e==null}var us=hue;function fue(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}var pue=fue,mue=/\s/;function gue(e){for(var t=e.length;t--&&mue.test(e.charAt(t)););return t}var vue=gue,yue=vue,bue=/^\s+/;function _ue(e){return e&&e.slice(0,yue(e)+1).replace(bue,"")}var wue=_ue,Cue=wue,lb=Gi,xue=Jc,ub=NaN,Tue=/^[-+]0x[0-9a-f]+$/i,Sue=/^0b[01]+$/i,Mue=/^0o[0-7]+$/i,Eue=parseInt;function Pue(e){if(typeof e=="number")return e;if(xue(e))return ub;if(lb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Cue(e);var r=Sue.test(e);return r||Mue.test(e)?Eue(e.slice(2),r?2:8):Tue.test(e)?ub:+e}var j0=Pue,Aue=pue,Uh=j0;function Rue(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=Uh(r),r=r===r?r:0),t!==void 0&&(t=Uh(t),t=t===t?t:0),Aue(Uh(e),t,r)}var hd=Rue,Due=od,Nue=Dx,kue=zx,Lue=Fr;function Oue(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Due(Lue(r)?kue(r):[r],Nue(t,1))}var cb=Oue;function db(e,t){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Iue(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
176
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return a=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Iue(e,t){if(e){if(typeof e=="string")return hb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hb(e,t)}}function hb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fue(e,t,r,n,i){var a=r?i:0,o=n-a,s=$ue(e,t,o),u=s.columnGroupElements,c=s.columnElements,d=fb(c),h=d.fixed,p=d.fixedRight,m=d.scrollable,v=fb(u),b=v.fixed,_=v.fixedRight,w=v.scrollable,C=Oa(h),S=Oa(p),T=Oa(m),M=o-C-S,E=Math.max(0,C+S+T-o);return{columnGroupProps:cb(b,w,_),columnProps:cb(h,m,p),availableScrollWidth:M,fixedColumns:h,fixedRightColumns:p,scrollableColumns:m,fixedColumnGroups:b,fixedRightColumnGroups:_,scrollableColumnGroups:w,maxScrollX:E}}function $ue(e,t,r){var n=Ns(),i=Ns(),a=Kx(t),o=nue(t),s=Math.max(r-a,0),u=[];for(var c in t){var d=t[c],h=0,p=0,m=db(d),v;try{for(m.s();!(v=m.n()).done;){var b=v.value,_=b.flexGrow||0,w=0;_&&(w=Math.floor(_*s/o));var C=b.width+w;o-=_,s-=w;var S=ot({},b,{width:C,offset:h});h+=C,u[b.groupIdx]=C+(u[b.groupIdx]||0),i[c][p]=S,p++}}catch($){m.e($)}finally{m.f()}}for(var T in e){var M=e[T],E=0,D=0,N=db(M),F;try{for(N.s();!(F=N.n()).done;){var B=F.value,G=u[B.index],Y=ot({},B,{width:G,offset:E});E+=G,n[T][D]=Y,D++}}catch($){N.e($)}finally{N.f()}}return{columnGroupElements:n,columnElements:i}}function fb(e){return{fixed:e.fixed,fixedRight:e.fixedRight,scrollable:e.scrollable}}var dl=In([function(e){return e.columnGroupElements},function(e){return e.columnElements},function(e){return Ii(e).scrollEnabledY},function(e){return e.tableSize.width},function(e){return e.scrollbarYWidth}],Fue);function Bue(e,t,r){var n=t.scrollLeft,i=e.scrollX;n!==void 0&&(!r||n!==r.scrollLeft)&&(i=n),i=zue(e,t,r.scrollToColumn,i);var a=dl(e),o=a.maxScrollX;i=hd(i,0,o),ot(e,{maxScrollX:o,scrollX:i})}function zue(e,t,r,n){var i=t.scrollToColumn;if(us(i))return n;var a=dl(e),o=a.availableScrollWidth,s=a.fixedColumns,u=a.scrollableColumns,c=s.length,d=u.length,h=d===0,p=i===r,m=i<c,v=i>=c+d;if(p||m||v||h)return n;for(var b=Math.min(i-c,u.length-1),_=0,w=0;w<b;++w)_+=u[w].width;var C=u[b].width,S=_+C-o;return n<S?S:n>_?_:n}var pb={initialize:Bue};function Hue(e,t,r,n,i,a,o){var s=i.availableHeight,u=i.scrollEnabledX,c=r;u&&(c+=o);var d=Math.min(s,n),h=a?d:s,p=h+c,m=h;t<p&&(m=t-c);var v=a?n:Math.max(n,s),b=v+c;t&&(b=Math.max(t,b));var _=e.footerHeight,w=e.groupHeaderHeight,C=e.headerHeight,S=w+C,T=S+m,M=T+_,E=Math.max(0,T-S);return{bodyHeight:d,bodyOffsetTop:S,componentHeight:p,contentHeight:b,footOffsetTop:T,scrollbarXOffsetTop:M,scrollbarYHeight:E,visibleRowsHeight:m}}var Ea=In([function(e){return e.elementHeights},function(e){return e.tableSize.ownerHeight},function(e){return W0(e).reservedHeight},function(e){return e.scrollContentHeight},Ii,function(e){return e.tableSize.useMaxHeight},function(e){return e.scrollbarXHeight}],Hue);function jo(e,t){var r=mb(e,t),n=e.rowSettings,i=e.scrollContentHeight,a=n.rowsCount,o=Ea(e),s=o.bodyHeight,u=i-s,c;u===0?(r.firstViewportIdx>0&&(r=mb(e,{firstOffset:0,lastIndex:a-1})),c=0):c=r.firstOffset;var d=r.firstViewportIdx,h=r.endViewportIdx;Wue(e,r,e.scrolling);var p=0;a>0&&(p=e.rowOffsets[r.firstViewportIdx]-c),p=hd(p,0,u),ot(e,{firstRowIndex:d,firstRowOffset:c,endRowIndex:h,maxScrollY:u,scrollY:p})}function mb(e,t){var r=W0(e),n=r.bufferRowCount,i=r.maxAvailableHeight,a=e.rowSettings.rowsCount;if(a===0)return{endBufferIdx:0,endViewportIdx:0,firstBufferIdx:0,firstOffset:0,firstViewportIdx:0};var o=t.firstIndex,s=t.firstOffset,u=t.lastIndex;(o>=a||u>=a)&&(u=a-1);var c=1,d=o,h=s;u!==void 0&&(c=-1,d=u,h=0);for(var p=d,m=p;p<a&&p>=0&&h<i;)h+=Ci(e,p),m=p,p+=c;var v=!1;if(h<i&&p===a&&u===void 0)for(v=!0,p=o-1;p>=0&&h<i;)h+=Ci(e,p),d=p,--p;var b=Math.min(d,m),_=Math.max(b-n,0);for(p=_;p<b;p++)Ci(e,p);var w=Math.max(d,m)+1,C=Math.min(w+n,a);for(p=w;p<C;p++)Ci(e,p);var S=Ii(e),T=S.availableHeight;if(u!==void 0||v){s=s+Math.min(T-h,0);var M=e.getInternal(),E=M.storedHeights;-1*s>=E[b]&&(b+=1,s+=E[b])}return{endBufferIdx:C,endViewportIdx:w,firstBufferIdx:_,firstOffset:s,firstViewportIdx:b}}function Wue(e,t,r){var n=e.getInternal(),i=n.rowBufferSet,a=n.rowOffsetIntervalTree,o=n.storedHeights,s=t.endBufferIdx,u=t.endViewportIdx,c=t.firstBufferIdx,d=t.firstViewportIdx,h=s-c;if(h===0){e.rowOffsets={},e.rows=[];return}for(var p=r?d:c,m=r?u:s,v=[],b={},_=a.sumUntil(p),w=p;w<m;w++){b[w]=_,_+=o[w];var C=jue(w,i,p,m,h);v[C]=w}e.rows=v,e.rowOffsets=b}function jue(e,t,r,n,i){var a=t.getValuePosition(e);return a===null&&t.getSize()>=i&&(a=t.replaceFurthestValuePosition(r,n-1,e)),a===null&&(a=t.getNewPositionForValue(e)),a}var $p={exports:{}},ic={exports:{}},Ke={};/** @license React v16.13.1
177
- * react-is.production.min.js
178
- *
179
- * Copyright (c) Facebook, Inc. and its affiliates.
180
- *
181
- * This source code is licensed under the MIT license found in the
182
- * LICENSE file in the root directory of this source tree.
183
- */var kt=typeof Symbol=="function"&&Symbol.for,U0=kt?Symbol.for("react.element"):60103,V0=kt?Symbol.for("react.portal"):60106,fd=kt?Symbol.for("react.fragment"):60107,pd=kt?Symbol.for("react.strict_mode"):60108,md=kt?Symbol.for("react.profiler"):60114,gd=kt?Symbol.for("react.provider"):60109,vd=kt?Symbol.for("react.context"):60110,G0=kt?Symbol.for("react.async_mode"):60111,yd=kt?Symbol.for("react.concurrent_mode"):60111,bd=kt?Symbol.for("react.forward_ref"):60112,_d=kt?Symbol.for("react.suspense"):60113,Uue=kt?Symbol.for("react.suspense_list"):60120,wd=kt?Symbol.for("react.memo"):60115,Cd=kt?Symbol.for("react.lazy"):60116,Vue=kt?Symbol.for("react.block"):60121,Gue=kt?Symbol.for("react.fundamental"):60117,que=kt?Symbol.for("react.responder"):60118,Yue=kt?Symbol.for("react.scope"):60119;function Cr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case U0:switch(e=e.type,e){case G0:case yd:case fd:case md:case pd:case _d:return e;default:switch(e=e&&e.$$typeof,e){case vd:case bd:case Cd:case wd:case gd:return e;default:return t}}case V0:return t}}}function Qx(e){return Cr(e)===yd}Ke.AsyncMode=G0;Ke.ConcurrentMode=yd;Ke.ContextConsumer=vd;Ke.ContextProvider=gd;Ke.Element=U0;Ke.ForwardRef=bd;Ke.Fragment=fd;Ke.Lazy=Cd;Ke.Memo=wd;Ke.Portal=V0;Ke.Profiler=md;Ke.StrictMode=pd;Ke.Suspense=_d;Ke.isAsyncMode=function(e){return Qx(e)||Cr(e)===G0};Ke.isConcurrentMode=Qx;Ke.isContextConsumer=function(e){return Cr(e)===vd};Ke.isContextProvider=function(e){return Cr(e)===gd};Ke.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===U0};Ke.isForwardRef=function(e){return Cr(e)===bd};Ke.isFragment=function(e){return Cr(e)===fd};Ke.isLazy=function(e){return Cr(e)===Cd};Ke.isMemo=function(e){return Cr(e)===wd};Ke.isPortal=function(e){return Cr(e)===V0};Ke.isProfiler=function(e){return Cr(e)===md};Ke.isStrictMode=function(e){return Cr(e)===pd};Ke.isSuspense=function(e){return Cr(e)===_d};Ke.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fd||e===yd||e===md||e===pd||e===_d||e===Uue||typeof e=="object"&&e!==null&&(e.$$typeof===Cd||e.$$typeof===wd||e.$$typeof===gd||e.$$typeof===vd||e.$$typeof===bd||e.$$typeof===Gue||e.$$typeof===que||e.$$typeof===Yue||e.$$typeof===Vue)};Ke.typeOf=Cr;var Ze={};/** @license React v16.13.1
184
- * react-is.development.js
185
- *
186
- * Copyright (c) Facebook, Inc. and its affiliates.
187
- *
188
- * This source code is licensed under the MIT license found in the
189
- * LICENSE file in the root directory of this source tree.
190
- */process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function S(le){return typeof le=="string"||typeof le=="function"||le===n||le===c||le===a||le===i||le===h||le===p||typeof le=="object"&&le!==null&&(le.$$typeof===v||le.$$typeof===m||le.$$typeof===o||le.$$typeof===s||le.$$typeof===d||le.$$typeof===_||le.$$typeof===w||le.$$typeof===C||le.$$typeof===b)}function T(le){if(typeof le=="object"&&le!==null){var Ve=le.$$typeof;switch(Ve){case t:var Te=le.type;switch(Te){case u:case c:case n:case a:case i:case h:return Te;default:var Ne=Te&&Te.$$typeof;switch(Ne){case s:case d:case v:case m:case o:return Ne;default:return Ve}}case r:return Ve}}}var M=u,E=c,D=s,N=o,F=t,B=d,G=n,Y=v,$=m,X=r,V=a,Z=i,j=h,q=!1;function te(le){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Q(le)||T(le)===u}function Q(le){return T(le)===c}function J(le){return T(le)===s}function ne(le){return T(le)===o}function ae(le){return typeof le=="object"&&le!==null&&le.$$typeof===t}function oe(le){return T(le)===d}function se(le){return T(le)===n}function ce(le){return T(le)===v}function me(le){return T(le)===m}function pe(le){return T(le)===r}function we(le){return T(le)===a}function Le(le){return T(le)===i}function Ce(le){return T(le)===h}Ze.AsyncMode=M,Ze.ConcurrentMode=E,Ze.ContextConsumer=D,Ze.ContextProvider=N,Ze.Element=F,Ze.ForwardRef=B,Ze.Fragment=G,Ze.Lazy=Y,Ze.Memo=$,Ze.Portal=X,Ze.Profiler=V,Ze.StrictMode=Z,Ze.Suspense=j,Ze.isAsyncMode=te,Ze.isConcurrentMode=Q,Ze.isContextConsumer=J,Ze.isContextProvider=ne,Ze.isElement=ae,Ze.isForwardRef=oe,Ze.isFragment=se,Ze.isLazy=ce,Ze.isMemo=me,Ze.isPortal=pe,Ze.isProfiler=we,Ze.isStrictMode=Le,Ze.isSuspense=Ce,Ze.isValidElementType=S,Ze.typeOf=T}();process.env.NODE_ENV==="production"?ic.exports=Ke:ic.exports=Ze;/*
191
- object-assign
192
- (c) Sindre Sorhus
193
- @license MIT
194
- */var gb=Object.getOwnPropertySymbols,Xue=Object.prototype.hasOwnProperty,Zue=Object.prototype.propertyIsEnumerable;function Kue(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Que(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}var Jue=Que()?Object.assign:function(e,t){for(var r,n=Kue(e),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)Xue.call(r,o)&&(n[o]=r[o]);if(gb){i=gb(r);for(var s=0;s<i.length;s++)Zue.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},ece="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",q0=ece,Jx=Function.call.bind(Object.prototype.hasOwnProperty),Bp=function(){};if(process.env.NODE_ENV!=="production"){var tce=q0,zp={},rce=Jx;Bp=function(e){var t="Warning: "+e;typeof console!="undefined"&&console.error(t);try{throw new Error(t)}catch(r){}}}function eT(e,t,r,n,i){if(process.env.NODE_ENV!=="production"){for(var a in e)if(rce(e,a)){var o;try{if(typeof e[a]!="function"){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}o=e[a](t,a,n,r,null,tce)}catch(c){o=c}if(o&&!(o instanceof Error)&&Bp((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof o+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),o instanceof Error&&!(o.message in zp)){zp[o.message]=!0;var u=i?i():"";Bp("Failed "+r+" type: "+o.message+(u!=null?u:""))}}}}eT.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(zp={})};var nce=eT,ice=ic.exports,ace=Jue,pa=q0,Vh=Jx,vb=nce,wa=function(){};process.env.NODE_ENV!=="production"&&(wa=function(e){var t="Warning: "+e;typeof console!="undefined"&&console.error(t);try{throw new Error(t)}catch(r){}});function du(){return null}var oce=function(e,t){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function i($){var X=$&&(r&&$[r]||$[n]);if(typeof X=="function")return X}var a="<<anonymous>>",o={array:d("array"),bigint:d("bigint"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:h(),arrayOf:p,element:m(),elementType:v(),instanceOf:b,node:S(),objectOf:w,oneOf:_,oneOfType:C,shape:M,exact:E};function s($,X){return $===X?$!==0||1/$===1/X:$!==$&&X!==X}function u($,X){this.message=$,this.data=X&&typeof X=="object"?X:{},this.stack=""}u.prototype=Error.prototype;function c($){if(process.env.NODE_ENV!=="production")var X={},V=0;function Z(q,te,Q,J,ne,ae,oe){if(J=J||a,ae=ae||Q,oe!==pa){if(t){var se=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw se.name="Invariant Violation",se}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var ce=J+":"+Q;!X[ce]&&V<3&&(wa("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+J+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),X[ce]=!0,V++)}}return te[Q]==null?q?te[Q]===null?new u("The "+ne+" `"+ae+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new u("The "+ne+" `"+ae+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:$(te,Q,J,ne,ae)}var j=Z.bind(null,!1);return j.isRequired=Z.bind(null,!0),j}function d($){function X(V,Z,j,q,te,Q){var J=V[Z],ne=F(J);if(ne!==$){var ae=B(J);return new u("Invalid "+q+" `"+te+"` of type "+("`"+ae+"` supplied to `"+j+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return c(X)}function h(){return c(du)}function p($){function X(V,Z,j,q,te){if(typeof $!="function")return new u("Property `"+te+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var Q=V[Z];if(!Array.isArray(Q)){var J=F(Q);return new u("Invalid "+q+" `"+te+"` of type "+("`"+J+"` supplied to `"+j+"`, expected an array."))}for(var ne=0;ne<Q.length;ne++){var ae=$(Q,ne,j,q,te+"["+ne+"]",pa);if(ae instanceof Error)return ae}return null}return c(X)}function m(){function $(X,V,Z,j,q){var te=X[V];if(!e(te)){var Q=F(te);return new u("Invalid "+j+" `"+q+"` of type "+("`"+Q+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return c($)}function v(){function $(X,V,Z,j,q){var te=X[V];if(!ice.isValidElementType(te)){var Q=F(te);return new u("Invalid "+j+" `"+q+"` of type "+("`"+Q+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return c($)}function b($){function X(V,Z,j,q,te){if(!(V[Z]instanceof $)){var Q=$.name||a,J=Y(V[Z]);return new u("Invalid "+q+" `"+te+"` of type "+("`"+J+"` supplied to `"+j+"`, expected ")+("instance of `"+Q+"`."))}return null}return c(X)}function _($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?wa("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):wa("Invalid argument supplied to oneOf, expected an array.")),du;function X(V,Z,j,q,te){for(var Q=V[Z],J=0;J<$.length;J++)if(s(Q,$[J]))return null;var ne=JSON.stringify($,function(oe,se){var ce=B(se);return ce==="symbol"?String(se):se});return new u("Invalid "+q+" `"+te+"` of value `"+String(Q)+"` "+("supplied to `"+j+"`, expected one of "+ne+"."))}return c(X)}function w($){function X(V,Z,j,q,te){if(typeof $!="function")return new u("Property `"+te+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var Q=V[Z],J=F(Q);if(J!=="object")return new u("Invalid "+q+" `"+te+"` of type "+("`"+J+"` supplied to `"+j+"`, expected an object."));for(var ne in Q)if(Vh(Q,ne)){var ae=$(Q,ne,j,q,te+"."+ne,pa);if(ae instanceof Error)return ae}return null}return c(X)}function C($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&wa("Invalid argument supplied to oneOfType, expected an instance of array."),du;for(var X=0;X<$.length;X++){var V=$[X];if(typeof V!="function")return wa("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(V)+" at index "+X+"."),du}function Z(j,q,te,Q,J){for(var ne=[],ae=0;ae<$.length;ae++){var oe=$[ae],se=oe(j,q,te,Q,J,pa);if(se==null)return null;se.data&&Vh(se.data,"expectedType")&&ne.push(se.data.expectedType)}var ce=ne.length>0?", expected one of type ["+ne.join(", ")+"]":"";return new u("Invalid "+Q+" `"+J+"` supplied to "+("`"+te+"`"+ce+"."))}return c(Z)}function S(){function $(X,V,Z,j,q){return D(X[V])?null:new u("Invalid "+j+" `"+q+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return c($)}function T($,X,V,Z,j){return new u(($||"React class")+": "+X+" type `"+V+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function M($){function X(V,Z,j,q,te){var Q=V[Z],J=F(Q);if(J!=="object")return new u("Invalid "+q+" `"+te+"` of type `"+J+"` "+("supplied to `"+j+"`, expected `object`."));for(var ne in $){var ae=$[ne];if(typeof ae!="function")return T(j,q,te,ne,B(ae));var oe=ae(Q,ne,j,q,te+"."+ne,pa);if(oe)return oe}return null}return c(X)}function E($){function X(V,Z,j,q,te){var Q=V[Z],J=F(Q);if(J!=="object")return new u("Invalid "+q+" `"+te+"` of type `"+J+"` "+("supplied to `"+j+"`, expected `object`."));var ne=ace({},V[Z],$);for(var ae in ne){var oe=$[ae];if(Vh($,ae)&&typeof oe!="function")return T(j,q,te,ae,B(oe));if(!oe)return new u("Invalid "+q+" `"+te+"` key `"+ae+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(V[Z],null," ")+`
195
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=oe(Q,ae,j,q,te+"."+ae,pa);if(se)return se}return null}return c(X)}function D($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(D);if($===null||e($))return!0;var X=i($);if(X){var V=X.call($),Z;if(X!==$.entries){for(;!(Z=V.next()).done;)if(!D(Z.value))return!1}else for(;!(Z=V.next()).done;){var j=Z.value;if(j&&!D(j[1]))return!1}}else return!1;return!0;default:return!1}}function N($,X){return $==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function F($){var X=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":N(X,$)?"symbol":X}function B($){if(typeof $=="undefined"||$===null)return""+$;var X=F($);if(X==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return X}function G($){var X=B($);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function Y($){return!$.constructor||!$.constructor.name?a:$.constructor.name}return o.checkPropTypes=vb,o.resetWarningCache=vb.resetWarningCache,o.PropTypes=o,o},sce=q0;function tT(){}function rT(){}rT.resetWarningCache=tT;var lce=function(){function e(n,i,a,o,s,u){if(u!==sce){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rT,resetWarningCache:tT};return r.PropTypes=r,r};if(process.env.NODE_ENV!=="production"){var uce=ic.exports,cce=!0;$p.exports=oce(uce.isElement,cce)}else $p.exports=lce();var W=$p.exports,dce=/\//g,hu={};function hce(e){return hu[e]||(hu[e]=e.replace(dce,"_")),hu[e]}function Me(e){var t;return kn(e)=="object"?t=Object.keys(e).filter(function(r){return e[r]}):t=Array.prototype.slice.call(arguments),t.map(hce).join(" ")}function xd(e){return function(){return e}}function Nt(){}Nt.thatReturns=xd;Nt.thatReturnsFalse=xd(!1);Nt.thatReturnsTrue=xd(!0);Nt.thatReturnsNull=xd(null);Nt.thatReturnsThis=function(){return this};Nt.thatReturnsArgument=function(e){return e};var an={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105},yb=!1,wi,Hp,Wp,ku,Lu,nT,Ou,jp,Up,Vp,iT,Gp,qp,aT,oT;function lr(){if(!yb){yb=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),r=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Gp=/\b(iPhone|iP[ao]d)/.exec(e),qp=/\b(iP[ao]d)/.exec(e),Vp=/Android/i.exec(e),aT=/FBAN\/\w+;/i.exec(e),oT=/Mobile/i.exec(e),iT=!!/Win64/.exec(e),t){wi=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,wi&&document&&document.documentMode&&(wi=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);nT=n?parseFloat(n[1])+4:wi,Hp=t[2]?parseFloat(t[2]):NaN,Wp=t[3]?parseFloat(t[3]):NaN,ku=t[4]?parseFloat(t[4]):NaN,ku?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Lu=t&&t[1]?parseFloat(t[1]):NaN):Lu=NaN}else wi=Hp=Wp=Lu=ku=NaN;if(r){if(r[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ou=i?parseFloat(i[1].replace("_",".")):!0}else Ou=!1;jp=!!r[2],Up=!!r[3]}else Ou=jp=Up=!1}}var Yp={ie:function(){return lr()||wi},ieCompatibilityMode:function(){return lr()||nT>wi},ie64:function(){return Yp.ie()&&iT},firefox:function(){return lr()||Hp},opera:function(){return lr()||Wp},webkit:function(){return lr()||ku},safari:function(){return Yp.webkit()},chrome:function(){return lr()||Lu},windows:function(){return lr()||jp},osx:function(){return lr()||Ou},linux:function(){return lr()||Up},iphone:function(){return lr()||Gp},mobile:function(){return lr()||Gp||qp||Vp||oT},nativeApp:function(){return lr()||aT},android:function(){return lr()||Vp},ipad:function(){return lr()||qp}},fu=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Y0={canUseDOM:fu,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:fu&&!!(window.addEventListener||window.attachEvent),canUseViewport:fu&&!!window.screen,isInWorker:!fu},sT;Y0.canUseDOM&&(sT=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
196
- * Checks if an event is supported in the current execution environment.
197
- *
198
- * NOTE: This will not work correctly for non-generic events such as `change`,
199
- * `reset`, `load`, `error`, and `select`.
200
- *
201
- * Borrows from Modernizr.
202
- *
203
- * @param {string} eventNameSuffix Event name, e.g. "click".
204
- * @param {?boolean} capture Check if the capture phase is supported.
205
- * @return {boolean} True if the event is supported.
206
- * @internal
207
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
208
- */function fce(e,t){if(!Y0.canUseDOM||t)return!1;var r="on"+e,n=r in document;if(!n){var i=document.createElement("div");i.setAttribute(r,"return;"),n=typeof i[r]=="function"}return!n&&sT&&e==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var bb=10,_b=40,wb=800;function lT(e){var t=0,r=0,n=0,i=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=r,r=0),n=t*bb,i=r*bb,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(e.deltaMode==1?(n*=_b,i*=_b):(n*=wb,i*=wb)),n&&!t&&(t=n<1?-1:1),i&&!r&&(r=i<1?-1:1),{spinX:t,spinY:r,pixelX:n,pixelY:i}}lT.getEventType=function(){return Yp.firefox()?"DOMMouseScroll":fce("wheel")?"wheel":"mousewheel"};var pce=er.requestAnimationFrame||er.webkitRequestAnimationFrame||er.mozRequestAnimationFrame||er.oRequestAnimationFrame||er.msRequestAnimationFrame,Cb=0,ti=pce||function(e){var t=Date.now(),r=Math.max(0,16-(t-Cb));return Cb=t+r,er.setTimeout(function(){e(Date.now())},r)};ti(Nt);var uT=function(){function e(t,r,n,i,a,o){rt(this,e),this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=this._didWheel.bind(this),this._rootRef=null,typeof r!="function"&&(r=r?Nt.thatReturnsTrue:Nt.thatReturnsFalse),typeof n!="function"&&(n=n?Nt.thatReturnsTrue:Nt.thatReturnsFalse),this._handleScrollX=r,this._handleScrollY=n,this._preventDefault=a,this._stopPropagation=o,this._onWheelCallback=t,this.onWheel=this.onWheel.bind(this),this._isRTL=i}return nt(e,[{key:"onWheel",value:function(r){this._preventDefault&&r.preventDefault();var n=lT(r);r.shiftKey&&e._allowInternalAxesSwap()?n=e._swapNormalizedWheelAxis(n):r.shiftKey||(n.pixelX*=this._isRTL?-1:1);var i=this._deltaX+n.pixelX,a=this._deltaY+n.pixelY,o=this._handleScrollX(i,a),s=this._handleScrollY(a,i);if(!(!o&&!s)&&!(this._rootRef&&!this._contains(r.target))){this._deltaX+=o?n.pixelX:0,this._deltaY+=s?n.pixelY:0,r.defaultPrevented||r.preventDefault();var u;(this._deltaX!==0||this._deltaY!==0)&&(this._stopPropagation&&r.stopPropagation(),u=!0),u===!0&&this._animationFrameID===null&&(this._animationFrameID=ti(this._didWheel))}}},{key:"setRoot",value:function(r){this._rootRef=r}},{key:"_didWheel",value:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}},{key:"_contains",value:function(r){for(var n=r;n!=document.body;){if(n===this._rootRef)return!0;n=n.parentNode}return!1}}],[{key:"_swapNormalizedWheelAxis",value:function(r){return{spinX:r.spinY,spinY:r.spinX,pixelX:r.pixelY,pixelY:r.pixelX}}},{key:"_allowInternalAxesSwap",value:function(){return navigator.platform!=="MacIntel"}}]),e}(),ma={listen:function(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t.addEventListener)return t.addEventListener(r,n,i||!1),{remove:function(){t.removeEventListener(r,n,i||!1)}};if(t.attachEvent)return t.attachEvent("on"+r,n),{remove:function(){t.detachEvent("on"+r,n)}}},capture:function(t,r,n){return t.addEventListener?(t.addEventListener(r,n,!0),{remove:function(){t.removeEventListener(r,n,!0)}}):(process.env.NODE_ENV!=="production"&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:Nt})},registerDefault:function(){}},cT=er.cancelAnimationFrame||er.webkitCancelAnimationFrame||er.mozCancelAnimationFrame||er.oCancelAnimationFrame||er.msCancelAnimationFrame||er.clearTimeout;function mce(e){var t=0,r=0;if(!e.clientX||!e.clientY){if(e.touches&&e.touches.length>0){var n=e.touches[0];t=n.clientX,r=n.clientY}}else t=e.clientX,r=e.clientY;return{x:t,y:r}}var Xp={getCoordinatesFromEvent:mce},X0=function(){function e(t,r,n,i){rt(this,e),this._isDragging=!1,this._isTouchEnabled=i,this._animationFrameID=null,this._domNode=n,this._onMove=t,this._onMoveEnd=r,this._onMouseEnd=this._onMouseEnd.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._didMouseMove=this._didMouseMove.bind(this)}return nt(e,[{key:"captureMouseMoves",value:function(r){if(!this._eventMoveToken&&!this._eventUpToken&&!this._eventLeaveToken&&(this._eventMoveToken=ma.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=ma.listen(this._domNode,"mouseup",this._onMouseUp),this._eventLeaveToken=ma.listen(this._domNode,"mouseleave",this._onMouseEnd)),this._isTouchEnabled&&!this._eventTouchStartToken&&!this._eventTouchMoveToken&&!this._eventTouchEndToken&&(this._eventTouchStartToken=ma.listen(this._domNode,"touchstart",this._onMouseMove,{passive:!1}),this._eventTouchMoveToken=ma.listen(r.target,"touchmove",this._onMouseMove,{passive:!1}),this._eventTouchEndToken=ma.listen(r.target,"touchend",this._onMouseUp,{passive:!1})),!this._isDragging){this._deltaX=0,this._deltaY=0,this._isDragging=!0;var n=Xp.getCoordinatesFromEvent(r),i=n.x,a=n.y;this._x=i,this._y=a}r.preventDefault()}},{key:"releaseMouseMoves",value:function(){this._eventMoveToken&&this._eventUpToken&&this._eventLeaveToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null,this._eventLeaveToken.remove(),this._eventLeaveToken=null),this._isTouchEnabled&&this._eventTouchStartToken&&this._eventTouchMoveToken&&this._eventTouchEndToken&&(this._eventTouchStartToken.remove(),this._eventTouchStartToken=null,this._eventTouchMoveToken.remove(),this._eventTouchMoveToken=null,this._eventTouchEndToken.remove(),this._eventTouchEndToken=null),this._animationFrameID!==null&&(cT(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"_onMouseMove",value:function(r){var n=Xp.getCoordinatesFromEvent(r),i=n.x,a=n.y;this._deltaX+=i-this._x,this._deltaY+=a-this._y,this._animationFrameID===null&&(this._animationFrameID=ti(this._didMouseMove)),this._x=i,this._y=a,r.preventDefault()}},{key:"_didMouseMove",value:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}},{key:"_onMouseUp",value:function(){this._animationFrameID&&this._didMouseMove(),this._onMoveEnd(!1)}},{key:"_onMouseEnd",value:function(){this._onMoveEnd(!0)}}]),e}(),Zp={"--scrollbar-face-active-color":"#7d7d7d","--scrollbar-face-color":"#c2c2c2","--scrollbar-face-margin":"4px","--scrollbar-face-radius":"6px","--scrollbar-size":"15px","--scrollbar-track-color":"#fff","--border-color":"#d3d3d3","--fbui-white":"#fff","--fbui-desktop-background-light":"#f6f7f8"};function Td(e){if(Zp.hasOwnProperty(e))return Zp[e];throw new Error('cssVar("'+e+'"): Unexpected class transformation.')}Td.CSS_VARS=Zp;var gce=/-(.)/g;function vce(e){return e.replace(gce,function(t,r){return r.toUpperCase()})}var Gh={},Kp=["Webkit","ms","Moz","O"],yce=new RegExp("^("+Kp.join("|")+")"),dT=Y0.canUseDOM?document.createElement("div").style:{};function bce(e){for(var t=0;t<Kp.length;t++){var r=Kp[t]+e;if(r in dT)return r}return null}function Pa(e){var t=vce(e);if(Gh[t]===void 0){var r=t.charAt(0).toUpperCase()+t.slice(1);yce.test(r)&&on(!1,"getVendorPrefixedName must only be called with unprefixedCSS property names. It was called with %s",e),Gh[t]=t in dT?t:bce(r)}return Gh[t]}var Qp={hasCSSAnimations:function(){return!!Pa("animationName")},hasCSSTransforms:function(){return!!Pa("transform")},hasCSS3DTransforms:function(){return!!Pa("perspective")},hasCSSTransitions:function(){return!!Pa("transition")}},xb=Pa("transform");Pa("backfaceVisibility");var _ce=function(){if(Qp.hasCSSTransforms()){var e=er.window?er.window.navigator.userAgent:"UNKNOWN",t=/Safari\//.test(e)&&!/Chrome\//.test(e);return!t&&Qp.hasCSS3DTransforms()?function(r,n,i){r[xb]="translate3d("+n+"px,"+i+"px,0)"}:function(r,n,i){r[xb]="translate("+n+"px,"+i+"px)"}}else return function(r,n,i){r.left=n+"px",r.top=i+"px"}}();function Ua(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;e.display!=="none"&&(n?(e.left=t+"px",e.top=r+"px"):(Qp.hasCSSTransforms()&&(t*=i?-1:1),e.left=0,_ce(e,t,r)),i&&(e.right=e.left,e.left="auto"))}function wce(e){var t=Cce();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Cce(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var xce={position:0,scrollable:!1},hT=parseInt(Td("--scrollbar-face-margin"),10),Tb=hT*2,qh=30,fT=40,yr=function(e){Ct(r,e);var t=wce(r);function r(n){var i;return rt(this,r),i=t.call(this,n),ie(he(i),"_onRefFace",function(a){return i._faceRef=a}),ie(he(i),"_onRefRoot",function(a){return i._rootRef=a}),ie(he(i),"scrollBy",function(a){i._onWheel(a)}),ie(he(i),"_shouldHandleX",function(a){return i.props.orientation==="horizontal"?i._shouldHandleChange(a):!1}),ie(he(i),"_shouldHandleY",function(a){return i.props.orientation!=="horizontal"?i._shouldHandleChange(a):!1}),ie(he(i),"_shouldHandleChange",function(a){var o=i._calculateState(i.state.position+a,i.props.size,i.props.contentSize,i.props.orientation);return o.position!==i.state.position}),ie(he(i),"_calculateState",function(a,o,s,u){var c=Math.max(1,o);if(s<=c)return xce;var d="".concat(a,"_").concat(c,"_").concat(s,"_").concat(u);if(i._stateKey===d)return i._stateForKey;var h=u==="horizontal",p=c/s,m=c*p;m<qh&&(p=(c-qh)/(s-c),m=qh);var v=!0,b=s-c;a<0?a=0:a>b&&(a=b);var _={faceSize:m,isHorizontal:h,position:a,scale:p,scrollable:v};return i._stateKey=d,i._stateForKey=_,_}),ie(he(i),"_onWheelY",function(a,o){i._onWheel(o)}),ie(he(i),"_onWheelX",function(a,o){i._onWheel(a)}),ie(he(i),"_onWheel",function(a){var o=i.props;i._setNextState(i._calculateState(i.state.position+a,o.size,o.contentSize,o.orientation))}),ie(he(i),"_onMouseDown",function(a){i.setState({isDragging:!0});var o;if(a.target!==i._faceRef){var s,u,c,d,h=a.nativeEvent,p=i.state.isHorizontal?(s=(u=h.offsetX)!==null&&u!==void 0?u:h.layerX)!==null&&s!==void 0?s:i.getTouchX(h):(c=(d=h.offsetY)!==null&&d!==void 0?d:h.layerY)!==null&&c!==void 0?c:i.getTouchY(h),m=i.props;p/=i.state.scale,o=i._calculateState(p-i.state.faceSize*.5/i.state.scale,m.size,m.contentSize,m.orientation)}else o={};i._setNextState(o),i._mouseMoveTracker.captureMouseMoves(a),i._rootRef.focus()}),ie(he(i),"_onTouchCancel",function(a){a.stopPropagation()}),ie(he(i),"_onTouchEnd",function(a){a.stopPropagation()}),ie(he(i),"_onTouchMove",function(a){a.stopPropagation()}),ie(he(i),"_onTouchStart",function(a){a.stopPropagation(),i._onMouseDown(a)}),ie(he(i),"_onMouseMove",function(a,o){var s=i.props,u=i.state.isHorizontal?a*(i.props.isRTL?-1:1):o;u/=i.state.scale;var c=Jn.flushSync||function(d){return d()};c(function(){return i._setNextState(i._calculateState(i.state.position+u,s.size,s.contentSize,s.orientation))})}),ie(he(i),"_onMouseMoveEnd",function(){i._nextState=null,i._mouseMoveTracker.releaseMouseMoves(),i.setState({isDragging:!1})}),ie(he(i),"_onKeyDown",function(a){var o=a.keyCode;if(o!==an.TAB){var s=fT,u=0;if(i.state.isHorizontal)switch(o){case an.HOME:u=-1,s=i.props.contentSize;break;case an.LEFT:u=-1;break;case an.RIGHT:u=1;break;default:return}if(!i.state.isHorizontal)switch(o){case an.SPACE:a.shiftKey?u=-1:u=1;break;case an.HOME:u=-1,s=i.props.contentSize;break;case an.UP:u=-1;break;case an.DOWN:u=1;break;case an.PAGE_UP:u=-1,s=i.props.size;break;case an.PAGE_DOWN:u=1,s=i.props.size;break;default:return}a.preventDefault();var c=i.props;i._setNextState(i._calculateState(i.state.position+s*u,c.size,c.contentSize,c.orientation))}}),ie(he(i),"getTouchX",function(a){return Math.round(a.targetTouches[0].clientX-a.target.getBoundingClientRect().x)}),ie(he(i),"getTouchY",function(a){return Math.round(a.targetTouches[0].clientY-a.target.getBoundingClientRect().y)}),ie(he(i),"_setNextState",function(a,o){o=o||i.props;var s=o.position,u=i.state.position!==a.position;if(s===void 0){var c=u?i._didScroll:void 0;i.setState(a,c)}else if(s===a.position)i.setState(a);else{a.position!==void 0&&a.position!==i.state.position&&i.props.onScroll(a.position);return}}),ie(he(i),"_didScroll",function(){i.props.onScroll(i.state.position)}),i.state=i._calculateState(n.position||n.defaultPosition||0,n.size,n.contentSize,n.orientation),i._initialRender=!0,i}return nt(r,[{key:"componentDidUpdate",value:function(){var i=this.props.position;i===void 0?this._setNextState(this._calculateState(this.state.position,this.props.size,this.props.contentSize,this.props.orientation)):this._setNextState(this._calculateState(i,this.props.size,this.props.contentSize,this.props.orientation),this.props)}},{key:"render",value:function(){if(!this.state.scrollable)return null;var i=this.props.size,a,o,s=this.state.isHorizontal,u=!s,c=this.state.isDragging,d=this.state.faceSize,h=this.props.isOpaque,p=this.props.verticalTop||0,m=Me({"ScrollbarLayout/main":!0,"ScrollbarLayout/mainVertical":u,"ScrollbarLayout/mainHorizontal":s,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":h,"public/Scrollbar/mainActive":c}),v=Me({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":s,"ScrollbarLayout/faceVertical":u,"public/Scrollbar/faceActive":c,"public/Scrollbar/face":!0}),b=this.state.position*this.state.scale+hT;return s?(a={width:i},o={width:d-Tb,top:0,bottom:0},Ua(o,b,0,this._initialRender,this.props.isRTL)):(a={top:p,height:i},this.props.isRTL&&(a.left=a.right||0,a.right="auto"),o={height:d-Tb},Ua(o,0,b,this._initialRender,this.props.isRTL),o.left=0,o.right=0),a.touchAction="none",a.zIndex=this.props.zIndex,this.props.trackColor==="gray"&&(a.backgroundColor=Td("--fbui-desktop-background-light")),k.createElement("div",{onKeyDown:this._onKeyDown,onMouseDown:this._onMouseDown,onTouchCancel:this._onTouchCancel,onTouchEnd:this._onTouchEnd,onTouchMove:this._onTouchMove,onTouchStart:this._onTouchStart,className:m,style:a,ref:this._onRefRoot},k.createElement("div",{ref:this._onRefFace,className:v,style:o}))}},{key:"componentDidMount",value:function(){var i=this.props.orientation==="horizontal",a=i?this._onWheelX:this._onWheelY;this._wheelHandler=new uT(a,this._shouldHandleX,this._shouldHandleY,this.props.isRTL),this._rootRef&&this._rootRef.addEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this._mouseMoveTracker=new X0(this._onMouseMove,this._onMouseMoveEnd,document.documentElement,this.props.touchEnabled),this.props.position!==void 0&&this.state.position!==this.props.position&&this._didScroll(),this._initialRender=!1}},{key:"componentWillUnmount",value:function(){this._rootRef&&this._rootRef.removeEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this._nextState=null,this._mouseMoveTracker&&(this._mouseMoveTracker.releaseMouseMoves(),this._mouseMoveTracker=null)}}]),r}(k.PureComponent);ie(yr,"propTypes",{contentSize:W.number.isRequired,defaultPosition:W.number,isOpaque:W.bool,orientation:W.oneOf(["vertical","horizontal"]),onScroll:W.func,position:W.number,size:W.number.isRequired,trackColor:W.oneOf(["gray"]),touchEnabled:W.bool,zIndex:W.number,verticalTop:W.number,isRTL:W.bool});ie(yr,"defaultProps",{defaultPosition:0,isOpaque:!1,onScroll:Nt,orientation:"vertical",zIndex:99});yr.KEYBOARD_SCROLL_AMOUNT=fT;yr.SIZE=parseInt(Td("--scrollbar-size"),10);yr.OFFSET=1;function xt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var i=kce[e],a=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ln(e){return!!e&&!!e[at]}function oi(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;var n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Lce}(e)||Array.isArray(e)||!!e[Db]||!!e.constructor[Db]||Z0(e)||K0(e))}function Tce(e){return Ln(e)||xt(23,e),e[at].t}function Fi(e,t,r){r===void 0&&(r=!1),go(e)===0?(r?Object.keys:Fa)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function go(e){var t=e[at];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Z0(e)?2:K0(e)?3:0}function Ia(e,t){return go(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Sce(e,t){return go(e)===2?e.get(t):e[t]}function pT(e,t,r){var n=go(e);n===2?e.set(t,r):n===3?(e.delete(t),e.add(r)):e[t]=r}function mT(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Z0(e){return Dce&&e instanceof Map}function K0(e){return Nce&&e instanceof Set}function Un(e){return e.o||e.t}function Q0(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=vT(e);delete t[at];for(var r=Fa(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function J0(e,t){return t===void 0&&(t=!1),eg(e)||Ln(e)||!oi(e)||(go(e)>1&&(e.set=e.add=e.clear=e.delete=Mce),Object.freeze(e),t&&Fi(e,function(r,n){return J0(n,!0)},!0)),e}function Mce(){xt(2)}function eg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function hn(e){var t=rm[e];return t||xt(18,e),t}function Ece(e,t){rm[e]||(rm[e]=t)}function Jp(){return process.env.NODE_ENV==="production"||Va||xt(0),Va}function Yh(e,t){t&&(hn("Patches"),e.u=[],e.s=[],e.v=t)}function ac(e){em(e),e.p.forEach(Pce),e.p=null}function em(e){e===Va&&(Va=e.l)}function Sb(e){return Va={p:[],l:Va,h:e,m:!0,_:0}}function Pce(e){var t=e[at];t.i===0||t.i===1?t.j():t.O=!0}function Xh(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.g||hn("ES5").S(t,e,n),n?(r[at].P&&(ac(t),xt(4)),oi(e)&&(e=oc(t,e),t.l||sc(t,e)),t.u&&hn("Patches").M(r[at].t,e,t.u,t.s)):e=oc(t,r,[]),ac(t),t.u&&t.v(t.u,t.s),e!==gT?e:void 0}function oc(e,t,r){if(eg(t))return t;var n=t[at];if(!n)return Fi(t,function(a,o){return Mb(e,n,t,a,o,r)},!0),t;if(n.A!==e)return t;if(!n.P)return sc(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Q0(n.k):n.o;Fi(n.i===3?new Set(i):i,function(a,o){return Mb(e,n,i,a,o,r)}),sc(e,i,!1),r&&e.u&&hn("Patches").R(n,r,e.u,e.s)}return n.o}function Mb(e,t,r,n,i,a){if(process.env.NODE_ENV!=="production"&&i===r&&xt(5),Ln(i)){var o=oc(e,i,a&&t&&t.i!==3&&!Ia(t.D,n)?a.concat(n):void 0);if(pT(r,n,o),!Ln(o))return;e.m=!1}if(oi(i)&&!eg(i)){if(!e.h.F&&e._<1)return;oc(e,i),t&&t.A.l||sc(e,i)}}function sc(e,t,r){r===void 0&&(r=!1),e.h.F&&e.m&&J0(t,r)}function Zh(e,t){var r=e[at];return(r?Un(r):e)[t]}function Eb(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function qn(e){e.P||(e.P=!0,e.l&&qn(e.l))}function Kh(e){e.o||(e.o=Q0(e.t))}function tm(e,t,r){var n=Z0(t)?hn("MapSet").N(t,r):K0(t)?hn("MapSet").T(t,r):e.g?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:Jp(),P:!1,I:!1,D:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,c=ks;o&&(u=[s],c=Ko);var d=Proxy.revocable(u,c),h=d.revoke,p=d.proxy;return s.k=p,s.j=h,p}(t,r):hn("ES5").J(t,r);return(r?r.A:Jp()).p.push(n),n}function Ace(e){return Ln(e)||xt(22,e),function t(r){if(!oi(r))return r;var n,i=r[at],a=go(r);if(i){if(!i.P&&(i.i<4||!hn("ES5").K(i)))return i.t;i.I=!0,n=Pb(r,a),i.I=!1}else n=Pb(r,a);return Fi(n,function(o,s){i&&Sce(i.t,o)===s||pT(n,o,t(s))}),a===3?new Set(n):n}(e)}function Pb(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Q0(e)}function Rce(){function e(o,s){var u=a[o];return u?u.enumerable=s:a[o]=u={configurable:!0,enumerable:s,get:function(){var c=this[at];return process.env.NODE_ENV!=="production"&&i(c),ks.get(c,o)},set:function(c){var d=this[at];process.env.NODE_ENV!=="production"&&i(d),ks.set(d,o,c)}},u}function t(o){for(var s=o.length-1;s>=0;s--){var u=o[s][at];if(!u.P)switch(u.i){case 5:n(u)&&qn(u);break;case 4:r(u)&&qn(u)}}}function r(o){for(var s=o.t,u=o.k,c=Fa(u),d=c.length-1;d>=0;d--){var h=c[d];if(h!==at){var p=s[h];if(p===void 0&&!Ia(s,h))return!0;var m=u[h],v=m&&m[at];if(v?v.t!==p:!mT(m,p))return!0}}var b=!!s[at];return c.length!==Fa(s).length+(b?0:1)}function n(o){var s=o.k;if(s.length!==o.t.length)return!0;var u=Object.getOwnPropertyDescriptor(s,s.length-1);if(u&&!u.get)return!0;for(var c=0;c<s.length;c++)if(!s.hasOwnProperty(c))return!0;return!1}function i(o){o.O&&xt(3,JSON.stringify(Un(o)))}var a={};Ece("ES5",{J:function(o,s){var u=Array.isArray(o),c=function(h,p){if(h){for(var m=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var b=vT(p);delete b[at];for(var _=Fa(b),w=0;w<_.length;w++){var C=_[w];b[C]=e(C,h||!!b[C].enumerable)}return Object.create(Object.getPrototypeOf(p),b)}(u,o),d={i:u?5:4,A:s?s.A:Jp(),P:!1,I:!1,D:{},l:s,t:o,k:c,o:null,O:!1,C:!1};return Object.defineProperty(c,at,{value:d,writable:!0}),c},S:function(o,s,u){u?Ln(s)&&s[at].A===o&&t(o.p):(o.u&&function c(d){if(d&&typeof d=="object"){var h=d[at];if(h){var p=h.t,m=h.k,v=h.D,b=h.i;if(b===4)Fi(m,function(T){T!==at&&(p[T]!==void 0||Ia(p,T)?v[T]||c(m[T]):(v[T]=!0,qn(h)))}),Fi(p,function(T){m[T]!==void 0||Ia(m,T)||(v[T]=!1,qn(h))});else if(b===5){if(n(h)&&(qn(h),v.length=!0),m.length<p.length)for(var _=m.length;_<p.length;_++)v[_]=!1;else for(var w=p.length;w<m.length;w++)v[w]=!0;for(var C=Math.min(m.length,p.length),S=0;S<C;S++)m.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&c(m[S])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?r(o):n(o)}})}var Ab,Va,tg=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",Dce=typeof Map!="undefined",Nce=typeof Set!="undefined",Rb=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",gT=tg?Symbol.for("immer-nothing"):((Ab={})["immer-nothing"]=!0,Ab),Db=tg?Symbol.for("immer-draftable"):"__$immer_draftable",at=tg?Symbol.for("immer-state"):"__$immer_state",kce={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Lce=""+Object.prototype.constructor,Fa=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,vT=Object.getOwnPropertyDescriptors||function(e){var t={};return Fa(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},rm={},ks={get:function(e,t){if(t===at)return e;var r=Un(e);if(!Ia(r,t))return function(i,a,o){var s,u=Eb(a,o);return u?"value"in u?u.value:(s=u.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!oi(n)?n:n===Zh(e.t,t)?(Kh(e),e.o[t]=tm(e.A.h,n,e)):n},has:function(e,t){return t in Un(e)},ownKeys:function(e){return Reflect.ownKeys(Un(e))},set:function(e,t,r){var n=Eb(Un(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Zh(Un(e),t),a=i==null?void 0:i[at];if(a&&a.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(mT(r,i)&&(r!==void 0||Ia(e.t,t)))return!0;Kh(e),qn(e)}return e.o[t]===r&&typeof r!="number"&&(r!==void 0||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return Zh(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,Kh(e),qn(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Un(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},Ko={};Fi(ks,function(e,t){Ko[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ko.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&xt(13),Ko.set.call(this,e,t,void 0)},Ko.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&xt(14),ks.set.call(this,e[0],t,r,e[0])};var Oce=function(){function e(r){var n=this;this.g=Rb,this.F=!0,this.produce=function(i,a,o){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var u=n;return function(b){var _=this;b===void 0&&(b=s);for(var w=arguments.length,C=Array(w>1?w-1:0),S=1;S<w;S++)C[S-1]=arguments[S];return u.produce(b,function(T){var M;return(M=a).call.apply(M,[_,T].concat(C))})}}var c;if(typeof a!="function"&&xt(6),o!==void 0&&typeof o!="function"&&xt(7),oi(i)){var d=Sb(n),h=tm(n,i,void 0),p=!0;try{c=a(h),p=!1}finally{p?ac(d):em(d)}return typeof Promise!="undefined"&&c instanceof Promise?c.then(function(b){return Yh(d,o),Xh(b,d)},function(b){throw ac(d),b}):(Yh(d,o),Xh(c,d))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===gT&&(c=void 0),n.F&&J0(c,!0),o){var m=[],v=[];hn("Patches").M(i,c,m,v),o(m,v)}return c}xt(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var d=arguments.length,h=Array(d>1?d-1:0),p=1;p<d;p++)h[p-1]=arguments[p];return n.produceWithPatches(c,function(m){return i.apply(void 0,[m].concat(h))})};var o,s,u=n.produce(i,a,function(c,d){o=c,s=d});return typeof Promise!="undefined"&&u instanceof Promise?u.then(function(c){return[c,o,s]}):[u,o,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){oi(r)||xt(8),Ln(r)&&(r=Ace(r));var n=Sb(this),i=tm(this,r,void 0);return i[at].C=!0,em(n),i},t.finishDraft=function(r,n){var i=r&&r[at];process.env.NODE_ENV!=="production"&&(i&&i.C||xt(9),i.I&&xt(10));var a=i.A;return Yh(a,n),Xh(void 0,a)},t.setAutoFreeze=function(r){this.F=r},t.setUseProxies=function(r){r&&!Rb&&xt(20),this.g=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=hn("Patches").$;return Ln(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},e}(),wr=new Oce,Ice=wr.produce;wr.produceWithPatches.bind(wr);wr.setAutoFreeze.bind(wr);wr.setUseProxies.bind(wr);wr.applyPatches.bind(wr);wr.createDraft.bind(wr);wr.finishDraft.bind(wr);var Iu=Ice;function yT(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(o){return function(s){return typeof s=="function"?s(i,a,e):o(s)}}};return t}var bT=yT();bT.withExtraArgument=yT;var Nb=bT,Fce=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lc=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},$ce=Object.defineProperty,kb=Object.getOwnPropertySymbols,Bce=Object.prototype.hasOwnProperty,zce=Object.prototype.propertyIsEnumerable,Lb=function(e,t,r){return t in e?$ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Ls=function(e,t){for(var r in t||(t={}))Bce.call(t,r)&&Lb(e,r,t[r]);if(kb)for(var n=0,i=kb(t);n<i.length;n++){var r=i[n];zce.call(t,r)&&Lb(e,r,t[r])}return e},Hce=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rc:rc.apply(null,arguments)};function _T(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function wT(e,t){var r=0;return{measureTime:function(n){var i=Date.now();try{return n()}finally{var a=Date.now();r+=a-i}},warnIfExceeded:function(){r>e&&console.warn(t+" took "+r+"ms, which is more than the warning threshold of "+e+`ms.
209
- If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
210
- It is disabled in production builds, so you don't need to worry about that.`)}}}var Wce=function(e){Fce(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,lc([void 0],r[0].concat(this)))):new(t.bind.apply(t,lc([void 0],r.concat(this))))},t}(Array),jce=process.env.NODE_ENV==="production",Ob="Invariant failed";function Ib(e,t){if(!e)throw jce?new Error(Ob):new Error(Ob+": "+(t||""))}function Uce(e,t,r,n){return JSON.stringify(e,Vce(t,n),r)}function Vce(e,t){var r=[],n=[];return t||(t=function(i,a){return r[0]===a?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(a)).join(".")+"]"}),function(i,a){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,i):n.push(i),~r.indexOf(a)&&(a=t.call(this,i,a))}else r.push(a);return e==null?a:e.call(this,i,a)}}function Gce(e){return typeof e!="object"||e===null||typeof e=="undefined"||Object.isFrozen(e)}function qce(e,t,r){var n=CT(e,t,r);return{detectMutations:function(){return xT(e,t,n,r)}}}function CT(e,t,r,n){t===void 0&&(t=[]),n===void 0&&(n="");var i={value:r};if(!e(r)){i.children={};for(var a in r){var o=n?n+"."+a:a;t.length&&t.indexOf(o)!==-1||(i.children[a]=CT(e,t,r[a],o))}}return i}function xT(e,t,r,n,i,a){t===void 0&&(t=[]),i===void 0&&(i=!1),a===void 0&&(a="");var o=r?r.value:void 0,s=o===n;if(i&&!s&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(o)||e(n))return{wasMutated:!1};var u={};for(var c in r.children)u[c]=!0;for(var c in n)u[c]=!0;for(var c in u){var d=a?a+"."+c:c;if(!(t.length&&t.indexOf(d)!==-1)){var h=xT(e,t,r.children[c],n[c],s,d);if(h.wasMutated)return h}}return{wasMutated:!1}}function Yce(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(u){return function(c){return u(c)}}};var t=e.isImmutable,r=t===void 0?Gce:t,n=e.ignoredPaths,i=e.warnAfter,a=i===void 0?32:i,o=e.ignore;n=n||o;var s=qce.bind(null,r,n);return function(u){var c=u.getState,d=c(),h=s(d),p;return function(m){return function(v){var b=wT(a,"ImmutableStateInvariantMiddleware");b.measureTime(function(){d=c(),p=h.detectMutations(),h=s(d),Ib(!p.wasMutated,"A state mutation was detected between dispatches, in the path '"+(p.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var _=m(v);return b.measureTime(function(){d=c(),p=h.detectMutations(),h=s(d),p.wasMutated&&Ib(!p.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(p.path||"")+". Take a look at the reducer(s) handling the action "+Uce(v)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),b.warnIfExceeded(),_}}}}function TT(e){var t=typeof e;return t==="undefined"||e===null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||_T(e)}function nm(e,t,r,n,i){t===void 0&&(t=""),r===void 0&&(r=TT),i===void 0&&(i=[]);var a;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null)return!1;for(var o=n!=null?n(e):Object.entries(e),s=i.length>0,u=0,c=o;u<c.length;u++){var d=c[u],h=d[0],p=d[1],m=t?t+"."+h:h;if(!(s&&i.indexOf(m)>=0)){if(!r(p))return{keyPath:m,value:p};if(typeof p=="object"&&(a=nm(p,m,r,n,i),a))return a}}return!1}function Xce(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(_){return function(w){return _(w)}}};var t=e.isSerializable,r=t===void 0?TT:t,n=e.getEntries,i=e.ignoredActions,a=i===void 0?[]:i,o=e.ignoredActionPaths,s=o===void 0?["meta.arg","meta.baseQueryMeta"]:o,u=e.ignoredPaths,c=u===void 0?[]:u,d=e.warnAfter,h=d===void 0?32:d,p=e.ignoreState,m=p===void 0?!1:p,v=e.ignoreActions,b=v===void 0?!1:v;return function(_){return function(w){return function(C){var S=w(C),T=wT(h,"SerializableStateInvariantMiddleware");return!b&&!(a.length&&a.indexOf(C.type)!==-1)&&T.measureTime(function(){var M=nm(C,"",r,n,s);if(M){var E=M.keyPath,D=M.value;console.error("A non-serializable value was detected in an action, in the path: `"+E+"`. Value:",D,`
211
- Take a look at the logic that dispatched this action: `,C,`
212
- (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
213
- (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),m||(T.measureTime(function(){var M=_.getState(),E=nm(M,"",r,n,c);if(E){var D=E.keyPath,N=E.value;console.error("A non-serializable value was detected in the state, in the path: `"+D+"`. Value:",N,`
214
- Take a look at the reducer(s) handling this action type: `+C.type+`.
215
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),T.warnIfExceeded()),S}}}}function Qh(e){return typeof e=="boolean"}function Zce(){return function(t){return Kce(t)}}function Kce(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,o=a===void 0?!0:a,s=new Wce;if(r&&(Qh(r)?s.push(Nb):s.push(Nb.withExtraArgument(r.extraArgument))),process.env.NODE_ENV!=="production"){if(i){var u={};Qh(i)||(u=i),s.unshift(Yce(u))}if(o){var c={};Qh(o)||(c=o),s.push(Xce(c))}}return s}var Jh=process.env.NODE_ENV==="production";function Qce(e){var t=Zce(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,o=a===void 0?t():a,s=r.devTools,u=s===void 0?!0:s,c=r.preloadedState,d=c===void 0?void 0:c,h=r.enhancers,p=h===void 0?void 0:h,m;if(typeof i=="function")m=i;else if(_T(i))m=fne(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=o;if(typeof v=="function"&&(v=v(t),!Jh&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Jh&&v.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var b=pne.apply(void 0,v),_=rc;u&&(_=Hce(Ls({trace:!Jh},typeof u=="object"&&u)));var w=[b];Array.isArray(p)?w=lc([b],p):typeof p=="function"&&(w=p(w));var C=_.apply(void 0,w);return Lx(m,d,C)}function Os(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Ls(Ls({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function ST(e){var t={},r=[],n,i={addCase:function(a,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var s=typeof a=="string"?a:a.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=o,i},addMatcher:function(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:o}),i},addDefaultCase:function(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error("`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function Jce(e){return typeof e=="function"}function ede(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?ST(t):[t,r,n],a=i[0],o=i[1],s=i[2],u;if(Jce(e))u=function(){return Iu(e(),function(){})};else{var c=Iu(e,function(){});u=function(){return c}}function d(h,p){h===void 0&&(h=u());var m=lc([a[p.type]],o.filter(function(v){var b=v.matcher;return b(p)}).map(function(v){var b=v.reducer;return b}));return m.filter(function(v){return!!v}).length===0&&(m=[s]),m.reduce(function(v,b){if(b)if(Ln(v)){var _=v,w=b(_,p);return typeof w=="undefined"?v:w}else{if(oi(v))return Iu(v,function(C){return b(C,p)});var w=b(v,p);if(typeof w=="undefined"){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return v},h)}return d.getInitialState=u,d}function tde(e,t){return e+"/"+t}function rde(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r=typeof e.initialState=="function"?e.initialState:Iu(e.initialState,function(){}),n=e.reducers||{},i=Object.keys(n),a={},o={},s={};i.forEach(function(d){var h=n[d],p=tde(t,d),m,v;"reducer"in h?(m=h.reducer,v=h.prepare):m=h,a[d]=m,o[p]=m,s[d]=v?Os(p,v):Os(p)});function u(){var d=typeof e.extraReducers=="function"?ST(e.extraReducers):[e.extraReducers],h=d[0],p=h===void 0?{}:h,m=d[1],v=m===void 0?[]:m,b=d[2],_=b===void 0?void 0:b,w=Ls(Ls({},p),o);return ede(r,w,v,_)}var c;return{name:t,reducer:function(d,h){return c||(c=u()),c(d,h)},actions:s,caseReducers:a,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var rg="listenerMiddleware";Os(rg+"/add");Os(rg+"/removeAll");Os(rg+"/remove");Rce();function nde(){var e=ide();return{columnElements:[],columnGroupElements:[],elementTemplates:{cell:[],footer:[],groupHeader:[],header:[]},elementHeights:{footerHeight:0,groupHeaderHeight:0,headerHeight:0},propsRevision:null,rowSettings:{bufferRowCount:void 0,rowAttributesGetter:void 0,rowHeight:0,rowHeightGetter:function(){return 0},rowsCount:0,subRowHeight:0,subRowHeightGetter:function(){return 0}},scrollFlags:{overflowX:"auto",overflowY:"auto",showScrollbarX:!0,showScrollbarY:!0},tableSize:{height:void 0,maxHeight:0,ownerHeight:void 0,useMaxHeight:!1,width:0},firstRowIndex:0,firstRowOffset:0,maxScrollX:0,maxScrollY:0,rowOffsets:{},rows:[],scrollContentHeight:0,scrollX:0,scrollbarXHeight:yr.SIZE,scrollY:0,scrollbarYWidth:yr.SIZE,scrolling:!1,getInternal:function(){return e}}}function ide(){return{rowBufferSet:new Xx,rowOffsetIntervalTree:null,storedHeights:[],rowUntilOffsetsAreExact:0}}var MT=rde({name:"FDT",initialState:{},reducers:{initialize:function(t,r){var n=r.payload;ot(t,nde()),$b(t,n),Fb(t);var i=sb(t,n);jo(t,i),pb.initialize(t,n,{})},propChange:function(t,r){var n=r.payload,i=n.newProps,a=n.oldProps,o=Ble(Tce(t));$b(t,i),(a.rowsCount!==i.rowsCount||a.rowHeight!==i.rowHeight||a.subRowHeight!==i.subRowHeight)&&Fb(t),a.rowsCount!==i.rowsCount&&(t.getInternal().rowBufferSet=new Xx);var s=sb(t,i,a);(!Ds(t,o)||s.changed)&&jo(t,s),pb.initialize(t,i,a),(t.scrollX!==o.scrollX||t.scrollY!==o.scrollY)&&(t.scrolling=t.scrolling||!0)},scrollEnd:function(t){t.scrolling=!1;var r={firstIndex:t.firstRowIndex,firstOffset:t.firstRowOffset,lastIndex:t.lastIndex};jo(t,r)},scrollToY:function(t,r){var n=r.payload;t.scrolling=!0;var i=Fp(t,n);jo(t,i)},scrollToX:function(t,r){var n=r.payload;t.scrolling=!0,t.scrollX=n},updateRowHeights:function(t,r){var n=r.payload||0;if(!(n>=t.rowSettings.rowsCount)){for(;n<t.rowSettings.rowsCount;)Ci(t,n++);var i=t.getInternal().rowOffsetIntervalTree.sumUntil(t.firstRowIndex)-t.firstRowOffset,a=Fp(t,i);jo(t,a)}}}});function Fb(e){for(var t=e.rowSettings,r=t.rowHeight,n=t.rowsCount,i=t.subRowHeight,a=t.rowHeightGetter,o=t.subRowHeightGetter,s=r+i,u=0,c=new Array(n),d=0;d<n;d++)e.isVerticalScrollExact?c[d]=a(d)+o(d):c[d]=s,u+=c[d];var h=new jle(c);e.scrollContentHeight=u,ot(e.getInternal(),{rowOffsetIntervalTree:h,storedHeights:c})}function $b(e,t){var r=Gle(t.children),n=r.columnGroupElements,i=r.columnElements,a=r.elementTemplates,o=r.useGroupHeader;ot(e,{columnGroupElements:n,columnElements:i,elementTemplates:a,propsRevision:e.propsRevision+1,isVerticalScrollExact:t.isVerticalScrollExact}),Object.freeze(e.columnElements),Object.freeze(e.columnGroupElements),Object.freeze(e.elementTemplates),e.elementHeights=ot({},e.elementHeights,Zo(t,["cellGroupWrapperHeight","footerHeight","groupHeaderHeight","headerHeight"])),o||(e.elementHeights.groupHeaderHeight=0),e.rowSettings=ot({},e.rowSettings,Zo(t,["bufferRowCount","rowHeight","rowsCount","subRowHeight"]));var s=e.rowSettings,u=s.rowHeight,c=s.subRowHeight;e.rowSettings.rowHeightGetter=t.rowHeightGetter||function(){return u},e.rowSettings.subRowHeightGetter=t.subRowHeightGetter||function(){return c||0},e.rowSettings.rowAttributesGetter=t.rowAttributesGetter,e.scrollFlags=ot({},e.scrollFlags,Zo(t,["overflowX","overflowY","showScrollbarX","showScrollbarY"])),e.tableSize=ot({},e.tableSize,Zo(t,["height","maxHeight","ownerHeight","width"])),e.tableSize.useMaxHeight=e.tableSize.height===void 0,e.scrollbarXHeight=t.scrollbarXHeight,e.scrollbarYWidth=t.scrollbarYWidth}var ade=MT.reducer,vo=MT.actions,ode=vo.initialize,sde=vo.propChange,lde=vo.scrollEnd,ude=vo.scrollToX,cde=vo.scrollToY,dde=vo.updateRowHeights,hde=function(t,r){var n=Ox({scrollToX:ude,scrollToY:cde,scrollEnd:lde},t.dispatch),i=function(s){var u=t.getState(),c=u.scrollX;if(s!==c){var d=Math.round(s),h=r(),p=h.onHorizontalScroll;(!p||p(d))&&n.scrollToX(d)}},a=function(s){var u=t.getState(),c=u.scrollY;if(s!==c){var d=r(),h=d.onVerticalScroll;(!h||h(s))&&n.scrollToY(s)}};return{scrollToX:i,scrollToY:a,stopScroll:n.scrollEnd}},fde=Vi,pde=ui,mde="[object Number]";function gde(e){return typeof e=="number"||pde(e)&&fde(e)==mde}var vde=gde,yde=vde;function bde(e){return yde(e)&&e!=+e}var Bb=bde;function _de(e,t,r,n,i){n=n||setTimeout,i=i||clearTimeout;var a;function o(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];o.reset();var d=function(){e.apply(r,u)};d.__SMmeta=e.__SMmeta,a=n(d,t)}return o.reset=function(){i(a)},o}function Dt(e){e||(e="");var t,r=arguments.length;if(r>1)for(var n=1;n<r;n++)t=arguments[n],t&&(e=(e?e+" ":"")+t);return e}function wde(e,t,r){var n=1,i=1,a=e+2,o=e+1,s=2;return t&&(i++,o++,a++,s++),r&&o++,{ariaGroupHeaderIndex:n,ariaHeaderIndex:i,ariaFooterIndex:a,ariaRowCount:o,ariaRowIndexOffset:s}}var Cde=In([function(e){return e.rowsCount},function(e){return e.groupHeaderHeight>0},function(e){return e.footerHeight>0}],wde);function xde(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var u=o[e?s:++i];if(r(a[u],u,a)===!1)break}return t}}var Tde=xde,Sde=Tde,Mde=Sde(),Ede=Mde,Pde=Ede,Ade=ud;function Rde(e,t){return e&&Pde(e,t,Ade)}var Dde=Rde,Nde=ul;function kde(e,t){return function(r,n){if(r==null)return r;if(!Nde(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var Lde=kde,Ode=Dde,Ide=Lde,Fde=Ide(Ode),$de=Fde,Bde=Nx;function zde(e){return typeof e=="function"?e:Bde}var Hde=zde,Wde=Ix,jde=$de,Ude=Hde,Vde=Fr;function Gde(e,t){var r=Vde(e)?Wde:jde;return r(e,Ude(t))}var zb=Gde;function qde(e,t){var r=e.columnGroupProps,n=e.columnProps,i=[],a=[],o=[];zb(r,function(d,h){var p={props:d,template:t.groupHeader[h]};d.fixed?i.push(p):d.fixedRight?a.push(p):o.push(p)});var s={cell:[],header:[],footer:[]},u={cell:[],header:[],footer:[]},c={cell:[],header:[],footer:[]};return zb(n,function(d,h){var p=c;d.fixed?p=s:d.fixedRight&&(p=u),p.cell.push({props:d,template:t.cell[h]}),p.header.push({props:d,template:t.header[h]}),p.footer.push({props:d,template:t.footer[h]})}),{fixedColumnGroups:i,fixedColumns:s,fixedRightColumnGroups:a,fixedRightColumns:u,scrollableColumnGroups:o,scrollableColumns:c}}var Yde=In([function(e){return dl(e)},function(e){return e.elementTemplates}],qde);function Xde(e,t){return e==null||e!==e?t:e}var Zde=Xde,Kde=Math.max,Qde=Math.min;function Jde(e,t,r){return e>=Qde(t,r)&&e<Kde(t,r)}var ehe=Jde,the=j0,Hb=1/0,rhe=17976931348623157e292;function nhe(e){if(!e)return e===0?e:0;if(e=the(e),e===Hb||e===-Hb){var t=e<0?-1:1;return t*rhe}return e===e?e:0}var ihe=nhe,ahe=ehe,Wb=ihe,ohe=j0;function she(e,t,r){return t=Wb(t),r===void 0?(r=t,t=0):r=Wb(r),e=ohe(e),ahe(e,t,r)}var Ei=she;function lhe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Rn(e,t){if(e==null)return{};var r,n,i=lhe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var uhe=["height","width","isVisible","style","className","children","columnKey","columnIndex","rowIndex","left","cellGroupType","isHeader","isGroupHeader","maxWidth","minWidth","touchEnabled"];function jb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function che(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jb(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dhe(e){var t=hhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function hhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var uc=function(e){Ct(r,e);var t=dhe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){var i=this.props,a=i.height,o=i.width,s=i.style,u=i.className,c=i.children,d=Rn(i,uhe),h=che({height:a,width:o},s);return k.createElement("div",ot({},d,{className:Dt(Me("fixedDataTableCellLayout/wrap1"),Me("public/fixedDataTableCell/wrap1"),u),style:h}),k.createElement("div",{className:Dt(Me("fixedDataTableCellLayout/wrap2"),Me("public/fixedDataTableCell/wrap2"))},k.createElement("div",{className:Dt(Me("fixedDataTableCellLayout/wrap3"),Me("public/fixedDataTableCell/wrap3"))},k.createElement("div",{className:Me("public/fixedDataTableCell/cellContent")},c))))}}]),r}(k.Component);ie(uc,"propTypes",{height:W.number,width:W.number,columnKey:W.oneOfType([W.string,W.number]),rowIndex:W.number,isVisible:W.bool});function ET(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function PT(e){function t(r){var n=this.constructor.getDerivedStateFromProps(e,r);return n!=null?n:null}this.setState(t.bind(this))}function AT(e,t){try{var r=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}ET.__suppressDeprecationWarning=!0;PT.__suppressDeprecationWarning=!0;AT.__suppressDeprecationWarning=!0;function RT(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var r=null,n=null,i=null;if(typeof t.componentWillMount=="function"?r="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?i="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),r!==null||n!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
216
-
217
- `+a+" uses "+o+" but also contains the following legacy lifecycles:"+(r!==null?`
218
- `+r:"")+(n!==null?`
219
- `+n:"")+(i!==null?`
220
- `+i:"")+`
221
-
222
- The above lifecycles should be removed. Learn more about this warning here:
223
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=ET,t.componentWillReceiveProps=PT),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=AT;var s=t.componentDidUpdate;t.componentDidUpdate=function(c,d,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;s.call(this,c,d,p)}}return e}var fhe=["height","width","isVisible","style","className","children","columnKey","columnIndex","rowIndex","left","cellGroupType","isHeader","isGroupHeader","maxWidth","minWidth","touchEnabled"];function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function phe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ng=k.forwardRef(function(t,r){var n=t.height,i=t.width,a=t.style,o=t.className,s=t.children,u=Rn(t,fhe),c=phe({height:n,width:i},a);return k.createElement("div",ot({},u,{className:Dt(Me("fixedDataTableCellLayout/wrap"),Me("public/fixedDataTableCell/wrap"),Me("public/fixedDataTableCell/cellContent"),o),style:c,ref:r}),s)});ng.propTypes={height:W.number,width:W.number,columnKey:W.oneOfType([W.string,W.number]),rowIndex:W.number,isVisible:W.bool};var Ga=k.createContext({}),mhe=Mx;function ghe(e,t,r){var n=e==null?void 0:mhe(e,t);return n===void 0?r:n}var im=ghe;function vhe(e){var t=yhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function yhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Vb=15,Gb=100,ig=function(e){Ct(r,e);var t=vhe(r);function r(){var n;rt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),ie(he(n),"state",{displacement:0}),ie(he(n),"containerRef",k.createRef()),ie(he(n),"onTouchEnd",function(s){n.props.touchEnabled&&s.stopPropagation()}),ie(he(n),"onTouchMove",function(s){n.props.touchEnabled&&s.stopPropagation()}),ie(he(n),"onMouseMove",function(s){n.cursorDeltaX+=s*(n.context.isRTL?-1:1)}),ie(he(n),"onMouseUp",function(){cT(n.frameId),n.setState({displacement:0,isReordering:!1}),n.updateColumnOrder(),n.frameId=null,n.cursorDeltaX=0,n.mouseMoveTracker.releaseMouseMoves()}),ie(he(n),"initializeDOMMouseMoveTracker",function(s){n.mouseMoveTracker=new X0(n.onMouseMove,n.onMouseUp,document.body,n.props.touchEnabled),n.mouseMoveTracker.captureMouseMoves(s)}),ie(he(n),"updateDisplacementPeriodically",function(){n.frameId=ti(n.updateDisplacementPeriodically),n.updateDisplacementWithScroll()}),ie(he(n),"getBoundedDeltaX",function(s){var u=0,c=0,d=n.props.cellGroupType,h=n.context.groupHeaderHeight>0;if(h&&!n.props.isGroupHeader){var p=n.context.getColumnGroupByChild(n.props.columnIndex);u=p.width,c=p.offset}else u=n.context.getCellGroupWidth(d);var m=u-n.props.width;return hd(s,-n.originalLeft+c,-n.originalLeft+m+c)}),ie(he(n),"updateDisplacementWithScroll",function(){var s=n.scrollStart,u=n.props.cellGroupType,c=n.context,d=c.scrollX,h=c.maxScrollX,p=c.availableScrollWidth,m=n.cursorDeltaX;if(u===Ee.SCROLLABLE){var v=n.originalLeft-s+m;m+=d-s,v>p-Gb?d=Math.min(d+Vb,h):v<=Gb&&(d=Math.max(d-Vb,0)),n.context.scrollToX(d)}m=n.getBoundedDeltaX(m),n.setState({displacement:m})}),ie(he(n),"isColumnMovedToRight",function(s){return s>0}),ie(he(n),"isColumnMovedToLeft",function(s){return s<0}),ie(he(n),"updateColumnOrder",function(){var s=n.props.cellGroupType,u=n.getBoundedDeltaX(n.cursorDeltaX+n.context.scrollX-n.scrollStart),c=u>=0?n.props.width+u+n.props.left:u+n.props.left,d,h;if(n.props.isGroupHeader){var p=n.context.getColumnGroupAtOffset(c,s),m=p.columnGroup,v=p.distanceFromOffset;d=m,h=v}else{var b=n.context.getColumnAtOffset(c,s),_=b.column,w=b.distanceFromOffset;d=_,h=w}var C=null,S=null;d.index<n.props.columnIndex?h<=d.width/2?(C=d.index-1,S=d.index):(C=d.index,S=d.index+1):h>=d.width/2?(C=d.index,S=d.index+1):(C=d.index-1,S=d.index),C===n.props.columnIndex&&--C,S===n.props.columnIndex&&++S;var T=n.props.isGroupHeader?n.context.getColumnGroupCount():n.context.getColumnCount(),M,E;Ei(C,0,T)&&(M=n.props.isGroupHeader?n.context.getColumnGroup(C):n.context.getColumn(C)),Ei(S,0,T)&&(E=n.props.isGroupHeader?n.context.getColumnGroup(S):n.context.getColumn(S)),n.props.onColumnReorderEnd({columnBefore:im(M,"columnKey"),columnAfter:im(E,"columnKey"),reorderColumn:n.props.columnKey})}),n}return nt(r,[{key:"componentDidMount",value:function(){var i=this.props.contents.parentNode.cloneNode(!0);i.firstChild.classList.add(Me("public/fixedDataTableCell/reordering")),this.containerRef.current.appendChild(i),this.startDrag()}},{key:"render",value:function(){var i={position:"absolute"};return Ua(i,this.state.displacement,0,!0,this.context.isRTL),k.createElement("div",{style:i,ref:this.containerRef})}},{key:"startDrag",value:function(){this.cursorDeltaX=0,this.scrollStart=this.context.scrollX,this.originalLeft=this.props.left,this.initializeDOMMouseMoveTracker(this.props.reorderStartEvent),this.setState({displacement:0,isReordering:!0}),this.frameId=ti(this.updateDisplacementPeriodically)}}]),r}(k.PureComponent);ig.contextType=Ga;ig.propTypes={columnIndex:W.number.isRequired,columnKey:W.string.isRequired,contents:W.object.isRequired,cellGroupType:W.string,isGroupHeader:W.bool,isRTL:W.bool,left:W.number.isRequired,onColumnReorderStart:W.func.isRequired,reorderStartEvent:W.object.isRequired,touchEnabled:W.bool,width:W.number.isRequired};function bhe(e){var t=_he();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function _he(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var whe=function(e){Ct(r,e);var t=bhe(r);function r(n){var i;rt(this,r),i=t.call(this,n);var a=n.value;return i.unsubscribe=a.subscribe(function(o){i.setState({FixedDataTableContextValue:o})}),i.state={FixedDataTableContextValue:a},i}return nt(r,[{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var i=this.state.FixedDataTableContextValue;return k.createElement(Ga.Provider,{value:i},this.props.children)}}]),r}(k.PureComponent);function Che(){}var xhe=Che,The=["onColumnReorderStart","onColumnReorderEnd","reorderStartEvent","children"];function She(e){var t=Mhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Mhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Ehe=1,Is=function(e){Ct(r,e);var t=She(r);function r(){var n;rt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),ie(he(n),"state",{isReordering:!1}),ie(he(n),"dragContainer",null),ie(he(n),"cellRef",k.createRef()),ie(he(n),"isMounted",!1),ie(he(n),"setReorderHandle",function(s){s&&(s.addEventListener("mousedown",n.onMouseDown,{passive:!1}),s.addEventListener("touchstart",n.onTouchStart,{passive:!1}))}),ie(he(n),"onTouchStart",function(s){n.props.touchEnabled&&n.onMouseDown(s)}),ie(he(n),"onMouseDown",function(s){n.onDragStart(s)}),ie(he(n),"onDragStart",function(s){n.createDragContainer(),n.renderDragProxy(s),n.props.onColumnReorderStart(n.props.columnKey)}),ie(he(n),"onColumnReorderEnd",function(s){n.isMounted&&n.setState({isReordering:!1}),n.removeDragContainer(),n.props.onColumnReorderEnd(s)}),ie(he(n),"createDragContainer",function(){n.dragContainer=document.createElement("div"),n.dragContainer.dataset.columnKey=n.props.columnKey;var s=n.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");s.appendChild(n.dragContainer)}),ie(he(n),"getDragContainer",function(){if(n.dragContainer)return n.dragContainer;var s=n.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");return n.dragContainer=s.querySelector('[data-column-key="'.concat(n.props.columnKey,'"]')),n.dragContainer}),ie(he(n),"removeDragContainer",function(){n.props.__react19RootCreator?n.dragContainer.root.unmount():Jn.unmountComponentAtNode(n.dragContainer),n.dragContainer.remove(),n.dragContainer=null}),n}return nt(r,[{key:"componentDidMount",value:function(){this.isMounted=!0;var i=im(this.getDragContainer(),"dataset.columnKey"),a=Sx(this.props.columnKey)===i;a&&(this.renderDragProxy({}),this.setState({isReordering:!0}))}},{key:"componentWillUnmount",value:function(){this.isMounted=!1}},{key:"render",value:function(){if(this.state.isReordering)return null;var i=this.props,a=i.children,o=Rn(i,The),s=Dt(Me({"public/fixedDataTableCell/resizeReorderCellContainer":!0}),o.className),u=Dt(s,Me({"public/fixedDataTableCell/hasReorderHandle":!0})),c={height:o.height,width:o.width-Ehe},d;return k.isValidElement(a)?d=k.cloneElement(a,o):typeof a=="function"?d=a(o):d=k.createElement(ng,o,a),k.createElement("div",{className:u,style:c,ref:this.cellRef},this.renderReorderHandle(),d)}},{key:"renderReorderHandle",value:function(){var i={height:this.props.height};return k.createElement("div",{ref:this.setReorderHandle,className:Me({"fixedDataTableCellLayout/columnReorderContainer":!0,"fixedDataTableCellLayout/columnReorderContainer/active":!1}),style:i})}},{key:"renderDragProxy",value:function(i){var a=this,o={isDragProxy:!0,reorderStartEvent:i,onColumnReorderEnd:this.onColumnReorderEnd,contents:this.cellRef.current},s=k.createElement(whe,{value:this.context},k.createElement(ig,ot({},this.props,o)));if(this.props.__react19RootCreator){var u=Jn.flushSync||function(c){return c()};u(function(){var c=a.props.__react19RootCreator(a.getDragContainer());a.dragContainer.root=c,c.render(s)}),this.setState({isReordering:!0});return}Jn.render(s,this.getDragContainer(),function(){return a.setState({isReordering:!0})})}}]),r}(k.PureComponent);Is.contextType=Ga;Is.defaultProps={onColumnReorderStart:xhe};Is.propTypes={height:W.number,width:W.number,columnKey:W.oneOfType([W.string,W.number]),rowIndex:W.number,left:W.number,touchEnabled:W.bool,minWidth:W.number,maxWidth:W.number,onColumnReorderStart:W.func,onColumnReorderEnd:W.func.isRequired,__react19RootCreator:W.func};var Phe=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Ahe=function(){function e(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function Rhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dhe(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Nhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var DT=function(e){Nhe(t,e);function t(){return Rhe(this,t),Dhe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ahe(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return Phe?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Jn.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(k.Component);DT.propTypes={children:W.node.isRequired,node:W.any};var khe=DT,Lhe=function(){function e(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function Ohe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ihe(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Fhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var NT=function(e){Fhe(t,e);function t(){return Ohe(this,t),Ihe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Lhe(t,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(n){this.renderPortal()}},{key:"componentWillUnmount",value:function(){Jn.unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(n){!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var i=this.props.children;typeof this.props.children.type=="function"&&(i=k.cloneElement(this.props.children)),this.portal=Jn.unstable_renderSubtreeIntoContainer(this,i,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),t}(k.Component),$he=NT;NT.propTypes={children:W.node.isRequired,node:W.any};var am=void 0;Jn.createPortal?am=khe:am=$he;var Bhe=am;function zhe(e){var t=Hhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Hhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var kT=function(e){Ct(r,e);var t=zhe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){if(!this.props.visible)return null;var i=this.getTableRef();if(!i)return null;var a={height:this.props.height,top:0,left:this.props.left};return k.createElement(Bhe,{node:i},k.createElement("div",{className:Dt(Me("fixedDataTableColumnResizerLineLayout/main"),Me("public/fixedDataTableColumnResizerLine/main")),style:a},k.createElement("div",{className:Me("fixedDataTableColumnResizerLineLayout/mouseArea"),style:{height:this.props.height}})))}},{key:"getTableRef",value:function(){var i=this.props.parentRef;return i?i.closest(Me(".fixedDataTableLayout/main")):null}}]),r}(k.PureComponent);ie(kT,"propTypes",{visible:W.bool.isRequired,height:W.number.isRequired,left:W.number.isRequired,parentRef:W.object});function qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Whe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jhe(e){var t=Uhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Uhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var LT=function(e){Ct(r,e);var t=jhe(r);function r(n){var i;return rt(this,r),i=t.call(this,n),ie(he(i),"initialState",{isColumnResizing:!1,currentMouseXCoordinate:0,totalDisplacement:0}),ie(he(i),"state",Whe({},i.initialState)),ie(he(i),"resizerKnobRef",null),ie(he(i),"mouseMoveTracker",null),ie(he(i),"setResizerKnobRef",function(a){i.resizerKnobRef=a}),ie(he(i),"initializeDOMMouseMoveTracker",function(a){i.mouseMoveTracker=new X0(i.onMouseMove,i.onMouseUp,document.body,i.props.touchEnabled),i.mouseMoveTracker.captureMouseMoves(a)}),ie(he(i),"onTouchStart",function(a){i.props.touchEnabled&&i.onMouseDown(a)}),ie(he(i),"onMouseDown",function(a){i.initializeDOMMouseMoveTracker(a);var o=Xp.getCoordinatesFromEvent(a).x-a.currentTarget.closest(Me(".fixedDataTableLayout/main")).getBoundingClientRect().left;i.setState({initialMouseXCoordinate:o,isColumnResizing:!0,totalDisplacement:0,currentMouseXCoordinate:o})}),ie(he(i),"onMouseUp",function(){var a=i.getMinMaxWidth(),o=a.minWidth,s=a.maxWidth,u=cd(i.props.width+i.state.totalDisplacement*(i.props.isRTL?-1:1),o,s);i.mouseMoveTracker.releaseMouseMoves(),i.setState({isColumnResizing:!1,totalDisplacement:0},function(){i.props.onColumnResizeEnd(u,i.props.columnKey)})}),ie(he(i),"onMouseMove",function(a){var o=i.props,s=o.isRTL,u=o.width,c=i.state,d=c.initialMouseXCoordinate,h=c.totalDisplacement,p=h+a,m=d+p,v=i.getMinMaxWidth(),b=v.minWidth,_=v.maxWidth,w=u+p*(s?-1:1);(w<b||w>_)&&(m=i.state.currentMouseXCoordinate),i.setState({totalDisplacement:p,currentMouseXCoordinate:m})}),ie(he(i),"getMinMaxWidth",function(){return{minWidth:i.props.minWidth||0,maxWidth:i.props.maxWidth||Number.MAX_SAFE_INTEGER}}),ie(he(i),"suppressEventIfInTouchMode",function(a){i.props.touchEnabled&&(a.preventDefault(),a.stopPropagation())}),i}return nt(r,[{key:"componentDidMount",value:function(){this.setupHandlers()}},{key:"componentWillUnmount",value:function(){this.cleanupHandlers()}},{key:"render",value:function(){var i={height:this.props.height},a=k.createElement(kT,{height:this.props.resizerLineHeight,visible:!!this.state.isColumnResizing,left:this.state.currentMouseXCoordinate,parentRef:this.resizerKnobRef});return k.createElement("div",{className:Me("fixedDataTableCellLayout/columnResizerContainer"),ref:this.setResizerKnobRef,style:i},a)}},{key:"setupHandlers",value:function(){this.resizerKnobRef.addEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.addEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.addEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}},{key:"cleanupHandlers",value:function(){this.resizerKnobRef.removeEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.removeEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.removeEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}}]),r}(k.PureComponent);LT.propTypes={columnKey:W.oneOfType([W.string,W.number]).isRequired,minWidth:W.number,maxWidth:W.number,width:W.number.isRequired,resizerLineHeight:W.number.isRequired,touchEnabled:W.bool,isRTL:W.bool,onColumnResizeEnd:W.func.isRequired,height:W.number.isRequired};var Vhe=["children","minWidth","maxWidth","onColumnResizeEnd","onColumnReorderEnd","rowIndex","left","touchEnabled","cellGroupType","onColumnReorderStart"];function Ghe(e){var t=qhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function qhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var cc=function(e){Ct(r,e);var t=Ghe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){var i=this.props,a=i.children,o=Rn(i,Vhe),s;return k.isValidElement(a)?s=k.cloneElement(a,o):typeof a=="function"?s=a(o):s=k.createElement(ng,o,a),k.createElement(k.Fragment,null,k.createElement(LT,{height:this.props.height,resizerLineHeight:this.context.tableHeight,onColumnResizeEnd:this.props.onColumnResizeEnd,width:this.props.width,minWidth:this.props.minWidth,maxWidth:this.props.maxWidth,columnKey:this.props.columnKey,touchEnabled:this.props.touchEnabled,isRTL:this.context.isRTL}),s)}}]),r}(k.PureComponent);cc.contextType=Ga;cc.propTypes={columnKey:W.oneOfType([W.string,W.number]),minWidth:W.number,maxWidth:W.number,width:W.number,touchEnabled:W.bool,isRTL:W.bool,onColumnResizeEnd:W.func.isRequired,height:W.number};var Yhe=["cell"],Xhe=["cell"],Zhe=["height","width","columnIndex","isVisible","columnKey","isHeaderOrFooter","touchEnabled"];function Yb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yb(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Khe(e){var t=Qhe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Qhe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var ag=function(e){Ct(r,e);var t=Khe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"shouldComponentUpdate",value:function(i){if(i.isScrolling&&this.props.rowIndex===i.rowIndex&&this.props.isVisible===i.isVisible)return!1;if(!i.pureRendering)return!0;var a=this.props,o=a.cell,s=Rn(a,Yhe),u=i.cell,c=Rn(i,Xhe);return!Ds(s,c)||!o||!u||o.type!==u.type||!Ds(o.props,u.props)}},{key:"render",value:function(){var i=this.props,a=i.height,o=i.width,s=i.isVisible,u=i.isHeaderOrFooter,c=i.touchEnabled,d=Rn(i,Zhe),h={height:a,width:o};this.props.isRTL?h.right=d.left:h.left=d.left;var p=Dt(Me({"fixedDataTableCellLayout/main":!0,"fixedDataTableCellLayout/lastChild":d.lastChild,"fixedDataTableCellLayout/alignRight":d.align==="right","fixedDataTableCellLayout/alignCenter":d.align==="center","public/fixedDataTableCell/alignRight":d.align==="right","public/fixedDataTableCell/highlighted":d.highlighted,"public/fixedDataTableCell/main":!0}),d.className),m={touchEnabled:c,isVisible:s,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,cellGroupType:this.props.cellGroupType,columnIndex:this.props.columnIndex,columnKey:this.props.columnKey,height:this.props.height,width:this.props.width,left:this.props.left};d.rowIndex>=0&&(m.rowIndex=d.rowIndex);var v;this.props.isHeader&&(this.props.onColumnResizeEnd||this.props.onColumnReorderEnd)?this.props.onColumnResizeEnd&&this.props.onColumnReorderEnd?(m=pu(pu({},m),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),v=k.createElement(Is,ot({},m,{onColumnReorderEnd:this.props.onColumnReorderEnd}),k.createElement(cc,{onColumnResizeEnd:this.props.onColumnResizeEnd},d.cell))):this.props.onColumnReorderEnd?v=k.createElement(Is,ot({},m,{onColumnReorderEnd:this.props.onColumnReorderEnd}),d.cell):(m=pu(pu({},m),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),v=k.createElement(cc,ot({},m,{onColumnResizeEnd:this.props.onColumnResizeEnd}),d.cell)):k.isValidElement(d.cell)?v=k.cloneElement(d.cell,m):typeof d.cell=="function"?v=d.cell(m):v=k.createElement(uc,m,d.cell);var b=u?"columnheader":"gridcell";return k.createElement("div",{className:p,style:h,role:b},v)}}]),r}(k.Component);ie(ag,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:W.bool,align:W.oneOf(["left","center","right"]),className:W.string,highlighted:W.bool,width:W.number.isRequired,minWidth:W.number,maxWidth:W.number,height:W.number.isRequired,cell:W.oneOfType([W.string,W.element,W.func]),columnKey:W.oneOfType([W.string,W.number]),rowIndex:W.number.isRequired,left:W.number,pureRendering:W.bool,touchEnabled:W.bool,isHeaderOrFooter:W.bool,isRTL:W.bool,isVisible:W.bool.isRequired,onColumnResizeEnd:W.func,onColumnReorderEnd:W.func,isHeader:W.bool,cellGroupType:W.oneOf([Ee.FIXED,Ee.FIXED_RIGHT,Ee.SCROLLABLE])});ie(ag,"defaultProps",{align:"left",highlighted:!1});var Jhe=RT(ag),efe=["offsetLeft"];function OT(e){var t=tfe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function tfe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var IT=function(e){Ct(r,e);var t=OT(r);function r(n){var i;return rt(this,r),i=t.call(this,n),ie(he(i),"_renderCell",function(a,o,s,u,c,d,h){var p=s.cellClassName,m=s.pureRendering||!1,v=s.isReorderable?i.props.onColumnReorderEndCallback:null,b=s.isResizable?i.props.onColumnResizeEndCallback:null;return k.createElement(Jhe,{columnIndex:s.index,isScrolling:i.props.isScrolling,isHeaderOrFooter:i.props.isHeaderOrFooter,isHeader:i.props.isHeader,isGroupHeader:i.props.isGroupHeader,align:s.align,className:p,height:o,key:d,maxWidth:s.maxWidth,minWidth:s.minWidth,touchEnabled:i.props.touchEnabled,onColumnResizeEnd:b,onColumnReorderEnd:v,rowIndex:a,columnKey:s.columnKey,width:s.width,left:c,cell:u,pureRendering:m,isRTL:i.props.isRTL,cellGroupType:i.props.cellGroupType,isVisible:i.props.isVisible&&h})}),i._initialRender=!0,i}return nt(r,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"render",value:function(){for(var i=this.props,a=i.columns,o=new Array(a.length),s=Nu(a),u=0,c=0,d=a.length;c<d;c++){var h=a[c].props,p=a[c].template,m=h.allowCellsRecycling,v=u-i.left<=i.width&&u-i.left+h.width>=0;if(!m||v){var b=h.columnKey||"cell_"+c;o[c]=this._renderCell(i.rowIndex,i.rowHeight,h,p,u,b,v)}u+=h.width}var _={height:i.height,position:"absolute",width:s,zIndex:i.zIndex};return Ua(_,-1*i.left,0,this._initialRender,this.props.isRTL),k.createElement("div",{className:Me("fixedDataTableCellGroupLayout/cellGroup"),style:_},o)}}]),r}(k.Component);ie(IT,"propTypes_DISABLED_FOR_PERFORMANCE",{columns:W.array.isRequired,isScrolling:W.bool,left:W.number,height:W.number.isRequired,cellGroupWrapperHeight:W.number,rowHeight:W.number.isRequired,rowIndex:W.number.isRequired,width:W.number.isRequired,zIndex:W.number.isRequired,touchEnabled:W.bool,isHeaderOrFooter:W.bool,isRTL:W.bool,onColumnResizeEndCallback:W.func,onColumnReorderEndCallback:W.func,isHeader:W.bool,isVisible:W.bool.isRequired});var cs=function(e){Ct(r,e);var t=OT(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"shouldComponentUpdate",value:function(i){return!(i.isScrolling&&this.props.rowIndex===i.rowIndex&&this.props.left===i.left&&this.props.offsetLeft===i.offsetLeft&&this.props.isVisible===i.isVisible)}},{key:"render",value:function(){var i=this.props,a=i.offsetLeft,o=Rn(i,efe),s={height:o.cellGroupWrapperHeight||o.height,width:o.width};return this.props.isRTL?s.right=a:s.left=a,k.createElement("div",{style:s,className:Me("fixedDataTableCellGroupLayout/cellGroupWrapper")},k.createElement(IT,o))}}]),r}(k.Component);ie(cs,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:W.bool,height:W.number.isRequired,offsetLeft:W.number,left:W.number,zIndex:W.number.isRequired});ie(cs,"defaultProps",{left:0,offsetLeft:0});var rfe=["offsetTop","zIndex"];function FT(e){var t=nfe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function nfe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var ife=1,$T=function(e){Ct(r,e);var t=FT(r);function r(){var n;rt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),ie(he(n),"mouseLeaveIndex",null),ie(he(n),"_getRowExpanded",function(s){if(n.props.rowExpanded){var u={rowIndex:n.props.index,height:s,width:n.props.width},c;return k.isValidElement(n.props.rowExpanded)?c=k.cloneElement(n.props.rowExpanded,u):typeof n.props.rowExpanded=="function"&&(c=n.props.rowExpanded(u)),c}}),ie(he(n),"_renderColumnsLeftShadow",function(s){var u=Me({"fixedDataTableRowLayout/fixedColumnsDivider":s>0,"fixedDataTableRowLayout/columnsShadow":n.props.scrollLeft>0,"public/fixedDataTableRow/fixedColumnsDivider":s>0,"public/fixedDataTableRow/columnsShadow":n.props.scrollLeft>0}),c=n.props.cellGroupWrapperHeight?n.props.cellGroupWrapperHeight-ife:n.props.height,d={left:s,height:c};return n.props.isRTL&&(d.right=s,d.left="auto"),k.createElement("div",{className:u,style:d})}),ie(he(n),"_renderFixedRightColumnsShadow",function(s){var u=Me("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","fixedDataTableRowLayout/fixedColumnsDivider","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow","public/fixedDataTableRow/fixedColumnsDivider"),c={height:n.props.height,left:s};return n.props.isRTL&&(c.right=s,c.left="auto"),k.createElement("div",{className:u,style:c})}),ie(he(n),"_renderColumnsRightShadow",function(s){if(Math.ceil(n.props.scrollLeft+n.props.width)<Math.floor(s)){var u=Me("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow"),c={height:n.props.height};return k.createElement("div",{className:u,style:c})}}),ie(he(n),"_onClick",function(s){n.props.onClick(s,n.props.index)}),ie(he(n),"_onContextMenu",function(s){n.props.onContextMenu(s,n.props.index)}),ie(he(n),"_onDoubleClick",function(s){n.props.onDoubleClick(s,n.props.index)}),ie(he(n),"_onMouseUp",function(s){n.props.onMouseUp(s,n.props.index)}),ie(he(n),"_onMouseDown",function(s){n.props.onMouseDown(s,n.props.index)}),ie(he(n),"_onMouseEnter",function(s){n.mouseLeaveIndex=n.props.index,n.props.onMouseEnter&&n.props.onMouseEnter(s,n.props.index)}),ie(he(n),"_onMouseLeave",function(s){n.mouseLeaveIndex===null&&(n.mouseLeaveIndex=n.props.index),n.props.onMouseLeave(s,n.mouseLeaveIndex),n.mouseLeaveIndex=null}),ie(he(n),"_onTouchStart",function(s){n.props.onTouchStart(s,n.props.index)}),ie(he(n),"_onTouchEnd",function(s){n.props.onTouchEnd(s,n.props.index)}),ie(he(n),"_onTouchMove",function(s){n.props.onTouchMove(s,n.props.index)}),n}return nt(r,[{key:"shouldComponentUpdate",value:function(i){return i.isScrolling?i.visible?this.props.visible!==i.visible?!0:!(this.props.index===i.index&&this.props.scrollLeft===i.scrollLeft):!1:!0}},{key:"render",value:function(){var i=this.props.subRowHeight||0,a={width:this.props.width,height:this.props.height+i},o=Me({"fixedDataTableRowLayout/main":!0,"public/fixedDataTableRow/main":!0,"public/fixedDataTableRow/highlighted":this.props.index%2===1,"public/fixedDataTableRow/odd":this.props.index%2===1,"public/fixedDataTableRow/even":this.props.index%2===0}),s=Nu(this.props.fixedColumns),u=k.createElement(cs,{key:"fixed_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,left:0,width:s,zIndex:2,columns:this.props.fixedColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:Ee.FIXED,isVisible:this.props.visible}),c=this._renderColumnsLeftShadow(s),d=Nu(this.props.fixedRightColumns),h=this.props.showScrollbarY?this.props.scrollbarYWidth:0,p=k.createElement(cs,{key:"fixed_right_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,offsetLeft:this.props.width-d-h,width:d,zIndex:2,columns:this.props.fixedRightColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:Ee.FIXED_RIGHT,isVisible:this.props.visible}),m=d?this._renderFixedRightColumnsShadow(this.props.width-d-h-5):null,v=k.createElement(cs,{key:"scrollable_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,align:"right",left:this.props.scrollLeft,offsetLeft:s,width:this.props.width-s-d-h,zIndex:0,columns:this.props.scrollableColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:Ee.SCROLLABLE,isVisible:this.props.visible}),b=Nu(this.props.scrollableColumns),_=this._renderColumnsRightShadow(s+b),w=this._getRowExpanded(i),C={height:i,top:this.props.height,width:this.props.width},S=null;if(this.props.showScrollbarY){var T={width:h,height:this.props.height,left:this.props.isRTL?2:this.props.width-h-2};S=k.createElement("div",{style:T,className:Me("public/fixedDataTable/scrollbarSpacer")})}return k.createElement("div",ot({className:Dt(o,this.props.className),role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.attributes,{onClick:this.props.onClick?this._onClick:null,onContextMenu:this.props.onContextMenu?this._onContextMenu:null,onDoubleClick:this.props.onDoubleClick?this._onDoubleClick:null,onMouseDown:this.props.onMouseDown?this._onMouseDown:null,onMouseUp:this.props.onMouseUp?this._onMouseUp:null,onMouseEnter:this.props.onMouseEnter||this.props.onMouseLeave?this._onMouseEnter:null,onMouseLeave:this.props.onMouseLeave?this._onMouseLeave:null,onTouchStart:this.props.onTouchStart?this._onTouchStart:null,onTouchEnd:this.props.onTouchEnd?this._onTouchEnd:null,onTouchMove:this.props.onTouchMove?this._onTouchMove:null,style:a}),k.createElement("div",{className:Me("fixedDataTableRowLayout/body")},u,v,c,p,m,S),w&&k.createElement("div",{className:Me("fixedDataTableRowLayout/rowExpanded"),style:C},w),_)}}]),r}(k.Component);ie($T,"propTypes",{isScrolling:W.bool,fixedColumns:W.array.isRequired,fixedRightColumns:W.array.isRequired,height:W.number.isRequired,cellGroupWrapperHeight:W.number,subRowHeight:W.number,rowExpanded:W.oneOfType([W.element,W.func]),index:W.number.isRequired,scrollableColumns:W.array.isRequired,scrollLeft:W.number.isRequired,width:W.number.isRequired,onClick:W.func,onContextMenu:W.func,onDoubleClick:W.func,onColumnReorderEndCallback:W.func,touchEnabled:W.bool,isHeaderOrFooter:W.bool,ariaRowIndex:W.number,isRTL:W.bool,attributes:W.object,onColumnResizeEndCallback:W.func,isHeader:W.bool,isGroupHeader:W.bool,scrollToX:W.func});var ds=function(e){Ct(r,e);var t=FT(r);function r(n){var i;return rt(this,r),i=t.call(this,n),i._initialRender=!0,i}return nt(r,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(i){return!i.isScrolling||this.props.visible!==i.visible?!0:i.visible?!(i.isScrolling&&this.props.index===i.index&&this.props.offsetTop===i.offsetTop&&this.props.scrollLeft===i.scrollLeft):!1}},{key:"render",value:function(){var i=this.props,a=i.offsetTop,o=i.zIndex,s=Rn(i,rfe),u={width:this.props.width,height:this.props.height,zIndex:o||0,visibility:s.visible?"visible":"hidden"};return Ua(u,0,a,this._initialRender,this.props.isRTL),k.createElement("div",{style:u,className:Me("fixedDataTableRowLayout/rowWrapper")},k.createElement($T,s))}}]),r}(k.Component);ie(ds,"propTypes",{isScrolling:W.bool,height:W.number.isRequired,zIndex:W.number,offsetTop:W.number.isRequired,visible:W.bool.isRequired,width:W.number.isRequired});function afe(e){var t=ofe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function ofe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var BT=function(e){Ct(r,e);var t=afe(r);function r(n){var i;return rt(this,r),i=t.call(this,n),i._staticRowArray=[],i._initialRender=!0,i}return nt(r,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillUnmount",value:function(){this._staticRowArray.length=0}},{key:"render",value:function(){var i=this.props,a=i.offsetTop,o=i.rowOffsets,s=i.scrollTop,u=i.isScrolling,c=i.rowsToRender;c=c||[],u?this._staticRowArray.length=Math.max(this._staticRowArray.length,c.length):this._staticRowArray.length=c.length;for(var d=1e6,h=a-s%d,p=0;p<this._staticRowArray.length;p++){var m,v=Zde(c[p],(m=this._staticRowArray[p])===null||m===void 0?void 0:m.props.index);if(us(v)||!Ei(v,0,this.props.rowSettings.rowsCount)){this._staticRowArray[p]=null;continue}var b=o[v]-Math.floor(s/d)*d;this._staticRowArray[p]=this.renderRow({rowIndex:v,key:p,rowOffsetTop:b})}var _={position:"relative"};Ua(_,0,h,!1);var w=this._staticRowArray.slice().sort(this.rowSortComparator);return k.createElement("div",{style:_},w)}},{key:"renderRow",value:function(i){var a=i.rowIndex,o=i.key,s=i.rowOffsetTop,u=this.props,c=u.rowClassNameGetter||Nt,d={};d.height=this.props.rowSettings.rowHeightGetter(a),d.subRowHeight=this.props.rowSettings.subRowHeightGetter(a),d.offsetTop=s,d.key=u.rowKeyGetter?u.rowKeyGetter(a):o,d.attributes=u.rowSettings.rowAttributesGetter&&u.rowSettings.rowAttributesGetter(a);var h=a===u.rowSettings.rowsCount-1&&u.showLastRowBorder;d.className=Dt(c(a),Me("public/fixedDataTable/bodyRow"),Me({"fixedDataTableLayout/hasBottomBorder":h,"public/fixedDataTable/hasBottomBorder":h}));var p=Ei(a,this.props.firstViewportRowIndex,this.props.endViewportRowIndex);return k.createElement(ds,ot({key:o,index:a,ariaRowIndex:a+u.ariaRowIndexOffset,isScrolling:u.isScrolling,width:u.width,rowExpanded:u.rowExpanded,scrollLeft:Math.round(u.scrollLeft),fixedColumns:u.fixedColumns,fixedRightColumns:u.fixedRightColumns,scrollableColumns:u.scrollableColumns,onClick:u.onRowClick,onContextMenu:u.onRowContextMenu,onDoubleClick:u.onRowDoubleClick,onMouseDown:u.onRowMouseDown,onMouseUp:u.onRowMouseUp,onMouseEnter:u.onRowMouseEnter,onMouseLeave:u.onRowMouseLeave,onTouchStart:u.onRowTouchStart,onTouchEnd:u.onRowTouchEnd,onTouchMove:u.onRowTouchMove,showScrollbarY:u.showScrollbarY,scrollbarYWidth:u.scrollbarYWidth,isRTL:u.isRTL,visible:p},d))}},{key:"rowSortComparator",value:function(i,a){var o,s;return((o=i==null?void 0:i.props.ariaRowIndex)!==null&&o!==void 0?o:-1)-((s=a==null?void 0:a.props.ariaRowIndex)!==null&&s!==void 0?s:-1)}}]),r}(k.Component);ie(BT,"propTypes",{ariaRowIndexOffset:W.number,isScrolling:W.bool,firstViewportRowIndex:W.number.isRequired,endViewportRowIndex:W.number.isRequired,fixedColumns:W.array.isRequired,fixedRightColumns:W.array.isRequired,height:W.number.isRequired,offsetTop:W.number.isRequired,onRowClick:W.func,onRowContextMenu:W.func,onRowDoubleClick:W.func,onRowMouseDown:W.func,onRowMouseUp:W.func,onRowMouseEnter:W.func,onRowMouseLeave:W.func,onRowTouchStart:W.func,onRowTouchEnd:W.func,onRowTouchMove:W.func,rowClassNameGetter:W.func,rowExpanded:W.oneOfType([W.element,W.func]),rowOffsets:W.object.isRequired,rowKeyGetter:W.func,rowSettings:W.shape({rowAttributesGetter:W.func,rowHeightGetter:W.func,rowsCount:W.number.isRequired,subRowHeightGetter:W.func}),rowsToRender:W.array.isRequired,scrollLeft:W.number.isRequired,scrollTop:W.number.isRequired,scrollableColumns:W.array.isRequired,showLastRowBorder:W.bool,showScrollbarY:W.bool,width:W.number.isRequired,isRTL:W.bool});var Xb=1.6,sfe=1.6,lfe=325,Uo=100,ufe=function(){function e(t,r,n,i,a){rt(this,e),this._dragAnimationId=null,this._trackerId=null,this._deltaX=0,this._deltaY=0,this._lastTouchX=0,this._lastTouchY=0,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),this._autoScrollTimestamp=Date.now(),typeof r!="function"&&(r=r?Nt.thatReturnsTrue:Nt.thatReturnsFalse),typeof n!="function"&&(n=n?Nt.thatReturnsTrue:Nt.thatReturnsFalse),this._handleScrollX=r,this._handleScrollY=n,this._preventDefault=i,this._stopPropagation=a,this._onTouchScrollCallback=t,this._didTouchMove=this._didTouchMove.bind(this),this._track=this._track.bind(this),this._autoScroll=this._autoScroll.bind(this),this._startAutoScroll=this._startAutoScroll.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this)}return nt(e,[{key:"onTouchStart",value:function(r){this._lastTouchX=r.touches[0].pageX,this._lastTouchY=r.touches[0].pageY,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),clearInterval(this._trackerId),this._trackerId=setInterval(this._track,Uo),this._stopPropagation&&r.stopPropagation()}},{key:"onTouchEnd",value:function(r){clearInterval(this._trackerId),this._trackerId=null,ti(this._startAutoScroll),this._stopPropagation&&r.stopPropagation()}},{key:"onTouchCancel",value:function(r){clearInterval(this._trackerId),this._trackerId=null,this._stopPropagation&&r.stopPropagation()}},{key:"onTouchMove",value:function(r){this._preventDefault&&r.preventDefault();var n=r.touches[0].pageX,i=r.touches[0].pageY;this._deltaX=Xb*(this._lastTouchX-n),this._deltaY=Xb*(this._lastTouchY-i);var a=this._handleScrollX(this._deltaX,this._deltaY),o=this._handleScrollY(this._deltaY,this._deltaX);if(!(!a&&!o)){a?this._lastTouchX=n:this._deltaX=0,o?this._lastTouchY=i:this._deltaY=0,r.defaultPrevented||r.preventDefault();var s=!1;(Math.abs(this._deltaX)>2||Math.abs(this._deltaY)>2)&&(this._stopPropagation&&r.stopPropagation(),s=!0),s===!0&&this._dragAnimationId===null&&(this._dragAnimationId=ti(this._didTouchMove))}}},{key:"_didTouchMove",value:function(){this._dragAnimationId=null,this._onTouchScrollCallback(this._deltaX,this._deltaY),this._accumulatedDeltaX+=this._deltaX,this._accumulatedDeltaY+=this._deltaY,this._deltaX=0,this._deltaY=0}},{key:"_track",value:function(){var r=Date.now(),n=r-this._lastFrameTimestamp,i=this._velocityX,a=this._velocityY,o=.8;n<Uo&&(o*=n/Uo),i===0&&a===0&&(o=1),this._velocityX=o*(Uo*this._accumulatedDeltaX/(1+n)),o<1&&(this._velocityX+=(1-o)*i),this._velocityY=o*(Uo*this._accumulatedDeltaY/(1+n)),o<1&&(this._velocityY+=(1-o)*a),this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=r}},{key:"_startAutoScroll",value:function(){this._autoScrollTimestamp=Date.now(),(this._deltaX>0||this.deltaY>0)&&this._didTouchMove(),this._track(),this._autoScroll()}},{key:"_autoScroll",value:function(){var r=Date.now()-this._autoScrollTimestamp,n=sfe*Math.exp(-r/lfe),i=n*this._velocityX,a=n*this._velocityY;(Math.abs(i)<=5||!this._handleScrollX(i,a))&&(i=0),(Math.abs(a)<=5||!this._handleScrollY(a,i))&&(a=0),(i!==0||a!==0)&&(this._onTouchScrollCallback(i,a),ti(this._autoScroll))}}]),e}();function cfe(e){var t=dfe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function dfe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var mu=25,og=function(e){Ct(r,e);var t=cfe(r);function r(n){var i;return rt(this,r),i=t.call(this,n),ie(he(i),"_shouldHandleTouchX",function(a){return i.props.touchScrollEnabled&&i._shouldHandleWheelX(a)}),ie(he(i),"_shouldHandleTouchY",function(a){return i.props.touchScrollEnabled&&i._shouldHandleWheelY(a)}),ie(he(i),"_shouldHandleWheelX",function(a){var o=i.props,s=o.maxScrollX,u=o.scrollFlags,c=o.scrollX,d=u.overflowX;return d==="hidden"||(a=Math.round(a),a===0)?!1:a<0&&c>0||a>=0&&c<s}),ie(he(i),"_shouldHandleWheelY",function(a){var o=i.props,s=o.maxScrollY,u=o.scrollFlags,c=o.scrollY,d=u.overflowY;return d==="hidden"||a===0||(a=Math.round(a),a===0)?!1:a<0&&c>0||a>=0&&c<s}),ie(he(i),"_reportContentHeight",function(){var a=Ea(i.props),o=a.contentHeight,s=i.props.onContentHeightChange;o!==i._contentHeight&&s&&s(o),i._contentHeight=o}),ie(he(i),"_renderRows",function(a,o,s,u,c,d){var h=Ii(i.props),p=h.scrollEnabledY,m=i.props;return k.createElement(BT,{ariaRowIndexOffset:d,isScrolling:m.scrolling,fixedColumns:o,fixedRightColumns:s,firstViewportRowIndex:m.firstRowIndex,endViewportRowIndex:m.endRowIndex,height:c,offsetTop:a,onRowClick:m.onRowClick,onRowContextMenu:m.onRowContextMenu,onRowDoubleClick:m.onRowDoubleClick,onRowMouseUp:m.onRowMouseUp,onRowMouseDown:m.onRowMouseDown,onRowMouseEnter:m.onRowMouseEnter,onRowMouseLeave:m.onRowMouseLeave,onRowTouchStart:m.touchScrollEnabled?m.onRowTouchStart:null,onRowTouchEnd:m.touchScrollEnabled?m.onRowTouchEnd:null,onRowTouchMove:m.touchScrollEnabled?m.onRowTouchMove:null,rowClassNameGetter:m.rowClassNameGetter,rowExpanded:m.rowExpanded,rowKeyGetter:m.rowKeyGetter,rowSettings:m.rowSettings,scrollLeft:m.scrollX,scrollTop:m.scrollY,scrollableColumns:u,showLastRowBorder:!0,width:m.tableSize.width,rowsToRender:m.rows,rowOffsets:m.rowOffsets,showScrollbarY:p,scrollbarYWidth:m.scrollbarYWidth,isRTL:m.isRTL})}),ie(he(i),"_onRef",function(a){i._divRef=a,i._wheelHandler&&(i.props.stopReactWheelPropagation?i._wheelHandler.setRoot(a):i._wheelHandler.setRoot(null))}),ie(he(i),"_onScroll",function(a,o){var s=i.props,u=s.maxScrollX,c=s.maxScrollY,d=s.onHorizontalScroll,h=s.onVerticalScroll,p=s.scrollActions,m=s.scrollFlags,v=s.scrollX,b=s.scrollY,_=m.overflowX,w=m.overflowY,C=v,S=b;if(Math.abs(o)>Math.abs(a)&&w!=="hidden")S+=o,S=S<0?0:S,S=S>c?c:S,(!h||h(S))&&p.scrollToY(S);else if(a&&_!=="hidden"){C+=a,C=C<0?0:C,C=C>u?u:C;var T=Math.round(C);(!d||d(T))&&p.scrollToX(T)}}),ie(he(i),"_scrollTo",function(a,o){i.props.scrollActions.scrollToX(a),i.props.scrollActions.scrollToY(o)}),ie(he(i),"_didScroll",function(a){var o=i.props,s=o.onScrollStart,u=o.scrollX,c=o.scrollY,d=o.onHorizontalScroll,h=o.onVerticalScroll,p=o.tableSize.ownerHeight,m=o.scrolling,v=a.endRowIndex,b=a.firstRowIndex,_=a.scrollX,w=a.scrollY,C=a.tableSize.ownerHeight,S=a.scrolling,T=p!==C&&!(Bb(p)&&Bb(C)),M=u!==_,E=c!==w;!T&&!M&&!E||(!S&&m&&s&&s(_,w,b,v),M&&d&&d(u),E&&h&&h(c),i._didScrollStop())}),ie(he(i),"_didScrollStopSync",function(){var a=i.props,o=a.endRowIndex,s=a.firstRowIndex,u=a.onScrollEnd,c=a.scrollActions,d=a.scrollX,h=a.scrollY,p=a.scrolling;p&&(c.stopScroll(),u&&u(d,h,s,o))}),i._didScrollStop=_de(i._didScrollStopSync,200,he(i)),i._onKeyDown=i._onKeyDown.bind(he(i)),i._setupHandlers(),i}return nt(r,[{key:"componentWillUnmount",value:function(){this._cleanupHandlers(),this._didScrollStop.reset(),this._didScrollStopSync()}},{key:"_setupHandlers",value:function(){this._wheelHandler||(this._wheelHandler=new uT(this._onScroll,this._shouldHandleWheelX,this._shouldHandleWheelY,this.props.isRTL,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._touchHandler||(this._touchHandler=new ufe(this._onScroll,this._shouldHandleTouchX,this._shouldHandleTouchY,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._divRef&&this._divRef.addEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this.props.touchScrollEnabled&&this._divRef&&this._divRef.addEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1})}},{key:"_cleanupHandlers",value:function(){this._wheelHandler&&(this._divRef&&this._divRef.removeEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this._wheelHandler=null),this._touchHandler&&(this._divRef&&this._divRef.removeEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1}),this._touchHandler=null)}},{key:"_onKeyDown",value:function(i){var a=Ea(this.props),o=a.scrollbarYHeight;if(this.props.keyboardPageEnabled)switch(i.key){case"PageDown":this._onScroll(0,o),i.preventDefault();break;case"PageUp":this._onScroll(0,o*-1),i.preventDefault();break}if(this.props.keyboardScrollEnabled)switch(i.key){case"ArrowDown":this._onScroll(0,mu),i.preventDefault();break;case"ArrowUp":this._onScroll(0,mu*-1),i.preventDefault();break;case"ArrowRight":this._onScroll(mu,0),i.preventDefault();break;case"ArrowLeft":this._onScroll(mu*-1,0),i.preventDefault();break}}},{key:"shouldComponentUpdate",value:function(i){return!Ds(this.props,i)}},{key:"componentDidMount",value:function(){this._setupHandlers(),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"componentDidUpdate",value:function(i){this._didScroll(i),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"_reportScrollBarsUpdates",value:function(){var i=Ea(this.props),a=i.bodyOffsetTop,o=i.scrollbarXOffsetTop,s=i.visibleRowsHeight,u=this.props,c=u.tableSize.width,d=u.scrollContentHeight,h=u.scrollY,p=u.scrollX,m={viewportHeight:s,contentHeight:d,scrollbarYOffsetTop:a,scrollY:h,viewportWidth:c,contentWidth:c+this.props.maxScrollX,scrollbarXOffsetTop:o,scrollX:p,scrollTo:this._scrollTo,scrollToX:this.props.scrollActions.scrollToX,scrollToY:this.props.scrollActions.scrollToY};Ds(this.previousScrollState,m)||(this.props.onScrollBarsUpdate(m),this.previousScrollState=m)}},{key:"render",value:function(){var i=Cde(this.props),a=i.ariaGroupHeaderIndex,o=i.ariaHeaderIndex,s=i.ariaFooterIndex,u=i.ariaRowCount,c=i.ariaRowIndexOffset,d=Yde(this.props),h=d.fixedColumnGroups,p=d.fixedColumns,m=d.fixedRightColumnGroups,v=d.fixedRightColumns,b=d.scrollableColumnGroups,_=d.scrollableColumns,w=Ea(this.props),C=w.bodyHeight,S=w.bodyOffsetTop,T=w.componentHeight,M=w.footOffsetTop,E=w.scrollbarXOffsetTop,D=w.visibleRowsHeight,N=this.props,F=N.className,B=N.elementHeights,G=N.gridAttributesGetter,Y=N.maxScrollY,$=N.onColumnReorderEndCallback,X=N.onColumnResizeEndCallback,V=N.scrollContentHeight,Z=N.scrollX,j=N.scrollY,q=N.scrolling,te=N.tableSize,Q=N.touchScrollEnabled,J=N.scrollbarYWidth,ne=te.ownerHeight,ae=te.width,oe=B.cellGroupWrapperHeight,se=B.footerHeight,ce=B.groupHeaderHeight,me=B.headerHeight,pe=Ii(this.props),we=pe.scrollEnabledX,Le=pe.scrollEnabledY,Ce=G&&G(),le;ce>0&&(le=k.createElement(ds,{key:"group_header",ariaRowIndex:a,isHeaderOrFooter:!0,isScrolling:q,className:Dt(Me("fixedDataTableLayout/header"),Me("public/fixedDataTable/header")),width:ae,height:ce,cellGroupWrapperHeight:oe,index:0,zIndex:1,offsetTop:0,scrollLeft:Z,fixedColumns:h,fixedRightColumns:m,scrollableColumns:b,visible:!0,touchEnabled:Q,onColumnResizeEndCallback:X,onColumnReorderEndCallback:$,showScrollbarY:Le,scrollbarYWidth:J,isRTL:this.props.isRTL,isHeader:!0,isGroupHeader:!0}));var Ve;Le&&(Ve=this.props.scrollbarY);var Te;we&&(Te=this.props.scrollbarX);var Ne=null;se&&(Ne=k.createElement(ds,{key:"footer",ariaRowIndex:s,isHeaderOrFooter:!0,isScrolling:q,className:Dt(Me("fixedDataTableLayout/footer"),Me("public/fixedDataTable/footer")),width:ae,height:se,index:-1,zIndex:1,offsetTop:M,visible:!0,fixedColumns:p.footer,fixedRightColumns:v.footer,scrollableColumns:_.footer,scrollLeft:Z,showScrollbarY:Le,scrollbarYWidth:J,isRTL:this.props.isRTL}));var Be=this._renderRows(S,p.cell,v.cell,_.cell,C,c),Xe=k.createElement(ds,{key:"header",ariaRowIndex:o,isHeaderOrFooter:!0,isScrolling:q,className:Dt(Me("fixedDataTableLayout/header"),Me("public/fixedDataTable/header")),width:ae,height:me,cellGroupWrapperHeight:oe,index:-1,zIndex:1,offsetTop:ce,scrollLeft:Z,visible:!0,fixedColumns:p.header,fixedRightColumns:v.header,scrollableColumns:_.header,touchEnabled:Q,onColumnResizeEndCallback:X,onColumnReorderEndCallback:$,showScrollbarY:Le,scrollbarYWidth:J,isRTL:this.props.isRTL,isHeader:!0}),Je;j&&(Je=k.createElement("div",{className:Dt(Me("fixedDataTableLayout/topShadow"),Me("public/fixedDataTable/topShadow")),style:{top:S}}));var pr=ne&&ne<T&&V>D,Pt;(pr||j<Y)&&(Pt=k.createElement("div",{className:Dt(Me("fixedDataTableLayout/bottomShadow"),Me("public/fixedDataTable/bottomShadow")),style:{top:M}}));var Ht=null;(this.props.keyboardPageEnabled||this.props.keyboardScrollEnabled)&&(Ht=0);var or=F;return this.props.isRTL&&(or=Dt(or,"fixedDataTable_isRTL")),k.createElement("div",ot({className:Dt(or,Me("fixedDataTableLayout/main"),Me("public/fixedDataTable/main")),role:"grid","aria-rowcount":u},Ce,{tabIndex:Ht,onKeyDown:this._onKeyDown,onTouchStart:Q?this._touchHandler.onTouchStart:null,onTouchEnd:Q?this._touchHandler.onTouchEnd:null,onTouchCancel:Q?this._touchHandler.onTouchCancel:null,ref:this._onRef,style:{height:T,width:ae}}),k.createElement("div",{className:Me("fixedDataTableLayout/rowsContainer"),style:{height:E,width:ae}},le,Xe,Be,Ne,Je,Pt),Ve,Te)}}]),r}(k.Component);ie(og,"propTypes",{width:W.number.isRequired,height:W.number,className:W.string,maxHeight:W.number,ownerHeight:W.number,overflowX:W.oneOf(["hidden","auto"]),overflowY:W.oneOf(["hidden","auto"]),touchScrollEnabled:W.bool,keyboardScrollEnabled:W.bool,keyboardPageEnabled:W.bool,scrollbarX:W.node,scrollbarXHeight:W.number,scrollbarY:W.node,scrollbarYWidth:W.number,onScrollBarsUpdate:W.func,defaultScrollbars:W.bool,showScrollbarX:W.bool,showScrollbarY:W.bool,onHorizontalScroll:W.func,onVerticalScroll:W.func,rowsCount:W.number.isRequired,rowHeight:W.number.isRequired,rowHeightGetter:W.func,subRowHeight:W.number,subRowHeightGetter:W.func,rowExpanded:W.oneOfType([W.element,W.func]),rowClassNameGetter:W.func,rowKeyGetter:W.func,groupHeaderHeight:W.number,headerHeight:W.number.isRequired,cellGroupWrapperHeight:W.number,footerHeight:W.number,scrollLeft:W.number,scrollToColumn:W.number,scrollTop:W.number,isVerticalScrollExact:W.bool,scrollToRow:W.number,onScrollStart:W.func,onScrollEnd:W.func,stopReactWheelPropagation:W.bool,stopScrollDefaultHandling:W.bool,stopScrollPropagation:W.bool,onContentHeightChange:W.func,onRowClick:W.func,onRowContextMenu:W.func,onRowDoubleClick:W.func,onRowMouseDown:W.func,onRowMouseUp:W.func,onRowMouseEnter:W.func,onRowMouseLeave:W.func,onRowTouchStart:W.func,onRowTouchEnd:W.func,onRowTouchMove:W.func,onColumnResizeEndCallback:W.func,onColumnReorderEndCallback:W.func,isRTL:W.bool,bufferRowCount:W.number,elementHeights:W.shape({cellGroupWrapperHeight:W.number,footerHeight:W.number,groupHeaderHeight:W.number,headerHeight:W.number}),gridAttributesGetter:W.func,rowAttributesGetter:W.func});ie(og,"defaultProps",{elementHeights:{cellGroupWrapperHeight:void 0,footerHeight:0,groupHeaderHeight:0,headerHeight:0},keyboardScrollEnabled:!1,keyboardPageEnabled:!1,touchScrollEnabled:!1,stopScrollPropagation:!1});var hfe={get:function(){return Qce({reducer:ade,devTools:process.env.NODE_ENV!=="production",middleware:function(r){return r({immutableCheck:!1,serializableCheck:!1})}})}},ffe=F0,pfe=cl,mfe=ad,gfe=Fr,vfe=ul,yfe=As.exports,bfe=ld,_fe=Fx,wfe="[object Map]",Cfe="[object Set]",xfe=Object.prototype,Tfe=xfe.hasOwnProperty;function Sfe(e){if(e==null)return!0;if(vfe(e)&&(gfe(e)||typeof e=="string"||typeof e.splice=="function"||yfe(e)||_fe(e)||mfe(e)))return!e.length;var t=pfe(e);if(t==wfe||t==Cfe)return!e.size;if(bfe(e))return!ffe(e).length;for(var r in e)if(Tfe.call(e,r))return!1;return!0}var Zb=Sfe;function zT(e){var t=Mfe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Mfe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Efe=function(e){Ct(r,e);var t=zT(r);function r(){var n;rt(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a)),ie(he(n),"state",{}),ie(he(n),"_onScrollBarsUpdate",function(s){n.setState(s)}),ie(he(n),"_onVerticalScroll",function(s){n.state.scrollToY!==void 0&&n.state.scrollToY(s)}),ie(he(n),"_onHorizontalScroll",function(s){n.state.scrollToX!==void 0&&n.state.scrollToX(s)}),n}return nt(r,[{key:"render",value:function(){var i=!Zb(this.state)&&k.createElement(yr,{size:this.state.viewportHeight,contentSize:this.state.contentHeight,onScroll:this._onVerticalScroll,verticalTop:this.state.scrollbarYOffsetTop,position:this.state.scrollY,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL}),a=!Zb(this.state)&&k.createElement(HT,{contentSize:this.state.contentWidth,offset:this.state.scrollbarXOffsetTop,onScroll:this._onHorizontalScroll,position:this.state.scrollX,size:this.state.viewportWidth,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL});return k.cloneElement(this.props.children,{onScrollBarsUpdate:this._onScrollBarsUpdate,scrollbarX:a,scrollbarY:i})}}]),r}(k.Component),HT=function(e){Ct(r,e);var t=zT(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){var i=this.props,a=i.offset,o=i.size,s={height:yr.SIZE,width:o},u={height:yr.SIZE,overflow:"hidden",width:o,top:a};return k.createElement("div",{className:Dt(Me("public/fixedDataTable/horizontalScrollbar")),style:s},k.createElement("div",{style:u},k.createElement(yr,ot({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}}]),r}(k.PureComponent);ie(HT,"propTypes",{contentSize:W.number.isRequired,offset:W.number.isRequired,onScroll:W.func.isRequired,position:W.number.isRequired,size:W.number.isRequired,isRTL:W.bool});var Pfe=function(){return In([function(t){return Ea(t).componentHeight},function(t){return t.elementHeights.groupHeaderHeight},function(t){return t.scrollX},function(t){return t.maxScrollX},function(t){return dl(t).availableScrollWidth},function(t){return t.isRTL}],function(t,r,n,i,a,o){return{tableHeight:t,groupHeaderHeight:r,scrollX:n,maxScrollX:i,availableScrollWidth:a,isRTL:o}})},Afe=Vi,Rfe=Fr,Dfe=ui,Nfe="[object String]";function kfe(e){return typeof e=="string"||!Rfe(e)&&Dfe(e)&&Afe(e)==Nfe}var Lfe=kfe;function Ofe(e){return function(t){return t==null?void 0:t[e]}}var Ife=Ofe,Ffe=Ife,$fe=Ffe("length"),Bfe=$fe,zfe="\\ud800-\\udfff",Hfe="\\u0300-\\u036f",Wfe="\\ufe20-\\ufe2f",jfe="\\u20d0-\\u20ff",Ufe=Hfe+Wfe+jfe,Vfe="\\ufe0e\\ufe0f",Gfe="\\u200d",qfe=RegExp("["+Gfe+zfe+Ufe+Vfe+"]");function Yfe(e){return qfe.test(e)}var Xfe=Yfe,WT="\\ud800-\\udfff",Zfe="\\u0300-\\u036f",Kfe="\\ufe20-\\ufe2f",Qfe="\\u20d0-\\u20ff",Jfe=Zfe+Kfe+Qfe,epe="\\ufe0e\\ufe0f",tpe="["+WT+"]",om="["+Jfe+"]",sm="\\ud83c[\\udffb-\\udfff]",rpe="(?:"+om+"|"+sm+")",jT="[^"+WT+"]",UT="(?:\\ud83c[\\udde6-\\uddff]){2}",VT="[\\ud800-\\udbff][\\udc00-\\udfff]",npe="\\u200d",GT=rpe+"?",qT="["+epe+"]?",ipe="(?:"+npe+"(?:"+[jT,UT,VT].join("|")+")"+qT+GT+")*",ape=qT+GT+ipe,ope="(?:"+[jT+om+"?",om,UT,VT,tpe].join("|")+")",Kb=RegExp(sm+"(?="+sm+")|"+ope+ape,"g");function spe(e){for(var t=Kb.lastIndex=0;Kb.test(e);)++t;return t}var lpe=spe,upe=Bfe,cpe=Xfe,dpe=lpe;function hpe(e){return cpe(e)?dpe(e):upe(e)}var fpe=hpe,ppe=F0,mpe=cl,gpe=ul,vpe=Lfe,ype=fpe,bpe="[object Map]",_pe="[object Set]";function wpe(e){if(e==null)return 0;if(gpe(e))return vpe(e)?ype(e):e.length;var t=mpe(e);return t==bpe||t==_pe?e.size:ppe(e).length}var ef=wpe,Cpe=function(t){return{offset:t.offset,width:t.width,index:t.index,columnKey:t.columnKey}},gu=function(t){return{offset:t.offset,width:t.width,index:t.index,columnKey:t.columnKey}},xpe=function(){return In([function(t){return dl(t)},function(t,r){return r}],function(t,r){var n=t.fixedColumns,i=t.fixedRightColumns,a=t.scrollableColumns,o=t.fixedColumnGroups,s=t.fixedRightColumnGroups,u=t.scrollableColumnGroups,c=function(j){var q=n.length+a.length+i.length;if(j<0||j>=q||!Number.isInteger(j))throw"columnIndex must be an integer between 0 and ".concat(q-1," inclusive")},d=function(j){var q=o.length+u.length+s.length;if(j<0||j>=q||!Number.isInteger(j))throw"columnGroupIndex must be an integer between 0 and ".concat(q-1," inclusive")},h=function(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(q&&us(j))&&j!==Ee.FIXED&&j!==Ee.FIXED_RIGHT&&j!==Ee.SCROLLABLE)throw"Invalid CellGroupType"},p=function(j){return j<n.length?Ee.FIXED:j<n.length+a.length?Ee.SCROLLABLE:Ee.FIXED_RIGHT},m=function(j){return j<o.length?Ee.FIXED:j<o.length+u.length?Ee.SCROLLABLE:Ee.FIXED_RIGHT},v=function(j,q){if(q===Ee.FIXED)return j;if(q===Ee.SCROLLABLE)return j-n.length;if(q===Ee.FIXED_RIGHT)return j-n.length-a.length},b=function(j,q){if(q===Ee.FIXED)return j;if(q===Ee.SCROLLABLE)return j-o.length;if(q===Ee.FIXED_RIGHT)return j-o.length-u.length},_=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ee.SCROLLABLE;h(j);var q=N(j);return q.reduce(function(te,Q){return te+Q.width},0)},w=function(j,q){var te=N(q),Q=v(j,q);return te[Q]},C=function(j){c(j);var q=p(j),te=w(j,q);return Cpe(te)},S=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(h(j,!0),us(j))return n.length+a.length+i.length;var q=N(j);return q.length},T=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(h(j,!0),us(j))return o.length+u.length+s.length;var q=F(j);return q.length},M=function(j,q){var te=F(q),Q=b(j,q);return gu(te[Q])},E=function(j){d(j);var q=m(j);return M(j,q)},D=function(j){c(j);var q=p(j),te=w(j,q).groupIdx,Q=B(te);return gu(Q)},N=function(j){if(j===Ee.FIXED)return n;if(j===Ee.FIXED_RIGHT)return i;if(j===Ee.SCROLLABLE)return a;throw"Invalid cell group type"},F=function(j){if(j===Ee.FIXED)return o;if(j===Ee.FIXED_RIGHT)return s;if(j===Ee.SCROLLABLE)return u;throw"Invalid cell group type"},B=function(j){var q=ef(o),te=ef(u),Q=ef(s);if(Ei(j,0,q))return o[j];if(Ei(j,q,q+te))return u[j-q];if(Ei(j,q+te,q+te+Q))return s[j-q-te];throw"Invalid absolute column group index"},G=function(j,q){if(j.length===0)return{element:null,distanceFromOffset:null};for(var te=0,Q=0;Q!==j.length&&!(te>q);)te+=j[Q].width,Q++;return Q=hd(Q-1,0,j.length-1),{element:j[Q],distanceFromOffset:j[Q].width-(te-q)}},Y=function(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee.SCROLLABLE;h(q);var te=N(q),Q=G(te,j),J=Q.element,ne=Q.distanceFromOffset;return J&&(J=gu(J)),{column:J,distanceFromOffset:ne}},$=function(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee.SCROLLABLE;h(q);var te=F(q),Q=G(te,j),J=Q.element,ne=Q.distanceFromOffset;return J&&(J=gu(J)),{columnGroup:J,distanceFromOffset:ne}},X=r.scrollToX,V=r.updateRowHeights;return{getColumn:C,getColumnGroup:E,getColumnGroupByChild:D,getColumnAtOffset:Y,getColumnGroupAtOffset:$,getCellGroupWidth:_,getColumnCount:S,getColumnGroupCount:T,scrollToX:X,updateRowHeights:V}})};function Qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qb(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tpe=function(){var t=[],r=null,n=function(s){return t=t.concat(s),function(){var u=t.indexOf(s);t.splice(u,1)}},i=Pfe(),a=xpe();return{getValue:In([function(o){return i(o)},function(o,s){return a(o,s)}],function(o,s){return r=tf(tf(tf({},o),s),{},{subscribe:n}),r}),notify:function(){t.forEach(function(s){return s(r)})}}};function Jb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(r),!0).forEach(function(n){ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Spe(e){var t=Mpe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Mpe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var YT=function(e){Ct(r,e);var t=Spe(r);function r(n){var i;return rt(this,r),i=t.call(this,n),i._initialize(n),i.fixedDataTableApi=Tpe(),i.previousApiValue=null,i}return nt(r,[{key:"componentDidMount",value:function(){this._initialize(this.props)}},{key:"componentWillUnmount",value:function(){this._cleanup()}},{key:"componentDidUpdate",value:function(){this.notifyApiValueChanges()}},{key:"_initialize",value:function(i){var a=this;if(!this.reduxStore){this.reduxStore=hfe.get(),this.reduxStore.dispatch(ode(i)),this.scrollActions=hde(this.reduxStore,function(){return a.props}),this.unsubscribe=this.reduxStore.subscribe(this.onStoreUpdate.bind(this));var o={boundState:r.getBoundState(this.reduxStore),reduxStore:this.reduxStore,props:i};this.state?this.setState(o):this.state=o}}},{key:"_cleanup",value:function(){this.reduxStore&&(this.unsubscribe(),this.unsubscribe=null,this.reduxStore=null)}},{key:"getApi",value:function(){var i=this;return this.fixedDataTableApi.getValue(vu(vu({},this.props),this.reduxStore.getState()),vu(vu({},this.scrollActions),{},{updateRowHeights:function(o){return Ox({updateRowHeights:dde},i.reduxStore.dispatch).updateRowHeights(o)}}))}},{key:"notifyApiValueChanges",value:function(){var i=this.getApi();this.previousApiValue!==i&&(this.fixedDataTableApi.notify(),this.previousApiValue=i)}},{key:"render",value:function(){var i=this.getApi(),a=k.createElement(og,ot({},this.props,this.state.boundState,{scrollActions:this.scrollActions}));return this.props.defaultScrollbars?k.createElement(Ga.Provider,{value:i},k.createElement(Efe,this.props,a)):k.createElement(Ga.Provider,{value:i},a)}},{key:"onStoreUpdate",value:function(){var i=r.getBoundState(this.reduxStore);this.state.boundState.propsRevision===i.propsRevision&&this.setState({boundState:i})}}],[{key:"getDerivedStateFromProps",value:function(i,a){return on(i.height!==void 0||i.maxHeight!==void 0,"You must set either a height or a maxHeight"),i===a.props?null:(a.reduxStore.dispatch(sde({newProps:i,oldProps:a.props})),{boundState:r.getBoundState(a.reduxStore),props:i})}},{key:"getBoundState",value:function(i){var a=i.getState(),o=Zo(a,["columnGroupElements","columnElements","elementHeights","elementTemplates","firstRowIndex","endRowIndex","maxScrollX","maxScrollY","propsRevision","rows","rowOffsets","rowSettings","scrollContentHeight","scrollFlags","scrollX","scrollY","scrolling","scrollJumpedX","scrollJumpedY","tableSize"]);return o}}]),r}(k.Component);ie(YT,"defaultProps",{defaultScrollbars:!0,scrollbarXHeight:yr.SIZE,scrollbarYWidth:yr.SIZE});var Epe=RT(YT);function Ppe(e){var t=Ape();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Ape(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Sd=function(e){Ct(r,e);var t=Ppe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumn /> should never render");return null}}]),r}(k.Component);ie(Sd,"__TableColumn__",!0);ie(Sd,"propTypes",{align:W.oneOf(["left","center","right"]),fixed:W.bool,fixedRight:W.bool,header:W.oneOfType([W.node,W.func]),cell:W.oneOfType([W.node,W.func]),footer:W.oneOfType([W.node,W.func]),columnKey:W.oneOfType([W.string,W.number]),width:W.number.isRequired,minWidth:W.number,maxWidth:W.number,flexGrow:W.number,isResizable:W.bool,isReorderable:W.bool,allowCellsRecycling:W.bool,pureRendering:W.bool,cellClassName:W.string});ie(Sd,"defaultProps",{allowCellsRecycling:!1,fixed:!1,fixedRight:!1});function Rpe(e){var t=Dpe();return function(){var n=$e(e),i;if(t){var a=$e(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Dpe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var sg=function(e){Ct(r,e);var t=Rpe(r);function r(){return rt(this,r),t.apply(this,arguments)}return nt(r,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumnGroup /> should never render");return null}}]),r}(k.Component);ie(sg,"__TableColumnGroup__",!0);ie(sg,"propTypes",{align:W.oneOf(["left","center","right"]),fixed:W.bool,header:W.oneOfType([W.node,W.func])});ie(sg,"defaultProps",{fixed:!1});const Npe=()=>typeof window=="undefined"||typeof document=="undefined"||!document.body||typeof window.innerWidth!="number"||typeof document.body.clientWidth!="number"?0:Math.max(0,window.innerWidth-document.body.clientWidth),kpe="#f4f4f8",Lpe="#edeef1",Ope="#e3e5ea",Ipe="#f9f9fb",Fpe="#ffcb05",$pe="#1faff3",Bpe="#e5e5e5",zpe="#5b6372",Hpe="#3a4356",Wpe="#3c3c42",jpe="#a3a3a3",Upe="#d0d3db",Vpe="_headerCell_2qf2w_16",Gpe="_noSort_2qf2w_29",qpe="_standard_2qf2w_29",Ype="_caret_2qf2w_33",Xpe="_headerLabel_2qf2w_38",Zpe="_icon_2qf2w_43",Kpe="_numberIcon_2qf2w_50",Qpe="_dateIcon_2qf2w_54",Jpe="_textIcon_2qf2w_58",eme="_booleanIcon_2qf2w_62",tme="_sortIcon_2qf2w_66",rme="_sortAscending_2qf2w_74",nme="_sortDescending_2qf2w_78",zn={athensGray:kpe,athensGrayDark:Lpe,athensGrayDark2:Ope,athensGrayLight:Ipe,defaultBrandColor:Fpe,dodgerBlue:$pe,mercury:Bpe,shuttleGrayDark:zpe,oxfordBlue:Hpe,darkModeDefaultBackground:Wpe,indicatorGrey:jpe,secondaryButtonHover:Upe,headerCell:Vpe,noSort:Gpe,standard:qpe,caret:Ype,headerLabel:Xpe,icon:Zpe,numberIcon:Kpe,dateIcon:Qpe,textIcon:Jpe,booleanIcon:eme,sortIcon:tme,sortAscending:rme,sortDescending:nme},ime="_icon_t30x8_1",ame="_numberIcon_t30x8_11",ome="_dateIcon_t30x8_15",sme="_textIcon_t30x8_19",lme="_booleanIcon_t30x8_23",Vo={icon:ime,numberIcon:ame,dateIcon:ome,textIcon:sme,booleanIcon:lme},ume=({columnType:e})=>O.jsx("div",{className:Ps(Vo.icon,{[Vo.numberIcon]:U.isNumber(e),[Vo.dateIcon]:U.isDatetime(e),[Vo.textIcon]:U.isText(e),[Vo.booleanIcon]:U.isBoolean(e)})}),cme=({column:e,onClick:t,isSelected:r,children:n,showFieldTypeIcon:i,sortIcon:a="standard"})=>O.jsxs("div",{className:zn.headerCell,onClick:()=>{t(e)},children:[i&&O.jsx(ume,{columnType:e.type}),O.jsx("div",{className:zn.headerLabel,children:n}),O.jsx("div",{className:Ps(zn.sortIcon,{[zn.caret]:a==="caret",[zn.standard]:a==="standard",[zn.noSort]:!r||e.direction===0,[zn.sortAscending]:r&&e.direction===1,[zn.sortDescending]:r&&e.direction===-1})})]}),dme=26,hme=26,e2=8,XT=36,ZT=29,KT=24,QT=350,JT=120,fme=38,pme=55,mme=(e,t,r,{fontFamily:n,minWidth:i=JT,maxWidth:a=QT}={})=>{const s=document.createElement("canvas").getContext("2d");if(!s)return[];const u=Math.min(i,a),c=Math.max(i,a);s.font=`13px ${n||"Open Sans"}`;const d=e.columns.map(b=>s.measureText(b.name).width+XT+(t?ZT:0)),h=s.measureText("0").width,p=e.columns.map(b=>({type:U.simpleColumnType(b.type),index:b.index})),{rows:m}=e,v=p.map(b=>{const _=m.reduce((w,C)=>{var E;const S=C[b.index].displayValue,T=(E=r[b.index])!=null&&E.isHtml?gme(S):S,M=b.type==="number"?C[b.index].displayValue.length*h:s.measureText(T).width;return Math.max(w,M)},0);return KT+_});return d.map((b,_)=>{var C;const w=(C=r[_])==null?void 0:C.width;return w||Math.ceil(Math.max(u,Math.min(c,Math.max(b,v[_]))))})};function gme(e){const t=document.createElement("div");return t.innerHTML=e,eS(t)}function eS(e){let t,r,n,i;for(r="",t=0;t<e.childNodes.length;t++)i=e.childNodes[t],n=null,i.nodeType===1?n=eS(i):i.nodeType===3&&(n=i.nodeValue),n&&(r+=n);return r}const t2=e=>e%2===1,r2=({colIndex:e=0,rowIndex:t=0,themeSettings:r,customStyles:n,isHeaderCell:i})=>{var c,d,h,p,m,v,b,_,w,C,S,T,M,E,D,N,F,B;let a=r.chart.textColor;const o=r.typography.fontFamily;let s=r.chart.backgroundColor;const u=P.getSlightlyDifferentColor(s);return i?(d=(c=n==null?void 0:n.header)==null?void 0:c.color)!=null&&d.enabled&&(s=((p=(h=n==null?void 0:n.header)==null?void 0:h.color)==null?void 0:p.backgroundColor)||u,a=((v=(m=n==null?void 0:n.header)==null?void 0:m.color)==null?void 0:v.textColor)||a):((_=(b=n==null?void 0:n.columns)==null?void 0:b.alternatingColor)!=null&&_.enabled&&t2(e)&&(s=((C=(w=n==null?void 0:n.columns)==null?void 0:w.alternatingColor)==null?void 0:C.backgroundColor)||u,a=((T=(S=n==null?void 0:n.columns)==null?void 0:S.alternatingColor)==null?void 0:T.textColor)||a),(E=(M=n==null?void 0:n.rows)==null?void 0:M.alternatingColor)!=null&&E.enabled&&t2(t)&&(s=((N=(D=n==null?void 0:n.rows)==null?void 0:D.alternatingColor)==null?void 0:N.backgroundColor)||u,a=((B=(F=n==null?void 0:n.rows)==null?void 0:F.alternatingColor)==null?void 0:B.textColor)||a)),{color:a,backgroundColor:s,fontFamily:o}},vme="#f4f4f8",yme="#edeef1",bme="#e3e5ea",_me="#f9f9fb",wme="#ffcb05",Cme="#1faff3",xme="#e5e5e5",Tme="#5b6372",Sme="#3a4356",Mme="#3c3c42",Eme="#a3a3a3",Pme="#d0d3db",Ame="_tableWrapper_1vpuy_16",Rme="_table_1vpuy_16",Dme="_tableHeader_1vpuy_87",Nme="_tableCell_1vpuy_97",kme="_tableCellContent_1vpuy_108",Lme="_headerColor_1vpuy_114",Ome="_rowColor_1vpuy_118",Qo={athensGray:vme,athensGrayDark:yme,athensGrayDark2:bme,athensGrayLight:_me,defaultBrandColor:wme,dodgerBlue:Cme,mercury:xme,shuttleGrayDark:Tme,oxfordBlue:Sme,darkModeDefaultBackground:Mme,indicatorGrey:Eme,secondaryButtonHover:Pme,tableWrapper:Ame,table:Rme,tableHeader:Dme,tableCell:Nme,tableCellContent:kme,headerColor:Lme,rowColor:Ome},Ime=e=>U.isNumber(e)?"right":"left",Fme=new RegExp(`<\\/?[\\w\\s="/.':;#-\\/\\?]+>`),n2=({displayValue:e,width:t,padding:r,ellipsizedLength:n,isHtml:i})=>{var h,p,m,v,b,_,w,C;const{app:a}=y.useSisenseContext(),o=(v=(m=(p=(h=a==null?void 0:a.settings)==null?void 0:h.chartConfig)==null?void 0:p.tabular)==null?void 0:m.htmlContent)==null?void 0:v.enabled,s=(C=(w=(_=(b=a==null?void 0:a.settings)==null?void 0:b.chartConfig)==null?void 0:_.tabular)==null?void 0:w.htmlContent)==null?void 0:C.sanitizeContents,{isHtmlValue:u,value:c}=k.useMemo(()=>{let S=i;o&&typeof S=="undefined"&&(S=Fme.test(e));const T=S&&s?P.purify.sanitize(e):e;return{isHtmlValue:S,value:T}},[o,i,e,s]),d=c.length>n;return O.jsx("div",{className:Qo.tableCellContent,style:{maxWidth:`${t-r}px`},children:u?O.jsx("div",{dangerouslySetInnerHTML:{__html:c}}):d?O.jsx(Oi,{title:c,children:O.jsx("div",{children:c})}):O.jsx("div",{children:c})})},$me=({dataTable:e,dataOptions:t,height:r,width:n,customStyles:i,themeSettings:a,onSortUpdate:o})=>{var $,X,V,Z,j,q,te,Q,J;const s=i&&i.showFieldTypeIcon!==void 0?i.showFieldTypeIcon:!0,u=(($=i==null?void 0:i.columns)==null?void 0:$.resizable)!==!1,c=(X=i==null?void 0:i.columns)==null?void 0:X.widths,d=(Z=(V=i==null?void 0:i.columns)==null?void 0:V.minWidth)!=null?Z:JT,h=(q=(j=i==null?void 0:i.columns)==null?void 0:j.maxWidth)!=null?q:QT,p=Math.min(d,h),m=Math.max(d,h),v=XT+(s?ZT:0),b=(i==null?void 0:i.paddingVertical)||e2,_=(i==null?void 0:i.paddingHorizontal)||e2,w=((te=i==null?void 0:i.columns)==null?void 0:te.width)==="auto"?(n-_*2-Npe())/t.columns.length:void 0,C=k.useMemo(()=>t.columns.map(ne=>({isHtml:"isHtml"in ne&&!!ne.isHtml,width:"width"in ne?ne.width:w})),[t.columns,w]),[S,T]=k.useState(((Q=document.fonts)==null?void 0:Q.status)==="loaded"),[M,E]=k.useState({}),D=(J=a.typography)==null?void 0:J.fontFamily,N=k.useMemo(()=>mme(e,s,C,{fontFamily:D,minWidth:p,maxWidth:m}),[m,p,e,s,C,D,S]),F=k.useMemo(()=>e.columns.map(ne=>`${ne.index}:${ne.name}:${ne.type}`).join("|"),[e.columns]);k.useEffect(()=>{E({})},[F]);const B=k.useMemo(()=>e.columns.map((ne,ae)=>{const oe=c==null?void 0:c[ae];if(oe!==void 0)return oe;const se=M[ae];return se!==void 0?se:N[ae]}),[c,e.columns,N,M]),G=k.useCallback((ne,ae)=>{var ce,me;const oe=Number(ae),se=e.columns.map((pe,we)=>{var Le;return we===oe?ne:(Le=B[we])!=null?Le:N[we]});c===void 0&&E(pe=>H(R({},pe),{[oe]:ne})),(me=(ce=i==null?void 0:i.columns)==null?void 0:ce.onColumnsResize)==null||me.call(ce,se)},[N,c,i==null?void 0:i.columns,e.columns,B]);k.useEffect(()=>{var ne;(ne=document.fonts)==null||ne.ready.then(()=>{T(!0)}).catch(ae=>{console.warn("Failed to observe font loading",ae)})},[]);const Y=k.useMemo(()=>e.columns.map((ne,ae)=>{const oe=B[ae],se=t.columns[ae],ce=r2({isHeaderCell:!0,themeSettings:a,customStyles:i});return oe?O.jsx(Sd,{columnKey:`${ae}`,isResizable:u,minWidth:p,maxWidth:m,allowCellsRecycling:!0,width:oe,header:O.jsx(uc,{className:Ps(Qo.tableHeader),style:ce,children:O.jsx(cme,{column:ne,onClick:o,isSelected:!!Math.abs(ne.direction),showFieldTypeIcon:s,sortIcon:(i==null?void 0:i.sortIcon)||"standard",children:O.jsx(n2,{displayValue:P.getDataOptionTitle(se),width:oe,padding:v,ellipsizedLength:fme})})}),cell:we=>{var Le=we,{rowIndex:me}=Le,pe=Ge(Le,["rowIndex"]);return O.jsx(uc,H(R({className:Ps(Qo.tableCell),style:r2({colIndex:ae,rowIndex:me,themeSettings:a,customStyles:i})},pe),{children:O.jsx(n2,{displayValue:e.rows[me][ae].displayValue,width:oe,padding:KT,ellipsizedLength:pme,isHtml:"isHtml"in se?se.isHtml:void 0})}))},align:Ime(ne.type)},`col${ae}`):null}),[e,B,a,i,o,s,t,v,u,p,m]);return k.useMemo(()=>O.jsx("div",{"data-testid":"data-table-wrapper",className:Qo.tableWrapper,style:{padding:`${b}px ${_}px`,"--csdk-table-column-resizer-color":a.general.brandColor},children:O.jsx(Epe,{className:Qo.table,rowHeight:(i==null?void 0:i.rowHeight)||hme,rowsCount:e.rows.length,width:n-_*2,height:r-b*2,headerHeight:(i==null?void 0:i.headerHeight)||dme,isColumnResizing:!1,onColumnResizeEndCallback:u?G:void 0,children:Y})}),[Y,i,e,r,_,u,G,a.general.brandColor,b,n])},Bme=(e,t,r=!0)=>{if(!e.columns.some(s=>U.isNumber(s.type)))return e;const n=e.columns,a=e.rows.map(s=>s.map((u,c)=>{const d=n[c].type;if(U.isNumber(d)){const h=t.columns[c].numberFormatConfig!==void 0;if(!r&&!h)return u;const p=P.getCompleteNumberFormatConfig(t.columns[c].numberFormatConfig),m=P.createCompareValue(u.displayValue,d);return{displayValue:P.applyFormatPlainText(p,m.value),compareValue:m}}else return u}));return{columns:n,rows:a}},zme="_component_1rw9b_1",Hme={component:zme},Wme=({dataTable:e,dataOptions:t,designOptions:r={},onSortUpdate:n,themeSettings:i,width:a=400,height:o=500})=>{var m,v,b,_;const{app:s}=y.useSisenseContext(),u=(_=(b=(v=(m=s==null?void 0:s.settings)==null?void 0:m.chartConfig)==null?void 0:v.defaultNumberFormatting)==null?void 0:b.enabled)!=null?_:!0,c=k.useRef(null),d=k.useRef(e),h=k.useMemo(()=>Bme(e,t,u),[e,t,u]);k.useLayoutEffect(()=>{d.current=e},[e]);const p=k.useMemo(()=>R({sortIcon:"caret",showFieldTypeIcon:!1},r),[r]);return O.jsx("div",{className:Hme.component,ref:c,children:O.jsx($me,{dataTable:h,dataOptions:t,onSortUpdate:n,height:o,width:a,customStyles:p,themeSettings:i})})},jme=e=>({"& .MuiPaginationItem-circular.Mui-selected":{color:e.chart.textColor},"& .MuiPaginationItem-circular":{color:e.chart.secondaryTextColor,fontFamily:e.typography.fontFamily}}),Ume=e=>({paddingVertical:e.paddingVertical,paddingHorizontal:e.paddingHorizontal,header:e.header,rows:e.rows,columns:e.columns}),tS=25,rS=10,nS=({dataSet:e,dataOptions:t,styleOptions:r={},filters:n,onDataReady:i})=>{const{rowsPerPage:a=tS,width:o,height:s}=r,{t:u}=O.useTranslation(),{themeSettings:c}=y.useThemeContext(),[d,h]=k.useState(0),{filters:p,relations:m}=k.useMemo(()=>U.getFilterListAndRelationsJaql(n),[n]),[v,b]=k.useState(1),_=k.useRef(null),{dataOptions:w,mapping:C}=k.useMemo(()=>Fq(tl(t)),[t]),S=k.useMemo(()=>Ume(r),[r]),[T,M]=k.useState(w),[E,D]=k.useState(C),[N,F]=k.useState(e),[B,G,Y]=jZ({dataSet:N,dataOptions:T,dataColumnNamesMapping:E,filters:p,filterRelations:m,count:a*rS,offset:d}),$=k.useMemo(()=>{if(B&&i){const te=i(B);if(!ix(te))throw new U.TranslatableError("errors.incorrectOnDataReadyHandler");return te}return B},[B]),X=UZ({data:$,innerDataOptions:G,dataColumnNamesMapping:Y,needToAggregate:!z.isDataSource(N)});k.useEffect(()=>{M(w),D(C),F(e),b(1),h(0)},[e,w,C]);const V=k.useCallback(te=>{if(!B)return;Math.floor(B.rows.length/a)===te&&h(B.rows.length),b(te)},[B,a]),Z=k.useCallback(te=>{b(1),h(0),T&&M(Cq(T,te))},[T]),j=k.useMemo(()=>{if(!X||z.isDataSource(N))return X;const te=X.columns.find(Q=>Q.direction!==0);return te?P.orderBy(X,[te]):X},[X,N]),q=k.useMemo(()=>j?{columns:j.columns,rows:j.rows.slice((v-1)*a,v*a)}:void 0,[j,v,a]);return G?O.jsx(vc,{defaultSize:yc("table"),size:{width:o,height:s},children:te=>{if(!X||!q)return O.jsx(y.LoadingOverlay,{});if(P.isDataTableEmpty(X))return O.jsx(Mm,{iconType:"table"});const Q=Math.ceil(X.rows.length/a);return O.jsxs("div",{className:"csdk-table-root",style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:c.chart.backgroundColor},"data-testid":"table-root",role:"region","aria-label":u("chart.table.label"),children:[O.jsx(Wme,{dataTable:q,dataOptions:G,designOptions:S,themeSettings:c,width:te.width,height:te.height-32,onSortUpdate:Z}),O.jsx(Q2,{ref:_,page:v,count:Q,onChange:(ne,ae)=>V(ae),sx:jme(c)})]})}}):null},Vme=k.createContext(null),rf={didCatch:!1,error:null};class lm extends k.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=rf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(rf)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&Gme(t.resetKeys,i)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(rf)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const u={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(u);else if(n)s=k.createElement(n,u);else if(i===null||k.isValidElement(i))s=i;else throw o}return k.createElement(Vme.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function Gme(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const iS=k.createContext(void 0),qme=({children:e})=>{const[t,r]=k.useState([]),[n,i]=k.useState([]),a=()=>r([]),o=()=>i([]);return O.jsx(iS.Provider,{value:{errors:t,warnings:n,clearError:a,clearWarning:o,setErrors:r,setWarnings:i},children:e})},aS=()=>{const e=k.useContext(iS);return e||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}}},Yme="BE#081586",Xme="BE#733473",Zme=e=>{const[t,r]=k.useState(0),{setErrors:n,errors:i}=aS(),a=y.useHasChanged(e,["dataOptions","filters"]);if(k.useEffect(()=>{a&&i.length>0&&(r(t+1),n([]))},[e.dataOptions,e.filters]),!z.isDataSource(e.dataSet))throw new U.TranslatableError("errors.missingDataSource");const o=U.cloneDeep(e.dataOptions),s=P.extractTrendMeasures(o);o.value.push(...s);const u=P.extractForecastMeasures(o);o.value.push(...u);const c=k.useCallback(({error:p})=>{console.debug("Unexpected error occurred when rendering advanced chart:",p);const m=U.cloneDeep(o),v=h(p.toString());return m.value=m.value.filter(b=>{const _="column"in b?b.column.name:b.name;return!("column"in b&&"type"in b.column&&b.column.type==="calculatedmeasure"&&[P.TREND_PREFIX,P.FORECAST_PREFIX].some(S=>_.includes(S))&&v.some(S=>S.includes(_)))}),O.jsx(lm,{fallbackRender:d,onError:b=>{const _=h(b.toString());n(w=>[...new Set([...w,..._])])},children:O.jsx(Au,H(R({},e),{dataOptions:m}))},`errorboundary_${t}`)},[e,i]),d=k.useCallback(({error:p})=>(console.debug("Error occurred when rendering fallback chart:",p),p.toString().includes(Yme)?O.jsx(Au,R({},e)):O.jsx(y.ErrorBoundaryBox,{error:i[0]})),[e,i]),h=p=>{if(p.includes(Xme)){const m=/Error: BE#733473 More than 1 Function failed, aggregated failures:\s*/;if(m.test(p))return p.replace(m,"").split(";").map(b=>b.trim()).filter(Boolean)}return[p.trim()]};return O.jsx(lm,{fallbackRender:c,onError:p=>{const m=h(p.toString());n(v=>[...new Set([...v,...m])])},children:O.jsx(Au,H(R({},e),{dataOptions:o}))},`errorboundary_${t}`)},oS=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},sS=y.asSisenseComponent({componentName:"Chart",shouldSkipSisenseContextWaiting:oS,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{var t;if(Kme(e))return O.jsx(nS,R({},e));if(Qme(e))return O.jsx(Zme,R({},e));if(lS(e))return O.jsx(Au,R({},e));throw new U.TranslatableError("errors.chartInvalidProps",{chartType:(t=e.chartType)!=null?t:"unknown"})});function Kme(e){return e.chartType==="table"&&"columns"in e.dataOptions}function lS(e){return e.chartType!=="table"}function Qme(e){return!lS(e)||!z.isCartesian(e.chartType)?!1:e.dataOptions.value.some(r=>(r==null?void 0:r.forecast)!==void 0||(r==null?void 0:r.trend)!==void 0)}function lg(e,{onLocalStateChange:t,syncCompareFn:r=U.isEqual}={}){const[n,i]=k.useState(e),a=k.useRef(e);k.useEffect(()=>{r(a.current,e)||i(e),a.current=e},[e,r]);const o=k.useCallback(s=>{i(u=>{const c=U.isFunction(s)?s(u):s;return t==null||t(c),c})},[t]);return[n,o]}var nf=function(){return U.root.Date.now()},Jme="Expected a function",e0e=Math.max,t0e=Math.min;function ug(e,t,r){var n,i,a,o,s,u,c=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(Jme);t=P.toNumber(t)||0,U.isObject(r)&&(d=!!r.leading,h="maxWait"in r,a=h?e0e(P.toNumber(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p);function m(E){var D=n,N=i;return n=i=void 0,c=E,o=e.apply(N,D),o}function v(E){return c=E,s=setTimeout(w,t),d?m(E):o}function b(E){var D=E-u,N=E-c,F=t-D;return h?t0e(F,a-N):F}function _(E){var D=E-u,N=E-c;return u===void 0||D>=t||D<0||h&&N>=a}function w(){var E=nf();if(_(E))return C(E);s=setTimeout(w,b(E))}function C(E){return s=void 0,p&&n?m(E):(n=i=void 0,o)}function S(){s!==void 0&&clearTimeout(s),c=0,n=u=i=s=void 0}function T(){return s===void 0?o:C(nf())}function M(){var E=nf(),D=_(E);if(n=arguments,i=this,u=E,D){if(s===void 0)return v(u);if(h)return clearTimeout(s),s=setTimeout(w,t),m(u)}return s===void 0&&(s=setTimeout(w,t)),o}return M.cancel=S,M.flush=T,M}function uS(e,t){const[r,n]=k.useState(e),i=k.useMemo(()=>ug(a=>{n(a)},t),[t]);return k.useEffect(()=>{i(e)},[e,i]),k.useEffect(()=>()=>{i.cancel()},[i]),r}function cS(e){return Wc(e)?{direction:e}:e}function r0e(e){return typeof e=="object"&&e!==null&&"direction"in e}function i2(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function n0e({type:e,settings:t,sortDetails:r},n){return e==="simple"?r.field>=(n.rows||[]).length?[{rowIndex:0,sort:{direction:U.getSortType(t[0].direction),by:i2(r,n)}}]:[{rowIndex:r.field,sort:{direction:U.getSortType(t[0].direction)}}]:t.reduce((i,a,o)=>{var h;const s=(h=n.rows)==null?void 0:h[o],u=(s==null?void 0:s.sortType)&&cS(s==null?void 0:s.sortType),c={direction:U.getSortType(a.direction),by:i2(r,n)};return!a.selected&&U.isEqual(u==null?void 0:u.by,c.by)&&i.push({rowIndex:o,sort:null}),a.selected&&i.push({rowIndex:o,sort:c}),i},[])}const i0e=200,a2=e=>R(R({attribute:P.translateColumnToAttribute(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:cS(e.sortType)}),e.name&&{name:e.name}),a0e=e=>{var t;return{measure:P.translateColumnToMeasure(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},cg=e=>{const{rows:t=[],columns:r=[],values:n=[],grandTotals:i}=e,a=t.flatMap(a2),o=r.flatMap(a2),s=n.flatMap(a0e);return{rows:a,columns:o,values:s,grandTotals:i}},o0e=({dataSet:e,dataOptionsInternal:t,filters:r,highlights:n})=>{const[i,a]=k.useState(),{rows:o,columns:s,values:u,grandTotals:c}=k.useMemo(()=>cg(t),[t]),d=k.useCallback(m=>{a(v=>U.isEqual(v,m)?v:m)},[a]),h=uS(k.useMemo(()=>({dataSource:e,rows:o,columns:s,values:u,grandTotals:c,filters:r,highlights:n,onBeforeQuery:d}),[e,o,s,u,c,r,n,d]),i0e),{error:p}=y.useExecutePivotQueryInternal(h);return{jaql:i,error:p}},dS=e=>O.jsx("svg",H(R({width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})}));var hl=(e=>(e.HIGHLIGHT="highlight",e.FILTER="filter",e))(hl||{});function hS(e){return function(t){t=U.toString(t);var r=B3(t)?Cp(t):void 0,n=r?r[0]:t.charAt(0),i=r?$3(r,1).join(""):t.slice(1);return n[e]()+i}}var fS=hS("toUpperCase");function s0e(e){return fS(U.toString(e).toLowerCase())}function l0e(e,t,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)r=t(r,e[i],i,e);return r}function u0e(e){return function(t){return e==null?void 0:e[t]}}var c0e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},d0e=u0e(c0e),h0e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,f0e="\\u0300-\\u036f",p0e="\\ufe20-\\ufe2f",m0e="\\u20d0-\\u20ff",g0e=f0e+p0e+m0e,v0e="["+g0e+"]",y0e=RegExp(v0e,"g");function b0e(e){return e=U.toString(e),e&&e.replace(h0e,d0e).replace(y0e,"")}var _0e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function w0e(e){return e.match(_0e)||[]}var C0e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function x0e(e){return C0e.test(e)}var pS="\\ud800-\\udfff",T0e="\\u0300-\\u036f",S0e="\\ufe20-\\ufe2f",M0e="\\u20d0-\\u20ff",E0e=T0e+S0e+M0e,mS="\\u2700-\\u27bf",gS="a-z\\xdf-\\xf6\\xf8-\\xff",P0e="\\xac\\xb1\\xd7\\xf7",A0e="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",R0e="\\u2000-\\u206f",D0e=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vS="A-Z\\xc0-\\xd6\\xd8-\\xde",N0e="\\ufe0e\\ufe0f",yS=P0e+A0e+R0e+D0e,bS="['’]",o2="["+yS+"]",k0e="["+E0e+"]",_S="\\d+",L0e="["+mS+"]",wS="["+gS+"]",CS="[^"+pS+yS+_S+mS+gS+vS+"]",O0e="\\ud83c[\\udffb-\\udfff]",I0e="(?:"+k0e+"|"+O0e+")",F0e="[^"+pS+"]",xS="(?:\\ud83c[\\udde6-\\uddff]){2}",TS="[\\ud800-\\udbff][\\udc00-\\udfff]",Ca="["+vS+"]",$0e="\\u200d",s2="(?:"+wS+"|"+CS+")",B0e="(?:"+Ca+"|"+CS+")",l2="(?:"+bS+"(?:d|ll|m|re|s|t|ve))?",u2="(?:"+bS+"(?:D|LL|M|RE|S|T|VE))?",SS=I0e+"?",MS="["+N0e+"]?",z0e="(?:"+$0e+"(?:"+[F0e,xS,TS].join("|")+")"+MS+SS+")*",H0e="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",W0e="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",j0e=MS+SS+z0e,U0e="(?:"+[L0e,xS,TS].join("|")+")"+j0e,V0e=RegExp([Ca+"?"+wS+"+"+l2+"(?="+[o2,Ca,"$"].join("|")+")",B0e+"+"+u2+"(?="+[o2,Ca+s2,"$"].join("|")+")",Ca+"?"+s2+"+"+l2,Ca+"+"+u2,W0e,H0e,_S,U0e].join("|"),"g");function G0e(e){return e.match(V0e)||[]}function q0e(e,t,r){return e=U.toString(e),t=t,t===void 0?x0e(e)?G0e(e):w0e(e):e.match(t)||[]}var Y0e="['’]",X0e=RegExp(Y0e,"g");function Z0e(e){return function(t){return l0e(q0e(b0e(t).replace(X0e,"")),e,"")}}var ES=Z0e(function(e,t,r){return t=t.toLowerCase(),e+(r?s0e(t):t)});function K0e(e,t,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(n,o,r(o),e)}return n}function Q0e(e,t){return function(r,n){if(r==null)return r;if(!U.isArrayLike(r))return e(r,n);for(var i=r.length,a=-1,o=Object(r);++a<i&&n(o[a],a,o)!==!1;);return r}}var J0e=Q0e(U.baseForOwn);function ege(e,t,r,n){return J0e(e,function(i,a,o){t(n,i,r(i),o)}),n}function PS(e,t){return function(r,n){var i=U.isArray(r)?K0e:ege,a=t?t():{};return i(r,e,U.baseIteratee(n),a)}}var fl=PS(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function dg(e){return t=>{var r,n,i,a,o;return H(R({},t),{toolbar:H(R({},t.toolbar),{menu:H(R({},(n=(r=t.toolbar)==null?void 0:r.menu)!=null?n:{}),{items:[...(o=(a=(i=t.toolbar)==null?void 0:i.menu)==null?void 0:a.items)!=null?o:[],e]})})})}}function AS(e){return t=>{var r,n;return H(R({},t),{config:H(R({},t.config),{header:dg(e)((n=(r=t.config)==null?void 0:r.header)!=null?n:{})})})}}const tge=Object.freeze(Object.defineProperty({__proto__:null,withHeaderMenuItem:AS,withMenuItemInHeaderConfig:dg},Symbol.toStringTag,{value:"Module"})),c2=(e,t)=>{var r;return z.isCartesian(e)&&((r=t.category)==null?void 0:r.length)===1||z.isScatter(e)};function rge({chartType:e,dataOptions:t,enabled:r}){const[n,i]=k.useState([]),a=k.useRef(r&&c2(e,t));k.useEffect(()=>{a.current=r&&c2(e,t)},[e,t,r]);const o=k.useMemo(()=>{if(n.length===0)return h=>H(R({},h),{series:h.series.map(p=>H(R({},p),{data:p.data.map(m=>H(R({},m),{selected:!1}))}))});if(z.isScatter(e))return h=>H(R({},h),{series:h.series.map(p=>H(R({},p),{data:p.data.map(m=>H(R({},m),{selected:!n.some(v=>{var b,_;return v.x===m.x&&v.y===m.y&&v.size===m.z&&v.breakByPoint===((b=m.custom)==null?void 0:b.maskedBreakByPoint)&&v.breakByColor===((_=m.custom)==null?void 0:_.maskedBreakByColor)})}))}))});{const h=n.reduce((p,{categoryValue:m})=>(m&&(p[`${m}`]=!0),p),{});return p=>H(R({},p),{series:p.series.map(m=>H(R({},m),{data:m.data.map(v=>{var b,_;return h[(_=(b=v.custom)==null?void 0:b.xValue)==null?void 0:_[0]]?v:H(R({},v),{selected:!0})})}))})}},[n,e]),s=k.useMemo(()=>h=>{var p;return H(R({},h),{chart:H(R({},h.chart),{events:H(R({},(p=h.chart)==null?void 0:p.events),{click:()=>{i([])}})})})},[]),u=k.useCallback(h=>(a.current&&(h=o(h),h=s(h)),h),[o,s]),c=k.useCallback(h=>{a.current&&i(h)},[]),d=k.useCallback(h=>{a.current&&i([h])},[]);return{onBeforeRender:u,onDataPointsSelected:c,onDataPointClick:d}}const nge="sdkWidgetInit",RS=e=>{const{widgetType:t,widgetName:r,widgetTitle:n,entityId:i,enabled:a=!0}=e,{tracking:o,app:s}=y.useSisenseContext(),{trackEvent:u}=y.useTracking(),c=k.useRef(!1);k.useEffect(()=>{if(!a||!o||!s||c.current)return;c.current=!0;const d={widgetType:t,widgetName:r,widgetTitle:n,entityId:i,entityType:"widget",eventType:"action",featureName:"composesdk",packageName:o.packageName,packageVersion:"2.31.1"};u(nge,d,!o.enabled)},[a,t,r,n,i,o,s,u])};function ige(e){const{enabled:t,onChange:r}=e,{t:n}=O.useTranslation(),[i,a]=k.useState(!1),o=k.useCallback(()=>{a(!0)},[]),s=k.useCallback(()=>{a(!1)},[]),u=k.useCallback(h=>{a(!1),r==null||r({type:"title/changed",payload:{title:h}})},[r]),c=k.useMemo(()=>{if(t)return{id:"rename-widget",caption:n("widgetHeader.menu.renameWidget"),onClick:o}},[t,n,o]),d=k.useMemo(()=>{if(t)return{isEditing:i,onCommit:u,onCancel:s,onEditingChange:h=>{h?o():s()}}},[t,i,u,s,o]);return{renameMenuItem:c,titleEditorConfig:d}}function DS(e){var u,c,d;const{onChange:t,headerConfig:r}=e,n=(d=(c=(u=r==null?void 0:r.title)==null?void 0:u.editing)==null?void 0:c.enabled)!=null?d:!1,{renameMenuItem:i,titleEditorConfig:a}=ige({enabled:n,onChange:t}),o=k.useMemo(()=>!n||!i?r!=null?r:{}:dg(i)(r!=null?r:{}),[n,r,i]);return{headerConfig:n?o:r!=null?r:{},titleEditor:a}}const age=e=>P.isStyledColumn(e)?e.column.name:e.name,oge=e=>"column"in e||"name"in e,sge=e=>{const t=[];for(const r of Object.values(e)){const n=Array.isArray(r)?r:[r];for(const i of n)typeof i=="object"&&i!==null&&oge(i)&&t.push(age(i))}return t},NS=(e,t,r)=>{var o;if(e.id)return e.id;const n=(o=e.title)!=null?o:null,i=e.dataOptions?sge(e.dataOptions):[],a=e.dataSource?U.getDataSourceName(e.dataSource):null;return`hash:${U.hashIt({widgetType:t,widgetName:r,widgetTitle:n,columnNames:i,dataSourceName:a})}`},d2=e=>e.chartType,lge=()=>"pivot",uge=()=>"text",cge=e=>e.customWidgetType,dge=()=>"filter",kS=e=>{var t;return(t=e.title)!=null?t:null};function yu(e){return parseInt(e,10)||0}const hge={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function fge(e){for(const t in e)return!1;return!0}function h2(e){return fge(e)||e.outerHeightStyle===0&&!e.overflowing}const LS=de.forwardRef(function(t,r){const S=t,{onChange:n,maxRows:i,minRows:a=1,style:o,value:s}=S,u=Ge(S,["onChange","maxRows","minRows","style","value"]),{current:c}=de.useRef(s!=null),d=de.useRef(null),h=y.useForkRef(r,d),p=de.useRef(null),m=de.useRef(null),v=de.useCallback(()=>{const T=d.current,M=m.current;if(!T||!M)return;const D=y.ownerWindow(T).getComputedStyle(T);if(D.width==="0px")return{outerHeightStyle:0,overflowing:!1};M.style.width=D.width,M.value=T.value||t.placeholder||"x",M.value.slice(-1)===`
224
- `&&(M.value+=" ");const N=D.boxSizing,F=yu(D.paddingBottom)+yu(D.paddingTop),B=yu(D.borderBottomWidth)+yu(D.borderTopWidth),G=M.scrollHeight;M.value="x";const Y=M.scrollHeight;let $=G;a&&($=Math.max(Number(a)*Y,$)),i&&($=Math.min(Number(i)*Y,$)),$=Math.max($,Y);const X=$+(N==="border-box"?F+B:0),V=Math.abs($-G)<=1;return{outerHeightStyle:X,overflowing:V}},[i,a,t.placeholder]),b=y.useEventCallback(()=>{const T=d.current,M=v();if(!T||!M||h2(M))return!1;const E=M.outerHeightStyle;return p.current!=null&&p.current!==E}),_=de.useCallback(()=>{const T=d.current,M=v();if(!T||!M||h2(M))return;const E=M.outerHeightStyle;p.current!==E&&(p.current=E,T.style.height=`${E}px`),T.style.overflow=M.overflowing?"hidden":""},[v]),w=de.useRef(-1);y.useEnhancedEffect(()=>{const T=y.debounce(_),M=d==null?void 0:d.current;if(!M)return;const E=y.ownerWindow(M);E.addEventListener("resize",T);let D;return typeof ResizeObserver!="undefined"&&(D=new ResizeObserver(()=>{b()&&(D.unobserve(M),cancelAnimationFrame(w.current),_(),w.current=requestAnimationFrame(()=>{D.observe(M)}))}),D.observe(M)),()=>{T.clear(),cancelAnimationFrame(w.current),E.removeEventListener("resize",T),D&&D.disconnect()}},[v,_,b]),y.useEnhancedEffect(()=>{_()});const C=T=>{c||_(),n&&n(T)};return _e.jsxs(de.Fragment,{children:[_e.jsx("textarea",R({value:s,onChange:C,ref:h,rows:a,style:o},u)),_e.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:H(R(R({},hge.shadow),o),{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(LS.propTypes={className:y.PropTypes.string,maxRows:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),minRows:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),onChange:y.PropTypes.func,placeholder:y.PropTypes.string,style:y.PropTypes.object,value:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.string),y.PropTypes.number,y.PropTypes.string])});function pge({props:e,states:t,muiFormControl:r}){return t.reduce((n,i)=>(n[i]=e[i],r&&typeof e[i]=="undefined"&&(n[i]=r[i]),n),{})}const hg=de.createContext(void 0);process.env.NODE_ENV!=="production"&&(hg.displayName="FormControlContext");function OS(){return de.useContext(hg)}function f2(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function mge(e,t=!1){return e&&(f2(e.value)&&e.value!==""||t&&f2(e.defaultValue)&&e.defaultValue!=="")}function gge(e){return y.generateUtilityClass("MuiInputBase",e)}const um=y.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var p2;const vge=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${y.capitalize(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},yge=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},bge=e=>{const{classes:t,color:r,disabled:n,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:m,type:v}=e,b={root:["root",`color${y.capitalize(r)}`,n&&"disabled",i&&"error",u&&"fullWidth",o&&"focused",s&&"formControl",p&&p!=="medium"&&`size${y.capitalize(p)}`,d&&"multiline",m&&"adornedStart",a&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",n&&"disabled",v==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",a&&"inputAdornedEnd",h&&"readOnly"]};return y.composeClasses(b,gge,t)},_ge=y.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:vge})(y.memoTheme(({theme:e})=>H(R({},e.typography.body1),{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${um.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:r})=>t.multiline&&r==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),wge=y.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yge})(y.memoTheme(({theme:e})=>{const t=e.palette.mode==="light",r=H(R({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5}),{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),n={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${um.formControl} &`]:{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${um.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),m2=wP({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),IS=de.forwardRef(function(t,r){var Xr;const n=y.useDefaultProps({props:t,name:"MuiInputBase"}),At=n,{"aria-describedby":i,autoComplete:a,autoFocus:o,className:s,color:u,components:c={},componentsProps:d={},defaultValue:h,disabled:p,disableInjectingGlobalStyles:m,endAdornment:v,error:b,fullWidth:_=!1,id:w,inputComponent:C="input",inputProps:S={},inputRef:T,margin:M,maxRows:E,minRows:D,multiline:N=!1,name:F,onBlur:B,onChange:G,onClick:Y,onFocus:$,onKeyDown:X,onKeyUp:V,placeholder:Z,readOnly:j,renderSuffix:q,rows:te,size:Q,slotProps:J={},slots:ne={},startAdornment:ae,type:oe="text",value:se}=At,ce=Ge(At,["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"]),me=S.value!=null?S.value:se,{current:pe}=de.useRef(me!=null),we=de.useRef(),Le=de.useCallback(He=>{process.env.NODE_ENV!=="production"&&He&&He.nodeName!=="INPUT"&&!He.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
225
- `))},[]),Ce=y.useForkRef(we,T,S.ref,Le),[le,Ve]=de.useState(!1),Te=OS();process.env.NODE_ENV!=="production"&&de.useEffect(()=>{if(Te)return Te.registerEffect()},[Te]);const Ne=pge({props:n,muiFormControl:Te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ne.focused=Te?Te.focused:le,de.useEffect(()=>{!Te&&p&&le&&(Ve(!1),B&&B())},[Te,p,le,B]);const Be=Te&&Te.onFilled,Xe=Te&&Te.onEmpty,Je=de.useCallback(He=>{mge(He)?Be&&Be():Xe&&Xe()},[Be,Xe]);y.useEnhancedEffect(()=>{pe&&Je({value:me})},[me,Je,pe]);const pr=He=>{$&&$(He),S.onFocus&&S.onFocus(He),Te&&Te.onFocus?Te.onFocus(He):Ve(!0)},Pt=He=>{B&&B(He),S.onBlur&&S.onBlur(He),Te&&Te.onBlur?Te.onBlur(He):Ve(!1)},Ht=(He,...vt)=>{if(!pe){const ci=He.target||we.current;if(ci==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":y.formatMuiErrorMessage(1));Je({value:ci.value})}S.onChange&&S.onChange(He,...vt),G&&G(He,...vt)};de.useEffect(()=>{Je(we.current)},[]);const or=He=>{we.current&&He.currentTarget===He.target&&we.current.focus(),Y&&Y(He)};let xr=C,Lt=S;N&&xr==="input"&&(te?(process.env.NODE_ENV!=="production"&&(D||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),Lt=R({type:void 0,minRows:te,maxRows:te},Lt)):Lt=R({type:void 0,maxRows:E,minRows:D},Lt),xr=LS);const Fn=He=>{Je(He.animationName==="mui-auto-fill-cancel"?we.current:{value:"x"})};de.useEffect(()=>{Te&&Te.setAdornedStart(!!ae)},[Te,ae]);const Tr=H(R({},n),{color:Ne.color||"primary",disabled:Ne.disabled,endAdornment:v,error:Ne.error,focused:Ne.focused,formControl:Te,fullWidth:_,hiddenLabel:Ne.hiddenLabel,multiline:N,size:Ne.size,startAdornment:ae,type:oe}),Sr=bge(Tr),Yr=ne.root||c.Root||_ge,$r=J.root||d.root||{},wn=ne.input||c.Input||wge;return Lt=R(R({},Lt),(Xr=J.input)!=null?Xr:d.input),_e.jsxs(de.Fragment,{children:[!m&&typeof m2=="function"&&(p2||(p2=_e.jsx(m2,{}))),_e.jsxs(Yr,H(R(R(H(R({},$r),{ref:r,onClick:or}),ce),!y.isHostComponent(Yr)&&{ownerState:R(R({},Tr),$r.ownerState)}),{className:y.clsx(Sr.root,$r.className,s,j&&"MuiInputBase-readOnly"),children:[ae,_e.jsx(hg.Provider,{value:null,children:_e.jsx(wn,H(R(R({"aria-invalid":Ne.error,"aria-describedby":i,autoComplete:a,autoFocus:o,defaultValue:h,disabled:Ne.disabled,id:w,onAnimationStart:Fn,name:F,placeholder:Z,readOnly:j,required:Ne.required,rows:te,value:me,onKeyDown:X,onKeyUp:V,type:oe},Lt),!y.isHostComponent(wn)&&{as:xr,ownerState:R(R({},Tr),Lt.ownerState)}),{ref:Ce,className:y.clsx(Sr.input,Lt.className,j&&"MuiInputBase-readOnly"),onBlur:Pt,onChange:Ht,onFocus:pr}))}),v,q?q(H(R({},Ne),{startAdornment:ae})):null]}))]})});process.env.NODE_ENV!=="production"&&(IS.propTypes={"aria-describedby":y.PropTypes.string,autoComplete:y.PropTypes.string,autoFocus:y.PropTypes.bool,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["primary","secondary","error","info","success","warning"]),y.PropTypes.string]),components:y.PropTypes.shape({Input:y.PropTypes.elementType,Root:y.PropTypes.elementType}),componentsProps:y.PropTypes.shape({input:y.PropTypes.object,root:y.PropTypes.object}),defaultValue:y.PropTypes.any,disabled:y.PropTypes.bool,disableInjectingGlobalStyles:y.PropTypes.bool,endAdornment:y.PropTypes.node,error:y.PropTypes.bool,fullWidth:y.PropTypes.bool,id:y.PropTypes.string,inputComponent:y.elementTypeAcceptingRef,inputProps:y.PropTypes.object,inputRef:y.refType,margin:y.PropTypes.oneOf(["dense","none"]),maxRows:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),minRows:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),multiline:y.PropTypes.bool,name:y.PropTypes.string,onBlur:y.PropTypes.func,onChange:y.PropTypes.func,onClick:y.PropTypes.func,onFocus:y.PropTypes.func,onInvalid:y.PropTypes.func,onKeyDown:y.PropTypes.func,onKeyUp:y.PropTypes.func,placeholder:y.PropTypes.string,readOnly:y.PropTypes.bool,renderSuffix:y.PropTypes.func,required:y.PropTypes.bool,rows:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),size:y.PropTypes.oneOfType([y.PropTypes.oneOf(["medium","small"]),y.PropTypes.string]),slotProps:y.PropTypes.shape({input:y.PropTypes.object,root:y.PropTypes.object}),slots:y.PropTypes.shape({input:y.PropTypes.elementType,root:y.PropTypes.elementType}),startAdornment:y.PropTypes.node,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),type:y.PropTypes.string,value:y.PropTypes.any});function Cge(e,t){k.useEffect(()=>{if(!t)return;const r=n=>{e.current&&!e.current.contains(n.target)&&e.current.blur()};return document.addEventListener("pointerdown",r),()=>{document.removeEventListener("pointerdown",r)}},[e,t])}const xge=y.newStyled.div`
226
- display: inline-grid;
227
- grid-template-columns: 1fr;
228
- align-items: baseline;
229
- width: auto;
230
- min-width: 50px;
231
- max-width: 100%;
232
- `,Tge=y.newStyled.span`
233
- // Auto-growing input using a CSS Grid technique with sharing the same grid area as the hidden text
234
- grid-area: 1 / 1 / 2 / 2;
235
- visibility: hidden;
236
- white-space: pre;
237
- font: inherit;
238
- padding: 0;
239
- `,Sge=y.newStyled(IS)`
240
- // Auto-growing input using a CSS Grid technique with sharing the same grid area as the hidden text
241
- grid-area: 1 / 1 / 2 / 2;
242
- width: 100%;
243
- font: inherit;
244
- color: inherit;
245
-
246
- & .MuiInputBase-input {
247
- padding: 0;
248
- font: inherit;
249
- color: inherit;
250
- width: 100%;
251
-
252
- &::placeholder {
253
- opacity: 0.5;
254
- }
255
-
256
- &:focus {
257
- outline: none;
258
- box-shadow: none;
259
- }
260
- }
261
- `,Mge=y.newStyled.span`
262
- color: ${({isPlaceholder:e})=>e?"rgba(0, 0, 0, 0.38)":"inherit"};
263
- `;function Ege({value:e,isEditing:t,onCommit:r,onEditingChange:n,onCancel:i,placeholder:a}){const o=k.useRef(null),[s,u]=k.useState(e);k.useEffect(()=>{t&&u(e)},[t,e]);const c=k.useCallback(()=>{const _=s.trim(),w=P.purify.sanitize(_,{ALLOWED_TAGS:[]});w!==e&&r(w),n(!1)},[s,r,n,e]),d=k.useCallback(()=>{i==null||i(),n(!1)},[i,n]),h=k.useCallback(_=>{_.key==="Enter"?(_.preventDefault(),c()):_.key==="Escape"&&(_.preventDefault(),d())},[c,d]),p=k.useCallback(()=>{c()},[c]),m=k.useCallback(()=>{n(!0)},[n]),v=k.useCallback(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),m())},[m]);if(k.useEffect(()=>{t&&o.current&&(o.current.focus(),o.current.select())},[t]),Cge(o,t),t)return O.jsxs(xge,{children:[O.jsx(Tge,{children:s||a||""}),O.jsx(Sge,{inputRef:o,inputProps:{"data-component":"inline-text-editor-input"},value:s,placeholder:a,onChange:_=>u(_.target.value),onBlur:p,onKeyDown:h})]});const b=!e&&!!a;return O.jsx(Mge,{role:"button",tabIndex:0,"aria-label":"Editable text. Double-click or press Enter or Space to edit.","data-component":"inline-text-editor-text",onDoubleClick:m,onKeyDown:v,isPlaceholder:b,children:e||a||""})}function Pge(e){return y.generateUtilityClass("MuiCard",e)}y.generateUtilityClasses("MuiCard",["root"]);const Age=e=>{const{classes:t}=e,r={root:["root"]};return y.composeClasses(r,Pge,t)},Rge=y.styled(y.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),FS=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiCard"}),c=n,{className:i,raised:a=!1}=c,o=Ge(c,["className","raised"]),s=H(R({},n),{raised:a}),u=Age(s);return _e.jsx(Rge,R({className:y.clsx(u.root,i),elevation:a?8:void 0,ref:r,ownerState:s},o))});process.env.NODE_ENV!=="production"&&(FS.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,raised:y.chainPropTypes(y.PropTypes.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object])});function Dge(e){return y.generateUtilityClass("MuiCardContent",e)}y.generateUtilityClasses("MuiCardContent",["root"]);const Nge=e=>{const{classes:t}=e,r={root:["root"]};return y.composeClasses(r,Dge,t)},kge=y.styled("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),$S=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiCardContent"}),c=n,{className:i,component:a="div"}=c,o=Ge(c,["className","component"]),s=H(R({},n),{component:a}),u=Nge(s);return _e.jsx(kge,R({as:a,className:y.clsx(u.root,i),ownerState:s,ref:r},o))});process.env.NODE_ENV!=="production"&&($S.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,component:y.PropTypes.elementType,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object])});function Lge(e){return y.generateUtilityClass("MuiCircularProgress",e)}y.generateUtilityClasses("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Hn=44,cm=y.keyframes`
264
- 0% {
265
- transform: rotate(0deg);
266
- }
267
-
268
- 100% {
269
- transform: rotate(360deg);
270
- }
271
- `,dm=y.keyframes`
272
- 0% {
273
- stroke-dasharray: 1px, 200px;
274
- stroke-dashoffset: 0;
275
- }
276
-
277
- 50% {
278
- stroke-dasharray: 100px, 200px;
279
- stroke-dashoffset: -15px;
280
- }
281
-
282
- 100% {
283
- stroke-dasharray: 1px, 200px;
284
- stroke-dashoffset: -126px;
285
- }
286
- `,Oge=typeof cm!="string"?y.css`
287
- animation: ${cm} 1.4s linear infinite;
288
- `:null,Ige=typeof dm!="string"?y.css`
289
- animation: ${dm} 1.4s ease-in-out infinite;
290
- `:null,Fge=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${y.capitalize(n)}`],svg:["svg"],circle:["circle",`circle${y.capitalize(r)}`,i&&"circleDisableShrink"]};return y.composeClasses(a,Lge,t)},$ge=y.styled("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${y.capitalize(r.color)}`]]}})(y.memoTheme(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Oge||{animation:`${cm} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ri()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Bge=y.styled("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),zge=y.styled("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${y.capitalize(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(y.memoTheme(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Ige||{animation:`${dm} 1.4s ease-in-out infinite`}}]}))),fg=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiCircularProgress"}),C=n,{className:i,color:a="primary",disableShrink:o=!1,size:s=40,style:u,thickness:c=3.6,value:d=0,variant:h="indeterminate"}=C,p=Ge(C,["className","color","disableShrink","size","style","thickness","value","variant"]),m=H(R({},n),{color:a,disableShrink:o,size:s,thickness:c,value:d,variant:h}),v=Fge(m),b={},_={},w={};if(h==="determinate"){const S=2*Math.PI*((Hn-c)/2);b.strokeDasharray=S.toFixed(3),w["aria-valuenow"]=Math.round(d),b.strokeDashoffset=`${((100-d)/100*S).toFixed(3)}px`,_.transform="rotate(-90deg)"}return _e.jsx($ge,H(R(R({className:y.clsx(v.root,i),style:R(R({width:s,height:s},_),u),ownerState:m,ref:r,role:"progressbar"},w),p),{children:_e.jsx(Bge,{className:v.svg,ownerState:m,viewBox:`${Hn/2} ${Hn/2} ${Hn} ${Hn}`,children:_e.jsx(zge,{className:v.circle,style:b,ownerState:m,cx:Hn,cy:Hn,r:(Hn-c)/2,fill:"none",strokeWidth:c})})}))});process.env.NODE_ENV!=="production"&&(fg.propTypes={classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["inherit","primary","secondary","error","info","success","warning"]),y.PropTypes.string]),disableShrink:y.chainPropTypes(y.PropTypes.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:y.PropTypes.oneOfType([y.PropTypes.number,y.PropTypes.string]),style:y.PropTypes.object,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),thickness:y.PropTypes.number,value:y.PropTypes.number,variant:y.PropTypes.oneOf(["determinate","indeterminate"])});function Hge(e){return y.generateUtilityClass("MuiIconButton",e)}const g2=y.generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Wge=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:o}=e,s={root:["root",o&&"loading",r&&"disabled",n!=="default"&&`color${y.capitalize(n)}`,i&&`edge${y.capitalize(i)}`,`size${y.capitalize(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return y.composeClasses(s,Hge,t)},jge=y.styled(y.ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${y.capitalize(r.color)}`],r.edge&&t[`edge${y.capitalize(r.edge)}`],t[`size${y.capitalize(r.size)}`]]}})(y.memoTheme(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),y.memoTheme(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ri()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ri()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${g2.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${g2.loading}`]:{color:"transparent"}}))),Uge=y.styled("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),gn=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiIconButton"}),S=n,{edge:i=!1,children:a,className:o,color:s="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium",id:h,loading:p=null,loadingIndicator:m}=S,v=Ge(S,["edge","children","className","color","disabled","disableFocusRipple","size","id","loading","loadingIndicator"]),b=gc(h),_=m!=null?m:_e.jsx(fg,{"aria-labelledby":b,color:"inherit",size:16}),w=H(R({},n),{edge:i,color:s,disabled:u,disableFocusRipple:c,loading:p,loadingIndicator:_,size:d}),C=Wge(w);return _e.jsxs(jge,H(R({id:p?b:h,className:y.clsx(C.root,o),centerRipple:!0,focusRipple:!c,disabled:u||p,ref:r},v),{ownerState:w,children:[typeof p=="boolean"&&_e.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:_e.jsx(Uge,{className:C.loadingIndicator,ownerState:w,children:p&&_})}),a]}))});process.env.NODE_ENV!=="production"&&(gn.propTypes={children:y.chainPropTypes(y.PropTypes.node,e=>de.Children.toArray(e.children).some(r=>de.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
291
- `)):null),classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),y.PropTypes.string]),disabled:y.PropTypes.bool,disableFocusRipple:y.PropTypes.bool,disableRipple:y.PropTypes.bool,edge:y.PropTypes.oneOf(["end","start",!1]),id:y.PropTypes.string,loading:y.PropTypes.bool,loadingIndicator:y.PropTypes.node,size:y.PropTypes.oneOfType([y.PropTypes.oneOf(["small","medium","large"]),y.PropTypes.string]),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object])});function Vge({fill:e="rgba(38, 46, 61, 0.67)"}){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:O.jsx("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function Gge({title:e,description:t,errorMessages:r=[],styleOptions:n,onRefresh:i}){var w,C,S;const[a,o]=k.useState(null),{themeSettings:s}=y.useThemeContext(),{typography:{primaryTextColor:u,secondaryTextColor:c,fontFamily:d}}=s,{t:h}=O.useTranslation(),p=T=>{o(T.currentTarget)},m=()=>{o(null)},v=k.useMemo(()=>e?O.jsx(vr,{variant:"body2",style:{color:u,fontFamily:d,fontSize:13},children:e}):null,[e,u,d]),b=k.useMemo(()=>r.length===0?null:r.map(T=>O.jsxs(O.Fragment,{children:[O.jsx(Ti,{sx:{my:1,borderColor:c,opacity:.3,marginY:"8px"}}),O.jsxs("div",{className:"csdk-flex",children:[O.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:O.jsx(Vge,{fill:"#fa5656"})}),O.jsx(vr,{variant:"body2",className:"csdk-grow-1",style:{color:c,fontFamily:d,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:T})]})]})),[r,c,d]),_=k.useMemo(()=>t?O.jsxs(O.Fragment,{children:[O.jsx(Ti,{sx:{my:"8px",borderColor:c,opacity:.3}}),O.jsx(vr,{variant:"body2",style:{color:c,fontFamily:d,fontSize:13},children:t})]}):null,[t,c,d]);return O.jsxs(O.Fragment,{children:[O.jsx(Oi,{title:h("widgetHeader.info.tooltip"),style:{color:(w=s.chart)==null?void 0:w.textColor,fontFamily:(C=s.typography)==null?void 0:C.fontFamily},children:O.jsx(gn,{onClick:p,sx:R({p:0},O.MIN_TOUCH_TARGET_SIZE),"data-testid":"widget-header-info-icon-button",children:O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:O.jsx("path",{fill:(n==null?void 0:n.titleTextColor)||s.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),O.jsx(y.Popover,{open:!!a,position:a?{anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:m,children:O.jsxs(FS,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[O.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:P.getSlightlyDifferentColor(s.general.backgroundColor)},children:[O.jsx(vr,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:s.typography.primaryTextColor,fontFamily:s.typography.fontFamily},children:h("widgetHeader.info.details")}),O.jsx(gn,{onClick:i,sx:R({p:0},O.MIN_TOUCH_TARGET_SIZE),"data-testid":"widget-header-refresh-icon-button",children:O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:O.jsx("path",{fill:(S=s.chart)==null?void 0:S.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),O.jsx(Ti,{sx:{borderColor:s.typography.secondaryTextColor,opacity:.3}}),O.jsxs($S,{style:{backgroundColor:s.general.backgroundColor,padding:12},children:[v,b,_]})]})})]})}const pg=()=>{const e=y.useMenuContext();if(!e)throw new U.TranslatableError("errors.missingMenuRoot");return e};function BS({fill:e="rgba(38, 46, 61, 0.67)"}){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7C13 7.55228 12.5523 8 12 8C11.4477 8 11 7.55228 11 7ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16Z",fill:e})})}const v2=28,qge=y.newStyled(gn,{shouldForwardProp:e=>e!=="iconSize"})`
292
- min-width: ${({iconSize:e})=>e!=null?e:v2}px;
293
- min-height: ${({iconSize:e})=>e!=null?e:v2}px;
294
- `,zS=a=>{var o=a,{color:e,onClick:t,ariaLabel:r,size:n}=o,i=Ge(o,["color","onClick","ariaLabel","size"]);const s=k.useCallback(()=>P.getSlightlyDifferentColor(e!=null?e:"",void 0,.1),[e]);return O.jsx(qge,H(R({iconSize:n,sx:{padding:0,"&:hover":{backgroundColor:s()}},onClick:t,"aria-label":r},i),{children:O.jsx(BS,{fill:e})}))};function HS(e){var t;return{key:e.id,caption:e.caption,onClick:e.onClick,subItems:(t=e.items)!=null&&t.length?[{items:e.items.map(HS)}]:void 0}}const WS=({menuItems:e})=>{const{themeSettings:t}=y.useThemeContext(),{openMenu:r}=pg(),n=k.useCallback(i=>{i.stopPropagation();const a=i.currentTarget.getBoundingClientRect();e.length&&r({position:{left:a.right,top:a.bottom},alignment:{horizontal:"right"},itemSections:[{items:e.map(HS)}]})},[e,r]);return O.jsx(zS,{onClick:n,ariaLabel:"widget header toolbar menu",color:t.widget.header.titleTextColor})};function Yge({infoButtonConfig:e,styleOptions:t,onRefresh:r,config:n}){var o,s,u,c;const i=k.useMemo(()=>{var d,h;return P.isUndefined((d=n==null?void 0:n.menu)==null?void 0:d.enabled)?!0:(h=n==null?void 0:n.menu)==null?void 0:h.enabled},[(o=n==null?void 0:n.menu)==null?void 0:o.enabled]),a=O.jsx(O.Fragment,{children:O.jsx(Gge,{title:e.dataSetName,description:e.description,styleOptions:t,errorMessages:e.errorMessages,warningMessages:e.warningMessages,onRefresh:r})});return O.jsxs(O.Fragment,{children:[t!=null&&t.renderToolbar?t.renderToolbar(r,a):a,i&&((s=n==null?void 0:n.menu)==null?void 0:s.items)&&((u=n==null?void 0:n.menu)==null?void 0:u.items.length)>0&&O.jsx(WS,{menuItems:(c=n==null?void 0:n.menu)==null?void 0:c.items})]})}function Xge(e){return e.toLowerCase()}const Zge=({title:e,infoButtonConfig:t,styleOptions:r,onRefresh:n,config:i,titleEditor:a})=>{var d,h;const{themeSettings:o}=y.useThemeContext(),{t:s}=O.useTranslation(),u=U.get(r,"dividerLine",o.widget.header.dividerLine),c=a?O.jsx(Ege,{value:e!=null?e:"",isEditing:a.isEditing,onEditingChange:a.onEditingChange,onCommit:a.onCommit,onCancel:a.onCancel,placeholder:s("widgetHeader.addTitle")}):e;return O.jsxs("div",{"data-component":"widget-header",children:[O.jsxs(Kge,{styleOptions:r,theme:o,"data-component":"header-container",children:[O.jsx(Qge,{styleOptions:r,theme:o,"data-component":"title",children:(h=(d=r==null?void 0:r.renderTitle)==null?void 0:d.call(r,c))!=null?h:c}),O.jsx(Jge,{"data-component":"toolbar-container",children:O.jsx(Yge,{infoButtonConfig:t,styleOptions:r,onRefresh:n,config:i==null?void 0:i.toolbar})})]}),u&&O.jsx(eve,{styleOptions:r,theme:o,"data-component":"widget-header-divider"})]})},Kge=y.newStyled.div`
295
- display: flex;
296
- flex-direction: row;
297
- align-items: center;
298
- padding-left: 8px;
299
- padding-right: 8px;
300
- min-height: 32px;
301
- background-color: ${({styleOptions:e,theme:t})=>(e==null?void 0:e.backgroundColor)||t.widget.header.backgroundColor};
302
- `,Qge=y.newStyled.div`
303
- width: 100%;
304
- white-space: nowrap;
305
- overflow: hidden;
306
- text-align: ${({styleOptions:e,theme:t})=>Xge((e==null?void 0:e.titleAlignment)||t.widget.header.titleAlignment)};
307
- color: ${({styleOptions:e,theme:t})=>(e==null?void 0:e.titleTextColor)||t.widget.header.titleTextColor};
308
- font-family: ${({theme:e})=>{var t,r;return(r=(t=e.typography)==null?void 0:t.fontFamily)!=null?r:"inherit"}};
309
- font-size: ${({theme:e})=>{const t=e.widget.header.titleFontSize;return typeof t=="number"?`${t}px`:t}};
310
- `,Jge=y.newStyled.div`
311
- margin-left: auto;
312
- display: flex;
313
- align-items: center;
314
- `,eve=y.newStyled(Ti)`
315
- background-color: ${({styleOptions:e,theme:t})=>(e==null?void 0:e.dividerLineColor)||t.widget.header.dividerLineColor||"#e6e6e6"};
316
- `;var jS=(e=>(e.None="",e.Large="30px",e.Medium="20px",e.Small="10px",e))(jS||{}),hm=(e=>(e.None="",e.Light="0.15",e.Medium="0.3",e.Dark="0.7",e))(hm||{}),fm=(e=>(e.None="",e.Large="3px 12px",e.Medium="2px 8px",e.Small="1px 4px",e))(fm||{}),Md=(e=>(e.None="",e.Large="15px",e.Medium="10px",e.Small="5px",e))(Md||{});const tve=(e,t)=>{const r=U.get(e,"shadow",t.widget.shadow),n=U.get(e,"spaceAround",t.widget.spaceAround);if(r==="None"||n==="None")return"none";if(r in hm&&n in fm){const i=hm[`${r}`];return`0px ${fm[`${n}`]} rgba(9, 9, 10, ${i})`}return"none"},rve=(e,t)=>{const r=U.get(e,"spaceAround",t.widget.spaceAround);return parseInt(Md[`${r}`]||"0",10)||0},nve=({styleOptions:e,themeSettings:t,hasHeader:r})=>(r?J2:0)+2*rve(e,t),US=e=>O.jsx(qme,{children:O.jsx(ive,R({},e))}),ive=({dataSetName:e,styleOptions:t,headerConfig:r,titleEditor:n,title:i,description:a,topSlot:o,bottomSlot:s,children:u,onRefresh:c=()=>{},contentAreaRef:d})=>{var b,_;const{errors:h,warnings:p}=aS(),{themeSettings:m}=y.useThemeContext(),v=k.useMemo(()=>{var w;return{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((w=m.chart)==null?void 0:w.backgroundColor)}}},[t==null?void 0:t.backgroundColor,(b=m.chart)==null?void 0:b.backgroundColor]);return O.jsx(ave,{className:"csdk-accessible","data-component":"widget-container-root",children:O.jsx(ove,{styleOptions:t,theme:m,"data-component":"widget-container-layout",children:O.jsxs(sve,{styleOptions:t,theme:m,"data-component":"widget-container-card",children:[!((_=t==null?void 0:t.header)!=null&&_.hidden)&&O.jsx(Zge,{title:i,infoButtonConfig:{dataSetName:e,description:a,errorMessages:h,warningMessages:p},styleOptions:t==null?void 0:t.header,config:r,titleEditor:n,onRefresh:c}),O.jsxs(lve,{ref:d,styleOptions:t,theme:m,"data-component":"widget-content-area",children:[o,O.jsx(l_,{theme:v,children:O.jsx(uve,{styleOptions:t,theme:m,"data-component":"widget-container-content",children:u})}),s]})]})})})},ave=y.newStyled.div`
317
- width: 100%;
318
- height: 100%;
319
- overflow: hidden;
320
- `,ove=y.newStyled.div`
321
- box-sizing: border-box;
322
- height: 100%;
323
- padding: ${({styleOptions:e,theme:t})=>Md[U.get(e,"spaceAround",t.widget.spaceAround)]||"0px"};
324
- `,sve=y.newStyled.div`
325
- box-sizing: border-box;
326
- height: 100%;
327
- overflow: hidden;
328
- display: flex;
329
- flex-direction: column;
330
- background-color: ${({styleOptions:e})=>(e==null?void 0:e.backgroundColor)||"unset"};
331
- border-width: ${({styleOptions:e,theme:t})=>U.get(e,"border",t.widget.border)?"1px":"0"};
332
- border-style: solid;
333
- border-color: ${({styleOptions:e,theme:t})=>(e==null?void 0:e.borderColor)||t.widget.borderColor};
334
- border-radius: ${({styleOptions:e,theme:t})=>jS[(e==null?void 0:e.cornerRadius)||t.widget.cornerRadius]||"0"};
335
- box-shadow: ${({styleOptions:e,theme:t})=>tve(e,t)};
336
- `,lve=y.newStyled.div`
337
- flex: 1;
338
- min-height: 0;
339
- display: flex;
340
- flex-direction: column;
341
- overflow: hidden;
342
- background-color: ${({styleOptions:e,theme:t})=>{var r;return(e==null?void 0:e.backgroundColor)||((r=t.chart)==null?void 0:r.backgroundColor)}};
343
- `,uve=y.newStyled.div`
344
- flex-grow: 1;
345
- min-width: 0;
346
- min-height: 0;
347
- background-color: ${({styleOptions:e,theme:t})=>{var r;return(e==null?void 0:e.backgroundColor)||((r=t.chart)==null?void 0:r.backgroundColor)}};
348
- `,cve="file";function mg(e,t){const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=t;try{document.body.appendChild(n),n.click()}finally{URL.revokeObjectURL(r),n.remove()}}function gg(e){const t=e.lastIndexOf("."),r=t===-1?e:e.substring(0,t),n=t===-1?"":e.substring(t);return`${r.replace(/[^a-zA-Z0-9]/g,"")||cve}${n}`}const dve=Object.freeze(Object.defineProperty({__proto__:null,downloadBlobAsFile:mg,normalizeFileName:gg},Symbol.toStringTag,{value:"Module"})),hve="data.csv";function VS(){const[e,t]=k.useState(null),r=y.useExecuteCsvQueryInternal(H(R({},e!=null?e:{dimensions:[],measures:[]}),{enabled:!!e,config:{asDataStream:!0}}));return k.useEffect(()=>{var i;e&&(r.isSuccess&&r.data?(mg(r.data,gg((i=e.filename)!=null?i:hve)),t(null)):r.isError&&t(null))},[e,r.isSuccess,r.isError,r.data]),{execute:k.useCallback(i=>{t(i)},[])}}const y2="widget-download",fve="widget-download-csv-file";function GS({baseHeaderConfig:e,enabled:t,onClick:r}){const{t:n}=O.useTranslation();return k.useMemo(()=>{var u,c,d,h,p;if(!t)return e;const i={id:fve,caption:n("widgetHeader.menu.csvFile"),onClick:r},a=(d=(c=(u=e.toolbar)==null?void 0:u.menu)==null?void 0:c.items)!=null?d:[],o=a.findIndex(m=>m.id===y2),s=o>=0?a.map((m,v)=>{var b;return v===o?H(R({},m),{items:[...(b=m.items)!=null?b:[],i]}):m}):[...a,{id:y2,caption:n("widgetHeader.menu.download"),items:[i]}];return H(R({},e),{toolbar:H(R({},e.toolbar),{menu:H(R({},(p=(h=e.toolbar)==null?void 0:h.menu)!=null?p:{}),{items:s})})})},[e,t,r,n])}const pve="YYYY-MM-DD HH:mm:ss.S";function mve(e){var v,b;const{chartType:t,dataOptions:r,dataSource:n,filters:i,highlights:a,title:o,config:s,baseHeaderConfig:u}=e,c=VS(),d=k.useMemo(()=>{const _=z.isTable(t),{attributes:w,measures:C}=_?C0(tl(r)):w0(r,t),S=w.map(T=>U.isDimensionalLevelAttribute(T)?T.format(pve):T);return{dataSource:n,dimensions:S,measures:C,filters:i,highlights:a,ungroup:_,filename:o?`${o}.csv`:void 0}},[t,r,n,i,a,o]),h=d.dimensions.length>0||d.measures.length>0,p=!!((b=(v=s==null?void 0:s.actions)==null?void 0:v.downloadCsv)!=null&&b.enabled)&&h;return{headerConfig:GS({baseHeaderConfig:u,enabled:p,onClick:()=>h&&c.execute(d)})}}const gve="0,0";function pm(e){return e.map(t=>{if(!U.isDimensionalLevelAttribute(t)||typeof t.format!="function"||t.getFormat())return t;const r=U.DimensionalLevelAttribute.getDefaultFormatForGranularity(t.granularity);return r?t.format(r):t})}function qS(e){return e.map(t=>typeof t.format!="function"||(typeof t.getFormat=="function"?t.getFormat():void 0)?t:t.format(gve))}function YS(e){const[t]=qS([P.translateColumnToMeasure(e)]),r="numberFormatConfig"in e?e.numberFormatConfig:void 0;return r?P.safeCombine(t,{excelNumberFormatConfig:r}):t}function XS(e){return e.map(YS)}const vve="pre",yve="post";function bve(e){var n,i,a,o,s,u;const t=P.getCompleteNumberFormatConfig(e),r=t.name==="Percent";return R(R(R({type:r?"percent":"number",abbreviations:{k:(n=t.kilo)!=null?n:!1,m:(i=t.million)!=null?i:!1,b:(a=t.billion)!=null?a:!1,t:(o=t.trillion)!=null?o:!1},abbreviateAll:!1,decimals:(s=t.decimalScale)!=null?s:"auto",isdefault:!0},t.thousandSeparator!==void 0&&{number:{separated:t.thousandSeparator},separated:t.thousandSeparator}),t.name==="Currency"&&{currency:{symbol:(u=t.symbol)!=null?u:"",position:t.prefix?vve:yve}}),r&&{percent:!0})}const _ve="export",b2={type:"number",abbreviations:{t:!1,b:!1,m:!1,k:!1},abbreviateAll:!1,separated:!0,decimals:"auto",isdefault:!0};function wve(e){const t=e.match(/\.(0+)/);return t?t[1].length:"auto"}function Cve(e,t){const{format:r,jaql:n}=e;if(n.datatype==="datetime")return r!=null?r:{};if(n.datatype!=="numeric"&&!n.agg)return{};if(t)return{mask:bve(t)};if(!r)return{};if(r.mask&&typeof r.mask=="object")return{mask:af(r.mask)};if(typeof r.number=="string"){const i=wve(r.number),a=r.number.includes(",");return r.number.includes("%")?{mask:af({type:"percent",percent:!0,separated:a,decimals:i})}:{mask:af({separated:a,decimals:i})}}return{}}function af(e){const t=e.abbreviations;return R(R(R({},b2),e),t&&typeof t=="object"?{abbreviations:R(R({},b2.abbreviations),t)}:{})}function xve(){return U.v4()}function Tve(e,t){return t&&e.panel==="columns"?"columns":"rows"}function _2({jaqlItem:e,formatItem:t,panel:r,merged:n,extraJaql:i={},id:a,index:o,numberFormatConfig:s}){return{jaql:H(R({},i),{column:e.title,title:e.title,dim:e.dim,merged:n}),field:{id:a,index:o},format:Cve(t!=null?t:{jaql:e,format:void 0},s),panel:r}}function Sve(e,t,r){var o,s;const n=(o=e==null?void 0:e.map((u,c)=>{const d=u.jaql(),h=d.jaql,{level:p,dateTimeLevel:m,bucket:v}=h,b=R(R(R({},p!==void 0&&{level:p}),m!==void 0&&{dateTimeLevel:m}),v!==void 0&&{bucket:v});return _2({jaqlItem:h,formatItem:d,panel:Tve(u,r),merged:!!u.merged,extraJaql:b,id:u.id,index:c})}))!=null?o:[],i=n.length,a=(s=t==null?void 0:t.map((u,c)=>{const d=u.jaql(),h=d.jaql,p=u.excelNumberFormatConfig;return _2({jaqlItem:h,formatItem:d,panel:"measures",merged:!!h.agg,extraJaql:{agg:h.agg},id:u.id,index:i+c,numberFormatConfig:p})}))!=null?s:[];return[...n,...a]}function Mve(e,t){const r=e.jaql(),n=i=>H(R({},i),{panel:"scope"});return t?Array.isArray(r)?r.map(i=>n(H(R({},i),{instanceid:e.config.guid}))):n(H(R({},r),{instanceid:e.config.guid})):Array.isArray(r)?r.map(n):n(r)}function Eve(e){var t;return Object.keys((t=e.jaql.filter)!=null?t:{}).length>0}function Pve(e){const{filters:t,relations:r}=U.getFilterListAndRelationsJaql(e);return[...t!=null?t:[]].flatMap(n=>Mve(n,r)).filter(Eve)}function Ave(e,t){const{dimensions:r,measures:n,filters:i}=e,a=Sve(r,n,t.mergeRows),o=Pve(i);return{datasource:U.convertJaqlDataSource(t.dataSource),widget:`${t.widgetOid};${t.widgetTitle}`,queryGuid:xve(),metadata:[...a,...o],mergeRows:t.mergeRows,count:-1,by:_ve,ungroup:!1}}function Rve(e,t,r){return{widgetId:e.widgetId,widgetType:e.widgetType,jaql:t,mergeRows:r,language:e.language,widgetStyles:{coloringRules:{alternatingRows:!0}}}}function w2(e,t){return y.dataLoadStateReducer(e,t)}function Dve(e){const t=y.useHasChanged(e,["mergeRows","exportRunId","widgetId","widgetTitle","widgetType"]),r=y.useQueryParamsChanged(e);return t||r}function Nve(e,t,r,n,i){var c;const{dimensions:a,measures:o,filters:s}=e,u=Ave({dimensions:a,measures:o,filters:s},{widgetOid:n,widgetTitle:(c=e.widgetTitle)!=null?c:"",dataSource:i,mergeRows:e.mergeRows});return Rve({widgetId:n,widgetType:r,language:t},u,e.mergeRows)}function kve(e,t,r){var c,d;const n=r.widgetType;if(!n){e({type:"error",error:new Error("Excel export requires widgetType (e.g. ChartWidget `chartType`).")});return}const i=r.widgetId;if(!i){e({type:"error",error:new Error("Excel export requires widgetId (e.g. ChartWidget `id` when rendered via `Widget` / dashboard).")});return}e({type:"loading"});const a=t==null?void 0:t.httpClient;if(!a){e({type:"error",error:new U.TranslatableError("errors.executeQueryNoSisenseContext")});return}const o=(c=r.dataSource)!=null?c:t==null?void 0:t.defaultDataSource;if(!o){e({type:"error",error:new U.TranslatableError("errors.executeQueryNoDataSource")});return}const s=(d=t==null?void 0:t.settings.translationConfig.language)!=null?d:"en-US",u=Nve(r,s,n,i,o);new zc(a).exportJaqlToXlsx(u).then(h=>{if(!h||h.size===0){e({type:"error",error:new Error("Excel export returned an empty file.")});return}e({type:"success",data:h})}).catch(h=>{e({type:"error",error:h})})}function Lve(e){const t=Dve(e),[r,n]=k.useReducer(w2,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=y.useSisenseContext();return k.useEffect(()=>{let o=!1;const s=u=>{o||n(u)};return e.enabled?i?(kve(s,a,e),()=>{o=!0}):(s({type:"error",error:new U.TranslatableError("errors.executeQueryNoSisenseContext")}),()=>{o=!0}):()=>{o=!0}},[a,i,e]),r.data&&t?w2(r,{type:"loading"}):r}const Ove="data.xlsx",Ive={dimensions:[],measures:[],mergeRows:!1,enabled:!1};function ZS(){const[e,t]=k.useState(null),r=k.useRef(0),n=k.useMemo(()=>{var o;return H(R(R({},Ive),e!=null?e:{}),{enabled:!!e,mergeRows:(o=e==null?void 0:e.mergeRows)!=null?o:!1})},[e]),i=Lve(n);return k.useEffect(()=>{var o;e&&(i.isSuccess&&i.data?(mg(i.data,gg((o=e.filename)!=null?o:Ove)),t(null)):i.isError&&t(null))},[e,i.isSuccess,i.isError,i.data]),{execute:k.useCallback(o=>{r.current+=1,t(H(R({},o),{exportRunId:r.current}))},[])}}const C2="widget-download",x2="excelFileMenuItem",Fve="downloadExcelRepeatRows",$ve="downloadExcelMergeRows";function KS({baseHeaderConfig:e,enabled:t,onDownloadExcel:r}){const{t:n}=O.useTranslation();return k.useMemo(()=>{var d,h,p,m,v;if(!t)return e;const i={id:Fve,caption:n("widgetHeader.menu.repeatRowsRecommended"),onClick:()=>r(!1)},a={id:$ve,caption:n("widgetHeader.menu.mergeRows"),onClick:()=>r(!0)},o={id:x2,caption:n("widgetHeader.menu.excelFile"),items:[i,a]},s=(p=(h=(d=e.toolbar)==null?void 0:d.menu)==null?void 0:h.items)!=null?p:[],u=s.findIndex(b=>b.id===C2),c=u>=0?s.map((b,_)=>{var w;return _===u?H(R({},b),{items:[...((w=b.items)!=null?w:[]).filter(C=>C.id!==x2),o]}):b}):[...s,{id:C2,caption:n("widgetHeader.menu.download"),items:[o]}];return H(R({},e),{toolbar:H(R({},e.toolbar),{menu:H(R({},(v=(m=e.toolbar)==null?void 0:m.menu)!=null?v:{}),{items:c})})})},[e,t,r,n])}function Bve(e){var _,w,C,S;const{chartType:t,dataOptions:r,dataSource:n,title:i,config:a,baseHeaderConfig:o,id:s,filters:u}=e,c=ZS(),d=!!((w=(_=a==null?void 0:a.actions)==null?void 0:_.downloadExcel)!=null&&w.enabled),h=k.useMemo(()=>{if(!d)return{dataSource:n,dimensions:[],measures:[],ungroup:!1,filename:i?`${i}.xlsx`:void 0,widgetType:t,widgetId:s,widgetTitle:i!=null?i:""};const T=z.isTable(t),{attributes:M,measures:E}=T?(()=>{const D=tl(r),N=[],F=[];for(const B of D.columns)P.isMeasureColumn(B)?F.push(B):N.push(P.translateColumnToAttribute(B));return{attributes:pm(N),measures:XS(F)}})():w0(r,t);return{dataSource:n,dimensions:pm(M),measures:T?E:qS(E),ungroup:!1,filename:i?`${i}.xlsx`:void 0,widgetType:t,widgetId:s,widgetTitle:i!=null?i:""}},[t,r,n,d,s,i]),p=h.dimensions.length>0||h.measures.length>0,m=!!((S=(C=a==null?void 0:a.actions)==null?void 0:C.downloadExcel)!=null&&S.enabled)&&p,v=k.useCallback(T=>{!m||!p||c.execute(H(R({},h),{mergeRows:T,filters:u}))},[c,h,u,p,m]);return{headerConfig:KS({baseHeaderConfig:o,enabled:m,onDownloadExcel:v})}}function QS({onClick:e,isVisible:t}){var o,s;const{themeSettings:r}=y.useThemeContext(),{t:n}=O.useTranslation(),i=r.widget.header.titleTextColor,a=n(t?"ai.buttons.hideNarrative":"ai.buttons.generateNarrative");return O.jsx(Oi,{title:a,style:{color:(o=r.chart)==null?void 0:o.textColor,fontFamily:(s=r.typography)==null?void 0:s.fontFamily},children:O.jsx(gn,{onClick:e,sx:R({p:0},O.MIN_TOUCH_TARGET_SIZE),"data-testid":"widget-narrative-trigger-button",children:t?O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[O.jsx("path",{d:"M15.7324 17.2959C16.0276 17.2959 16.2674 17.535 16.2676 17.8301C16.2676 18.1254 16.0277 18.3652 15.7324 18.3652H3.96973C3.67445 18.3652 3.43555 18.1254 3.43555 17.8301C3.43575 17.535 3.67458 17.2959 3.96973 17.2959H15.7324Z",fill:i}),O.jsx("path",{d:"M11.5049 14.0879C11.8 14.088 12.0389 14.327 12.0391 14.6221C12.0391 14.9173 11.8001 15.1571 11.5049 15.1572H3.96973C3.67445 15.1572 3.43555 14.9174 3.43555 14.6221C3.43572 14.3269 3.67456 14.0879 3.96973 14.0879H11.5049Z",fill:i}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6396 3.75977C15.6769 3.76034 15.7165 3.76229 15.7568 3.76562L15.8818 3.78125L15.9658 3.7998C16.0496 3.82327 16.1309 3.86143 16.2061 3.91699C16.2536 3.95218 16.2931 3.9906 16.3262 4.02832L16.4082 4.13574L16.4717 4.24316C16.5317 4.35233 16.5822 4.46842 16.625 4.57812L16.7598 4.9541L16.9766 5.57324C17.0531 5.79645 17.1335 6.02839 17.2188 6.25391C17.3957 6.72219 17.5715 7.10258 17.7373 7.31055C17.8204 7.41478 18.0107 7.54958 18.333 7.70117C18.6414 7.84617 19.0096 7.97901 19.3906 8.11035C19.7599 8.23765 20.1532 8.36695 20.4668 8.49414C20.6249 8.55827 20.78 8.6291 20.9131 8.70703C21.0352 8.77855 21.1913 8.88626 21.2969 9.04492C21.3413 9.11166 21.4879 9.33064 21.4043 9.62402C21.367 9.75388 21.294 9.85006 21.2373 9.91113C21.1782 9.97469 21.1118 10.0279 21.0508 10.0703C20.9294 10.1546 20.7813 10.2315 20.6318 10.3008C20.3305 10.4405 19.9434 10.5842 19.5664 10.7217C19.1803 10.8625 18.7995 10.9984 18.4775 11.1299C18.1338 11.2703 17.9384 11.3748 17.8711 11.4336C17.7496 11.5399 17.6097 11.7511 17.46 12.0762C17.3151 12.3908 17.1843 12.7601 17.0547 13.1396C16.929 13.5078 16.8004 13.8975 16.6709 14.2109C16.6056 14.3689 16.5338 14.5249 16.4521 14.6592C16.3755 14.7852 16.2634 14.938 16.1025 15.042L15.9795 15.1211L15.834 15.1221L15.6484 15.1113C15.5939 15.1049 15.4886 15.091 15.3789 15.04C15.2863 14.9969 15.2128 14.9386 15.1533 14.874L15.0986 14.8076C14.9821 14.6521 14.9046 14.4792 14.8496 14.3369C14.8066 14.2257 14.7369 14.018 14.7129 13.9531C14.6476 13.7766 14.5747 13.561 14.499 13.3408C14.4223 13.1174 14.3408 12.8828 14.2549 12.6543C14.0755 12.1774 13.8997 11.7923 13.7432 11.5938C13.6511 11.4771 13.4564 11.3375 13.1406 11.1865C12.836 11.0409 12.4741 10.9098 12.0986 10.7812C11.7353 10.6569 11.3452 10.5303 11.0332 10.4053C10.8755 10.3421 10.7201 10.2729 10.5859 10.1953C10.4602 10.1226 10.308 10.0169 10.2002 9.86523C10.1447 9.7871 10.0907 9.68855 10.0664 9.56348C10.0438 9.44657 10.0546 9.34408 10.0635 9.28125L10.0801 9.16504L10.1455 9.06934C10.2472 8.92004 10.395 8.81577 10.5117 8.74512C10.6383 8.66847 10.7856 8.59777 10.9365 8.5332C11.2376 8.40446 11.6102 8.27492 11.9688 8.14844C12.3365 8.01873 12.6973 7.8895 13.0078 7.75488C13.3299 7.6152 13.5426 7.49139 13.6494 7.3916C13.7519 7.29577 13.882 7.09108 14.0283 6.76465C14.1687 6.45142 14.301 6.08302 14.4316 5.70605C14.5588 5.33924 14.6874 4.95438 14.8145 4.64746C14.8783 4.4933 14.9486 4.34186 15.0254 4.21289C15.095 4.09606 15.2033 3.94017 15.3643 3.83789L15.4902 3.75781L15.6396 3.75977ZM15.7305 5.04785C15.6202 5.31696 15.5067 5.65605 15.376 6.0332C15.2459 6.40844 15.101 6.81555 14.9404 7.17383C14.7858 7.51876 14.5898 7.88226 14.332 8.12305C14.0913 8.34782 13.7412 8.52718 13.4053 8.67285C13.0578 8.8235 12.6644 8.96288 12.3018 9.09082C11.9336 9.22069 11.6006 9.33643 11.3379 9.44824C11.3596 9.45734 11.3817 9.46807 11.4053 9.47754C11.6856 9.58986 12.0316 9.70135 12.4219 9.83496C12.7998 9.96435 13.2106 10.1113 13.5723 10.2842C13.9229 10.4518 14.2897 10.6722 14.5283 10.9746C14.7932 11.3105 15.0156 11.8343 15.1914 12.3018C15.2829 12.5452 15.3683 12.7923 15.4453 13.0166C15.5235 13.2441 15.5913 13.444 15.6514 13.6064C15.6926 13.7179 15.7132 13.7801 15.7373 13.8496C15.7402 13.8428 15.7442 13.8361 15.7471 13.8291C15.861 13.5534 15.975 13.2069 16.1084 12.8164C16.2379 12.4373 16.3831 12.0236 16.5518 11.6572C16.7157 11.3013 16.9274 10.9315 17.2129 10.6816C17.4251 10.496 17.7768 10.3359 18.0996 10.2041C18.4444 10.0633 18.8511 9.91845 19.2246 9.78223C19.5633 9.65871 19.8722 9.5392 20.1172 9.43164C20.1085 9.42808 20.0997 9.42452 20.0908 9.4209C19.8098 9.30693 19.4581 9.19136 19.0645 9.05566C18.6828 8.92409 18.2691 8.77567 17.9072 8.60547C17.6027 8.46225 17.2821 8.28011 17.0498 8.04004L16.9561 7.93359C16.6815 7.58929 16.459 7.07278 16.2832 6.60742C16.1921 6.36626 16.1071 6.12142 16.0303 5.89746C15.9525 5.67056 15.8844 5.46912 15.8223 5.30078L15.7305 5.04785Z",fill:i}),O.jsx("path",{d:"M8.49121 10.8799C8.78623 10.8801 9.02525 11.119 9.02539 11.4141C9.02539 11.7092 8.78631 11.949 8.49121 11.9492H3.96973C3.67445 11.9492 3.43555 11.7093 3.43555 11.4141C3.43568 11.1189 3.67454 10.8799 3.96973 10.8799H8.49121Z",fill:i}),O.jsx("path",{d:"M7.48723 19.7499C7.32796 19.9502 7.03648 19.9834 6.83619 19.8241C6.6359 19.6649 6.60264 19.3734 6.76191 19.1731L18.3716 4.57324C18.5309 4.37295 18.8224 4.3397 19.0227 4.49897C19.223 4.65824 19.2562 4.94972 19.097 5.15001L7.48723 19.7499Z",fill:i}),O.jsx("path",{d:"M8.29204 20.2294C8.13277 20.4296 7.84129 20.4629 7.641 20.3036C7.44071 20.1444 7.40745 19.8529 7.56672 19.6526L19.1765 5.05274C19.3357 4.85244 19.6272 4.81919 19.8275 4.97846C20.0278 5.13773 20.061 5.42921 19.9018 5.6295L8.29204 20.2294Z",fill:"white"})]}):O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[O.jsx("path",{d:"M15.7327 17.2958C16.028 17.2958 16.2674 17.5352 16.2674 17.8305C16.2674 18.1257 16.028 18.3651 15.7327 18.3651H3.96977C3.67447 18.3651 3.43509 18.1257 3.43509 17.8305C3.43509 17.5352 3.67447 17.2958 3.96977 17.2958H15.7327Z",fill:i}),O.jsx("path",{d:"M11.5047 14.0877C11.8 14.0877 12.0393 14.3271 12.0393 14.6224C12.0393 14.9177 11.8 15.1571 11.5047 15.1571H3.96977C3.67447 15.1571 3.43509 14.9177 3.43509 14.6224C3.43509 14.3271 3.67447 14.0877 3.96977 14.0877H11.5047Z",fill:i}),O.jsx("path",{d:"M8.49079 10.8796C8.78608 10.8796 9.02547 11.119 9.02547 11.4143C9.02547 11.7096 8.78608 11.949 8.49079 11.949H3.96977C3.67447 11.949 3.43509 11.7096 3.43509 11.4143C3.43509 11.119 3.67447 10.8796 3.96977 10.8796H8.49079Z",fill:i}),O.jsx("path",{d:"M15.6395 3.76001C15.6768 3.76059 15.7164 3.76253 15.7567 3.76587L15.8817 3.78149L15.9657 3.80005C16.0495 3.82352 16.1307 3.86165 16.2059 3.91724C16.2536 3.95245 16.2929 3.99082 16.3261 4.02856L16.4081 4.13599V4.13696L16.4716 4.24341C16.5316 4.35263 16.5821 4.46861 16.6249 4.57837L16.7597 4.95435L16.9764 5.57349C17.053 5.79675 17.1334 6.02858 17.2186 6.25415C17.3956 6.72251 17.5713 7.10285 17.7372 7.31079C17.8203 7.41503 18.0106 7.54982 18.3329 7.70142C18.6413 7.84642 19.0095 7.97925 19.3905 8.1106C19.7598 8.2379 20.153 8.36719 20.4667 8.49438C20.6248 8.55852 20.7799 8.62934 20.913 8.70728C21.0351 8.77881 21.1912 8.88644 21.2968 9.04517H21.2977C21.3422 9.11193 21.4879 9.33075 21.4042 9.62427V9.62524C21.3669 9.75523 21.294 9.85031 21.2372 9.91138C21.178 9.975 21.1117 10.0282 21.0507 10.0706C20.9292 10.1549 20.7813 10.2317 20.6317 10.301C20.3303 10.4407 19.9433 10.5844 19.5663 10.7219C19.1801 10.8628 18.7994 10.9986 18.4774 11.1301C18.1334 11.2706 17.9381 11.3751 17.871 11.4338C17.7495 11.5402 17.6096 11.7512 17.4598 12.0764C17.315 12.3911 17.1842 12.7602 17.0546 13.1399C16.9288 13.5081 16.8004 13.8977 16.6708 14.2112C16.6054 14.3693 16.5337 14.5251 16.452 14.6594C16.3754 14.7855 16.2634 14.9382 16.1024 15.0422L15.9794 15.1213L15.8339 15.1223L15.6483 15.1116C15.5938 15.1051 15.4885 15.0913 15.3788 15.0403C15.2862 14.9972 15.2127 14.9388 15.1532 14.8743L15.0985 14.8079C14.982 14.6523 14.9045 14.4794 14.8495 14.3372C14.8065 14.226 14.7368 14.0183 14.7128 13.9534C14.6475 13.7768 14.5746 13.5613 14.4989 13.3411C14.4222 13.1176 14.3407 12.8832 14.2548 12.6545C14.0754 12.1776 13.8996 11.7925 13.7431 11.594C13.651 11.4773 13.4564 11.3378 13.1405 11.1868C12.8359 11.0412 12.474 10.9101 12.0985 10.7815C11.7352 10.6571 11.3451 10.5306 11.0331 10.4055C10.8754 10.3423 10.72 10.2732 10.5858 10.1956C10.4601 10.1228 10.3078 10.0172 10.2001 9.86548C10.1446 9.78733 10.0906 9.68886 10.0663 9.56372C10.0436 9.44672 10.0545 9.34437 10.0634 9.28149L10.08 9.16528L10.1454 9.06958C10.2471 8.92017 10.3949 8.81605 10.5116 8.74536C10.6383 8.66867 10.7854 8.59805 10.9364 8.53345C11.2375 8.40468 11.61 8.27519 11.9686 8.14868C12.3364 8.01895 12.6972 7.88977 13.0077 7.75513C13.3299 7.61541 13.5424 7.49165 13.6493 7.39185C13.7518 7.29608 13.8818 7.09151 14.0282 6.76489C14.1686 6.45161 14.3008 6.08336 14.4315 5.7063C14.5587 5.33941 14.6872 4.9547 14.8143 4.64771C14.8782 4.49346 14.9484 4.34217 15.0253 4.21313C15.0949 4.09628 15.2031 3.94048 15.3641 3.83813L15.4901 3.75806L15.6395 3.76001ZM15.7304 5.0481C15.62 5.31726 15.5066 5.6562 15.3759 6.03345C15.2458 6.40877 15.1009 6.81573 14.9403 7.17407C14.7857 7.51908 14.5898 7.88251 14.3319 8.12329C14.0911 8.3481 13.7412 8.52741 13.4052 8.6731C13.0576 8.82376 12.6644 8.96311 12.3016 9.09106C11.9334 9.22096 11.6005 9.33665 11.3378 9.44849C11.3595 9.45759 11.3815 9.46832 11.4052 9.47778C11.6854 9.59011 12.0314 9.70159 12.4218 9.83521C12.7997 9.96459 13.2104 10.1115 13.5722 10.2844C13.9228 10.452 14.2896 10.6724 14.5282 10.9749C14.7931 11.3108 15.0155 11.8345 15.1913 12.302C15.2829 12.5455 15.3681 12.7925 15.4452 13.0168C15.5234 13.2444 15.5912 13.4442 15.6513 13.6067C15.6925 13.7182 15.7131 13.7803 15.7372 13.8499C15.7401 13.843 15.744 13.8364 15.747 13.8293C15.8609 13.5536 15.9749 13.2073 16.1083 12.8167C16.2378 12.4375 16.3829 12.024 16.5516 11.6575C16.7156 11.3014 16.9272 10.9318 17.2128 10.6819C17.4249 10.4962 17.7766 10.3362 18.0995 10.2043C18.4443 10.0635 18.8509 9.91872 19.2245 9.78247C19.5632 9.65893 19.8721 9.53946 20.1171 9.43188C20.1084 9.42832 20.0996 9.42476 20.0907 9.42114C19.8097 9.30717 19.458 9.1916 19.0643 9.05591C18.6827 8.92433 18.2691 8.77591 17.9071 8.60547C17.6026 8.46225 17.2821 8.28011 17.0497 8.04004L16.9559 7.93359C16.6813 7.58929 16.459 7.07278 16.2831 6.60742C16.1919 6.36626 16.107 6.12142 16.0302 5.89746C15.9523 5.67056 15.8843 5.46912 15.8222 5.30078L15.7304 5.0481Z",fill:i})]})})})}function Yi(e){var t;return(t=e.config)==null?void 0:t.narrative}function zve(e){if(!(typeof e!="number"||!Number.isFinite(e))){if(e<0||e>1){console.error(`[WidgetNarrative] heightFraction must be in the range [0, 1], got ${e}. The value will be ignored.`);return}return e}}function $i(e){var t,r,n,i,a,o,s;return{enabled:(t=e==null?void 0:e.enabled)!=null?t:!1,verbosity:(r=e==null?void 0:e.verbosity)!=null?r:"low",displayLocation:(n=e==null?void 0:e.displayLocation)!=null?n:"above",autoShow:(i=e==null?void 0:e.autoShow)!=null?i:!0,includeTrendAndForecast:(a=e==null?void 0:e.includeTrendAndForecast)!=null?a:!0,feedback:{enabled:(s=(o=e==null?void 0:e.feedback)==null?void 0:o.enabled)!=null?s:!1},heightFraction:zve(e==null?void 0:e.heightFraction)}}class yo{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const r={listener:t};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Fs=typeof window=="undefined"||"Deno"in window;function Rr(){}function Hve(e,t){return typeof e=="function"?e(t):e}function mm(e){return typeof e=="number"&&e>=0&&e!==1/0}function JS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jo(e,t,r){return pl(e)?typeof t=="function"?H(R({},r),{queryKey:e,queryFn:t}):H(R({},t),{queryKey:e}):e}function Wve(e,t,r){return pl(e)?H(R({},t),{mutationKey:e}):typeof e=="function"?H(R({},t),{mutationFn:e}):R({},e)}function Vn(e,t,r){return pl(e)?[H(R({},t),{queryKey:e}),r]:[e||{},t]}function T2(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(pl(o)){if(n){if(t.queryHash!==vg(o,t.options))return!1}else if(!Aa(t.queryKey,o))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof i!="undefined"&&i!==t.state.fetchStatus||a&&!a(t))}function S2(e,t){const{exact:r,fetching:n,predicate:i,mutationKey:a}=e;if(pl(a)){if(!t.options.mutationKey)return!1;if(r){if(xi(t.options.mutationKey)!==xi(a))return!1}else if(!Aa(t.options.mutationKey,a))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||i&&!i(t))}function vg(e,t){return((t==null?void 0:t.queryKeyHashFn)||xi)(e)}function xi(e){return JSON.stringify(e,(t,r)=>gm(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Aa(e,t){return eM(e,t)}function eM(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!eM(e[r],t[r])):!1}function tM(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=M2(e)&&M2(t);if(n||gm(e)&&gm(t)){const i=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{};let u=0;for(let c=0;c<o;c++){const d=n?c:a[c];s[d]=tM(e[d],t[d],r+1),s[d]===e[d]&&u++}return i===o&&u===i?e:s}return t}function dc(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function M2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gm(e){if(!E2(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const r=t.prototype;return!(!E2(r)||!r.hasOwnProperty("isPrototypeOf"))}function E2(e){return Object.prototype.toString.call(e)==="[object Object]"}function pl(e){return Array.isArray(e)}function rM(e){return new Promise(t=>{setTimeout(t,e)})}function P2(e){rM(0).then(e)}function jve(){if(typeof AbortController=="function")return new AbortController}function vm(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tM(e,t):t}class Uve extends yo{constructor(){super(),this.setup=t=>{if(!Fs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const hc=new Uve,A2=["online","offline"];class Vve extends yo{constructor(){super(),this.setup=t=>{if(!Fs&&window.addEventListener){const r=()=>t();return A2.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{A2.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const fc=new Vve;function Gve(e){return Math.min(1e3*bv(2,e),3e4)}function Ed(e){return(e!=null?e:"online")==="online"?fc.isOnline():!0}class nM{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Fu(e){return e instanceof nM}function iM(e){let t=!1,r=0,n=!1,i,a,o;const s=new Promise((_,w)=>{a=_,o=w}),u=_=>{n||(m(new nM(_)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},h=()=>!hc.isFocused()||e.networkMode!=="always"&&!fc.isOnline(),p=_=>{n||(n=!0,e.onSuccess==null||e.onSuccess(_),i==null||i(),a(_))},m=_=>{n||(n=!0,e.onError==null||e.onError(_),i==null||i(),o(_))},v=()=>new Promise(_=>{i=w=>{const C=n||!h();return C&&_(w),C},e.onPause==null||e.onPause()}).then(()=>{i=void 0,n||e.onContinue==null||e.onContinue()}),b=()=>{if(n)return;let _;try{_=e.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(p).catch(w=>{var C,S;if(n)return;const T=(C=e.retry)!=null?C:3,M=(S=e.retryDelay)!=null?S:Gve,E=typeof M=="function"?M(r,w):M,D=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,w);if(t||!D){m(w);return}r++,e.onFail==null||e.onFail(r,w),rM(E).then(()=>{if(h())return v()}).then(()=>{t?m(w):b()})})};return Ed(e.networkMode)?b():v().then(b),{promise:s,cancel:u,continue:()=>(i==null?void 0:i())?s:Promise.resolve(),cancelRetry:c,continueRetry:d}}const yg=console;function qve(){let e=[],t=0,r=d=>{d()},n=d=>{d()};const i=d=>{let h;t++;try{h=d()}finally{t--,t||s()}return h},a=d=>{t?e.push(d):P2(()=>{r(d)})},o=d=>(...h)=>{a(()=>{d(...h)})},s=()=>{const d=e;e=[],d.length&&P2(()=>{n(()=>{d.forEach(h=>{r(h)})})})};return{batch:i,batchCalls:o,schedule:a,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const gt=qve();class aM{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mm(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Fs?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Yve extends aM{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||yg,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Xve(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=R(R({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const n=vm(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(t),n?n.then(Rr).catch(Rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!JS(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var a;return(a=this.retryer)==null||a.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const o=jve(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};u(s);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(u(d),(n=this.options.behavior)==null||n.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var h;this.dispatch({type:"fetch",meta:(h=d.fetchOptions)==null?void 0:h.meta})}const p=m=>{if(Fu(m)&&m.silent||this.dispatch({type:"error",error:m}),!Fu(m)){var v,b,_,w;(v=(b=this.cache.config).onError)==null||v.call(b,m,this),(_=(w=this.cache.config).onSettled)==null||_.call(w,this.state.data,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=iM({fn:d.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:m=>{var v,b,_,w;if(typeof m=="undefined"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),p(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(v=(b=this.cache.config).onSuccess)==null||v.call(b,m,this),(_=(w=this.cache.config).onSettled)==null||_.call(w,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:p,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=n=>{var i,a;switch(t.type){case"failed":return H(R({},n),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return H(R({},n),{fetchStatus:"paused"});case"continue":return H(R({},n),{fetchStatus:"fetching"});case"fetch":return R(H(R({},n),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Ed(this.options.networkMode)?"fetching":"paused"}),!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return R(H(R({},n),{data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(a=t.dataUpdatedAt)!=null?a:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const o=t.error;return Fu(o)&&o.revert&&this.revertState?H(R({},this.revertState),{fetchStatus:"idle"}):H(R({},n),{error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"});case"invalidate":return H(R({},n),{isInvalidated:!0});case"setState":return R(R({},n),t.state)}};this.state=r(this.state),gt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Xve(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t!="undefined",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n!=null?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Zve extends yo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,n){var i;const a=r.queryKey,o=(i=r.queryHash)!=null?i:vg(a,r);let s=this.get(o);return s||(s=new Yve({cache:this,logger:t.getLogger(),queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(n=>n!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){gt.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=Vn(t,r);return typeof n.exact=="undefined"&&(n.exact=!0),this.queries.find(i=>T2(n,i))}findAll(t,r){const[n]=Vn(t,r);return Object.keys(n).length>0?this.queries.filter(i=>T2(n,i)):this.queries}notify(t){gt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){gt.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){gt.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Kve extends aM{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||yg,this.observers=[],this.state=t.state||oM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=R(R({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(r=>r!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,r;return(t=(r=this.retryer)==null?void 0:r.continue())!=null?t:this.execute()}execute(){return pt(this,null,function*(){const t=()=>{var D;return this.retryer=iM({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,F)=>{this.dispatch({type:"failed",failureCount:N,error:F})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,a,o,s,u,c,d;if(!r){var h,p,m,v;this.dispatch({type:"loading",variables:this.options.variables}),yield(h=(p=this.mutationCache.config).onMutate)==null?void 0:h.call(p,this.state.variables,this);const N=yield(m=(v=this.options).onMutate)==null?void 0:m.call(v,this.state.variables);N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const D=yield t();return yield(n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,D,this.state.variables,this.state.context,this),yield(a=(o=this.options).onSuccess)==null?void 0:a.call(o,D,this.state.variables,this.state.context),yield(s=(u=this.mutationCache.config).onSettled)==null?void 0:s.call(u,D,null,this.state.variables,this.state.context,this),yield(c=(d=this.options).onSettled)==null?void 0:c.call(d,D,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:D}),D}catch(D){try{var b,_,w,C,S,T,M,E;throw yield(b=(_=this.mutationCache.config).onError)==null?void 0:b.call(_,D,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(D),yield(w=(C=this.options).onError)==null?void 0:w.call(C,D,this.state.variables,this.state.context),yield(S=(T=this.mutationCache.config).onSettled)==null?void 0:S.call(T,void 0,D,this.state.variables,this.state.context,this),yield(M=(E=this.options).onSettled)==null?void 0:M.call(E,void 0,D,this.state.variables,this.state.context),D}finally{this.dispatch({type:"error",error:D})}}})}dispatch(t){const r=n=>{switch(t.type){case"failed":return H(R({},n),{failureCount:t.failureCount,failureReason:t.error});case"pause":return H(R({},n),{isPaused:!0});case"continue":return H(R({},n),{isPaused:!1});case"loading":return H(R({},n),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Ed(this.options.networkMode),status:"loading",variables:t.variables});case"success":return H(R({},n),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return H(R({},n),{data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return R(R({},n),t.state)}};this.state=r(this.state),gt.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function oM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Qve extends yo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const i=new Kve({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?t.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){gt.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact=="undefined"&&(t.exact=!0),this.mutations.find(r=>S2(t,r))}findAll(t){return this.mutations.filter(r=>S2(t,r))}notify(t){gt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return gt.batch(()=>r.reduce((n,i)=>n.then(()=>i.continue().catch(Rr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Jve(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,i,a,o;const s=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,u=(n=e.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,c=u==null?void 0:u.pageParam,d=(u==null?void 0:u.direction)==="forward",h=(u==null?void 0:u.direction)==="backward",p=((a=e.state.data)==null?void 0:a.pages)||[],m=((o=e.state.data)==null?void 0:o.pageParams)||[];let v=m,b=!1;const _=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{var D;if((D=e.signal)!=null&&D.aborted)b=!0;else{var N;(N=e.signal)==null||N.addEventListener("abort",()=>{b=!0})}return e.signal}})},w=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),C=(E,D,N,F)=>(v=F?[D,...v]:[...v,D],F?[N,...E]:[...E,N]),S=(E,D,N,F)=>{if(b)return Promise.reject("Cancelled");if(typeof N=="undefined"&&!D&&E.length)return Promise.resolve(E);const B={queryKey:e.queryKey,pageParam:N,meta:e.options.meta};_(B);const G=w(B);return Promise.resolve(G).then($=>C(E,N,$,F))};let T;if(!p.length)T=S([]);else if(d){const E=typeof c!="undefined",D=E?c:R2(e.options,p);T=S(p,E,D)}else if(h){const E=typeof c!="undefined",D=E?c:e1e(e.options,p);T=S(p,E,D,!0)}else{v=[];const E=typeof e.options.getNextPageParam=="undefined";T=(s&&p[0]?s(p[0],0,p):!0)?S([],E,m[0]):Promise.resolve(C([],m[0],p[0]));for(let N=1;N<p.length;N++)T=T.then(F=>{if(s&&p[N]?s(p[N],N,p):!0){const G=E?m[N]:R2(e.options,F);return S(F,E,G)}return Promise.resolve(C(F,m[N],p[N]))})}return T.then(E=>({pages:E,pageParams:v}))}}}}function R2(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function e1e(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class t1e{constructor(t={}){this.queryCache=t.queryCache||new Zve,this.mutationCache=t.mutationCache||new Qve,this.logger=t.logger||yg,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&t.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=hc.subscribe(()=>{hc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=fc.subscribe(()=>{fc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[n]=Vn(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll(H(R({},t),{fetching:!0})).length}getQueryData(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state.data}ensureQueryData(t,r,n){const i=Jo(t,r,n),a=this.getQueryData(i.queryKey);return a?Promise.resolve(a):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(t,r,n){const i=this.queryCache.find(t),a=i==null?void 0:i.state.data,o=Hve(r,a);if(typeof o=="undefined")return;const s=Jo(t),u=this.defaultQueryOptions(s);return this.queryCache.build(this,u).setData(o,H(R({},n),{manual:!0}))}setQueriesData(t,r,n){return gt.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state}removeQueries(t,r){const[n]=Vn(t,r),i=this.queryCache;gt.batch(()=>{i.findAll(n).forEach(a=>{i.remove(a)})})}resetQueries(t,r,n){const[i,a]=Vn(t,r,n),o=this.queryCache,s=R({type:"active"},i);return gt.batch(()=>(o.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(s,a)))}cancelQueries(t,r,n){const[i,a={}]=Vn(t,r,n);typeof a.revert=="undefined"&&(a.revert=!0);const o=gt.batch(()=>this.queryCache.findAll(i).map(s=>s.cancel(a)));return Promise.all(o).then(Rr).catch(Rr)}invalidateQueries(t,r,n){const[i,a]=Vn(t,r,n);return gt.batch(()=>{var o,s;if(this.queryCache.findAll(i).forEach(c=>{c.invalidate()}),i.refetchType==="none")return Promise.resolve();const u=H(R({},i),{type:(o=(s=i.refetchType)!=null?s:i.type)!=null?o:"active"});return this.refetchQueries(u,a)})}refetchQueries(t,r,n){const[i,a]=Vn(t,r,n),o=gt.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var c;return u.fetch(void 0,H(R({},a),{cancelRefetch:(c=a==null?void 0:a.cancelRefetch)!=null?c:!0,meta:{refetchPage:i.refetchPage}}))}));let s=Promise.all(o).then(Rr);return a!=null&&a.throwOnError||(s=s.catch(Rr)),s}fetchQuery(t,r,n){const i=Jo(t,r,n),a=this.defaultQueryOptions(i);typeof a.retry=="undefined"&&(a.retry=!1);const o=this.queryCache.build(this,a);return o.isStaleByTime(a.staleTime)?o.fetch(a):Promise.resolve(o.state.data)}prefetchQuery(t,r,n){return this.fetchQuery(t,r,n).then(Rr).catch(Rr)}fetchInfiniteQuery(t,r,n){const i=Jo(t,r,n);return i.behavior=Jve(),this.fetchQuery(i)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(Rr).catch(Rr)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,r){const n=this.queryDefaults.find(i=>xi(t)===xi(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>Aa(t,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>Aa(t,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(t)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const n=this.mutationDefaults.find(i=>xi(t)===xi(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>Aa(t,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>Aa(t,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(t)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r=H(R(R(R({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=vg(r.queryKey,r)),typeof r.refetchOnReconnect=="undefined"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary=="undefined"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:H(R(R(R({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class r1e extends yo{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),D2(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ym(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ym(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),process.env.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)!="undefined"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),dc(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const a=this.hasListeners();a&&N2(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),a&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();a&&(this.currentQuery!==i||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t),n=this.createResult(r,t);return i1e(this,n,t)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(n={}){var i=n,{refetchPage:t}=i,r=Ge(i,["refetchPage"]);return this.fetch(H(R({},r),{meta:{refetchPage:t}}))}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){var r;return this.executeFetch(H(R({},t),{cancelRefetch:(r=t.cancelRefetch)!=null?r:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Rr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Fs||this.currentResult.isStale||!mm(this.options.staleTime))return;const r=JS(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Fs||this.options.enabled===!1||!mm(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||hc.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const n=this.currentQuery,i=this.options,a=this.currentResult,o=this.currentResultState,s=this.currentResultOptions,u=t!==n,c=u?t.state:this.currentQueryInitialState,d=u?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:p,error:m,errorUpdatedAt:v,fetchStatus:b,status:_}=h,w=!1,C=!1,S;if(r._optimisticResults){const N=this.hasListeners(),F=!N&&D2(t,r),B=N&&N2(t,n,r,i);(F||B)&&(b=Ed(t.options.networkMode)?"fetching":"paused",p||(_="loading")),r._optimisticResults==="isRestoring"&&(b="idle")}if(r.keepPreviousData&&!h.dataUpdatedAt&&d!=null&&d.isSuccess&&_!=="error")S=d.data,p=d.dataUpdatedAt,_=d.status,w=!0;else if(r.select&&typeof h.data!="undefined")if(a&&h.data===(o==null?void 0:o.data)&&r.select===this.selectFn)S=this.selectResult;else try{this.selectFn=r.select,S=r.select(h.data),S=vm(a==null?void 0:a.data,S,r),this.selectResult=S,this.selectError=null}catch(N){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(N),this.selectError=N}else S=h.data;if(typeof r.placeholderData!="undefined"&&typeof S=="undefined"&&_==="loading"){let N;if(a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))N=a.data;else if(N=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof N!="undefined")try{N=r.select(N),this.selectError=null}catch(F){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(F),this.selectError=F}typeof N!="undefined"&&(_="success",S=vm(a==null?void 0:a.data,N,r),C=!0)}this.selectError&&(m=this.selectError,S=this.selectResult,v=Date.now(),_="error");const T=b==="fetching",M=_==="loading",E=_==="error";return{status:_,fetchStatus:b,isLoading:M,isSuccess:_==="success",isError:E,isInitialLoading:M&&T,data:S,dataUpdatedAt:p,error:m,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:T,isRefetching:T&&!M,isLoadingError:E&&h.dataUpdatedAt===0,isPaused:b==="paused",isPlaceholderData:C,isPreviousData:w,isRefetchError:E&&h.dataUpdatedAt!==0,isStale:bg(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,dc(n,r))return;this.currentResult=n;const i={cache:!0},a=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!this.trackedProps.size)return!0;const u=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&u.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==r[d]&&u.has(d)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),this.notify(R(R({},i),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Fu(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){gt.batch(()=>{if(t.onSuccess){var r,n,i,a;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(a=this.options).onSettled)==null||i.call(a,this.currentResult.data,null)}else if(t.onError){var o,s,u,c;(o=(s=this.options).onError)==null||o.call(s,this.currentResult.error),(u=(c=this.options).onSettled)==null||u.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function n1e(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function D2(e,t){return n1e(e,t)||e.state.dataUpdatedAt>0&&ym(e,t,t.refetchOnMount)}function ym(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&bg(e,t)}return!1}function N2(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&bg(e,r)}function bg(e,t){return e.isStaleByTime(t.staleTime)}function i1e(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!dc(e.getCurrentResult(),t)}var bm={exports:{}},of={};/**
349
- * @license React
350
- * use-sync-external-store-shim.production.js
351
- *
352
- * Copyright (c) Meta Platforms, Inc. and affiliates.
353
- *
354
- * This source code is licensed under the MIT license found in the
355
- * LICENSE file in the root directory of this source tree.
356
- */var k2;function a1e(){if(k2)return of;k2=1;var e=k;function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(h,p){var m=p(),v=n({inst:{value:m,getSnapshot:p}}),b=v[0].inst,_=v[1];return a(function(){b.value=m,b.getSnapshot=p,u(b)&&_({inst:b})},[h,m,p]),i(function(){return u(b)&&_({inst:b}),h(function(){u(b)&&_({inst:b})})},[h]),o(m),m}function u(h){var p=h.getSnapshot;h=h.value;try{var m=p();return!r(h,m)}catch(v){return!0}}function c(h,p){return p()}var d=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?c:s;return of.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,of}var sf={};/**
357
- * @license React
358
- * use-sync-external-store-shim.development.js
359
- *
360
- * Copyright (c) Meta Platforms, Inc. and affiliates.
361
- *
362
- * This source code is licensed under the MIT license found in the
363
- * LICENSE file in the root directory of this source tree.
364
- */var L2;function o1e(){return L2||(L2=1,process.env.NODE_ENV!=="production"&&function(){function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}function t(m,v){d||i.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=v();if(!h){var _=v();a(b,_)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}_=o({inst:{value:b,getSnapshot:v}});var w=_[0].inst,C=_[1];return u(function(){w.value=b,w.getSnapshot=v,r(w)&&C({inst:w})},[m,b,v]),s(function(){return r(w)&&C({inst:w}),m(function(){r(w)&&C({inst:w})})},[m]),c(b),b}function r(m){var v=m.getSnapshot;m=m.value;try{var b=v();return!a(m,b)}catch(_){return!0}}function n(m,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=k,a=typeof Object.is=="function"?Object.is:e,o=i.useState,s=i.useEffect,u=i.useLayoutEffect,c=i.useDebugValue,d=!1,h=!1,p=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?n:t;sf.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sf}process.env.NODE_ENV==="production"?bm.exports=a1e():bm.exports=o1e();var s1e=bm.exports;const sM=s1e.useSyncExternalStore,O2=de.createContext(void 0),lM=de.createContext(!1);function uM(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=O2),window.ReactQueryClientContext):O2)}const cM=({context:e}={})=>{const t=de.useContext(uM(e,de.useContext(lM)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l1e=({client:e,children:t,context:r,contextSharing:n=!1})=>{de.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&n&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=uM(r,n);return de.createElement(lM.Provider,{value:!r&&n},de.createElement(i.Provider,{value:e},t))},u1e=de.createContext(!1),c1e=()=>de.useContext(u1e);function d1e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const h1e=de.createContext(d1e()),f1e=()=>de.useContext(h1e);function dM(e,t){return typeof e=="function"?e(...t):!!e}const p1e=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},m1e=e=>{de.useEffect(()=>{e.clearReset()},[e])},g1e=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&dM(r,[e.error,n]),v1e=e=>{e.suspense&&(typeof e.staleTime!="number"&&(e.staleTime=1e3),typeof e.cacheTime=="number"&&(e.cacheTime=Math.max(e.cacheTime,1e3)))},y1e=(e,t)=>e.isLoading&&e.isFetching&&!t,b1e=(e,t,r)=>(e==null?void 0:e.suspense)&&y1e(t,r),_1e=(e,t,r)=>t.fetchOptimistic(e).then(({data:n})=>{e.onSuccess==null||e.onSuccess(n),e.onSettled==null||e.onSettled(n,null)}).catch(n=>{r.clearReset(),e.onError==null||e.onError(n),e.onSettled==null||e.onSettled(void 0,n)});function w1e(e,t){const r=cM({context:e.context}),n=c1e(),i=f1e(),a=r.defaultQueryOptions(e);a._optimisticResults=n?"isRestoring":"optimistic",a.onError&&(a.onError=gt.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=gt.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=gt.batchCalls(a.onSettled)),v1e(a),p1e(a,i),m1e(i);const[o]=de.useState(()=>new t(r,a)),s=o.getOptimisticResult(a);if(sM(de.useCallback(u=>{const c=n?()=>{}:o.subscribe(gt.batchCalls(u));return o.updateResult(),c},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),de.useEffect(()=>{o.setOptions(a,{listeners:!1})},[a,o]),b1e(a,s,n))throw _1e(a,o,i);if(g1e({result:s,errorResetBoundary:i,useErrorBoundary:a.useErrorBoundary,query:o.getCurrentQuery()}))throw s.error;return a.notifyOnChangeProps?s:o.trackResult(s)}function _g(e,t,r){const n=Jo(e,t,r);return w1e(n,r1e)}const _m="ComposeSDK";function hM(e){return H(R({},e),{jaql:H(R({},e.jaql),{by:_m})})}const C1e="api/v2/ai/narrative",fM="api/v2/ai/nlg/queryResult";function pM(e){return"status"in e}function x1e(e){return typeof e!="object"||e===null?!1:pM(e)&&e.status==="404"}function T1e(e){return typeof e!="object"||e===null?!1:pM(e)&&e.status==="400"}function S1e(e,t){return pt(this,null,function*(){const r=hM(t);try{return yield e.post(C1e,r)}catch(n){if(!x1e(n))throw n;return yield e.post(fM,r)}})}function mM(e,t,r){return pt(this,null,function*(){const{canGenerateNarrativeViaAI:n,fallbackRequestOn400:i}=r!=null?r:{},a=o=>n?S1e(e,o):e.post(fM,hM(o));if(!i)return a(t);try{return yield a(t)}catch(o){if(!T1e(o))throw o;return a(i)}})}function Pd(e){var s,u;if("jaql"in e)return H(R({},e),{jaql:H(R({},e.jaql),{by:_m})});const t=U.convertJaqlDataSource(e.dataSource),{filters:r=[],relations:n}=U.getFilterListAndRelationsJaql(e.filters),{metadata:i,filterRelations:a}=U.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(s=e.dimensions)!=null?s:[],measures:(u=e.measures)!=null?u:[],filters:r,filterRelations:n,highlights:[]},!0),o={jaql:{datasource:t,metadata:i,filterRelations:a,by:_m}};return e.verbosity&&(o.verbosity=e.verbosity),o}const M1e=Pd;function gM(e,t,r){const n=e.map(z.toDimensionQueryAdaptItem),i=t.map(z.toMeasureQueryAdaptItem);return{dimensions:z.adaptDimensionsForQuery(n),measures:z.adaptMeasuresForQuery(i,r)}}function E1e(e){const t=[],r=[];for(const n of e)P.isMeasureColumn(n)?r.push(n):t.push(n);return{dimensionColumns:t,measureColumns:r}}function P1e(e,t,r){const n=R3(t,e),i=D3(t,n),a=P3(i,t);return gM(k3(a,t),L3(a,t),r)}function A1e(e,t){const r=tl(e),{dimensionColumns:n,measureColumns:i}=E1e(r.columns);return gM(n,i,t)}function vM(e){if(e!==void 0)return e==="high"?"High":"Low"}function R1e(e,t){const{dataSource:r,dataOptions:n,chartType:i,filters:a}=e,o=r!=null?r:t;if(!o)throw new Error("dataSource is required. Provide it in ChartWidgetProps or as defaultDataSource parameter.");const{verbosity:s,includeTrendAndForecast:u}=$i(Yi(e)),c={includeTrendAndForecast:u},{dimensions:d,measures:h}=z.isTable(i)?A1e(n,c):P1e(n,i,c);return{dataSource:o,dimensions:d,measures:h,filters:a,verbosity:vM(s)}}function D1e(e,t){var w,C,S;const r=(w=e.dataSource)!=null?w:t;if(!r)throw new Error("dataSource is required. Provide it in pivot widget props or as defaultDataSource parameter.");const{verbosity:n,includeTrendAndForecast:i}=$i(Yi(e)),a=!i&&e.dataOptions.values?H(R({},e.dataOptions),{values:e.dataOptions.values.map(T=>P.isMeasureColumn(T)&&("trend"in T||"forecast"in T)?U.omit(T,["trend","forecast"]):T)}):e.dataOptions,o=O3(a),{rows:s,columns:u,values:c,grandTotals:d}=cg(o),{filters:h=[],relations:p}=U.getFilterListAndRelationsJaql((C=e.filters)!=null?C:[]),m=h.map(T=>P.safeCombine(T,{isScope:!0})),v=((S=e.highlights)!=null?S:[]).map(T=>P.safeCombine(T,{isScope:!0})),b={dataSource:r,rowsAttributes:s!=null?s:[],columnsAttributes:u!=null?u:[],measures:c!=null?c:[],grandTotals:R(R({},U.DEFAULT_PIVOT_GRAND_TOTALS),d!=null?d:{}),filters:m,filterRelations:p,highlights:v};Dw(b);const _=U.getPivotJaqlQueryPayload(b,!1);return Pd({jaql:_,verbosity:vM(n)})}function bu(e,t){if(P.isPivotTableWidgetProps(e))return D1e(e,t);if(P.isChartWidgetProps(e))return Pd(R1e(e,t));throw new Error("Expected chart or pivot widget props")}function N1e(e){return P.isChartWidgetProps(e)||P.isPivotTableWidgetProps(e)?$i(Yi(e)):$i(void 0)}const k1e="dataSource is required. Provide it on the widget props, defaultDataSource parameter or via SisenseContextProvider.";function $u(){return{supported:!1,narrativeRequest:void 0,narrativeFallbackRequest:void 0}}function I2(){return H(R({},$u()),{missingDataSource:!0})}function F2(e){var r;if(!P.isChartWidgetProps(e)&&!P.isPivotTableWidgetProps(e))return e;const t=Yi(e);return H(R({},e),{config:H(R({},(r=e.config)!=null?r:{}),{narrative:H(R({},t!=null?t:{}),{includeTrendAndForecast:!1})})})}function yM(e,t){var n,i;const{includeTrendAndForecast:r}=N1e(e);if(P.isPivotTableWidgetProps(e)){if(!((n=e.dataSource)!=null?n:t))return I2();let a;try{a=bu(e,t)}catch(s){return $u()}let o;if(r)try{o=bu(F2(e),t)}catch(s){}return{supported:!0,narrativeRequest:a,narrativeFallbackRequest:o}}if(P.isChartWidgetProps(e)){if(!((i=e.dataSource)!=null?i:t))return I2();let a;try{a=bu(e,t)}catch(s){return $u()}let o;if(r)try{o=bu(F2(e),t)}catch(s){}return{supported:!0,narrativeRequest:a,narrativeFallbackRequest:o}}return $u()}const L1e={dataSource:"__WidgetNarrativeInactive__",dimensions:[],measures:[],filters:[]};function bM({widgetProps:e,enabled:t=!0}){var S,T;const{app:r}=y.useSisenseContext(),n=r==null?void 0:r.httpClient,i=k.useMemo(()=>{var M,E;return{canGenerateNarrativeViaAI:(E=(M=r==null?void 0:r.settings)==null?void 0:M.narrative)==null?void 0:E.canGenerateNarrativeViaAI}},[(T=(S=r==null?void 0:r.settings)==null?void 0:S.narrative)==null?void 0:T.canGenerateNarrativeViaAI]),{supported:a,narrativeRequest:o,narrativeFallbackRequest:s}=k.useMemo(()=>yM(e,r==null?void 0:r.defaultDataSource),[e,r==null?void 0:r.defaultDataSource]),u=k.useMemo(()=>a&&o?o:Pd(L1e),[a,o]),c=a&&t&&!!n,d=n?n.url:null,h=k.useMemo(()=>JSON.stringify(u),[u]),{data:p,error:m,isError:v,isLoading:b,isSuccess:_,refetch:w}=_g({queryKey:["narrative",h,d,i.canGenerateNarrativeViaAI],queryFn:()=>n?mM(n,u,H(R({},i),{fallbackRequestOn400:s})):Promise.reject(new Error("HttpClient is required for narrative requests")),select:M=>{var E;return(E=M==null?void 0:M.data)==null?void 0:E.answer},enabled:c}),C=k.useCallback(()=>{w()},[w]);return t?{isLoading:b,isError:v,isSuccess:_,data:p,error:m,refetch:C,supported:a,enabled:!0,narrativeRequest:a?o:void 0}:{isLoading:!1,isError:!1,isSuccess:!1,data:void 0,error:void 0,refetch:C,supported:a,enabled:!1,narrativeRequest:void 0}}function O1e(e){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.textContent=`A
365
- A`,Object.assign(t.style,{position:"absolute",visibility:"hidden",pointerEvents:"none",whiteSpace:"pre",margin:"0",padding:"0",border:"0"}),e.appendChild(t);const{height:r}=t.getBoundingClientRect();return e.removeChild(t),r>0?r/2:null}function I1e(e){const[t,r]=k.useState(null),n=k.useRef({element:null,ro:null,cancelled:!1});return k.useLayoutEffect(()=>{var c;const i=e.current,a=n.current;if(i===a.element)return;if(a.cancelled=!0,(c=a.ro)==null||c.disconnect(),a.ro=null,a.element=i,!i){r(null);return}a.cancelled=!1;const o=()=>{if(a.cancelled)return;const d=O1e(i);d!=null&&r(h=>h===d?h:d)};o();const s=document.fonts;s&&s.status!=="loaded"&&s.ready.then(o);const u=new ResizeObserver(o);u.observe(i),a.ro=u}),k.useEffect(()=>()=>{var i;n.current.cancelled=!0,(i=n.current.ro)==null||i.disconnect()},[]),t}const F1e=18,$1e=5;function _M({text:e,maxCollapsedHeightPx:t,maxExpandedHeightPx:r,reserveCollapsedHeight:n=!1,noCollapse:i=!1,isLoading:a=!1,isError:o=!1,onCollapsedChange:s,textClassName:u,showDisclaimer:c=!1}){const[d,h]=k.useState(!0),[p,m]=k.useState(!1),v=k.useRef(null),b=k.useRef(null),[_,w]=k.useState(0),{t:C}=O.useTranslation(),{themeSettings:S}=y.useThemeContext(),T=I1e(v),M=T!=null?T:F1e,E=k.useMemo(()=>t!==void 0&&t>0?Math.max(Math.floor(t/M)*M,M):$1e*M,[t,M]),D=Math.max(Math.floor((E-_)/M)*M,M);k.useLayoutEffect(()=>{var j,q;const V=(q=(j=b.current)==null?void 0:j.offsetHeight)!=null?q:0;if(w(te=>te===V?te:V),i||!v.current)return;const Z=Math.max(Math.floor((E-V)/M)*M,M);m(v.current.scrollHeight>Z)},[i,E,M,a,c]),k.useEffect(()=>{if(i||!v.current)return;const V=v.current,Z=new ResizeObserver(()=>{m(V.scrollHeight>D)});return Z.observe(V),()=>Z.disconnect()},[i,D]),k.useEffect(()=>{const V=b.current;if(!V)return;const Z=new ResizeObserver(()=>{const j=V.offsetHeight;w(q=>q===j?q:j)});return Z.observe(V),()=>Z.disconnect()},[c,a]);const N=()=>{h(!1),s==null||s(!1)},F=()=>{h(!0),s==null||s(!0)},B=V=>Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),V())},G=!i&&p&&d,Y=!i&&p&&!d,$=r?r-_:void 0;let X;return!i&&d?X=n?{height:D,overflow:"hidden"}:{maxHeight:D,overflow:"hidden"}:X={overflow:"auto",maxHeight:$},o?O.jsx("div",{style:{width:"100%"},children:O.jsx(y.ErrorBoundaryBox,{error:C("ai.errors.unexpected")})}):O.jsxs("div",{className:"csdk-min-w-0 csdk-flex-1",children:[O.jsx("div",{style:X,children:a?O.jsx(y.LoadingOverlay,{isVisible:!0}):O.jsx("div",{ref:v,className:["csdk-whitespace-pre-wrap",u].filter(Boolean).join(" "),style:{color:S.typography.primaryTextColor},children:e})}),O.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between",children:[c&&!a&&O.jsx("div",{ref:b,className:"csdk-text-ai-xs csdk-pt-2",style:{color:S.typography.secondaryTextColor},children:C("ai.disclaimer.poweredByAi")}),(G||Y)&&O.jsx("div",{className:"csdk-mt-3 csdk-flex csdk-justify-end",children:O.jsx("div",{className:"csdk-text-ai-xs csdk-text-text-link csdk-cursor-pointer",onClick:G?N:F,onKeyDown:B(G?N:F),role:"button",tabIndex:0,children:C(G?"ai.buttons.readMore":"ai.buttons.collapse")})})]})]})}function wM(n){var i=n,{constrainedHeightPx:e,maxConstrainedHeightPx:t}=i,r=Ge(i,["constrainedHeightPx","maxConstrainedHeightPx"]);return O.jsx(_M,H(R({},r),{showDisclaimer:!0,maxCollapsedHeightPx:e,maxExpandedHeightPx:t,reserveCollapsedHeight:!0,textClassName:"csdk-text-[13px]"}))}const CM=18,xM=12,wm=8,B1e=0,z1e=0,H1e=CM+B1e+z1e,Cm=y.newStyled.div`
366
- box-sizing: border-box;
367
- margin: 0;
368
- padding: ${({$horizontalInset:e})=>e?`${wm}px ${xM}px 0 ${H1e}px`:"8px 0 0"};
369
- width: 100%;
370
- color: ${({theme:e})=>e.chart.textColor};
371
- background-color: ${({theme:e})=>e.chart.backgroundColor};
372
- `,W1e="api/v2/ai/feedback";function j1e(e,t){return e.post(W1e,t)}const TM=()=>{const[e,t]=k.useState(!1),r=k.useRef(null),n=k.useCallback(()=>{t(!0)},[]),i=k.useCallback(()=>{t(!1)},[]);return[k.useCallback(o=>{var s;((s=r.current)==null?void 0:s.nodeType)===Node.ELEMENT_NODE&&(r.current.removeEventListener("mouseenter",n),r.current.removeEventListener("mouseleave",i)),(o==null?void 0:o.nodeType)===Node.ELEMENT_NODE&&(o.addEventListener("mouseenter",n),o.addEventListener("mouseleave",i)),r.current=o},[n,i]),e]},SM=y.newStyled.div`
373
- display: flex;
374
- flex-direction: row;
375
- align-items: center;
376
- gap: 10px;
377
- width: 100%;
378
- box-sizing: border-box;
379
- padding-left: ${CM}px;
380
- padding-right: ${xM}px;
381
- `,MM=y.newStyled.div`
382
- align-self: flex-start;
383
- `,U1e=y.newStyled.div`
384
- display: flex;
385
- flex-direction: column;
386
- row-gap: ${({theme:e})=>e.aiChat.body.gapBetweenMessages};
387
- `;function EM({theme:e}){const t=e.general.brandColor;return O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"-2 -3 24 24",fill:"none","aria-hidden":!0,"data-testid":"narrative-ai-icon",children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0533 3.62671e-06C12.0557 -9.45649e-05 12.0577 0.00181346 12.0578 0.00422597C12.1926 3.98958 15.4422 7.18501 19.4491 7.23273C19.4494 7.23273 19.4496 7.23296 19.4496 7.23325C19.4496 7.23356 19.4494 7.23381 19.4491 7.23382C15.3869 7.2822 12.1029 10.5659 12.054 14.628C12.054 14.6283 12.0538 14.6285 12.0535 14.6285C12.0532 14.6285 12.0529 14.6283 12.0529 14.628C12.0047 10.6218 8.80995 7.37281 4.8253 7.23765C4.82287 7.23757 4.82095 7.23552 4.82105 7.2331C4.82114 7.23081 4.82301 7.22897 4.8253 7.2289C8.75488 7.0956 11.9163 3.93392 12.0491 0.004224C12.0492 0.00194873 12.051 9.62326e-05 12.0533 3.62671e-06Z",fill:t}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.0973 12.7759C7.1172 12.7236 5.51984 11.1352 5.45331 9.1587C5.45326 9.1573 5.45209 9.1562 5.4507 9.15625C5.44938 9.1563 5.44832 9.15738 5.44828 9.15869C5.38204 11.1266 3.79825 12.7098 1.83009 12.7751C1.82969 12.7752 1.82936 12.7755 1.82935 12.7759C1.82933 12.7763 1.82967 12.7767 1.83009 12.7767C3.8264 12.8429 5.42727 14.4708 5.45019 16.4778C5.45019 16.4781 5.45045 16.4784 5.45077 16.4784C5.45111 16.4784 5.4514 16.4781 5.4514 16.4778C5.47442 14.4622 7.089 12.8289 9.0973 12.7759Z",fill:t}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.8778 2.15728C2.87779 2.15701 2.8779 2.15674 2.8781 2.15655C2.87874 2.15591 2.87983 2.15638 2.87981 2.15728C2.87934 2.17566 2.87911 2.1941 2.87911 2.21259C2.87911 3.36434 3.78842 4.30371 4.92829 4.35195C3.78842 4.40019 2.87911 5.33955 2.87911 6.4913C2.87911 6.56284 2.88262 6.63356 2.88947 6.7033C2.89045 6.7133 2.8783 6.71912 2.87119 6.71202C2.86894 6.70976 2.86781 6.70662 2.86813 6.70344C2.87499 6.63366 2.8785 6.56289 2.8785 6.4913C2.8785 5.33956 1.96921 4.40021 0.829346 4.35195C1.96921 4.30369 2.8785 3.36433 2.8785 2.21259C2.8785 2.1941 2.87827 2.17566 2.8778 2.15728ZM5.16566 4.35485C5.16834 4.35503 5.16981 4.35179 5.16791 4.34989C5.16732 4.3493 5.1665 4.34899 5.16567 4.34905C5.14802 4.35023 5.13031 4.3512 5.11255 4.35195C5.13031 4.3527 5.14801 4.35367 5.16566 4.35485Z",fill:t})]})}function V1e({color:e,bold:t=!1}){const r=t?{stroke:e,strokeWidth:1,paintOrder:"stroke fill"}:{};return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:O.jsx("path",R({fillRule:"evenodd",clipRule:"evenodd",d:"M18.5798 14.7911C18.8749 14.4146 19.0165 14.011 18.9985 13.5954C18.9804 13.1377 18.7757 12.7793 18.607 12.5595C18.8027 12.0715 18.878 11.3036 18.2245 10.7073C17.7456 10.2705 16.9325 10.0748 15.806 10.1289C15.014 10.1651 14.3513 10.3127 14.3243 10.3187H14.3213C14.1708 10.3458 14.011 10.3789 13.8484 10.4151C13.8363 10.2223 13.8696 9.74345 14.2248 8.66522C14.6465 7.38231 14.6225 6.40041 14.1466 5.74397C13.6466 5.05425 12.8485 5 12.6136 5C12.3877 5 12.1799 5.09336 12.0324 5.26499C11.6981 5.6535 11.7373 6.37026 11.7793 6.70158C11.3818 7.76777 10.2676 10.382 9.32479 11.1077C9.30668 11.1198 9.2917 11.1349 9.27671 11.1499C8.99949 11.4421 8.81287 11.7583 8.68642 12.0353C8.50861 11.939 8.30687 11.8848 8.08995 11.8848H6.25291C5.56014 11.8848 5 12.448 5 13.1377V18.0318C5 18.7244 5.56323 19.2847 6.25291 19.2847H8.08995C8.35803 19.2847 8.60804 19.2003 8.81287 19.0557L9.52051 19.1401C9.62905 19.1551 11.5565 19.3991 13.5352 19.36C13.8935 19.387 14.2309 19.402 14.5441 19.402C15.0832 19.402 15.5531 19.36 15.9445 19.2756C16.8661 19.0798 17.4957 18.6884 17.8148 18.1131C18.0588 17.6734 18.0588 17.2366 18.0197 16.9596C18.6191 16.4175 18.7244 15.8181 18.7033 15.3965C18.6913 15.1525 18.637 14.9447 18.5798 14.7911ZM6.25291 18.4715C6.00896 18.4715 5.81324 18.2727 5.81324 18.0318V13.1346C5.81324 12.8908 6.0119 12.6949 6.25291 12.6949H8.08995C8.33393 12.6949 8.52981 12.8937 8.52981 13.1346V18.0287C8.52981 18.2727 8.33096 18.4685 8.08995 18.4685H6.25291V18.4715ZM17.8088 14.4387C17.6823 14.5712 17.6582 14.7731 17.7547 14.9298C17.7547 14.9327 17.878 15.1436 17.8932 15.4327C17.9142 15.8272 17.7245 16.1765 17.327 16.4747C17.1854 16.5831 17.1282 16.7699 17.1885 16.9385C17.1885 16.9415 17.3179 17.3391 17.1072 17.7156C16.9052 18.0769 16.4566 18.3359 15.7759 18.4804C15.2309 18.5979 14.4898 18.6191 13.5805 18.5468H13.5383C11.6017 18.589 9.64403 18.3359 9.62302 18.3329H9.61994L9.31583 18.2967C9.3339 18.2125 9.34286 18.1221 9.34286 18.0318V13.1346C9.34286 13.0052 9.32185 12.8787 9.28567 12.7612C9.33992 12.5595 9.49051 12.1106 9.84582 11.7281C11.1981 10.6559 12.5203 7.03893 12.5775 6.88232C12.6016 6.81908 12.6075 6.74981 12.5956 6.68058C12.5443 6.34323 12.5624 5.93058 12.6347 5.80718C12.7943 5.81015 13.225 5.85529 13.484 6.21365C13.7912 6.63837 13.7791 7.39733 13.4478 8.40316C12.9419 9.93624 12.8997 10.7433 13.3003 11.0987C13.4991 11.2764 13.7641 11.2855 13.9569 11.2162C14.1406 11.174 14.3153 11.1378 14.4809 11.1108C14.4929 11.1077 14.508 11.1048 14.52 11.1017C15.4447 10.8999 17.1011 10.7765 17.6763 11.3005C18.1642 11.7462 17.8179 12.3365 17.7788 12.3998C17.6673 12.5684 17.7004 12.7883 17.851 12.9238C17.854 12.9268 18.1702 13.225 18.1852 13.6256C18.1973 13.8935 18.0708 14.1677 17.8088 14.4387Z",fill:e},r))})}function G1e({color:e,bold:t=!1}){const r=t?{stroke:e,strokeWidth:1,paintOrder:"stroke fill"}:{};return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:O.jsx("path",R({fillRule:"evenodd",clipRule:"evenodd",d:"M18.5798 9.61098C18.8749 9.98744 19.0165 10.391 18.9985 10.8066C18.9804 11.2643 18.7757 11.6227 18.607 11.8426C18.8027 12.3305 18.878 13.0984 18.2245 13.6947C17.7456 14.1315 16.9325 14.3273 15.806 14.2732C15.014 14.237 14.3513 14.0893 14.3243 14.0833H14.3213C14.1708 14.0562 14.011 14.0231 13.8484 13.9869C13.8363 14.1797 13.8696 14.6585 14.2249 15.7367C14.6465 17.0196 14.6225 18.0016 14.1466 18.6581C13.6466 19.3478 12.8485 19.4019 12.6136 19.4019C12.3877 19.4019 12.1799 19.3086 12.0324 19.137C11.6981 18.7484 11.7373 18.0317 11.7793 17.7004C11.3818 16.6342 10.2676 14.02 9.32479 13.2943C9.30668 13.2822 9.2917 13.2671 9.27671 13.2521C8.99949 12.9599 8.81287 12.6437 8.68642 12.3667C8.50861 12.463 8.30687 12.5173 8.08995 12.5173H6.25291C5.56014 12.5173 5 11.954 5 11.2643L5 6.37029C5 5.67764 5.56323 5.11738 6.25291 5.11738H8.08995C8.35803 5.11738 8.60804 5.20179 8.81287 5.34635L9.52051 5.26191C9.62905 5.24692 11.5565 5.00297 13.5352 5.04209C13.8935 5.01502 14.2309 5 14.5441 5C15.0832 5 15.5531 5.04209 15.9445 5.12649C16.8661 5.32222 17.4957 5.71366 17.8148 6.28898C18.0588 6.72865 18.0588 7.16543 18.0197 7.44247C18.6191 7.98454 18.7244 8.58394 18.7033 9.00555C18.6913 9.2495 18.637 9.4573 18.5798 9.61098ZM6.25291 5.93058C6.00896 5.93058 5.81324 6.12939 5.81324 6.37029V11.2674C5.81324 11.5112 6.0119 11.7071 6.25291 11.7071H8.08995C8.33393 11.7071 8.52981 11.5083 8.52981 11.2674V6.37338C8.52981 6.12939 8.33096 5.93352 8.08995 5.93352H6.25291V5.93058ZM17.8088 9.96331C17.6823 9.83083 17.6582 9.6289 17.7547 9.47229C17.7547 9.46935 17.878 9.25849 17.8932 8.96937C17.9142 8.5748 17.7245 8.22555 17.327 7.92731C17.1854 7.81893 17.1282 7.63217 17.1885 7.46351C17.1885 7.46057 17.3179 7.06291 17.1072 6.68645C16.9052 6.32516 16.4566 6.06619 15.7759 5.92162C15.2309 5.80413 14.4899 5.78293 13.5805 5.85529H13.5383C11.6017 5.81309 9.64403 6.06619 9.62302 6.06912H9.61994L9.31583 6.1053C9.3339 6.18955 9.34286 6.27998 9.34286 6.37029V11.2674C9.34286 11.3968 9.32185 11.5233 9.28567 11.6408C9.33992 11.8425 9.49051 12.2914 9.84582 12.6739C11.1982 13.7461 12.5203 17.3631 12.5775 17.5197C12.6017 17.583 12.6075 17.6521 12.5956 17.7214C12.5443 18.0587 12.5624 18.4715 12.6347 18.5949C12.7943 18.5919 13.225 18.5467 13.484 18.1883C13.7912 17.7636 13.7791 17.0046 13.4478 15.9988C12.9419 14.4657 12.8997 13.6587 13.3003 13.3033C13.4991 13.1256 13.7641 13.1165 13.9569 13.1858C14.1406 13.228 14.3153 13.2641 14.4809 13.2912C14.4929 13.2943 14.508 13.2973 14.52 13.3003C15.4447 13.5021 17.1011 13.6255 17.6763 13.1015C18.1642 12.6558 17.8179 12.0655 17.7788 12.0022C17.6673 11.8336 17.7004 11.6137 17.851 11.4782C17.854 11.4752 18.1702 11.177 18.1852 10.7764C18.1973 10.5085 18.0708 10.2343 17.8088 9.96331Z",fill:e},r))})}function q1e({narrativeTargetKey:e,visible:t,onSend:r,onCancelSend:n,themeSettings:i}){const[a,o]=k.useState(null),{t:s}=O.useTranslation();k.useEffect(()=>{o(null)},[e]);const u=k.useCallback(p=>{const m=a===p?null:p;o(m),m!==null?r(m==="up"?1:-1):n()},[r,n,a]),c=i.aiChat.icons.color,d=i.aiChat.icons.feedbackIcons.hoverColor;if(!t)return null;const h=p=>({padding:"2px",backgroundColor:a===p?d:"transparent","&:hover":{backgroundColor:d}});return O.jsxs("div",{className:"csdk-flex csdk-items-center",children:[O.jsx(Oi,{title:s("ai.buttons.correctResponse"),children:O.jsx(gn,{"aria-label":"thumbs-up",onClick:()=>u("up"),size:"small",sx:h("up"),children:O.jsx(V1e,{color:c,bold:a==="up"})})}),O.jsx(Oi,{title:s("ai.buttons.incorrectResponse"),children:O.jsx(gn,{"aria-label":"thumbs-down",onClick:()=>u("down"),size:"small",sx:h("down"),children:O.jsx(G1e,{color:c,bold:a==="down"})})})]})}function Y1e({narrativeTargetKey:e,sourceId:t,data:r,type:n,buttonVisibility:i,renderContent:a}){const{app:o}=y.useSisenseContext(),s=o==null?void 0:o.httpClient,{themeSettings:u}=y.useThemeContext(),c=k.useCallback(v=>{s&&j1e(s,{sourceId:t,type:n,data:r,rating:v})},[s,t,r,n]),d=k.useMemo(()=>ug(c,200),[c]);k.useEffect(()=>()=>{d.cancel()},[d]);const[h,p]=TM(),m=k.useMemo(()=>i==="always"||i==="onHover"&&p,[p,i]);return O.jsx(U1e,{ref:h,theme:u,children:a(O.jsx(q1e,{narrativeTargetKey:e,visible:m,onSend:d,onCancelSend:()=>d.cancel(),themeSettings:u}))})}function X1e({text:e,isError:t,isLoading:r,narrativeRequest:n,onCollapsedChange:i,constrainedHeightPx:a,maxConstrainedHeightPx:o,noCollapse:s}){const{themeSettings:u}=y.useThemeContext();return O.jsx(Y1e,{narrativeTargetKey:e,sourceId:n.jaql.datasource.title,data:n,type:"chart/insights",buttonVisibility:"always",renderContent:c=>O.jsx(Cm,{theme:u,"data-testid":"widget-narrative",children:O.jsxs(SM,{children:[O.jsx(MM,{theme:u,children:O.jsx(EM,{theme:u})}),O.jsx(wM,{isError:t,isLoading:r,text:e,noCollapse:s,onCollapsedChange:i,constrainedHeightPx:a,maxConstrainedHeightPx:o}),c]})})})}const PM=y.asSisenseComponent({componentName:"WidgetNarrative"})(function({widgetProps:t,enabled:r=!0,onCollapsedChange:n,constrainedHeightPx:i,maxConstrainedHeightPx:a}){const{t:o}=O.useTranslation(),{themeSettings:s}=y.useThemeContext(),{feedbackEnabled:u,isDisplayedAlone:c}=k.useMemo(()=>{if(!P.isChartWidgetProps(t)&&!P.isPivotTableWidgetProps(t))return{feedbackEnabled:!1,isDisplayedAlone:!1};const C=$i(Yi(t));return{feedbackEnabled:C.feedback.enabled,isDisplayedAlone:C.displayLocation==="alone"}},[t]),{data:d,isLoading:h,isError:p,supported:m,narrativeRequest:v,enabled:b}=bM({widgetProps:t,enabled:r});if(!m||!b)return null;const _=d!=null?d:o("ai.errors.insightsNotAvailable"),w=O.jsxs(SM,{children:[O.jsx(MM,{theme:s,children:O.jsx(EM,{theme:s})}),O.jsx(wM,{isError:p,text:_,isLoading:h,noCollapse:c,onCollapsedChange:n,constrainedHeightPx:i,maxConstrainedHeightPx:a?a-wm:void 0})]});return u?v?h?O.jsx(Cm,{"data-testid":"widget-narrative",theme:s,children:w}):O.jsx(X1e,{isError:p,isLoading:h,narrativeRequest:v,text:_,noCollapse:c,onCollapsedChange:n,constrainedHeightPx:i,maxConstrainedHeightPx:a?a-wm:void 0}):null:O.jsx(Cm,{"data-testid":"widget-narrative",theme:s,children:w})});function Z1e({propsWithDrilldown:e,styleOptions:t}){var C,S,T,M,E,D,N;const{app:r}=y.useSisenseContext(),n=k.useMemo(()=>$i(Yi(e)),[e]),i=(T=(S=(C=r==null?void 0:r.settings)==null?void 0:C.narrative)==null?void 0:S.canGenerateNarrativeViaAI)!=null?T:!1,[a,o]=k.useState(!1),s=!!((E=(M=r==null?void 0:r.settings)==null?void 0:M.narrativeConfig)!=null&&E.enabled)&&i&&n.enabled&&!n.autoShow,u=k.useMemo(()=>s?H(R({},t),{header:H(R({},t==null?void 0:t.header),{renderToolbar:(F,B)=>{var Y;const G=(Y=t==null?void 0:t.header)!=null&&Y.renderToolbar?t.header.renderToolbar(F,B):B;return O.jsxs(O.Fragment,{children:[G,O.jsx(QS,{isVisible:a,onClick:()=>o($=>!$)})]})}})}):t,[s,t,a,o]),c=!!((N=(D=r==null?void 0:r.settings)==null?void 0:D.narrativeConfig)!=null&&N.enabled)&&i&&n.enabled&&(n.autoShow||a),d=k.useMemo(()=>{const F=e,B=typeof F.id=="string"?F.id:"__chartWidgetNarrative__";return H(R({},F),{id:B,widgetType:"chart"})},[e]),h=k.useRef(null),[p,m]=k.useState(void 0);k.useEffect(()=>{const F=h.current;if(!F)return;m(F.clientHeight);const B=new ResizeObserver(()=>m(F.clientHeight));return B.observe(F),()=>B.disconnect()},[]);const v=k.useMemo(()=>{const{heightFraction:F,displayLocation:B}=n;if(!(F===void 0||B==="alone"||p===void 0))return F*p},[n,p]),b=k.useMemo(()=>{const{displayLocation:F}=n;if(p!==void 0)return F==="alone"?p:Math.max(p*.5,v!=null?v:0)},[n,p,v]),{displayLocation:_}=n,w=c?O.jsx(PM,{widgetProps:d,constrainedHeightPx:v,maxConstrainedHeightPx:b}):null;return{contentAreaRef:h,styleOptionsWithNarrative:u,narrativeTopSlot:_==="above"?w:null,narrativeBottomSlot:_==="below"?w:null,narrativeAloneContent:_==="alone"?w:null}}var K1e=Object.prototype,Q1e=K1e.hasOwnProperty,AM=PS(function(e,t,r){Q1e.call(e,r)?e[r].push(t):U.baseAssignValue(e,r,[t])});function xm(e){return e&&e.length?b0(e):[]}var $s=(e=>(e.WIDGET_POINTS_DRILLDOWN="widget-points-drilldown",e.WIDGET_POINTS_CROSSFILTERING="widget-points-crossfiltering",e))($s||{}),qa=(e=>(e.DRILLDOWN_CHART_POINTS_SELECTION="drilldown-chart-points-selection",e.DRILLDOWN_DRILL_DIRECTIONS="drilldown-drill-directions",e.CROSSFILTERING_CHART_POINTS_SELECTION="crossfiltering-chart-points-selection",e))(qa||{});const J1e=["rows","columns","values","category","value","breakBy","x","y","breakByPoint","breakByColor","size","date","geo","color","colorBy","details","outliers","secondary","min","max"];function eye(e){return J1e.includes(e)}function tye(e,t){const r=[];for(const[n,i]of Object.entries(e))!eye(n)||i===null||i===void 0||(Array.isArray(i)?i.forEach((a,o)=>{$2(a)&&r.push({location:{dataOptionName:n,dataOptionIndex:o},column:a})}):typeof i=="object"&&!Array.isArray(i)&&$2(i)&&r.push({location:{dataOptionName:n,dataOptionIndex:0},column:i}));for(const{location:n,column:i}of r)if(RM(i,t))return n}function $2(e){if(!e||typeof e!="object")return!1;const t="column"in e?e.column:e;return typeof t=="object"&&t!==null&&"type"in t&&"expression"in t}function RM(e,t){return y.isSameAttribute(P.translateColumnToAttribute(e),P.translateColumnToAttribute(t))}function DM(e,t){const{dataOptionName:r,dataOptionIndex:n=0}=t,i=e[r];if(i!=null){if(U.isArray(i))return n>=0&&n<i.length?i[n]:void 0;if(U.isPlainObject(i))return n!==0&&t.dataOptionIndex!==void 0?void 0:i}}function rye(e,t,r){const{dataOptionName:n,dataOptionIndex:i=0}=t,a=r[n];if(a==null)return r;if(U.isArray(a)){if(i>=0&&i<a.length){const o=[...a];return o[i]=e,H(R({},r),{[n]:o})}return r}return U.isPlainObject(a)?i!==0&&t.dataOptionIndex!==void 0?r:H(R({},r),{[n]:e}):r}function NM(e,t,r){return r.length===0||!t?void 0:"dataOptionName"in t?t:tye(e,t)}function kM(e,t,r){const n=DM(e,t);return!n||RM(n,r)?e:rye(r,t,e)}function nye(e,t){return t.all?[]:e.filter(r=>{var n;return!((n=t.ids)!=null&&n.includes(r.config.guid))})}function LM(e,t){return e.find(r=>y.isSameAttribute(r.attribute,t))}function OM(e,t,r){var i;const n=LM(r,e);return U.members((i=n==null?void 0:n.attribute)!=null?i:e,t.map(a=>`${a}`),{guid:n==null?void 0:n.config.guid,backgroundFilter:n==null?void 0:n.config.backgroundFilter})}function IM(e,t){return y.haveSameAttribute(e,t)&&"members"in e&&"members"in t&&U.isEqual(e.members,t.members)}function iye({widgetType:e,chartType:t,dataOptions:r,drilldownOptions:n}){if(e==="pivot"){const i=n,a=r,o=i==null?void 0:i.drilldownSelections,s=i==null?void 0:i.drilldownTarget;if(o&&o.length&&s){const u=NM(a,s,o),c=U.last(o);if(u&&(c!=null&&c.nextDimension))return kM(a,u,c.nextDimension)}}if(t){const i=n,a=r,o=i==null?void 0:i.drilldownSelections;if(o&&o.length){const s=U.last(o);if(s!=null&&s.nextDimension)return $M(t,a,s.nextDimension)}}return r}const FM=2;function aye(e,t){const r=e[t];return r?Array.isArray(r)?r:[r]:[]}function _n(e,t,r=!1){if(!e.length||!t.length)return[];const n=e.flatMap(({entries:a={}})=>t.flatMap(o=>aye(a,o)).filter(o=>"attribute"in o&&!!o.attribute)),i=AM(n,({attribute:a})=>U.isLevelAttribute(a)&&U.isDatetime(a.type)?`${a.expression}.${a.granularity}`:a.expression);return Object.values(i).filter(a=>a.length>0&&!!a[0].attribute&&(!U.MetadataTypes.isCalculatedAttribute(a[0].attribute)||r)).map(a=>{const o=a[0].attribute,s=xm(a.map(({value:c})=>c).filter(c=>c!=null)),u=xm(a.map(({displayValue:c})=>c).filter(c=>c!==void 0));return{attribute:o,values:s,displayValues:u}})}function oye(e){return _n(e,["category"])}function sye(e){return _n(e,["category"])}function lye(e,t){const n=_n(e,["category"],!0),i=n.length-1,a=P.translateColumnToAttribute(t.category[i]);return U.MetadataTypes.isCalculatedAttribute(a)?[]:t.category.map((o,s)=>{const u=i===s,c=P.translateColumnToAttribute(o);if(!U.MetadataTypes.isCalculatedAttribute(c))return u?n[s]:{attribute:c,values:[],displayValues:[]}}).filter(o=>o!==void 0)}function uye(e){return _n(e,["x","y","breakByPoint","breakByColor"])}function cye(e){return _n(e,["geo"])}function dye(e){return _n(e,["geo"])}function hye(e){return _n(e,["date"])}function fye(e){return _n(e,["category"])}function pye(e){const t=e.filter(r=>r.isDataCell&&!r.isTotalCell);return _n(t.map(r=>{var n,i,a,o,s,u;return(i=(n=r.entries)==null?void 0:n.values)!=null&&i.length?r:H(R({},r),{entries:{rows:(o=(a=r.entries.rows)==null?void 0:a.slice(-1))!=null?o:[],columns:(u=(s=r.entries.columns)==null?void 0:s.slice(-1))!=null?u:[],values:[]}})}),["rows","columns","values"])}function mye(e,t){const r=Object.entries(t).filter(([,n])=>Array.isArray(n)&&n.some(i=>!P.isMeasureColumn(i))).map(([n])=>n);return _n(e,r)}function Bu(e,t,r){return e==="custom"?mye(r,t):e==="text"?[]:e==="pivot"?pye(r):e==="treemap"||e==="sunburst"?lye(r,t):z.isCartesian(e)||e==="pie"||e==="funnel"?oye(r):z.isBoxplot(e)?sye(r):z.isScatter(e)?uye(r):z.isScattermap(e)?cye(r):z.isAreamap(e)?dye(r):z.isCalendarHeatmap(e)?hye(r):z.isSankey(e)?fye(r):[]}function wg(e,t){let r=[];return e==="custom"?r=gye(t):e==="text"?r=[]:e==="pivot"?r=[...t.rows||[],...t.columns||[]]:z.isCartesian(e)||z.isCategorical(e)||z.isBoxplot(e)||z.isRange(e)?r=[...t.category]:z.isScatter(e)?r=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(n=>!!(n&&!P.isMeasureColumn(n))):z.isScattermap(e)||z.isAreamap(e)?r=[...t.geo]:z.isCalendarHeatmap(e)?r=[t.date]:z.isSankey(e)&&(r=[...t.category]),r.map(P.translateColumnToAttribute).filter(n=>!U.MetadataTypes.isCalculatedAttribute(n))}function gye(e){return Object.values(e).flatMap(t=>Array.isArray(t)?t.filter(r=>!P.isMeasureColumn(r)):[])}function vye(e,t,r){const n=LM(t,e.attribute);if(!n||y.isIncludeAllFilter(n))return null;if(IM(e,n))return y.clearMembersFilter(e);if(U.isMembersFilter(n)&&r){const[i,a]=fl(n.members,s=>e.members.includes(s));if(i.length===e.members.length&&a.length)return OM(e.attribute,a,[n])}return null}function yye(e,t,r){const n=t.filter(o=>!o.config.disabled),i=e.map(o=>vye(o,n,r)).filter(o=>!!o),a=e.length!==i.length;return{filters:a?e:i,isSelection:a}}function lf(e,t,r=!1){const n=e.map(({attribute:a,values:o})=>OM(a,o,t)),i=bye(t,n);return yye(i,t,r)}function bye(e,t){const r=e.filter(n=>n.config.locked);return r.length?t.filter(n=>!r.some(i=>y.haveSameAttribute(i,n))):t}function _ye(e,t,r){const n=Bu(e,t,r).filter(({displayValues:s})=>s.length);if(n.length===0)return"";const[i]=n,a=r.length===1,o=i.displayValues.length>FM;return n.length>1?a?n.map(s=>s.displayValues[0]).join(", "):o?"":i.displayValues.join(", "):o?i.attribute.title:i.displayValues.join(", ")}function B2(e,t,r){const n=_ye(e,t,r);return n?{id:qa.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:n}:null}function z2(e,t){return{items:[{caption:e,onClick:t}]}}function wye(e,t){return wg(e,t)[0]}function Cye(e){return[...z.CARTESIAN_CHART_TYPES,...z.CATEGORICAL_CHART_TYPES,...z.SCATTER_CHART_TYPES,...z.BOXPLOT_CHART_TYPES,...z.RANGE_CHART_TYPES,...z.SANKEY_CHART_TYPES].includes(e)}function xye(e,t){return wg(e,t).length>=1}function Tye(e,t){return xye(e,t)&&Cye(e)}function $M(e,t,r){const n=i=>!!i&&!y.isSameAttribute(r,P.translateColumnToAttribute(i));if(z.isCartesian(e)||z.isCategorical(e)||z.isBoxplot(e)||z.isRange(e)||z.isSankey(e)){const i=t.category.find(a=>!U.MetadataTypes.isCalculatedAttribute(P.translateColumnToAttribute(a)));if(n(i))return H(R({},t),{category:[r]})}else if(z.isScatter(e)){const i=t,o=["x","y","breakByPoint","breakByColor"].find(s=>BM(i[s]));if(o){const s=i[o];if(n(s))return H(R({},i),{[o]:r})}}return t}function BM(e){return!!e&&!P.isMeasureColumn(e)&&!U.MetadataTypes.isCalculatedAttribute(P.translateColumnToAttribute(e))}function H2(e,t,r){return e.map(n=>{const i=["x","y","breakByPoint","breakByColor"],a=[...i,"size"].some(s=>s in n),o=i.find(s=>BM(r[s]));if(a){const s=t,u=s.type==="mouseup";u&&console.warn("No drilldown support for multi-selection in scatter chart");const c=u?n[o]:s.point.options.custom[ES(`{masked ${o}`)];return{categoryValue:c,categoryDisplayValue:c}}return n})}function pc(e,t){return e.filter(r=>{if(U.MetadataTypes.isAttribute(r)){const a=r;return t.every(o=>!y.isSameAttribute(o,a))}const i=r;return t.every((a,o)=>i.levels[o]&&y.isSameAttribute(a,i.levels[o]))})}function mc(e,t){return[P.translateColumnToAttribute(e),...t.map(({nextDimension:r})=>r)]}const Sye=Ya(_e.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Mye=y.styled(y.ButtonBase)(y.memoTheme(({theme:e})=>H(R({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]}),{borderRadius:2,"&:hover, &:focus":R({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":R({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:y.emphasize(e.palette.grey[200],.12)}:{backgroundColor:y.emphasize(e.palette.grey[600],.12)})}))),Eye=y.styled(Sye)({width:24,height:16});function zM(e){const a=e,{slots:t={},slotProps:r={}}=a,n=Ge(a,["slots","slotProps"]),i=e;return _e.jsx("li",{children:_e.jsx(Mye,H(R({focusRipple:!0},n),{ownerState:i,children:_e.jsx(Eye,R({as:t.CollapsedIcon,ownerState:i},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(zM.propTypes={slotProps:y.PropTypes.shape({collapsedIcon:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({CollapsedIcon:y.PropTypes.elementType}),sx:y.PropTypes.object});function Pye(e){return y.generateUtilityClass("MuiBreadcrumbs",e)}const Aye=y.generateUtilityClasses("MuiBreadcrumbs",["root","ol","li","separator"]),Rye=e=>{const{classes:t}=e,r={root:["root"],li:["li"],ol:["ol"],separator:["separator"]};return y.composeClasses(r,Pye,t)},Dye=y.styled(vr,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Aye.li}`]:t.li},t.root]})({}),Nye=y.styled("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),kye=y.styled("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Lye(e,t,r,n){return e.reduce((i,a,o)=>(o<e.length-1?i=i.concat(a,_e.jsx(kye,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${o}`)):i.push(a),i),[])}const HM=de.forwardRef(function(t,r){const n=y.useDefaultProps({props:t,name:"MuiBreadcrumbs"}),D=n,{children:i,className:a,component:o="nav",slots:s={},slotProps:u={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:h=1,maxItems:p=8,separator:m="/"}=D,v=Ge(D,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[b,_]=de.useState(!1),w=H(R({},n),{component:o,expanded:b,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:h,maxItems:p,separator:m}),C=Rye(w),S=y.useSlotProps({elementType:s.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:w}),T=de.useRef(null),M=N=>{const F=()=>{_(!0);const B=T.current.querySelector("a[href],button,[tabindex]");B&&B.focus()};return h+d>=N.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${d}} + itemsBeforeCollapse={${h}} >= maxItems={${p}}`].join(`
388
- `)),N):[...N.slice(0,h),_e.jsx(zM,{"aria-label":c,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:F},"ellipsis"),...N.slice(N.length-d,N.length)]},E=de.Children.toArray(i).filter(N=>(process.env.NODE_ENV!=="production"&&y.reactIsExports.isFragment(N)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
389
- `)),de.isValidElement(N))).map((N,F)=>_e.jsx("li",{className:C.li,children:N},`child-${F}`));return _e.jsx(Dye,H(R({ref:r,component:o,color:"textSecondary",className:y.clsx(C.root,a),ownerState:w},v),{children:_e.jsx(Nye,{className:C.ol,ref:T,ownerState:w,children:Lye(b||p&&E.length<=p?E:M(E),C.separator,m,w)})}))});process.env.NODE_ENV!=="production"&&(HM.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,component:y.PropTypes.elementType,expandText:y.PropTypes.string,itemsAfterCollapse:y.integerPropType,itemsBeforeCollapse:y.integerPropType,maxItems:y.integerPropType,separator:y.PropTypes.node,slotProps:y.PropTypes.shape({collapsedIcon:y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object])}),slots:y.PropTypes.shape({CollapsedIcon:y.PropTypes.elementType}),sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object])});function Oye(e){return y.generateUtilityClass("MuiButton",e)}const yi=y.generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),WM=de.createContext({});process.env.NODE_ENV!=="production"&&(WM.displayName="ButtonGroupContext");const jM=de.createContext(void 0);process.env.NODE_ENV!=="production"&&(jM.displayName="ButtonGroupButtonContext");const Iye=e=>{const{color:t,disableElevation:r,fullWidth:n,size:i,variant:a,loading:o,loadingPosition:s,classes:u}=e,c={root:["root",o&&"loading",a,`${a}${y.capitalize(t)}`,`size${y.capitalize(i)}`,`${a}Size${y.capitalize(i)}`,`color${y.capitalize(t)}`,r&&"disableElevation",n&&"fullWidth",o&&`loadingPosition${y.capitalize(s)}`],startIcon:["icon","startIcon",`iconSize${y.capitalize(i)}`],endIcon:["icon","endIcon",`iconSize${y.capitalize(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=y.composeClasses(c,Oye,u);return R(R({},u),d)},UM=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Fye=y.styled(y.ButtonBase,{shouldForwardProp:e=>y.rootShouldForwardProp(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${y.capitalize(r.color)}`],t[`size${y.capitalize(r.size)}`],t[`${r.variant}Size${y.capitalize(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(y.memoTheme(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return H(R({},e.typography.button),{minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${yi.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${yi.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${yi.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${yi.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(ri()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(e.vars||e).palette[n].main,"--variant-outlinedColor":(e.vars||e).palette[n].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.5)`:y.alpha(e.palette[n].main,.5),"--variant-containedColor":(e.vars||e).palette[n].contrastText,"--variant-containedBg":(e.vars||e).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[n].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha(e.palette[n].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[n].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha(e.palette[n].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:y.alpha(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${yi.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${yi.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${yi.loading}`]:{color:"transparent"}}}]})})),$ye=y.styled("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${y.capitalize(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...UM]})),Bye=y.styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${y.capitalize(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...UM]})),zye=y.styled("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),W2=y.styled("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Bs=de.forwardRef(function(t,r){const n=de.useContext(WM),i=de.useContext(jM),a=y.resolveProps(n,t),o=y.useDefaultProps({props:a,name:"MuiButton"}),q=o,{children:s,color:u="primary",component:c="button",className:d,disabled:h=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:b,fullWidth:_=!1,id:w,loading:C=null,loadingIndicator:S,loadingPosition:T="center",size:M="medium",startIcon:E,type:D,variant:N="text"}=q,F=Ge(q,["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","id","loading","loadingIndicator","loadingPosition","size","startIcon","type","variant"]),B=gc(w),G=S!=null?S:_e.jsx(fg,{"aria-labelledby":B,color:"inherit",size:16}),Y=H(R({},o),{color:u,component:c,disabled:h,disableElevation:p,disableFocusRipple:m,fullWidth:_,loading:C,loadingIndicator:G,loadingPosition:T,size:M,type:D,variant:N}),$=Iye(Y),X=(E||C&&T==="start")&&_e.jsx($ye,{className:$.startIcon,ownerState:Y,children:E||_e.jsx(W2,{className:$.loadingIconPlaceholder,ownerState:Y})}),V=(v||C&&T==="end")&&_e.jsx(Bye,{className:$.endIcon,ownerState:Y,children:v||_e.jsx(W2,{className:$.loadingIconPlaceholder,ownerState:Y})}),Z=i||"",j=typeof C=="boolean"?_e.jsx("span",{className:$.loadingWrapper,style:{display:"contents"},children:C&&_e.jsx(zye,{className:$.loadingIndicator,ownerState:Y,children:G})}):null;return _e.jsxs(Fye,H(R({ownerState:Y,className:y.clsx(n.className,$.root,d,Z),component:c,disabled:h||C,focusRipple:!m,focusVisibleClassName:y.clsx($.focusVisible,b),ref:r,type:D,id:C?B:w},F),{classes:$,children:[X,T!=="end"&&j,s,T==="end"&&j,V]}))});process.env.NODE_ENV!=="production"&&(Bs.propTypes={children:y.PropTypes.node,classes:y.PropTypes.object,className:y.PropTypes.string,color:y.PropTypes.oneOfType([y.PropTypes.oneOf(["inherit","primary","secondary","success","error","info","warning"]),y.PropTypes.string]),component:y.PropTypes.elementType,disabled:y.PropTypes.bool,disableElevation:y.PropTypes.bool,disableFocusRipple:y.PropTypes.bool,disableRipple:y.PropTypes.bool,endIcon:y.PropTypes.node,focusVisibleClassName:y.PropTypes.string,fullWidth:y.PropTypes.bool,href:y.PropTypes.string,id:y.PropTypes.string,loading:y.PropTypes.bool,loadingIndicator:y.PropTypes.node,loadingPosition:y.PropTypes.oneOf(["center","end","start"]),size:y.PropTypes.oneOfType([y.PropTypes.oneOf(["small","medium","large"]),y.PropTypes.string]),startIcon:y.PropTypes.node,sx:y.PropTypes.oneOfType([y.PropTypes.arrayOf(y.PropTypes.oneOfType([y.PropTypes.func,y.PropTypes.object,y.PropTypes.bool])),y.PropTypes.func,y.PropTypes.object]),type:y.PropTypes.oneOfType([y.PropTypes.oneOf(["button","reset","submit"]),y.PropTypes.string]),variant:y.PropTypes.oneOfType([y.PropTypes.oneOf(["contained","outlined","text"]),y.PropTypes.string])});const Hye=y.newStyled(gn)`
390
- && {
391
- position: absolute;
392
- left: 0;
393
- right: auto;
394
- margin: auto;
395
- bottom: 0;
396
- top: 0;
397
- z-index: 10;
398
- background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0) 100%);
399
- display: inline-flex;
400
-
401
- span[aria-label='prev-item'] {
402
- width: 0;
403
- height: 0;
404
- border-top: 6px solid transparent;
405
- border-bottom: 6px solid transparent;
406
- border-right: 5px solid #000;
407
- color: transparent;
408
- opacity: 0.3;
409
-
410
- &:hover {
411
- opacity: 0.8;
412
- }
413
- }
414
- }
415
- `,Wye=y.newStyled(gn)`
416
- && {
417
- position: absolute;
418
- left: auto;
419
- right: 0;
420
- margin: auto;
421
- bottom: 0;
422
- top: 0;
423
- z-index: 10;
424
- background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, white 70%);
425
- display: inline-flex;
426
-
427
- span[aria-label='next-item'] {
428
- width: 0;
429
- height: 0;
430
- border-top: 6px solid transparent;
431
- border-bottom: 6px solid transparent;
432
- border-left: 5px solid #000;
433
- color: transparent;
434
- opacity: 0.3;
435
-
436
- &:hover {
437
- opacity: 0.8;
438
- }
439
- }
440
- }
441
- `,jye=({currentDimension:e,children:t})=>{const{t:r}=O.useTranslation(),n=k.useRef(null),[i,a]=k.useState(0),[o,s]=k.useState(0),[u,c]=k.useState(0),d=()=>{var v;return(v=n.current)==null?void 0:v.querySelector("ol")};k.useEffect(()=>{const v=d();if(v){const b=v.clientWidth,_=v.scrollWidth,w=v.scrollLeft;a(b),s(_),c(w)}},[e]),k.useEffect(()=>{const v=d();function b(){if(v){const C=v.clientWidth;a(C)}}function _(){if(v){const C=v.scrollLeft;c(C)}}const w=new ResizeObserver(b);return v?(w.observe(v),v.addEventListener("scroll",_),()=>{w.disconnect(),v.removeEventListener("scroll",_)}):()=>{}},[]);const h=v=>{const _="smooth",w=d();w&&w.scrollBy({left:v==="right"?200:-200,behavior:_})},p=u!=0,m=Math.floor(o-u)>i;return O.jsxs("div",{style:{position:"relative"},children:[p&&O.jsx(Hye,{onClick:()=>h("left"),children:O.jsx("span",{"aria-label":"prev-item",children:r("drilldown.breadcrumbsPrev")})}),m&&O.jsx(Wye,{onClick:()=>h("right"),children:O.jsx("span",{"aria-label":"next-item",children:r("drilldown.breadcrumbsNext")})}),O.jsx("div",{ref:n,children:t})]})},Uye=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:r,themeProps:n})=>{const{t:i}=O.useTranslation(),a=t.name,o=y.newStyled(Bs)`
442
- && {
443
- background-color: ${n.activeDrillBackgroundColor};
444
- color: ${n.primaryButtonTextColor};
445
- border-radius: 100%;
446
- border: 2px solid white;
447
- min-width: 39px;
448
- width: 39px;
449
- height: 39px;
450
- z-index: 10;
451
- padding: 7px;
452
- cursor: pointer;
453
- text-transform: none;
454
- margin-right: -5px;
455
-
456
- &:hover {
457
- background-color: ${n.activeDrillHoverBackgroundColor};
458
- color: ${n.primaryTextColor};
459
- }
460
- }
461
- `,s=y.newStyled.svg`
462
- width: 22px;
463
- height: 22px;
464
- fill: #9ea2ab;
465
- `,u=()=>O.jsx(o,{theme:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:e,children:O.jsx(s,{width:22,height:22,viewBox:"0 0 24 24",children:O.jsx("path",{fill:"#9EA2AB",d:"M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"})})}),c=y.newStyled(Bs)`
466
- && {
467
- position: relative;
468
- font-family: ${h=>h.theme.fontFamily};
469
- border-radius: 0;
470
- border: 1px solid ${ln};
471
- background-color: ${h=>h.theme.chartBackgroundColor};
472
- border-right: none;
473
- border-left: none;
474
- color: ${h=>h.theme.secondaryTextColor};
475
- padding-right: 1.25rem;
476
- padding-left: 1.875rem;
477
- height: 1.64rem;
478
- font-size: 13px;
479
- transition: background-color 0.2s, border-color 0.2s, color 0.2s;
480
- text-transform: none;
481
- cursor: auto;
482
- pointer-events: none;
483
- white-space: nowrap;
484
-
485
- &:hover {
486
- background-color: ${h=>h.theme.chartBackgroundColor};
487
- border: 1px solid ${ln};
488
- border-right: none;
489
- border-left: none;
490
- }
491
- }
492
- `;return{CancelButton:u,CurrentDrillButton:()=>O.jsxs(c,{theme:n,children:[a," (",i("drilldown.breadcrumbsAllSuffix"),")",O.jsx("span",{className:"flex items-center justify-between",children:O.jsx("span",{className:"csdk-absolute csdk-right-[0px] csdk-top-[3px] csdk-h-[18px] csdk-w-[18px] csdk-transform csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:"transparent",borderTop:`1px solid ${ln}`,borderRight:`1px solid ${ln}`}})})]})}},Vye={modifiers:[{name:"offset",options:{offset:[0,12]}}]},Gye=({themeProps:e,filterDisplayValues:t,currentTable:r,currentColumn:n})=>{const{t:i}=O.useTranslation();return O.jsxs("div",{className:"csdk-w-50 csdk-px-[12px] csdk-shadow-md csdk-shadow-gray-500 csdk-rounded-md csdk-bg-white",style:{backgroundColor:e.chartBackgroundColor,color:e.primaryTextColor},children:[O.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.members")}),O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),O.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.table")}),O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]}),O.jsxs("div",{className:"csdk-p-3 csdk-pl-1",children:[O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:i("drilldown.popover.column")}),O.jsx(vr,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]})]})},qye=({popperParams:e,currentDimension:t,themeProps:r})=>{const n=t.expression.match(/\[(.*?)]/),[i,a]=n?n[1].split("."):["",""],o=!!e;return O.jsx(sl,{open:o,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:Vye,children:e&&O.jsx(Gye,{themeProps:r,filterDisplayValues:e.filterDisplayValues,currentTable:i,currentColumn:a})})},Yye=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:r},general:{backgroundColor:n,brandColor:i,primaryButtonTextColor:a},chart:{backgroundColor:o}}}=y.useThemeContext(),s=P.scaleBrightness(o,-.02),u=P.scaleBrightness(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:r,backgroundColor:n,brandColor:i,primaryButtonTextColor:a,chartBackgroundColor:o,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:u}},ln="#F2F2F2",Xye=y.newStyled(Bs)`
493
- && {
494
- font-family: ${({theme:e})=>e.fontFamily};
495
- position: relative;
496
- border-radius: 0;
497
- border: 1px solid ${ln};
498
- border-right: none;
499
- color: ${({active:e,theme:t})=>e==="true"?t.primaryTextColor:t.secondaryTextColor};
500
- background-color: ${({active:e,theme:t})=>e==="true"?t.activeDrillBackgroundColor:t.chartBackgroundColor};
501
- padding-right: 1.25rem;
502
- padding-left: 1.875rem;
503
- height: 1.64rem;
504
- font-size: 13px;
505
- text-transform: none;
506
- transition: background-color 0.2s, border-color 0.2s, color 0.2s;
507
- white-space: nowrap;
508
- cursor: ${({active:e})=>e==="true"?"pointer":"auto"};
509
- margin-right: ${({active:e})=>e==="true"?"5px":"0px"};
510
-
511
- &:hover {
512
- background-color: ${({active:e,theme:t})=>e==="true"?t.activeDrillHoverBackgroundColor:t.chartBackgroundColor};
513
- border: 1px solid ${ln};
514
- border-right: none;
515
- }
516
-
517
- .MuiTouchRipple-root {
518
- display: none;
519
- }
520
- }
521
- `,Zye=y.newStyled(HM)`
522
- .MuiBreadcrumbs-ol {
523
- flex-wrap: nowrap;
524
- overflow: hidden;
525
- }
526
- .MuiBreadcrumbs-separator {
527
- display: none;
528
- }
529
- `,Kye=({isActive:e,filterDisplayValue:t,handleMouseEnter:r,handleMouseLeave:n,handleClick:i,themeProps:a,popperParams:o,index:s})=>O.jsx(Xye,{theme:a,active:e.toString(),index:s,onMouseEnter:r,onMouseLeave:n,onClick:i,children:O.jsxs("span",{className:"flex items-center justify-between",children:[O.jsxs("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?O.jsx("span",{className:"csdk-absolute csdk-right-0 csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:t===(o==null?void 0:o.filterDisplayValues)?a.activeDrillHoverBackgroundColor:a.activeDrillBackgroundColor,borderTop:`1px solid ${ln}`,borderRight:`1px solid ${ln}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,O.jsx("span",{className:`csdk-absolute ${e?"csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-right-[-15px]":"csdk-h-[10px] csdk-w-[10px] csdk-top-[7px] csdk-right-[-5px]"} csdk-transform translate-x-1/2 csdk-rotate-45`,style:{backgroundColor:a.chartBackgroundColor,borderTop:`1px solid ${ln}`,borderRight:`1px solid ${ln}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),VM=y.asSisenseComponent({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:r,sliceDrilldownSelections:n})=>{const[i,a]=k.useState(null),[o,s]=k.useState(!1),u=Yye(),{CancelButton:c,CurrentDrillButton:d}=Uye({clearDrilldownSelections:r,currentDimension:t,isHovered:o,setIsHovered:s,themeProps:u}),h=b=>_=>{s(!0),a({filterDisplayValues:b,anchorEl:_.currentTarget})},p=()=>{s(!1),a(null)},m=b=>b<e.length-1,v=b=>b===e.length-2;return e.length?O.jsx("div",{"data-testid":"drilldown-breadcrumbs",children:O.jsx(jye,{currentDimension:t,children:O.jsxs(Zye,{separator:null,sx:{backgroundColor:u.chartBackgroundColor,padding:"4px"},children:[O.jsx(c,{}),e.map((b,_)=>{const w=m(_),C=v(_);return O.jsx("div",{children:O.jsx(Kye,{isActive:w,isLastActive:C,filterDisplayValue:b,handleMouseEnter:h(b),handleMouseLeave:p,handleClick:()=>n(_+1),themeProps:u,popperParams:i,index:_})},_)}),O.jsx(d,{}),O.jsx(qye,{popperParams:i,currentDimension:t,themeProps:u})]})})}):null}),GM=e=>{const{initialDimension:t,onDrilldownSelectionsChange:r}=e,n=k.useMemo(()=>e.drilldownPaths||[],[e.drilldownPaths]),i=k.useMemo(()=>e.initialDrilldownSelections||[],[e.initialDrilldownSelections]),{t:a}=O.useTranslation();if(!t)throw new U.TranslatableError("errors.drilldownNoInitialDimension");const[o,s]=lg(i,{onLocalStateChange:r}),u=k.useMemo(()=>mc(t,o),[t,o]),c=k.useMemo(()=>pc(n,u),[n,u]),d=k.useCallback((_,w,C)=>{s(S=>qM(S,_,w,C))},[s]),h=k.useCallback(_=>{s(w=>w.slice(0,_))},[s]),p=k.useCallback(()=>{s([])},[s]),{drilldownFilters:m,drilldownFiltersDisplayValues:v,drilldownDimension:b}=k.useMemo(()=>YM(o,t,a),[o,t,a]);return{drilldownSelections:o,availableDrilldownPaths:c,drilldownFilters:m,drilldownFiltersDisplayValues:v,drilldownDimension:b,selectDrilldown:d,sliceDrilldownSelections:h,clearDrilldownSelections:p}},qM=(e,t,r,n)=>{var p,m;if(!(n!=null&&n.levels))return[...e,{points:t,nextDimension:r}];if(y.isSameAttribute(n.levels[0],r))return[];const a=(p=e==null?void 0:e.findIndex(v=>y.isSameAttribute(v.nextDimension,r)))!=null?p:-1;if(a!==-1)return e.slice(0,a+1);const s=(m=U.last(e))==null?void 0:m.nextDimension,u=e.length?n.levels.findIndex(v=>s&&y.isSameAttribute(v,s)):0,c=n.levels.indexOf(r),h=n.levels.slice(u+1,c+1).map((v,b)=>({points:b===0?t:[],nextDimension:v}));return[...e,...h]},YM=(e,t,r)=>{let n=t&&P.translateColumnToAttribute(t);const i=[],a=[];return e.forEach(({points:o,nextDimension:s})=>{i.push(U.members(n,o.map(Qye)));const u=o.length?o.map(XM):[`${n.name} (${r("drilldown.breadcrumbsAllSuffix")})`];a.push(u),n=s}),{drilldownFilters:i,drilldownFiltersDisplayValues:a,drilldownDimension:n}};function XM(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function Qye(e){return"categoryValue"in e?`${e.categoryValue}`:""}const ZM=({initialDimension:e,initialDrilldownSelections:t,openMenu:r,onDrilldownSelectionsChange:n})=>{const{t:i}=O.useTranslation(),{drilldownFilters:a,drilldownFiltersDisplayValues:o,drilldownDimension:s,drilldownSelections:u,selectDrilldown:c,sliceDrilldownSelections:d,clearDrilldownSelections:h}=GM({initialDimension:e,initialDrilldownSelections:t,onDrilldownSelectionsChange:n}),p=k.useCallback((v,b,_=[],w)=>{const C=QM(_,s,(T,M)=>{w==null||w(T,M),c(b,T,M)},i),S=[KM(b,s),...C?[C]:[]];r({id:$s.WIDGET_POINTS_DRILLDOWN,position:v,itemSections:S})},[s,i,c,r]),m=k.useMemo(()=>s&&O.jsx(VM,{filtersDisplayValues:o,currentDimension:s,clearDrilldownSelections:h,sliceDrilldownSelections:d}),[h,s,o,d]);return{drilldownDimension:s,drilldownSelections:u,drilldownFilters:a,breadcrumbs:m,openDrilldownMenu:p}};function KM(e,t){const r=xm(e.map(XM).filter(n=>!!n));return r.length>FM?{id:qa.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:qa.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:r.join(", ")}}function Jye(e){return 30+12*e}function QM(e,t,r,n){const[i,a]=fl(e,U.MetadataTypes.isAttribute.bind(U.MetadataTypes)),o=i.map(c=>({caption:c.name,onClick:()=>r(c)})),u=[...a.map(c=>({caption:c.title,subItems:[{items:c.levels.map((d,h)=>({caption:d.name,class:h===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${Jye(h)}px`},disabled:y.isSameAttribute(d,t),onClick:()=>r(d,c)}))}]})),...o];return u.length===0?null:{id:qa.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:n("drilldown.drillMenuItem"),items:u}}function ebe(e){const{_id:t,title:r,levels:n}=e;return{id:t,title:r,levels:n.map(i=>U.createDimensionalElementFromJaql(i))}}function JM(e,t,r){return pt(this,null,function*(){const i=yield new zc(e,r).getHierarchies(t);return i==null?void 0:i.map(a=>ebe(a))})}function eE(){const{isInitialized:e,app:t}=y.useSisenseContext();return{getHierarchies:k.useCallback(n=>pt(this,null,function*(){const{attribute:i,dataSource:a,ids:o}=n;if(!e||!t)throw new U.TranslatableError("errors.noSisenseContext");return JM(t.httpClient,{dimension:i,dataSource:a,ids:o,alwaysIncluded:!0},t.defaultDataSource)}),[e,t])}}function tbe(e){const t=y.useHasChanged(e,["attribute","dataSource","drilldownPaths","enabled"]),{attribute:r,dataSource:n,drilldownPaths:i,enabled:a}=e,[o,s]=k.useMemo(()=>fl(i,Wc),[i]),{getHierarchies:u}=eE(),[c,d]=k.useState([]);return k.useEffect(()=>{(a||a===void 0)&&t&&u({attribute:r,dataSource:n,ids:o}).then(p=>{d(m=>p.length>0||m.length!==p.length?p:m)}).catch(p=>{console.error("Failed to load hierarchies",p)})},[t,a,r,n,o,u]),k.useMemo(()=>c.length?[...c,...s]:s,[c,s])}const rbe=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:r,dataOptions:n,dataSource:i,drilldownOptions:a}=e,{drilldownSelections:o}=a||{},{openMenu:s}=pg(),u=k.useMemo(()=>Tye(r,n),[r,n]),c=k.useMemo(()=>(a==null?void 0:a.drilldownPaths)||[],[a==null?void 0:a.drilldownPaths]),d=k.useMemo(()=>{const F=U.createAttribute({name:"dummy drilldown initial attribute"});return wye(r,n)||F},[r,n]),h=tbe({attribute:d,dataSource:i,drilldownPaths:c,enabled:u}),p=k.useRef(h);k.useEffect(()=>{p.current=h},[h]);const m=k.useMemo(()=>{var B;return(!!((B=a==null?void 0:a.drilldownSelections)!=null&&B.length)||!!(h!=null&&h.length))&&u},[a,u,h]),{drilldownDimension:v,drilldownFilters:b,breadcrumbs:_,openDrilldownMenu:w}=ZM({initialDimension:d,initialDrilldownSelections:o,openMenu:s,onDrilldownSelectionsChange:t}),C=k.useCallback((F,B)=>{const G=H2(F,B,n),Y=mc(d,o||[]),$=pc(p.current,Y);w({left:B.clientX,top:B.clientY},G,$)},[n,d,o,w]),S=k.useCallback((F,B)=>{const G=H2([F],B,n),Y=mc(d,o||[]),$=pc(p.current,Y);w({left:B.clientX,top:B.clientY},G,$)},[n,d,o,w]),T=k.useMemo(()=>u?$M(r,n,v):n,[r,n,v,u]),M=k.useMemo(()=>b.length?z.mergeFiltersOrFilterRelations(e.filters||[],b):e.filters,[e.filters,b]),E=k.useMemo(()=>P.combineHandlers([C,e.onDataPointsSelected]),[C,e.onDataPointsSelected]),D=k.useMemo(()=>P.combineHandlers([S,e.onDataPointContextMenu]),[S,e.onDataPointContextMenu]);return{propsWithDrilldown:H(R({},e),{dataOptions:T,filters:M,onDataPointsSelected:E,onDataPointContextMenu:D}),isDrilldownEnabled:m,breadcrumbs:_}},nbe=y.asSisenseComponent({componentName:"ChartWidget"})(e=>{var q,te,Q;RS({widgetType:"chart",widgetName:d2(e),widgetTitle:kS(e),entityId:NS(e,"chart",d2(e)),enabled:!!(e.chartType&&e.dataOptions)});const{app:t}=y.useSisenseContext(),{chartType:r,dataSource:n=t==null?void 0:t.defaultDataSource,dataOptions:i,styleOptions:a,highlightSelectionDisabled:o=!1,highlights:s,description:u,onChange:c}=e,{width:d,height:h}=a||{},p=k.useMemo(()=>{var J;return t_(r,{hasHeader:!((J=a==null?void 0:a.header)!=null&&J.hidden)})},[r,(q=a==null?void 0:a.header)==null?void 0:q.hidden]),m=k.useMemo(()=>({width:d,height:h}),[d,h]),[v,b]=k.useState(0),_=k.useMemo(()=>U.omit(a,["width","height"]),[a]),w=k.useCallback(J=>{c==null||c({type:"drilldownSelections/changed",payload:J})},[c]),{headerConfig:C,titleEditor:S}=DS({title:e.title,onChange:e.onChange,headerConfig:(te=e.config)==null?void 0:te.header}),{headerConfig:T}=mve({baseHeaderConfig:C,title:e.title,chartType:r,dataOptions:i,dataSource:n,filters:e.filters,highlights:e.highlights,config:e.config}),{headerConfig:M}=Bve({baseHeaderConfig:T,title:e.title,chartType:r,dataOptions:i,dataSource:n,filters:e.filters,config:e.config,id:e.id}),{propsWithDrilldown:E,isDrilldownEnabled:D,breadcrumbs:N}=rbe({propsToExtend:e,onDrilldownSelectionsChange:w}),{contentAreaRef:F,styleOptionsWithNarrative:B,narrativeTopSlot:G,narrativeBottomSlot:Y,narrativeAloneContent:$}=Z1e({propsWithDrilldown:E,styleOptions:a}),X=rge({chartType:r,dataOptions:i,enabled:!o&&!D&&!(s!=null&&s.length)}),V=(Q=t==null?void 0:t.settings.accessibilityConfig)==null?void 0:Q.enabled,Z=k.useCallback(J=>{var ne;return V?H(R({},J),{accessibility:H(R({},J.accessibility),{description:u!=null?u:(ne=J.accessibility)==null?void 0:ne.description})}):J},[u,V]);if(!r||!i)return null;const j=H(R({},E),{dataSet:n,styleOptions:_,refreshCounter:v,onDataPointClick:k.useMemo(()=>P.combineHandlers([X.onDataPointClick,e.onDataPointClick]),[X.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:E.onDataPointContextMenu,onDataPointsSelected:k.useMemo(()=>P.combineHandlers([X.onDataPointsSelected,E.onDataPointsSelected]),[X.onDataPointsSelected,E.onDataPointsSelected]),onBeforeRender:k.useMemo(()=>P.combineHandlers([Z,X.onBeforeRender,e.onBeforeRender],!0),[Z,X.onBeforeRender,e.onBeforeRender])});return O.jsx(vc,{defaultSize:p,size:m,children:O.jsx(US,H(R({},e),{styleOptions:B,headerConfig:M,titleEditor:S,contentAreaRef:F,topSlot:O.jsxs(O.Fragment,{children:[e.topSlot,G,N]}),dataSetName:n&&U.getDataSourceName(n),onRefresh:()=>b(v+1),bottomSlot:O.jsxs(O.Fragment,{children:[Y,e.bottomSlot]}),children:$!=null?$:O.jsx(sS,R({},j))}))})}),tE=()=>O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:O.jsx("path",{d:"M13.0908 2.20223C13.286 2.00704 13.6026 2.00699 13.7978 2.20223C13.993 2.39747 13.993 2.71402 13.7978 2.90926L8.70698 8.00008L13.7978 13.0909C13.9929 13.2862 13.993 13.6027 13.7978 13.7979C13.6026 13.9931 13.286 13.993 13.0908 13.7979L7.99995 8.70711L2.90913 13.7979C2.71389 13.9931 2.39735 13.9931 2.2021 13.7979C2.00687 13.6027 2.00692 13.2862 2.2021 13.0909L7.29292 8.00008L2.2021 2.90926C2.00685 2.714 2.00685 2.39749 2.2021 2.20223C2.39736 2.00697 2.71387 2.00697 2.90913 2.20223L7.99995 7.29305L13.0908 2.20223Z",fill:"#2C2E32"})});function rE(e,t,r){var u,c;const n=r!=null&&r.filterId&&(u=e.find(d=>d.config.guid===r.filterId))!=null?u:null,i=n!==null&&!y.isSameAttribute(n.attribute,t),a=i?null:n,o=i||r==null?void 0:r.filterId,s=o?null:(c=e.find(d=>y.isSameAttribute(d.attribute,t)))!=null?c:null;return{filter:a!=null?a:s,validLinkGuid:o}}function j2(e,t){e.config.guid=t}function ibe(e){return t=>{const{attribute:r}=t,{filters:n,setFilters:i,link:a,setLink:o}=e,{filter:s,validLinkGuid:u}=rE(n,r,a),c=u?null:s;return{filter:s,onChange:h=>{if(h===null){u&&i(n.filter(m=>m.config.guid!==u));return}const p=u;if(p){j2(h,p);const m=n.map(b=>b.config.guid===p?h:b),v=n.some(b=>b.config.guid===p)?m:[...m,h];i(v)}else c?(j2(h,c.config.guid),o({filterId:c.config.guid}),i(n.map(m=>m.config.guid===c.config.guid?h:m))):(o({filterId:h.config.guid}),i([...n,h]))}}}}function abe(e){const t={};return{flatFilters:e.reduce((n,i)=>(U.isCascadingFilter(i)?(t[i.config.guid]||(t[i.config.guid]=[]),i.filters.forEach(a=>{t[i.config.guid].push(a),n.push(a)})):n.push(i),n),[]),cascadingToPureFiltersMap:t}}function nE(e,t,r){const n=t.filter(U.isCascadingFilter);return sbe(e,n).map(a=>{if(obe(a)){const o=n.find(u=>u.config.guid===a.groupId);if(!o)throw new U.TranslatableError("errors.cascadingFilterOriginalNotFound");const s=r==null?void 0:r.shouldResetFiltersDeeperThanModified;return lbe(a,o,{shouldResetFiltersDeeperThanModified:s})}return a})}function obe(e){return"groupId"in e}function sbe(e,t){const r=[];return e.forEach(n=>{const i=t.find(a=>a.filters.some(o=>z.getFilterCompareId(o)===z.getFilterCompareId(n)));if(i){const a=i.config.guid,o=r.find(s=>"groupId"in s&&s.groupId===a);o?o.filters.push(n):r.push({groupId:a,filters:[n],previousFilters:i.filters})}else r.push(n)}),r}function lbe(e,t,r){const n=r!=null&&r.shouldResetFiltersDeeperThanModified?dbe(e.filters,e.previousFilters):e.filters,i=ube(n,t.config.disabled);return U.cascading(n,{guid:t.config.guid,disabled:i})}function ube(e,t){return e.some(n=>n.config.disabled!==t)?!t:t}function cbe(e,t,r){const{flatFilters:n,cascadingToPureFiltersMap:i}=abe(e);return{pureFilters:n,updateFilters:o=>{const s=nE(o,e,{shouldResetFiltersDeeperThanModified:!0});t(s)},pureFiltersIgnoringRules:hbe(r,i)}}function dbe(e,t){const r=e.reduce((n,i,a)=>{const o=t.find(s=>y.haveSameAttribute(s,i));return o&&!IM(i,o)?a:n},-1);return r===-1?e:e.map((n,i)=>i>r?y.clearMembersFilter(n):n)}function hbe(e,t){var r;return{all:e.all,ids:((r=e.ids)==null?void 0:r.reduce((n,i)=>{const a=t[i];return a?n.concat(a.map(o=>o.config.guid)):n.concat(i)},[]))||[]}}const fbe=y.newStyled.button`
530
- color: ${({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor}};
531
- background: none;
532
- font-size: 13px;
533
- border: none;
534
- height: 26px;
535
- padding: 0 6px 0 2px;
536
- margin: 0 4px 0 4px;
537
- border-radius: 4px;
538
- cursor: pointer;
539
- display: flex;
540
- align-items: center;
541
- justify-content: center;
542
- &:hover {
543
- background-color: rgba(247, 247, 247, 1);
544
- }
545
- `,pbe=y.newStyled.span`
546
- color: ${({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor}};
547
- display: inline-block;
548
- padding-top: 3px;
549
- white-space: nowrap;
550
- `,mbe=({onClick:e})=>{var n;const{themeSettings:t}=y.useThemeContext(),{t:r}=O.useTranslation();return O.jsxs(fbe,{onClick:e,theme:t,"data-testid":"csdk-clear-selection-button",children:[O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:O.jsx("path",{fill:(n=t.chart)==null?void 0:n.textColor,d:"M7.187 7l9.774 10.279A1 1 0 0 0 17 17V8a1 1 0 0 0-1-1H7.187zm9.018 10.979L6.206 7.463l.487-.415A1 1 0 0 0 6 8v9a1 1 0 0 0 1 1h9c.07 0 .139-.007.205-.021zM7 6h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"})}),O.jsx(pbe,{theme:t,children:r("commonFilter.clearSelectionButton")})]})},U2={applyMode:hl.HIGHLIGHT,shouldAffectFilters:!0,ignoreFilters:{all:!1,ids:[]},forceApplyBackgroundFilters:!0};function gbe(e,t){return e==="table"?{applyMode:hl.FILTER,shouldAffectFilters:!1,ignoreFilters:P.merge(U2.ignoreFilters,t.ignoreFilters||{})}:P.merge(U2,t)}function vbe(e,t,r,n,i,a,o){const s={},u=gbe(r,i),{pureFilters:c,updateFilters:d,pureFiltersIgnoringRules:h}=cbe(e,t,u.ignoreFilters||{}),p=c.filter(S=>!S.config.disabled),m=nye(p,h),v=wg(r,n),b=u.shouldAffectFilters&&v.length,[_,w]=bbe(m,v,u.applyMode),C=u.forceApplyBackgroundFilters?z.mergeFilters(ybe(c),_):_;if(s.filters=C,s.highlights=w,s.onDataPointsSelected=(S,T)=>{const M=[];if(b){const E=B2(r,n,S);E&&M.push(E);const D=Bu(r,n,S),{filters:N,isSelection:F}=lf(D,c,!0),B=a(F?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),G=z2(B,()=>{d(z.mergeFilters(c,N))});M.push(G)}M.length&&(o==null||o({id:$s.WIDGET_POINTS_CROSSFILTERING,position:{left:T.clientX,top:T.clientY},itemSections:M}))},s.onDataPointContextMenu=(S,T)=>{const M=[];if(b){const E=B2(r,n,[S]);E&&M.push(E);const D=Bu(r,n,[S]);if(!D.length)return;const{filters:N,isSelection:F}=lf(D,c,!0),B=a(F?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),G=z2(B,()=>{d(z.mergeFilters(c,N))});M.push(G)}M.length&&(o==null||o({id:$s.WIDGET_POINTS_CROSSFILTERING,position:{left:T.clientX,top:T.clientY},itemSections:M}))},b){s.onDataPointClick=E=>{const D=Bu(r,n,[E]),{filters:N}=lf(D,c);d(z.mergeFilters(c,N))};const S=p.filter(E=>v==null?void 0:v.some(D=>U.isMembersFilter(E)&&y.isSameAttribute(E.attribute,D)&&!y.isIncludeAllFilter(E)&&!E.config.locked)),T=!!S.length,M=()=>{const E=S.map(y.clearMembersFilter);d(z.mergeFilters(c,E))};T&&(s.renderToolbar=(E,D)=>{const N=v.map(({expression:F})=>F).join(";");return O.jsxs("div",{style:{display:"flex"},children:[O.jsx(mbe,{onClick:M}),D]},N)})}return s}function ybe(e){return e.map(t=>{var r;return(r=t.config)==null?void 0:r.backgroundFilter}).filter(t=>!!t)}function bbe(e,t,r){if(r===hl.HIGHLIGHT){const[n,i]=fl(e,o=>t.every(s=>!y.isSameAttribute(s,o.attribute))),a=i.filter(o=>!y.isIncludeAllFilter(o));return[n,a]}return[e,[]]}function _be(e,t){const r=k.useRef(void 0),[n,i]=lg(k.useMemo(()=>z.splitFiltersAndRelations(e),[e]),{onLocalStateChange:k.useCallback(m=>{const{filters:v,relations:b}=m;if(t){const _=z.combineFiltersAndRelations(v,b);U.isEqual(r.current,_)||(r.current=_,t(_))}},[t])}),{filters:a,relations:o}=n,s=k.useMemo(()=>z.combineFiltersAndRelations(a,o),[a,o]),u=k.useCallback(m=>{if(z.isFilterRelations(m)){const{filters:v,relations:b}=z.splitFiltersAndRelations(m);i({filters:v||[],relations:b||null})}else i({filters:m,relations:null})},[i]),c=k.useCallback(m=>{const v=z.mergeFilters(a,[m]);i({filters:v,relations:z.calculateNewRelations(a,o,v)})},[a,o,i]),d=k.useCallback(m=>{i({filters:m,relations:z.calculateNewRelations(a,o,m)})},[a,o,i]),h=k.useMemo(()=>a.some(m=>U.isCascadingFilter(m)),[a]),p=k.useCallback(m=>{if(!o)return m;const v=h?nE(m,a):m,b=z.calculateNewRelations(a,o,v,{shouldReplaceSameAttributeFilters:!0});return z.combineFiltersAndRelations(v,b)},[h,a,o]);return{regularFilters:a,addFilter:c,filtersOrFilterRelations:s,setFiltersOrFilterRelations:u,setFilters:d,applyRelationsToOtherFilters:p}}const wbe=({initialFilters:e=[],openMenu:t,onBeforeMenuOpen:r,onFiltersChange:n}={})=>{const{t:i}=O.useTranslation(),{filtersOrFilterRelations:a,regularFilters:o,addFilter:s,setFiltersOrFilterRelations:u,setFilters:c,applyRelationsToOtherFilters:d}=_be(e,n),h=k.useCallback((p,m={})=>{var S;if(P.isTextWidgetProps(p))return p;if(P.isFilterWidgetProps(p)){const{filter:T,onChange:M}=ibe({filters:o,setFilters:c,link:m.filterWidgetOptions,setLink:(S=m.setFilterWidgetOptions)!=null?S:()=>{}})(p),E=p.onChange;return H(R({},p),{filter:T,onChange:D=>{D.type==="filter/changed"&&M(D.payload.filter),E==null||E(D)},onBeforeMenuOpen:r})}const v=P.getInternalWidgetType(p),b=p,_=U.cloneDeep(p),w=iye(p),C=vbe(o,c,v,w,m,i,t);return _.highlights=z.mergeFilters(C.highlights,b.highlights),_.onBeforeMenuOpen=r,_.filters=d(z.mergeFilters(C.filters,z.getFiltersArray(b.filters))),C.onDataPointClick&&P.registerDataPointClickHandler(_,C.onDataPointClick),C.onDataPointsSelected&&P.registerDataPointsSelectedHandler(_,C.onDataPointsSelected),C.onDataPointContextMenu&&P.registerDataPointContextMenuHandler(_,C.onDataPointContextMenu),C.renderToolbar&&P.registerRenderToolbarHandler(_,C.renderToolbar),_},[o,c,i,t,r,d]);return{filters:a,setFilters:u,addFilter:s,connectToWidgetProps:h}},Cbe=()=>O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9C0 4.02944 4.02944 0 9 0ZM9 13C8.44772 13 8 13.4477 8 14C8 14.5523 8.44772 15 9 15C9.55228 15 10 14.5523 10 14C10 13.4477 9.55228 13 9 13ZM9.00586 3C7.66861 3.03426 7.00001 3.77738 7 5.22852C7 6.07042 7.227 7.11074 7.68066 8.34961C7.85572 8.8149 7.99704 9.18813 8.10449 9.46875C8.21185 9.74913 8.28914 9.94119 8.33691 10.0439C8.59959 10.6532 8.83879 10.9716 9.05371 10.999C9.25272 11.0196 9.47115 10.7147 9.70996 10.085C9.82133 9.79081 9.92504 9.5002 10.0205 9.21289C10.116 8.92539 10.2159 8.63711 10.3193 8.34961C10.773 7.06972 11 6.00206 11 5.14648C11 3.6953 10.3352 2.97946 9.00586 3Z",fill:"#F2B900"})}),xbe=()=>O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9C2.57711e-07 4.02944 4.02944 2.57702e-07 9 0ZM12.7881 5.21582C12.4952 4.92297 12.0204 4.92307 11.7275 5.21582L9.00195 7.94141L6.27637 5.21582C5.98347 4.92293 5.50871 4.92293 5.21582 5.21582C4.92295 5.50872 4.92293 5.98348 5.21582 6.27637L7.94141 9.00195L5.21582 11.7275C4.923 12.0204 4.92295 12.4952 5.21582 12.7881C5.5087 13.0808 5.98352 13.0809 6.27637 12.7881L9.00195 10.0625L11.7275 12.7881C12.0204 13.0807 12.4953 13.0809 12.7881 12.7881C13.0809 12.4953 13.0807 12.0205 12.7881 11.7275L10.0625 9.00195L12.7881 6.27637C13.0808 5.98351 13.0808 5.50868 12.7881 5.21582Z",fill:"#D12D04"})}),Tbe=6e4,Sbe=85,Mbe=100,Ebe=(e,t)=>e===!0&&t==="sisense_managed";function Pbe(e,t,r){const{initialBalance:n,balance:i}=e;if(n===0)return{initialBalance:n,currentBalance:i,usagePercentage:0,isWarning:!1,isExceeded:!0};const a=(n-i)/n*100,o=Math.min(Math.max(a,0),100);return{initialBalance:n,currentBalance:i,usagePercentage:o,isWarning:o>=t&&o<r,isExceeded:o>=r}}const iE=(e={})=>{var m,v;const{enabled:t,warningThreshold:r=Sbe,exceededThreshold:n=Mbe}=e,{app:i}=y.useSisenseContext(),a=i==null?void 0:i.httpClient,o=(v=(m=i==null?void 0:i.settings)==null?void 0:m.serverFeatures)==null?void 0:v.aiAssistant,u=Ebe(o==null?void 0:o.quotaNotification,o==null?void 0:o.featureModelType)&&(t!=null?t:!0),{data:c,isLoading:d,error:h}=_g({queryKey:["creditBalance"],queryFn:()=>pt(exports,null,function*(){if(!a)throw new U.TranslatableError("errors.httpClientNotFound");const b=yield a.call(a.url+"api/v1/credits/get-balance",{method:"GET"});if(!b)throw new U.TranslatableError("ai.errors.failedToFetchCreditBalance");return b}),enabled:!!a&&u,refetchInterval:Tbe}),p=k.useMemo(()=>c?Pbe(c,r,n):null,[c,r,n]);return{enabled:u,quotaState:p,isLoading:d,error:h}},Abe="_alert_gx4j3_1",Rbe="_error_gx4j3_12",Dbe="_warning_gx4j3_16",Nbe="_info_gx4j3_20",kbe="_icon_gx4j3_25",Lbe="_content_gx4j3_38",Obe="_title_gx4j3_47",Ibe="_description_gx4j3_54",Fbe="_dismissButton_gx4j3_61",bi={alert:Abe,error:Rbe,warning:Dbe,info:Nbe,icon:kbe,content:Lbe,title:Obe,description:Ibe,dismissButton:Fbe},V2=({variant:e="info",title:t,description:r,icon:n,dismissible:i=!1,onDismiss:a,className:o=""})=>{const s=n||O.jsx(dS,{}),u=()=>{a==null||a()},c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),u())};return O.jsxs("div",{role:"alert",className:`${bi.alert} ${bi[e]} ${o}`,children:[O.jsx("div",{className:bi.icon,children:s}),O.jsxs("div",{className:bi.content,children:[t&&O.jsx("div",{className:bi.title,children:t}),r&&O.jsx("div",{className:bi.description,children:r})]}),i&&a&&O.jsx("button",{type:"button",className:bi.dismissButton,onClick:u,onKeyDown:c,"aria-label":"Dismiss alert",children:O.jsx(tE,{})})]})},$be="_container_gw9t3_1",Bbe="_bannerWrapper_gw9t3_8",_u={container:$be,bannerWrapper:Bbe};function zbe({className:e="",enabled:t=!0,warningThreshold:r,exceededThreshold:n}={}){const{t:i}=O.useTranslation(),{enabled:a,quotaState:o,isLoading:s}=iE({enabled:t,warningThreshold:r,exceededThreshold:n}),[u,c]=k.useState(!1);return!a||s||!o?null:o.isExceeded?O.jsx("div",{className:`${_u.container} ${e}`,children:O.jsx("div",{className:_u.bannerWrapper,children:O.jsx(V2,{variant:"error",icon:O.jsx(xbe,{}),title:i("ai.quota.exceededErrorTitle"),description:i("ai.quota.exceededErrorDescription"),dismissible:!1})})}):o.isWarning&&!u?O.jsx("div",{className:`${_u.container} ${e}`,children:O.jsx("div",{className:_u.bannerWrapper,children:O.jsx(V2,{variant:"warning",icon:O.jsx(Cbe,{}),description:i("ai.quota.warningDescription",{usagePercentage:Math.round(o.usagePercentage)}),dismissible:!0,onDismiss:()=>c(!0)})})}):null}exports.AlertIcon=dS;exports.ArrowIcon=pp;exports.BaseAuthenticator=Ws;exports.BearerAuthenticator=UR;exports.Button=Bs;exports.Chart=sS;exports.ChartWidget=nbe;exports.CloseIcon=tE;exports.Collapsible=_M;exports.CommonFiltersApplyMode=hl;exports.DEFAULT_PIVOT_TABLE_SIZE=e_;exports.DEFAULT_TABLE_ROWS_PER_PAGE=tS;exports.DatePeriod=_C;exports.DimensionalQueryClient=r8;exports.DoubleArrowIcon=mp;exports.DrilldownBreadcrumbs=VM;exports.DynamicSizeContainer=vc;exports.EVENT_DATA_CELL_FORMAT=G_;exports.EVENT_HEADER_CELL_FORMAT=ff;exports.ElementStates=s_;exports.EmotionCacheProvider=r_;exports.ErrorBoundary=lm;exports.IconButton=gn;exports.LEGACY_DESIGN_TYPES=Go;exports.MISSING_DATASOURCE_NLG_ERROR=k1e;exports.MenuButton=zS;exports.MenuIds=$s;exports.MenuSectionIds=qa;exports.NarrativeTriggerButton=QS;exports.NoResultsOverlay=Mm;exports.PAGES_BATCH_SIZE=rS;exports.PanelType=De;exports.PasswordAuthenticator=i6;exports.PivotQueryClient=Tw;exports.Popper=sl;exports.QueryClient=t1e;exports.QueryClientProvider=l1e;exports.QuotaNotification=zbe;exports.RestApi=zc;exports.RestApiNotReadyError=gW;exports.SsoAuthenticator=XR;exports.Subscribable=yo;exports.TableComponent=nS;exports.ThemeProvider=l_;exports.ThreeDotsIcon=BS;exports.Tooltip=Oi;exports.Typography=vr;exports.UserType=Tt;exports.WatAuthenticator=KR;exports.WidgetContainer=US;exports.WidgetMenuButton=WS;exports.WidgetNarrative=PM;exports.WidgetSpaceAround=Md;exports.addQueryParamsToUrl=_w;exports.appendHeaders=Pc;exports.applyDrilldownDimensionToPivot=kM;exports.basePickBy=c_;exports.baseUniq=b0;exports.boxWhiskerProcessResult=TY;exports.buildWidgetNarrativeRequests=yM;exports.camelCase=ES;exports.classNames=Ps;exports.convertToThemeSettings=n_;exports.createCaseFirst=hS;exports.createFormatter=Mt;exports.createHeaderCellValueFormatter=nW;exports.createLevelAttribute=DC;exports.createPanelColorFormat=s8;exports.createSimplePaletteValueFilter=ri;exports.createSvgIcon=Ya;exports.createValueColorOptions=Nw;exports.createValueToColorMap=kw;exports.createValueToColorMultiColumnsMap=l8;exports.debounce=ug;exports.defaultDateConfig=Ks;exports.downloadBlobAsFile=dve;exports.errorInterceptor=Ac;exports.extendSxProp=G2;exports.formatDateValue=Qs;exports.formatDatetimeString=s0;exports.generateAttributeName=RC;exports.getAvailableDrilldownPaths=pc;exports.getBaseDateFnsLocale=Zs;exports.getChartDefaultSize=yc;exports.getCompleteWidgetNarrativeConfig=$i;exports.getCustomWidgetName=cge;exports.getDataOptionByLocation=DM;exports.getDataPointMetadata=Fe;exports.getDefaultDateMask=eW;exports.getDefaultState=oM;exports.getDrilldownMenuItems=QM;exports.getFilterWidgetName=dge;exports.getHierarchyModels=JM;exports.getInitialDimensionLocation=NM;exports.getLegacyPalette=o_;exports.getNarrative=mM;exports.getPaletteName=i_;exports.getPivotDataOptionByJaqlIndex=EC;exports.getPivotDataOptionIdByJaqlIndex=tW;exports.getPivotQueryOptions=cg;exports.getPivotWidgetName=lge;exports.getResponseInterceptor=r6;exports.getSelectedDrilldownAttributes=mc;exports.getSelectionTitleMenuItem=KM;exports.getTableAttributesAndMeasures=C0;exports.getTextWidgetName=uge;exports.getThemeSettingsByOid=a_;exports.getTranslatedDataOptions=Y3;exports.getWidgetDefaultSize=t_;exports.getWidgetEntityId=NS;exports.getWidgetNarrativeConfigFromWidgetProps=Yi;exports.getWidgetOverheadHeight=nve;exports.getWidgetTitle=kS;exports.groupBy=AM;exports.headerMenuUtils=tge;exports.isAuthTokenPending=WR;exports.isPivotRowsSort=r0e;exports.isSsoAuthenticator=Vm;exports.isString=Wc;exports.mapAttributesForExcelExport=pm;exports.mapMeasureColumnForExcelExport=YS;exports.mapMeasureColumnsForExcelExport=XS;exports.normalizeUrl=Bi;exports.notifyManager=gt;exports.parseDataTableDateValue=NH;exports.parseMutationArgs=Wve;exports.partition=fl;exports.prepareGetNlgInsightsPayload=M1e;exports.preparePivotRowsSortCriteriaList=n0e;exports.processDrilldownSelections=YM;exports.resolveFilterWidgetFilter=rE;exports.shallowEqualObjects=dc;exports.shouldSkipSisenseContextWaiting=oS;exports.shouldThrowError=dM;exports.startOfPeriod=DH;exports.translatePivotTableDataOptions=O3;exports.translateTableDataOptions=tl;exports.typographyClasses=r4;exports.updateDrilldownSelections=qM;exports.upperFirst=fS;exports.useCommonFilters=wbe;exports.useControlled=Tm;exports.useCsvQueryFileLoader=VS;exports.useDebouncedValue=uS;exports.useDrilldown=ZM;exports.useDrilldownCore=GM;exports.useExcelQueryFileLoader=ZS;exports.useFormControl=OS;exports.useHierarchiesLoader=eE;exports.useHover=TM;exports.useId=gc;exports.useMenu=pg;exports.usePivotTableQuery=o0e;exports.useQuery=_g;exports.useQueryClient=cM;exports.useQuotaNotification=iE;exports.useRestApi=PC;exports.useSetError=_0;exports.useSyncExternalStore=sM;exports.useSyncedState=lg;exports.useTrackWidgetInit=RS;exports.useWidgetHeaderManagement=DS;exports.useWidgetNarrativeState=bM;exports.useWithCsvDownloadMenuItem=GS;exports.useWithExcelDownloadMenuItem=KS;exports.validateUrl=jR;exports.withHeaderMenuItem=AS;