@cubejs-backend/server-core 0.35.81 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/core/DevServer.js +5 -3
- package/dist/src/core/DevServer.js.map +1 -1
- package/dist/src/core/OptsHandler.js +19 -8
- package/dist/src/core/OptsHandler.js.map +1 -1
- package/dist/src/core/OrchestratorApi.js +6 -1
- package/dist/src/core/OrchestratorApi.js.map +1 -1
- package/dist/src/core/OrchestratorStorage.js +1 -3
- package/dist/src/core/OrchestratorStorage.js.map +1 -1
- package/dist/src/core/RefreshScheduler.js +1 -0
- package/dist/src/core/RefreshScheduler.js.map +1 -1
- package/dist/src/core/agentCollect.js +9 -1
- package/dist/src/core/agentCollect.js.map +1 -1
- package/dist/src/core/optionsValidate.d.ts.map +1 -1
- package/dist/src/core/optionsValidate.js +1 -23
- package/dist/src/core/optionsValidate.js.map +1 -1
- package/dist/src/core/server.d.ts.map +1 -1
- package/dist/src/core/server.js +98 -83
- package/dist/src/core/server.js.map +1 -1
- package/dist/src/core/types.d.ts +2 -5
- package/dist/src/core/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/playground/assets/index-n9H6oO1O.js +3538 -0
- package/playground/index.html +2 -3
- package/playground/vizard/assets/abap-Bs-KDgo-.js +6 -0
- package/playground/vizard/assets/apex-BB8ijgrA.js +6 -0
- package/playground/vizard/assets/azcli-CM0y7Ame.js +6 -0
- package/playground/vizard/assets/bat-Bfxf8Mzl.js +6 -0
- package/playground/vizard/assets/bicep-DJPqIr_M.js +7 -0
- package/playground/vizard/assets/cameligo-PnszTm2c.js +6 -0
- package/playground/vizard/assets/clients-CzhsrDwG.js +1 -0
- package/playground/vizard/assets/clojure-B3cFVYI-.js +6 -0
- package/playground/vizard/assets/codicon-BuT2v_Yt.ttf +0 -0
- package/playground/vizard/assets/coffee-D8tSzcLH.js +6 -0
- package/playground/vizard/assets/cpp-CP-cATHl.js +6 -0
- package/playground/vizard/assets/csharp-Dfj4WFqy.js +6 -0
- package/playground/vizard/assets/csp-D9HxVpWn.js +6 -0
- package/playground/vizard/assets/css-CkCHETKw.js +8 -0
- package/playground/vizard/assets/css.worker-CJ81phlL.js +84 -0
- package/playground/vizard/assets/cssMode-PbVgDCx5.js +9 -0
- package/playground/vizard/assets/cypher-B50w5pq9.js +6 -0
- package/playground/vizard/assets/dart-DvROnYA_.js +6 -0
- package/playground/vizard/assets/dockerfile-C4f37Dvd.js +6 -0
- package/playground/vizard/assets/ecl-DW46Dzft.js +6 -0
- package/playground/vizard/assets/editor.worker-DnhKYsI_.js +11 -0
- package/playground/vizard/assets/elixir-BIa5JtGe.js +6 -0
- package/playground/vizard/assets/flow9-ByI4Scwv.js +6 -0
- package/playground/vizard/assets/freemarker2-CJRN0A1r.js +8 -0
- package/playground/vizard/assets/fsharp-Cgf6u04w.js +6 -0
- package/playground/vizard/assets/go-CJfxPkej.js +6 -0
- package/playground/vizard/assets/graphql-CGlhcY2-.js +6 -0
- package/playground/vizard/assets/handlebars-iTWM3ahM.js +6 -0
- package/playground/vizard/assets/hcl-CTI7WNlW.js +6 -0
- package/playground/vizard/assets/html-CpaHgWrY.js +6 -0
- package/playground/vizard/assets/htmlMode-xt8whNAd.js +9 -0
- package/playground/vizard/assets/icons-DuVB-IiR.js +61 -0
- package/playground/vizard/assets/index-B0u8YO_h.css +1 -0
- package/playground/vizard/assets/index-C388WnHl.js +4841 -0
- package/playground/vizard/assets/ini-qJXHXiTY.js +6 -0
- package/playground/vizard/assets/java-Dnrl9822.js +6 -0
- package/playground/vizard/assets/javascript-zOLCCWF1.js +6 -0
- package/playground/vizard/assets/json.worker-DY5adJme.js +42 -0
- package/playground/vizard/assets/jsonMode-mWIcOV2K.js +11 -0
- package/playground/vizard/assets/julia-pqMLycLG.js +6 -0
- package/playground/vizard/assets/kotlin-DLX697jv.js +6 -0
- package/playground/vizard/assets/less-2ExdFhZM.js +7 -0
- package/playground/vizard/assets/lexon-ABKfEwhw.js +6 -0
- package/playground/vizard/assets/liquid-Bu0TeitP.js +6 -0
- package/playground/vizard/assets/lua-CI0blgFs.js +6 -0
- package/playground/vizard/assets/m3-yVPEHiu4.js +6 -0
- package/playground/vizard/assets/markdown-CjOKAnMy.js +6 -0
- package/playground/vizard/assets/mdx-uhxhQOIT.js +6 -0
- package/playground/vizard/assets/mips-B7KWClFm.js +6 -0
- package/playground/vizard/assets/monaco-B_IR9uhL.js +730 -0
- package/playground/vizard/assets/monaco-ZJDocGaF.css +1 -0
- package/playground/vizard/assets/msdax-N_40gjXO.js +6 -0
- package/playground/vizard/assets/mysql-CzgTwwi2.js +6 -0
- package/playground/vizard/assets/objective-c-CwAIQX-6.js +6 -0
- package/playground/vizard/assets/other-HgnFgCOO.js +2 -0
- package/playground/vizard/assets/pascal-3SrKWnFX.js +6 -0
- package/playground/vizard/assets/pascaligo-Cv9Y0fbC.js +6 -0
- package/playground/vizard/assets/perl-DHxnJL0_.js +6 -0
- package/playground/vizard/assets/pgsql-DGJFw0qd.js +6 -0
- package/playground/vizard/assets/php-BA3Rqjpx.js +6 -0
- package/playground/vizard/assets/pla-DKf5_u7N.js +6 -0
- package/playground/vizard/assets/postiats-Bup1kUyj.js +6 -0
- package/playground/vizard/assets/powerquery-BfbPeLER.js +6 -0
- package/playground/vizard/assets/powershell-DAsS7BG8.js +6 -0
- package/playground/vizard/assets/protobuf-Dzs34GPr.js +7 -0
- package/playground/vizard/assets/pug-CVuUMJ1K.js +6 -0
- package/playground/vizard/assets/python-4inBdLoB.js +6 -0
- package/playground/vizard/assets/qsharp-BgY1GbL_.js +6 -0
- package/playground/vizard/assets/r-C2Iz-cGs.js +6 -0
- package/playground/vizard/assets/razor-BGbFglDZ.js +6 -0
- package/playground/vizard/assets/react-CJahmRYQ.js +32 -0
- package/playground/vizard/assets/redis-F7UxdB6U.js +6 -0
- package/playground/vizard/assets/redshift-CDF44XVS.js +6 -0
- package/playground/vizard/assets/restructuredtext-C_dzeD_4.js +6 -0
- package/playground/vizard/assets/ruby-BdxlVRg3.js +6 -0
- package/playground/vizard/assets/rust-gU8692nP.js +6 -0
- package/playground/vizard/assets/sb-CsAkPjmq.js +6 -0
- package/playground/vizard/assets/scala-D_TH4Qyk.js +6 -0
- package/playground/vizard/assets/scheme-CTXRt_ZJ.js +6 -0
- package/playground/vizard/assets/scss-Rf_ppwBg.js +8 -0
- package/playground/vizard/assets/shell-osqRiq1b.js +6 -0
- package/playground/vizard/assets/solidity-BTHmi1CB.js +6 -0
- package/playground/vizard/assets/sophia-BRe4RArb.js +6 -0
- package/playground/vizard/assets/sparql-CaSv-uNl.js +6 -0
- package/playground/vizard/assets/sql-CHiRcria.js +6 -0
- package/playground/vizard/assets/st-CCGZ7KTi.js +6 -0
- package/playground/vizard/assets/swift-DeyDsJzf.js +8 -0
- package/playground/vizard/assets/systemverilog-RSGMMa-l.js +6 -0
- package/playground/vizard/assets/tcl-B28K5YOH.js +6 -0
- package/playground/vizard/assets/ts.worker-VACfgpbU.js +37021 -0
- package/playground/vizard/assets/tsMode-DWjmFJDZ.js +16 -0
- package/playground/vizard/assets/twig-ChoE7Tfw.js +6 -0
- package/playground/vizard/assets/typescript-3uQjFVUM.js +6 -0
- package/playground/vizard/assets/uikit-M_i__YCU.js +1352 -0
- package/playground/vizard/assets/vb-BCnlgLOU.js +6 -0
- package/playground/vizard/assets/wgsl-DlxrJ_uh.js +303 -0
- package/playground/vizard/assets/xml-DnmeLHVb.js +6 -0
- package/playground/vizard/assets/yaml-ByRsSZUB.js +6 -0
- package/playground/vizard/download/react-typescript-antd-table.zip +0 -0
- package/playground/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
- package/playground/vizard/favicon.ico +0 -0
- package/playground/vizard/fonts/Inter-Bold.woff +0 -0
- package/playground/vizard/fonts/Inter-Bold.woff2 +0 -0
- package/playground/vizard/fonts/Inter-Medium.woff +0 -0
- package/playground/vizard/fonts/Inter-Medium.woff2 +0 -0
- package/playground/vizard/fonts/Inter-Regular.woff +0 -0
- package/playground/vizard/fonts/Inter-Regular.woff2 +0 -0
- package/playground/vizard/fonts/Inter-SemiBold.woff +0 -0
- package/playground/vizard/fonts/Inter-SemiBold.woff2 +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Bold.woff +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Bold.woff2 +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Medium.woff +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Medium.woff2 +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Regular.woff +0 -0
- package/playground/vizard/fonts/JetBrainsMono-Regular.woff2 +0 -0
- package/playground/vizard/fonts/SourceCodePro-Regular.woff +0 -0
- package/playground/vizard/fonts/SourceCodePro-Regular.woff2 +0 -0
- package/playground/vizard/fonts/text-security-disc.woff +0 -0
- package/playground/vizard/fonts/text-security-disc.woff2 +0 -0
- package/playground/vizard/index.html +20 -0
- package/playground/vizard/logos/angular.svg +1 -0
- package/playground/vizard/logos/js.svg +1 -0
- package/playground/vizard/logos/react.svg +1 -0
- package/playground/vizard/logos/svelte.svg +1 -0
- package/playground/vizard/logos/ts.svg +1 -0
- package/playground/vizard/logos/vue.svg +1 -0
- package/playground/vizard/preview/react-typescript-antd-table/assets/index-C6xomtdV.js +355 -0
- package/playground/vizard/preview/react-typescript-antd-table/assets/index-D47x4Gho.css +1 -0
- package/playground/vizard/preview/react-typescript-antd-table/index.html +14 -0
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-D47x4Gho.css +1 -0
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-DlSl_JqR.js +57 -0
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/index.html +14 -0
- package/playground/assets/CachePane-9673c7ae.js +0 -1
- package/playground/assets/GraphiQLSandbox-53d3feeb.js +0 -268
- package/playground/assets/GraphiQLSandbox-8134e867.css +0 -1
- package/playground/assets/SchemaReference-ef4fa07a.js +0 -1
- package/playground/assets/SqlQueryTab-3e2bdfa2.js +0 -1
- package/playground/assets/bigquery-da521185.svg +0 -7
- package/playground/assets/brace-fold-6a775a2a.js +0 -1
- package/playground/assets/clickhouse-c923cfe7.svg +0 -15
- package/playground/assets/closebrackets-8dae6aa3.js +0 -2
- package/playground/assets/codemirror-3e55eb16.js +0 -24
- package/playground/assets/comment-3e14e4d5.js +0 -2
- package/playground/assets/crate-b646e4b5.svg +0 -9
- package/playground/assets/deepnote-6b5057ec.svg +0 -1
- package/playground/assets/dialog-a3340072.js +0 -1
- package/playground/assets/dialog-b108f254.js +0 -1
- package/playground/assets/druid-749d725a.svg +0 -6
- package/playground/assets/excel-d8d00a7e.svg +0 -1
- package/playground/assets/firebolt-f9ba6fb1.svg +0 -11
- package/playground/assets/foldgutter-04638de0.js +0 -1
- package/playground/assets/forEachState-6d514dbd.js +0 -1
- package/playground/assets/google-data-studio-8fefa10d.svg +0 -1
- package/playground/assets/google-sheets-c7f3e3ba.svg +0 -1
- package/playground/assets/hex-d653256d.svg +0 -1
- package/playground/assets/hightouch-263b24e1.svg +0 -1
- package/playground/assets/hint-2f6f4aaa.js +0 -1
- package/playground/assets/hint-35bc0266.js +0 -1
- package/playground/assets/index-21441f59.js +0 -15
- package/playground/assets/index-5b7876a6.js +0 -24
- package/playground/assets/index-f32c771c.js +0 -2935
- package/playground/assets/info-2f09b005.js +0 -1
- package/playground/assets/info-addon-ccdc82e5.js +0 -1
- package/playground/assets/javascript-1746d201.js +0 -1
- package/playground/assets/jump-1975be72.js +0 -1
- package/playground/assets/jump-to-line-00f030bc.js +0 -1
- package/playground/assets/jupyter-cc6ef4a6.svg +0 -1
- package/playground/assets/lint-087d334a.js +0 -1
- package/playground/assets/lint-0dc04469.js +0 -1
- package/playground/assets/lint-d3c9ba5b.js +0 -1
- package/playground/assets/matchbrackets-08ac6e5b.js +0 -1
- package/playground/assets/matchbrackets-8cf1c673.js +0 -1
- package/playground/assets/materialize-1c275282.svg +0 -7
- package/playground/assets/metabase-94537ada.svg +0 -1
- package/playground/assets/mode-0a6ca237.js +0 -1
- package/playground/assets/mode-55dee06f.js +0 -1
- package/playground/assets/mode-6f83539b.js +0 -1
- package/playground/assets/mongodb-ff875234.svg +0 -5
- package/playground/assets/observable-1fb9435c.svg +0 -1
- package/playground/assets/oracle-ac621595.svg +0 -10
- package/playground/assets/power-bi-f8d15f9c.svg +0 -1
- package/playground/assets/questdb-e8a2159a.svg +0 -53
- package/playground/assets/redshift-e3635b1b.svg +0 -9
- package/playground/assets/search-3880dafb.js +0 -2
- package/playground/assets/searchcursor-c88732e4.js +0 -7
- package/playground/assets/searchcursor-f596c4b5.js +0 -1
- package/playground/assets/show-hint-61147df4.js +0 -1
- package/playground/assets/sqlFormatter-f7d64f52.js +0 -7
- package/playground/assets/streamlit-77ef93a9.svg +0 -1
- package/playground/assets/sublime-4489239f.js +0 -6
- package/playground/assets/superset-9a4f216d.svg +0 -1
- package/playground/assets/tableau-841bb88e.svg +0 -1
- package/playground/assets/thoughtspot-3774b7ec.svg +0 -1
- package/playground/chart-renderers/angular/index.html +0 -13
- package/playground/chart-renderers/angular/main.c9ec6970e8db9607c52c.js +0 -1
- package/playground/chart-renderers/angular/polyfills.5e0ce2c1a99c8658e3f9.js +0 -1
- package/playground/chart-renderers/angular/runtime.acf0dec4155e77772545.js +0 -1
- package/playground/chart-renderers/angular/styles.c241fdf862898bf70e5f.css +0 -1
- package/playground/chart-renderers/react/index.html +0 -1
- package/playground/chart-renderers/react/static/css/main.1607577d.css +0 -9
- package/playground/chart-renderers/react/static/js/main.71cb3173.js +0 -2
- package/playground/chart-renderers/vue/index.html +0 -1
- package/playground/chart-renderers/vue/js/app.f3bd331b.js +0 -2
- package/playground/chart-renderers/vue/js/chunk-vendors.8740c156.js +0 -308
- /package/playground/assets/{athena-6bb5702d.svg → athena-ojPCDZsu.svg} +0 -0
- /package/playground/assets/{hive-f1d55e07.svg → hive-CnKOdnG1.svg} +0 -0
- /package/playground/assets/{index-af3b87a2.css → index-xEIXRErq.css} +0 -0
- /package/playground/assets/{mssql-ee163b5c.svg → mssql-D2BHkfVq.svg} +0 -0
- /package/playground/assets/{mysql-505410e7.svg → mysql-BeONLFsC.svg} +0 -0
- /package/playground/assets/{postgres-f2e5378f.svg → postgres-CRAWabOt.svg} +0 -0
- /package/playground/assets/{presto-23044820.svg → presto-CuvrYmB5.svg} +0 -0
- /package/playground/assets/{semantic-layer-ab287c7b.svg → semantic-layer-B8UQ_kwI.svg} +0 -0
- /package/playground/assets/{snowflake-6ddc094d.svg → snowflake-BQpm6tUS.svg} +0 -0
|
@@ -0,0 +1,1352 @@
|
|
|
1
|
+
import{r as f,a as $i,R as _,g as Tu,b as Tt}from"./react-CJahmRYQ.js";import{d as _a,u as Bt,L as Cu}from"./other-HgnFgCOO.js";import{L as Iu,_ as Tn,a as Mt,I as Ru,b as Lu}from"./icons-DuVB-IiR.js";var Ba={exports:{}},Cn={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Au=f,Mu=Symbol.for("react.element"),Fu=Symbol.for("react.fragment"),ku=Object.prototype.hasOwnProperty,Ou=Au.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Du={key:!0,ref:!0,__self:!0,__source:!0};function Ha(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)ku.call(t,r)&&!Du.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Mu,type:e,key:o,ref:a,props:i,_owner:Ou.current}}Cn.Fragment=Fu;Cn.jsx=Ha;Cn.jsxs=Ha;Ba.exports=Cn;var v=Ba.exports,fo={},ho=$i;fo.createRoot=ho.createRoot,fo.hydrateRoot=ho.hydrateRoot;var Na={exports:{}},K={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-is.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ei=Symbol.for("react.element"),Si=Symbol.for("react.portal"),In=Symbol.for("react.fragment"),Rn=Symbol.for("react.strict_mode"),Ln=Symbol.for("react.profiler"),An=Symbol.for("react.provider"),Mn=Symbol.for("react.context"),_u=Symbol.for("react.server_context"),Fn=Symbol.for("react.forward_ref"),kn=Symbol.for("react.suspense"),On=Symbol.for("react.suspense_list"),Dn=Symbol.for("react.memo"),_n=Symbol.for("react.lazy"),Bu=Symbol.for("react.offscreen"),ja;ja=Symbol.for("react.module.reference");function he(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ei:switch(e=e.type,e){case In:case Ln:case Rn:case kn:case On:return e;default:switch(e=e&&e.$$typeof,e){case _u:case Mn:case Fn:case _n:case Dn:case An:return e;default:return t}}case Si:return t}}}K.ContextConsumer=Mn;K.ContextProvider=An;K.Element=Ei;K.ForwardRef=Fn;K.Fragment=In;K.Lazy=_n;K.Memo=Dn;K.Portal=Si;K.Profiler=Ln;K.StrictMode=Rn;K.Suspense=kn;K.SuspenseList=On;K.isAsyncMode=function(){return!1};K.isConcurrentMode=function(){return!1};K.isContextConsumer=function(e){return he(e)===Mn};K.isContextProvider=function(e){return he(e)===An};K.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ei};K.isForwardRef=function(e){return he(e)===Fn};K.isFragment=function(e){return he(e)===In};K.isLazy=function(e){return he(e)===_n};K.isMemo=function(e){return he(e)===Dn};K.isPortal=function(e){return he(e)===Si};K.isProfiler=function(e){return he(e)===Ln};K.isStrictMode=function(e){return he(e)===Rn};K.isSuspense=function(e){return he(e)===kn};K.isSuspenseList=function(e){return he(e)===On};K.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===In||e===Ln||e===Rn||e===kn||e===On||e===Bu||typeof e=="object"&&e!==null&&(e.$$typeof===_n||e.$$typeof===Dn||e.$$typeof===An||e.$$typeof===Mn||e.$$typeof===Fn||e.$$typeof===ja||e.getModuleId!==void 0)};K.typeOf=he;Na.exports=K;var Pi=Na.exports;/**
|
|
18
|
+
* @license MIT
|
|
19
|
+
* author: Cube Dev Team
|
|
20
|
+
* @cube-dev/ui-kit v0.33.2
|
|
21
|
+
* Released under the MIT license.
|
|
22
|
+
*/const Vr=f.createContext([980]);function Hu({value:e,children:t}){return v.jsx(Vr.Provider,{value:e,children:t})}/**
|
|
23
|
+
* @license MIT
|
|
24
|
+
* author: Cube Dev Team
|
|
25
|
+
* @cube-dev/ui-kit v0.33.2
|
|
26
|
+
* Released under the MIT license.
|
|
27
|
+
*/function Va(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}/**
|
|
28
|
+
* @license MIT
|
|
29
|
+
* author: Cube Dev Team
|
|
30
|
+
* @cube-dev/ui-kit v0.33.2
|
|
31
|
+
* Released under the MIT license.
|
|
32
|
+
*/function Ft(e,t=1e3){let n={},r=0;return(i,o)=>{const a=typeof i=="string"&&o==null?i:JSON.stringify([i,o]);return n[a]||(r>t&&(n={},r=0),r++,n[a]=o==null?e(i):e(i,o)),n[a]}}/**
|
|
33
|
+
* @license MIT
|
|
34
|
+
* author: Cube Dev Team
|
|
35
|
+
* @cube-dev/ui-kit v0.33.2
|
|
36
|
+
* Released under the MIT license.
|
|
37
|
+
*/function Nu(e){return e?Object.keys(e).reduce((t,n)=>(e[n]&&(t[`data-is-${Va(n)}`]=""),t),{}):null}const ju=Ft(Nu);/**
|
|
38
|
+
* @license MIT
|
|
39
|
+
* author: Cube Dev Team
|
|
40
|
+
* @cube-dev/ui-kit v0.33.2
|
|
41
|
+
* Released under the MIT license.
|
|
42
|
+
*/function Vu(e){return e.filter(t=>{const n=[];return!t.find(r=>{const i=r.match(/\[(.+?)[=\]]/);return i?n.includes(i[1])?!0:(n.push(i[1]),!1):!1})})}function Ku(e,t){const n=t?[[]]:[];if(e.length===0)return[e];if(e.length<2)return n.concat([e]);const r=function(i=[],o){for(let a=0;a<o.length;a++)n.push([...i,o[a]]),r([...i,o[a]],o.slice(a+1))};return r([],e),Vu(n)}/**
|
|
43
|
+
* @license MIT
|
|
44
|
+
* author: Cube Dev Team
|
|
45
|
+
* @cube-dev/ui-kit v0.33.2
|
|
46
|
+
* Released under the MIT license.
|
|
47
|
+
*/const Uu=!1,zu=typeof CSS<"u"&&typeof CSS?.supports=="function"?CSS.supports("height: 100dvh"):!1,Ka={r:"var(--radius)",bw:"var(--border-width)",ow:"var(--outline-width)",x:"var(--gap)",fs:"var(--font-size)",lh:"var(--line-height)",rp:"var(--rem-pixel)",gp:"var(--column-gap)",dvh:function(t){return zu?`${t}dvh`:`calc(var(--cube-dynamic-viewport-height, 100dvh) / 100 * ${t})`},sp:function(t){return`((${t} * var(--column-width)) + (${t-1} * var(--column-gap)))`}},Te=["top","right","bottom","left"],Gu=["rgb","rgba"],Wu=["auto","max-content","min-content","none","subgrid","initial"],po=/("[^"]*")|('[^']*')|([a-z-]+\()|(#[a-z0-9.-]{2,}(?![a-f0-9[-]))|(--[a-z0-9-]+|@[a-z0-9-]+)|([a-z][a-z0-9-]*)|(([0-9]+(?![0-9.])|[0-9-.]{2,}|[0-9-]{2,}|[0-9.-]{3,})([a-z%]{0,3}))|([*/+-])|([()])|(,)/gi,Zu=new Map,qu=new Map,Xu=new Map,Yu=1e4,Ju=[qu,Zu,Xu],Qu=/calc\((\d*)\)/gi,lr=new Map;function vo(e){return lr.has(e)||lr.set(e,e.match(/^[a-z]/)?`[data-is-${Va(e)}]`:e),lr.get(e)}function J(e,t=0){if(typeof e=="number"&&(e=String(e)),typeof e!="string")return{values:[],mods:[],all:[],value:""};const n=Ju[t];if(!n.has(e)){n.size>Yu&&n.clear();const r=[],i=[],o=[],a=t!==1;let s="",c=-1,l=0,u="",d="",h="",p="",g;for(po.lastIndex=0,e=e.replace(/@\(/g,"var(--");g=po.exec(e);){let[,m,x,$,y,w,T,C,L,A,b,R,E]=g;if(x||m)s+=`${x||m} `;else if($)h=$.slice(0,-1),s+=$,l++;else if(y)t===2?d=y:d=Rt(y,!1).color;else if(T)l||Wu.includes(T)?s+=`${T} `:(r.push(T),i.push(T),u+=`${T} `);else if(R)R==="("&&(~c||(c=l,s+="calc"),l++),R===")"&&l&&(s=s.trim(),l>0&&l--,l===c&&(c=-1)),R===")"&&!l&&(p=h,h=""),s+=`${R}${R===")"?" ":""}`;else if(b){if(!~c&&a){if(s){if(s.includes("(")){const P=s.lastIndexOf("(");s=`${s.slice(0,P)}(calc(${s.slice(P+1)}`,c=l,l++}}else if(o.length){u=u.slice(0,u.length-o[o.length-1].length-1);let P=o.splice(o.length-1,1)[0];i.splice(o.length-1,1),P&&(P.startsWith("calc(")&&(P=P.slice(4)),c=l,l++,s=`calc((${P}) `)}}s+=`${b} `}else if(C)if(A&&Ka[A]){let P=rd(L,A);!~c&&P.startsWith("(")&&(s+="calc"),s+=`${P} `}else s+=`${C} `;else w?(w=w.replace("@","--"),h!=="var"?s+=`var(${w}) `:s+=`${w} `):E&&(~c?(c=-1,l--,s=`${s.trim()}), `):s=`${s.trim()}, `,l||i.push(","));if(s&&!l){let P=bo(s);Gu.includes(p)?d=P:P.startsWith("color(")?(P=P.slice(6,-1),d=Rt(P).color):(P!==","&&(o.push(P),i.push(P)),u+=`${P} `),s=""}}if(l){let m=bo(`${s.trim()}${")".repeat(l)}`);m.startsWith("color(")?(m=m.slice(6,-1),d=Rt(m).color):(m!==","&&(o.push(m),i.push(m)),u+=m)}n.set(e,{values:o,mods:r,all:i,value:`${u} ${d}`.trim(),color:d})}return n.get(e)}function Rt(e,t=!1){if(e=e.trim(),!e)return{};if(e.startsWith("#")){e=e.slice(1);const s=e.split(".");let c=100;s.length>1&&(s[1].length===1?c=Number(s[1])*10:c=Number(s[1]),Number.isNaN(c)&&(c=100));const l=s[0];let u;return l==="current"?u="currentColor":c>100?c=100:c<0&&(c=0),u||(u=c!==100?mo(l,Math.round(c)/100):ed(l,null,rn(`#${l}`))),{color:u,name:l,opacity:c??100}}let{values:n,mods:r,color:i}=J(e),o,a;if(i)return{color:(i.startsWith("var(")?i:rn(i))||i};if(n.forEach(s=>{s.match(/^((var|rgb|rgba|hsl|hsla)\(|#[0-9a-f]{3,6})/)?i=s.startsWith("var")?s:rn(s):s.endsWith("%")&&(a=parseInt(s))}),i)return{color:i};if(o=o||r[0],!o)return!t&&Uu&&console.warn("CubeUIKit: incorrect color value:",e),{};if(!a){let s;return o==="current"?s="currentColor":o==="inherit"?s="inherit":o!=="transparent"&&o!=="currentColor"?s=`var(--${o}-color, ${o})`:s=o,{name:o,color:s}}return{color:mo(o,Math.round(a)/100),name:o,opacity:a}}function mo(e,t,n,r){const i=r?`, ${r}`:"";return`rgba(var(--${e}-color-rgb${n?`, var(--${n}-color-rgb, ${i})`:i}), ${t})`}function ed(e,t,n){const r=n?`, ${n}`:"";return`var(--${e}-color${t?`, var(--${t}${r})`:r})`}function rn(e,t=!1){if(e)return e.startsWith("rgb")?e:e.startsWith("#")?td(e):null}function go(e){return e.match(/\d+/g).map(t=>parseInt(t)).slice(0,3)}function td(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(n,r,i,o)=>"#"+r+r+i+i+o+o).substring(1).match(/.{2}/g).map((n,r)=>parseInt(n,16)*(r===3?.00392156862745098:1));return Number.isNaN(t[0])?"rgba(0, 0, 0, 1)":t.length===3?`rgb(${t.join(", ")})`:t.length===4?`rgba(${t.join(", ")})`:null}function nd(e,t,n){e.forEach(r=>{t.includes(r)&&(n.push(r),t.splice(t.indexOf(r),1))})}function bo(e){return e.trim().replace(Qu,(t,n)=>n)}function un(e,t){return e.filter(n=>t.includes(n))}function rd(e,t){const n=Ka[t];return typeof n=="function"?n(e):e==="1"||e===1?n:`(${e} * ${n})`}function G(e,t=[],n,r,i=[]){const o={...n,...e.styles};return Object.keys(e).forEach(a=>{const s=r&&r[a]||a,c=e[a];i&&i.includes(a)||t.includes(s)&&(o[s]=c)},{}),o}function Ua(e,t=""){if(!e)return"";if(Array.isArray(e))return e.reduce((a,s)=>a+Ua(s,t),"");const{$:n,css:r,...i}=e;let o=Object.keys(i).reduce((a,s)=>{const c=i[s];return Array.isArray(c)?a+c.reduce((l,u)=>u?l+`${s}:${u};
|
|
48
|
+
`:l,""):c?`${a}${s}:${c};
|
|
49
|
+
`:a},"");return r&&(o=r+`
|
|
50
|
+
`+o),o?Array.isArray(n)?`${t?`${t}{
|
|
51
|
+
`:""}${n.reduce((a,s)=>a+`${s?`&${s}{
|
|
52
|
+
`:""}${o}${s?`}
|
|
53
|
+
`:""}`,"")}${t?`}
|
|
54
|
+
`:""}`:`${t?`${t}{
|
|
55
|
+
`:""}${n?`&${n}{
|
|
56
|
+
`:""}${o}${n?`}
|
|
57
|
+
`:""}${t?`}
|
|
58
|
+
`:""}`:""}function id(e,t,n=""){return t.reduce((r,i)=>{if(!i.value)return r;const o=`${(i.mods||[]).map(vo).join("")}${(i.notMods||[]).map(a=>{let s=vo(a);return s.startsWith(":not(")?s.slice(5,-1):`:not(${s})`}).join("")}`;return`${r}${e}${o}${n}{
|
|
59
|
+
${i.value.replace(/^&&/,"&")}}
|
|
60
|
+
`},"")}function za(e,t=1e3){const n=Ft(i=>Ua(e(i)),t),r=Ft((i,o="")=>{if(i==null||i===!1)return null;const a=ad(i);return od(a,n),id("&&",a,o)},t);return Object.assign(r,{__lookupStyles:e.__lookupStyles})}function od(e,t){const n=new Map;return e.forEach(r=>{n.get(r.value)||n.set(r.value,t(r.value)),r.value=n.get(r.value)}),e}function ad(e,t){const n=t||Object.keys(e);if(!n.length)return[];const r={};let i=new Set;n.forEach(s=>{r[s]=dd(e[s]),r[s].mods.forEach(i.add,i)});const o=Array.from(i),a=[];return Ku(o,!0).forEach(s=>{a.push({mods:s,notMods:o.filter(c=>!s.includes(c)),value:n.reduce((c,l)=>(c[l]=r[l].states.find(u=>Kr(u.model,d=>s.includes(d))).value,c),{})})}),a}const sd=/([&|!^])|([()])|([a-z][a-z0-9-]+)|(:[a-z][a-z0-9-]+\([:a-z0-9-]+\)|:[a-z][a-z0-9-]+)|(\.[a-z][a-z0-9-]+)|(\[[^\]]+])/gi,ld=["!","&","|","^"];function cr(e){return e.length===1?e[0]:(ld.forEach(t=>{let n;for(;(n=e.indexOf(t))!==-1;){const r=e[n];r==="!"?e[n+1]&&e[n+1].length!==1?e.splice(n,2,["!",e[n+1]]):e.splice(n,1):e[n-1]&&e[n+1]&&e[n-1].length!==1&&e[n+1].length!==1?e.splice(n-1,3,[r,e[n-1],e[n+1]]):e.splice(n,1)}}),e.length===1?e[0]:e)}function cd(e,t){const n=e.replace(/,/g,"|").match(sd);if(!n||!n.length)return{model:void 0,mods:[],notMods:[],tokens:[],value:t};if(n.length===1)return{model:n[0],mods:n.slice(0),notMods:[],tokens:n,value:t};const r=[];let i=[[]],o=i[0],a=0;for(n.forEach(s=>{switch(s){case"(":const c=[];a++,o=i[a]=c;break;case")":a--,i[a].push(cr(o)),o=i[a];break;default:s.length>1&&(r.includes(s)||r.push(s)),o.push(s)}});a;)a--,i[a].push(cr(o)),o=i[a];return{tokens:n,mods:r,notMods:[],model:cr(i[0]),value:t}}const ud=Ft(cd);function dd(e){if(typeof e!="object"||!e)return{states:[{model:void 0,mods:[],notMods:[],value:e}],mods:[]};const t=[];Object.keys(e).forEach(i=>{const o=ud(i,e[i]);t.push(o)}),t.reverse();let n;const r=t.reduce((i,o)=>(o.mods.length?o.mods.forEach(a=>{i.includes(a)||i.push(a)}):n=o,i),[]);return n||t.push({mods:[],notMods:r,value:!0}),{states:t,mods:r}}const fd={"!":e=>!e,"^":(e,t)=>e^t,"|":(e,t)=>e|t,"&":(e,t)=>e&t};function Kr(e,t){if(!e)return!0;if(!Array.isArray(e))return typeof t=="function"?!!t(e):!!t[e];const n=fd[e[0]];n||console.warn("CubeUIKit: unexpected compute method in the model",e);let r=e[1];if(typeof r=="object"?r=!!Kr(r,t):typeof t=="function"?r=!!t(r):r=!!t[r],e.length===2)return n(r);let i=e[2];return typeof i=="object"?i=!!Kr(i,t):typeof t=="function"?i=!!t(i):i=!!t[i],!!n(r,i)}/**
|
|
61
|
+
* @license MIT
|
|
62
|
+
* author: Cube Dev Team
|
|
63
|
+
* @cube-dev/ui-kit v0.33.2
|
|
64
|
+
* Released under the MIT license.
|
|
65
|
+
*/function Ga({display:e="block",flow:t,gap:n}){if(typeof n=="number"&&(n=`${n}px`),!n)return;n===!0&&(n="1.5x");const r=e.includes("grid"),i=e.includes("flex"),o=t?t.includes("wrap")&&!t.includes("nowrap"):!1;!r&&t==null&&(t=i?"row":"column");const{values:a}=J(n);if(n=a.join(" "),r||i)return{gap:n};const s=t.includes("row")?"right":"bottom";return o?[{"margin-right":`calc(-1 * ${a[1]||a[0]})`,"margin-bottom":`calc(-1 * ${a[0]})`},{$:"& > *","margin-right":a[1]||a[0],"margin-bottom":a[0]}]:{$:"& > *:not(:last-child)",[`margin-${s}`]:n}}Ga.__lookupStyles=["display","flow","gap"];/**
|
|
66
|
+
* @license MIT
|
|
67
|
+
* author: Cube Dev Team
|
|
68
|
+
* @cube-dev/ui-kit v0.33.2
|
|
69
|
+
* Released under the MIT license.
|
|
70
|
+
*/function Wa({fill:e}){if(!e)return"";e.startsWith("#")&&(e=J(e).color||e);const t=e.match(/var\(--(.+?)-color/);let n="";t&&(n=t[1]);const r=[{"background-color":e}];return n&&r.push([{$:">*","--context-fill-color":e,"--context-fill-color-rgb":`var(--${n}-color-rgb)`}]),r}Wa.__lookupStyles=["fill"];/**
|
|
71
|
+
* @license MIT
|
|
72
|
+
* author: Cube Dev Team
|
|
73
|
+
* @cube-dev/ui-kit v0.33.2
|
|
74
|
+
* Released under the MIT license.
|
|
75
|
+
*/function Za({display:e="block",flow:t}){let n;return e.includes("grid")?n="grid-auto-flow":e.includes("flex")&&(n="flex-flow"),n?{[n]:t}:null}Za.__lookupStyles=["display","flow"];/**
|
|
76
|
+
* @license MIT
|
|
77
|
+
* author: Cube Dev Team
|
|
78
|
+
* @cube-dev/ui-kit v0.33.2
|
|
79
|
+
* Released under the MIT license.
|
|
80
|
+
*/const yo={input:[{css:`
|
|
81
|
+
-webkit-appearance: none;
|
|
82
|
+
word-spacing: initial;
|
|
83
|
+
-webkit-text-fill-color: currentColor;
|
|
84
|
+
`},{$:"::-webkit-search-cancel-button",css:"display: none"},{$:[":-webkit-autofill",":-webkit-autofill:hover",":-webkit-autofill:focus"],css:`
|
|
85
|
+
caret-color: var(--purple-color);
|
|
86
|
+
-webkit-text-fill-color: var(--purple-color);
|
|
87
|
+
-webkit-box-shadow: 0 0 0px 9999rem var(--white-color) inset;
|
|
88
|
+
box-shadow: 0 0 0px 9999rem var(--white-color) inset;
|
|
89
|
+
font-family: inherit;
|
|
90
|
+
font-size: inherit;
|
|
91
|
+
line-height: inherit;
|
|
92
|
+
`},{$:"[disabled]",css:`
|
|
93
|
+
-webkit-opacity: 1;
|
|
94
|
+
`},{$:"::placeholder",css:`
|
|
95
|
+
-webkit-text-fill-color: var(--local-placeholder-color);
|
|
96
|
+
color: var(--local-placeholder-color);
|
|
97
|
+
filter: saturate(.33);
|
|
98
|
+
`},{$:"::-webkit-search-cancel-button",css:`
|
|
99
|
+
display: none;
|
|
100
|
+
-webkit-appearance: none;
|
|
101
|
+
`},{$:":not([disabled])::placeholder",css:`--local-placeholder-color: var(--placeholder-color, rgba(var(--dark-color-rgb), .3));
|
|
102
|
+
`}],button:[{css:`
|
|
103
|
+
appearance: none;
|
|
104
|
+
touch-action: manipulation;
|
|
105
|
+
-webkit-tap-highlight-color: transparent;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
`}]};function qa({reset:e}){if(!e)return;const{mods:t}=J(e,1);return t.reduce((n,r)=>(yo[r]&&n.push(...yo[r]),n),[])}qa.__lookupStyles=["reset"];/**
|
|
108
|
+
* @license MIT
|
|
109
|
+
* author: Cube Dev Team
|
|
110
|
+
* @cube-dev/ui-kit v0.33.2
|
|
111
|
+
* Released under the MIT license.
|
|
112
|
+
*/function Xa({color:e}){if(!e)return"";e===!0&&(e="currentColor"),e.startsWith("#")&&(e=Rt(e).color||e);const t=e.match(/var\(--(.+?)-color/);let n="";t&&(n=t[1]);const r=[{color:e}];return n&&r.push([{"--current-color":`var(--${n}-color, ${n})`,"--current-color-rgb":`var(--${n}-color-rgb)`}]),r}Xa.__lookupStyles=["color"];/**
|
|
113
|
+
* @license MIT
|
|
114
|
+
* author: Cube Dev Team
|
|
115
|
+
* @cube-dev/ui-kit v0.33.2
|
|
116
|
+
* Released under the MIT license.
|
|
117
|
+
*/const hd="var(--gap)",pd="100%";function zt(e){return typeof CSS<"u"&&typeof CSS?.supports=="function"?CSS.supports("height",e):!1}const xo="stretch",wo="fill-available",$o="-webkit-fill-available",Eo="-moz-fill-available",vd=zt(xo)?xo:zt(wo)?wo:zt($o)?$o:zt(Eo)?Eo:null,md=["max-content","min-content","fit-content","stretch"];function Ya(e){const t=`min-${e}`,n=`max-${e}`;return r=>{if(!r)return"";typeof r=="number"&&(r=`${r}px`),r=String(r);const i={[e]:"auto",[t]:"initial",[n]:"initial"},{mods:o,values:a}=J(r);nd(md,o,a),a.forEach((c,l)=>{c==="stretch"&&(a[l]=vd||(e==="height"?"100vh":"100vw"))});let s=!1;for(let c of o)switch(c){case"min":i[t]=a[0]||hd,s=!0;break;case"max":i[n]=a[0]||pd,s=!0;break}return(!s||!o.length)&&(a.length===2?(i[t]=a[0],i[n]=a[1]):a.length===3?(i[t]=a[0],i[e]=a[1],i[n]=a[2]):i[e]=a[0]||"auto"),i}}/**
|
|
118
|
+
* @license MIT
|
|
119
|
+
* author: Cube Dev Team
|
|
120
|
+
* @cube-dev/ui-kit v0.33.2
|
|
121
|
+
* Released under the MIT license.
|
|
122
|
+
*/const gd=Ya("width");function Ja({width:e}){return gd(e)}Ja.__lookupStyles=["width"];/**
|
|
123
|
+
* @license MIT
|
|
124
|
+
* author: Cube Dev Team
|
|
125
|
+
* @cube-dev/ui-kit v0.33.2
|
|
126
|
+
* Released under the MIT license.
|
|
127
|
+
*/const bd=Ya("height");function Qa({height:e}){return bd(e)}Qa.__lookupStyles=["height"];/**
|
|
128
|
+
* @license MIT
|
|
129
|
+
* author: Cube Dev Team
|
|
130
|
+
* @cube-dev/ui-kit v0.33.2
|
|
131
|
+
* Released under the MIT license.
|
|
132
|
+
*/const Me="var(--radius)",Gt="var(--leaf-sharp-radius)";function es({radius:e}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1r");let{mods:t,values:n}=J(e,1);if(t.includes("round")?n=["9999rem"]:t.includes("ellipse")?n=["50%"]:n.length||(n=[Me]),t.includes("leaf"))n=[n[1]||Gt,n[0]||Me,n[1]||Gt,n[0]||Me];else if(t.includes("backleaf"))n=[n[0]||Me,n[1]||Gt,n[0]||Me,n[1]||Gt];else if(t.length){const r=["0","0","0","0"];let i=!1;Te.forEach((o,a)=>{t.includes(o)&&(i=!0,r[a]=n[0]||Me,r[(a+1)%4]=n[0]||Me)}),i&&(n=r)}return[{"--local-radius":n.join(" "),"border-radius":"var(--local-radius)"},{$:">*","--context-radius":n.join(" ")}]}es.__lookupStyles=["radius"];/**
|
|
133
|
+
* @license MIT
|
|
134
|
+
* author: Cube Dev Team
|
|
135
|
+
* @cube-dev/ui-kit v0.33.2
|
|
136
|
+
* Released under the MIT license.
|
|
137
|
+
*/const yd=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function ts({border:e}){if(!e&&e!==0)return;e===!0&&(e="1bw");const{values:t,mods:n,color:r}=J(String(e)),i=un(n,Te),o=un(n,yd),a=t[0]||"var(--border-width)",s=o[0]||"solid",c=r||"var(--border-color)",l=[a,s,c].join(" ");if(!i.length)return{border:l};const u=[0,s,c].join(" ");return Te.reduce((d,h)=>(n.includes(h)?d[`border-${h}`]=l:d[`border-${h}`]=u,d),{})}ts.__lookupStyles=["border"];/**
|
|
138
|
+
* @license MIT
|
|
139
|
+
* author: Cube Dev Team
|
|
140
|
+
* @cube-dev/ui-kit v0.33.2
|
|
141
|
+
* Released under the MIT license.
|
|
142
|
+
*/function xd(e){const{values:t,mods:n,color:r}=J(e),i=n[0]||"",o=r||"var(--shadow-color)";return[i,...t,o].join(" ")}function ns({shadow:e}){return e?(e===!0&&(e="0 5px 15px #shadow"),{"--local-shadow-box-shadow":e.split(",").map(xd).join(",")}):""}ns.__lookupStyles=["shadow"];/**
|
|
143
|
+
* @license MIT
|
|
144
|
+
* author: Cube Dev Team
|
|
145
|
+
* @cube-dev/ui-kit v0.33.2
|
|
146
|
+
* Released under the MIT license.
|
|
147
|
+
*/function rs({padding:e,paddingBlock:t,paddingInline:n,paddingTop:r,paddingRight:i,paddingBottom:o,paddingLeft:a}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:s,mods:c}=J(e),l=un(c,Te);s.length||(s=["var(--gap)"]),l.length||(l=Te);const u=[r,i,o,a];return l.reduce((d,h)=>{const p=Te.indexOf(h);return(p%2&&n==null||!(p%2)&&t==null)&&u[p]==null&&(d[`padding-${h}`]=s[p]||s[p%2]||s[0]),d},{})}rs.__lookupStyles=["padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingInline"];/**
|
|
148
|
+
* @license MIT
|
|
149
|
+
* author: Cube Dev Team
|
|
150
|
+
* @cube-dev/ui-kit v0.33.2
|
|
151
|
+
* Released under the MIT license.
|
|
152
|
+
*/function is({paddingBlock:e,paddingTop:t,paddingBottom:n}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:r}=J(e);r.length||(r=["var(--gap)"]);const i={};return t==null&&(i["padding-top"]=r[0]),n==null&&(i["padding-bottom"]=r[1]||r[0]),i}is.__lookupStyles=["paddingBlock","paddingTop","paddingBottom"];/**
|
|
153
|
+
* @license MIT
|
|
154
|
+
* author: Cube Dev Team
|
|
155
|
+
* @cube-dev/ui-kit v0.33.2
|
|
156
|
+
* Released under the MIT license.
|
|
157
|
+
*/function os({paddingInline:e,paddingLeft:t,paddingRight:n}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:r}=J(e);r.length||(r=["var(--gap)"]);const i={};return t==null&&(i["padding-left"]=r[0]),n==null&&(i["padding-right"]=r[1]||r[0]),i}os.__lookupStyles=["paddingInline","paddingLeft","paddingRight"];/**
|
|
158
|
+
* @license MIT
|
|
159
|
+
* author: Cube Dev Team
|
|
160
|
+
* @cube-dev/ui-kit v0.33.2
|
|
161
|
+
* Released under the MIT license.
|
|
162
|
+
*/function we(e,t,n,r=!1){e[`--${t}`]=(()=>{if(n==="inherit")return"inherit";const i=`var(--default-${t}, ${t==="font-family"?"var(--font, NonexistentFontName)":"inherit"})`,o=t==="font-family"?", var(--font, sans-serif)":"";return n==="default"?`${i}${o}`:`var(--${n}-${t}, ${i})${o}`})(),r||(e[t]=e[`--${t}`])}function as({preset:e,fontSize:t,lineHeight:n,textTransform:r,letterSpacing:i,fontWeight:o,fontStyle:a,font:s}){if(!e)return"";e===!0&&(e="");const{mods:c}=J(e),l=c[0]||"default",u={};return t||we(u,"font-size",l),n||we(u,"line-height",l),i||we(u,"letter-spacing",l),o||we(u,"font-weight",l),a||we(u,"font-style",l),r||we(u,"text-transform",l),s||we(u,"font-family",l),we(u,"bold-font-weight",l,!0),we(u,"icon-size",l,!0),u}as.__lookupStyles=["preset","fontSize","lineHeight","letterSpacing","textTransform","fontWeight","fontStyle","font"];/**
|
|
163
|
+
* @license MIT
|
|
164
|
+
* author: Cube Dev Team
|
|
165
|
+
* @cube-dev/ui-kit v0.33.2
|
|
166
|
+
* Released under the MIT license.
|
|
167
|
+
*/function ss({fontStyle:e}){return e===!0&&(e="italic"),e!=="inherit"&&(e=e?"italic":"normal"),{"font-style":e}}ss.__lookupStyles=["fontStyle"];/**
|
|
168
|
+
* @license MIT
|
|
169
|
+
* author: Cube Dev Team
|
|
170
|
+
* @cube-dev/ui-kit v0.33.2
|
|
171
|
+
* Released under the MIT license.
|
|
172
|
+
*/function ls({margin:e,marginBlock:t,marginInline:n,marginTop:r,marginRight:i,marginBottom:o,marginLeft:a}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:s,mods:c}=J(e),l=un(c,Te);s.length||(s=["var(--gap)"]),l.length||(l=Te);const u=[r,i,o,a];return l.reduce((d,h)=>{const p=Te.indexOf(h);return(p%2&&n==null||!(p%2)&&t==null)&&u[p]==null&&(d[`margin-${h}`]=s[p]||s[p%2]||s[0]),d},{})}ls.__lookupStyles=["margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginInline"];/**
|
|
173
|
+
* @license MIT
|
|
174
|
+
* author: Cube Dev Team
|
|
175
|
+
* @cube-dev/ui-kit v0.33.2
|
|
176
|
+
* Released under the MIT license.
|
|
177
|
+
*/function cs({marginBlock:e,marginTop:t,marginBottom:n}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:r}=J(e);r.length||(r=["var(--gap)"]);const i={};return t==null&&(i["margin-top"]=r[0]),n==null&&(i["margin-bottom"]=r[1]||r[0]),i}cs.__lookupStyles=["marginBlock","marginTop","marginBottom"];/**
|
|
178
|
+
* @license MIT
|
|
179
|
+
* author: Cube Dev Team
|
|
180
|
+
* @cube-dev/ui-kit v0.33.2
|
|
181
|
+
* Released under the MIT license.
|
|
182
|
+
*/function us({marginInline:e,marginLeft:t,marginRight:n}){if(typeof e=="number"&&(e=`${e}px`),!e)return"";e===!0&&(e="1x");let{values:r}=J(e);r.length||(r=["var(--gap)"]);const i={};return t==null&&(i["margin-left"]=r[0]),n==null&&(i["margin-right"]=r[1]||r[0]),i}us.__lookupStyles=["marginInline","marginLeft","marginRight"];/**
|
|
183
|
+
* @license MIT
|
|
184
|
+
* author: Cube Dev Team
|
|
185
|
+
* @cube-dev/ui-kit v0.33.2
|
|
186
|
+
* Released under the MIT license.
|
|
187
|
+
*/function ds({font:e}){if(e==null||e===!1)return null;const t=e==="monospace"?"var(--monospace-font)":e===!0?"var(--font)":`${e}, var(--font)`;return{"font-family":t,"--font-family":t}}ds.__lookupStyles=["font"];/**
|
|
188
|
+
* @license MIT
|
|
189
|
+
* author: Cube Dev Team
|
|
190
|
+
* @cube-dev/ui-kit v0.33.2
|
|
191
|
+
* Released under the MIT license.
|
|
192
|
+
*/function fs({outline:e}){if(!e&&e!==0)return"";e===!0&&(e="1ow");const{values:t,color:n,mods:r}=J(String(e)),i=r.includes("inset"),o=t[0]||"var(--outline-width)";return{"--local-outline-box-shadow":`${i?"inset ":""}0 0 0 ${o} ${n||"var(--outline-color)"}`}}fs.__lookupStyles=["outline"];/**
|
|
193
|
+
* @license MIT
|
|
194
|
+
* author: Cube Dev Team
|
|
195
|
+
* @cube-dev/ui-kit v0.33.2
|
|
196
|
+
* Released under the MIT license.
|
|
197
|
+
*/const wd={move:["transform"],rotate:["transform"],scale:["transform"],placeSelf:["transform","top","right","bottom","left"],fill:["background-color"],border:["border","box-shadow"],filter:["filter","backdrop-filter"],radius:["border-radius"],shadow:["box-shadow"],outline:["box-shadow"],preset:["font-size","line-height","letter-spacing","font-weight","font-style"],text:["font-weight","text-decoration-color"],theme:["color","background-color","box-shadow","border","border-radius"],inset:["box-shadow"],mark:["box-shadow"],width:["max-width","min-width","width"],height:["max-height","min-height","height"],gap:["gap","margin"],zIndex:["z-index"],image:["background-image","background-position","background-size"]},$d="linear";function Ed(e){return`var(--${e}-transition, var(--transition))`}function hs({transition:e}){if(!e)return;const t=J(e).all;if(!t)return;let n=[];const r=[];t.forEach(a=>{a===","?n&&(r.push(n),n=[]):n.push(a)}),n&&r.push(n);const i={};return r.forEach(a=>{const s=a[0],c=a[1],l=a[2],u=a[3];(wd[s]||[s]).forEach(h=>{i[h]=[s,l,c,u]})}),{transition:Object.entries(i).map(([a,[s,c,l,u]])=>`${a} ${l||Ed(s)} ${c||$d} ${u||"0s"}`).join(", ")}}hs.__lookupStyles=["transition"];/**
|
|
198
|
+
* @license MIT
|
|
199
|
+
* author: Cube Dev Team
|
|
200
|
+
* @cube-dev/ui-kit v0.33.2
|
|
201
|
+
* Released under the MIT license.
|
|
202
|
+
*/const So={row:["* 0 0 *","0 * * 0"],column:["* * 0 0","0 0 * *"]};function ps({groupRadius:e,flow:t}){if(!e)return"";e===!0&&(e="1r");const{values:n,mods:r}=J(e);t=t||"row";const i=r.includes("reverse");let o=n[0];o||(r.includes("round")?o="9999rem":r.includes("ellipse")?o="50%":o="var(--radius)");const a=So[t][i?1:0].replace(/\*/g,o),s=So[t][i?0:1].replace(/\*/g,o);return[{$:">:first-child:not(:last-child)","border-radius":a,"--local-radius":a},{$:">:last-child:not(:first-child)","border-radius":s,"--local-radius":s},{$:">:last-child:first-child","border-radius":o,"--local-radius":o},{$:">:not(:last-child):not(:first-child)","border-radius":"0","--local-radius":"0"}]}ps.__lookupStyles=["groupRadius","flow"];/**
|
|
203
|
+
* @license MIT
|
|
204
|
+
* author: Cube Dev Team
|
|
205
|
+
* @cube-dev/ui-kit v0.33.2
|
|
206
|
+
* Released under the MIT license.
|
|
207
|
+
*/function Ti(e){const t=Ti.__lookupStyles.reduce((n,r)=>(e[r]&&n.push(`var(--local-${r}-box-shadow)`),n),[]);return t.length?{"box-shadow":t.join(", ")}:""}Ti.__lookupStyles=["outline","shadow"];/**
|
|
208
|
+
* @license MIT
|
|
209
|
+
* author: Cube Dev Team
|
|
210
|
+
* @cube-dev/ui-kit v0.33.2
|
|
211
|
+
* Released under the MIT license.
|
|
212
|
+
*/function vs({styledScrollbar:e}){return e==null?null:e?[{$:"::-webkit-scrollbar",width:"var(--scrollbar-width)",height:"var(--scrollbar-width)"},{$:"::-webkit-scrollbar-track","background-color":"var(--scrollbar-bg-color)"},{$:"::-webkit-scrollbar-thumb","background-color":"var(--scrollbar-thumb-color)","border-radius":"var(--scrollbar-radius)",border:"var(--scrollbar-outline-width) solid var(--scrollbar-outline-color)","background-clip":"padding-box"},{$:"::-webkit-scrollbar-corner","background-color":"var(--scrollbar-corner-color)"},{"scrollbar-width":"thin","scrollbar-color":"var(--scrollbar-bg-color) var(--scrollbar-thumb-color)"}]:[{$:"::-webkit-scrollbar",display:"none"},{"scrollbar-width":"none"}]}vs.__lookupStyles=["styledScrollbar"];/**
|
|
213
|
+
* @license MIT
|
|
214
|
+
* author: Cube Dev Team
|
|
215
|
+
* @cube-dev/ui-kit v0.33.2
|
|
216
|
+
* Released under the MIT license.
|
|
217
|
+
*/function ms({display:e,hide:t}){return{display:t?"none":e}}ms.__lookupStyles=["display","hide"];/**
|
|
218
|
+
* @license MIT
|
|
219
|
+
* author: Cube Dev Team
|
|
220
|
+
* @cube-dev/ui-kit v0.33.2
|
|
221
|
+
* Released under the MIT license.
|
|
222
|
+
*/function gs({align:e}){if(typeof e=="string"&&e)return{"align-items":e,"align-content":e}}gs.__lookupStyles=["align"];/**
|
|
223
|
+
* @license MIT
|
|
224
|
+
* author: Cube Dev Team
|
|
225
|
+
* @cube-dev/ui-kit v0.33.2
|
|
226
|
+
* Released under the MIT license.
|
|
227
|
+
*/function bs({justify:e}){if(typeof e=="string"&&e)return{"justify-items":e,"justify-content":e}}bs.__lookupStyles=["justify"];/**
|
|
228
|
+
* @license MIT
|
|
229
|
+
* author: Cube Dev Team
|
|
230
|
+
* @cube-dev/ui-kit v0.33.2
|
|
231
|
+
* Released under the MIT license.
|
|
232
|
+
*/function Sd(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}/**
|
|
233
|
+
* @license MIT
|
|
234
|
+
* author: Cube Dev Team
|
|
235
|
+
* @cube-dev/ui-kit v0.33.2
|
|
236
|
+
* Released under the MIT license.
|
|
237
|
+
*/const ur={};function ys(e,t,n){const r=`${e}.${t??""}`;if(!ur[r]){const i=o=>{let a=o[e];if(a==null||a===!1)return;const s=t||Sd(e).replace(/^@/,"--");if(n&&typeof a!="string"&&(a=n(a),!a))return;if(typeof a=="string"&&s.startsWith("--")&&s.endsWith("-color")){a=a.trim();const l=rn(a),{color:u,name:d}=Rt(a);return d&&l?{[s]:`var(--${d}-color, ${l})`,[`${s}-rgb`]:`var(--${d}-color-rgb, ${go(l).join(", ")})`}:d?u?{[s]:u,[`${s}-rgb`]:`var(--${d}-color-rgb)`}:{[s]:`var(--${d}-color)`,[`${s}-rgb`]:`var(--${d}-color-rgb)`}:l?{[s]:l,[`${s}-rgb`]:go(l).join(", ")}:{[s]:u}}const{value:c}=J(a,1);return{[s]:c}};i.__lookupStyles=[e],ur[r]=za(i)}return ur[r]}/**
|
|
238
|
+
* @license MIT
|
|
239
|
+
* author: Cube Dev Team
|
|
240
|
+
* @cube-dev/ui-kit v0.33.2
|
|
241
|
+
* Released under the MIT license.
|
|
242
|
+
*/const Wt=e=>typeof e=="number"?`${e}px`:e,Po=e=>{if(typeof e=="number")return"minmax(1px, 1fr) ".repeat(e).trim()},To=e=>{if(typeof e=="number")return"auto ".repeat(e).trim()},Ne={};function Co(e,t){let n;if(typeof e=="function")n=e,e=n.__lookupStyles;else if(t)n=Object.assign(t,{__lookupStyles:e});else{console.warn("CubeUIKit: incorrect custom style definition: ",e);return}n=za(n),Array.isArray(e)&&e.forEach(r=>{Ne[r]||(Ne[r]=[]),Ne[r].push(n)})}function W(e,t,n){const r=ys(e,t,n);Ne[e]||(Ne[e]=[]),Ne[e].push(r)}function Pd(){return W("fontSize"),W("lineHeight"),W("fontWeight"),W("fontStyle"),W("letterSpacing"),W("textTransform"),W("fontFamily"),W("paddingTop"),W("paddingRight"),W("paddingBottom"),W("paddingLeft"),W("marginTop"),W("marginRight"),W("marginBottom"),W("marginLeft"),W("top","top",Wt),W("right","right",Wt),W("bottom","bottom",Wt),W("left","left",Wt),W("gridAreas","grid-template-areas"),W("gridColumns","grid-template-columns",Po),W("gridRows","grid-template-rows",To),W("gridTemplate","grid-template",e=>{if(typeof e=="string")return e.split("/").map((t,n)=>(n?Po:To)(t)).join("/")}),[ms,hs,qa,Wa,Ja,ls,cs,us,Ga,Za,Xa,Qa,es,ts,ns,rs,is,os,gs,bs,as,Ti,fs,ds,ss,ps,vs].forEach(e=>Co(e)),{STYLE_HANDLER_MAP:Ne,defineCustomStyle:Co,defineStyleAlias:W}}/**
|
|
243
|
+
* @license MIT
|
|
244
|
+
* author: Cube Dev Team
|
|
245
|
+
* @cube-dev/ui-kit v0.33.2
|
|
246
|
+
* Released under the MIT license.
|
|
247
|
+
*/const{STYLE_HANDLER_MAP:Io,defineCustomStyle:xy,defineStyleAlias:wy}=Pd();/**
|
|
248
|
+
* @license MIT
|
|
249
|
+
* author: Cube Dev Team
|
|
250
|
+
* @cube-dev/ui-kit v0.33.2
|
|
251
|
+
* Released under the MIT license.
|
|
252
|
+
*/function Td(e,t){return t.filter(n=>n.mediaQuery).map((n,r)=>`@media ${n.mediaQuery} {${e[r]}}`).join(`
|
|
253
|
+
`)}const dr={};function fr(e){const t=e.join("|");if(!dr[t]){const n=[];e.forEach((r,i)=>{const o={};i&&(o.max=e[i-1]-1),o.min=r,n.push(o)}),n.push({max:e[e.length-1]-1}),n.forEach(r=>{const i=[];r.min&&i.push(`(min-width: ${r.min}px)`),r.max&&i.push(`(max-width: ${r.max}px)`),r.mediaQuery=i.join(" and ")}),dr[t]=n}return dr[t]}function Cd(e,t){if(e==null)return e;const n=Array.from(Array(t));if(typeof e=="string")return n.map(()=>e);if(Array.isArray(e)){let r=null;for(let i=0;i<n.length;i++)n[i]=e[i]==null?r:e[i],r=n[i];return n}return[]}/**
|
|
254
|
+
* @license MIT
|
|
255
|
+
* author: Cube Dev Team
|
|
256
|
+
* @cube-dev/ui-kit v0.33.2
|
|
257
|
+
* Released under the MIT license.
|
|
258
|
+
*/function Ur(e){return e.startsWith("&")||e.startsWith(".")||e.match(/^[A-Z]/)}function Id(e){return e.startsWith("&")?e.slice(1):e.startsWith(".")?` ${e}`:e.match(/^[A-Z]/)?` [data-element="${e}"]`:null}let Zt={},hr=0;const Rd=1e3;function on(e,t=[],n){const r=t,i=Array.from(Array(r.length)).map(()=>""),o=JSON.stringify({s:e,r:t,suffix:n});let a="";const s=[];if(!Zt[o]){hr++,hr>Rd&&(hr=0,Zt={});const c=e?Object.keys(e):[],l=c.filter(d=>Ur(d));let u="";l.length&&l.forEach(d=>{const h=Id(d);u+=on(e?.[d],t,h)}),c.forEach(d=>{if(Ur(d))return;let h=Io[d];h||(h=Io[d]=[ys(d)]),h.forEach(p=>{if(s.find($=>$.handler===p))return;let g=!1;const x=p.__lookupStyles.reduce(($,y)=>($[y]=e?.[y],Array.isArray($[y])&&($[y].length===0?delete $[y]:($[y].length===1&&($[y]=$[y][0]),g=!0)),$),{});s.push({handler:p,styleMap:x,isResponsive:g})})}),s.forEach(({handler:d,styleMap:h,isResponsive:p})=>{const g=d.__lookupStyles;if(p){const m=g.reduce((y,w)=>(y[w]=Cd(h[w],r.length),y),{});r.map((y,w)=>{const T={};return g.forEach(C=>{m!=null&&m[C]!=null&&(T[C]=m[C][w])}),T}).map(y=>d(y,n)).forEach((y,w)=>{i[w]+=y||""})}else a+=d(h,n)||""}),Zt[o]=`&${n||""}{outline: none;
|
|
259
|
+
&[hidden]{display: none !important;}}${a}${t&&t.length&&i.filter(d=>d).length?Td(i,r):""}${u}`}return Zt[o]}/**
|
|
260
|
+
* @license MIT
|
|
261
|
+
* author: Cube Dev Team
|
|
262
|
+
* @cube-dev/ui-kit v0.33.2
|
|
263
|
+
* Released under the MIT license.
|
|
264
|
+
*/const Re=["display","font","preset","hide","opacity","whiteSpace"],xs=["gridArea","order","gridColumn","gridRow","placeSelf","alignSelf","justifySelf","zIndex","margin"],Ht=["reset","padding","paddingInline","paddingBlock","shadow","border","radius","opacity","overflow","styledScrollbar","hide","outline","textAlign"],Bn=["color","fill"],be=["textTransform","fontWeight","fontStyle"],Ci=["width","height","flexBasis","flexGrow","flexShrink","flex"],Ld=["flow","placeItems","placeContent","alignItems","alignContent","justifyItems","justifyContent","align","justify","gap","columnGap","rowGap","gridColumns","gridRows","gridTemplate","gridAreas"],ee=[...Re,...Bn,...Ci,...xs,...Ht,...Ld],Nt=[...xs,...Ci];/**
|
|
265
|
+
* @license MIT
|
|
266
|
+
* author: Cube Dev Team
|
|
267
|
+
* @cube-dev/ui-kit v0.33.2
|
|
268
|
+
* Released under the MIT license.
|
|
269
|
+
*/function an(...e){let t=e[0]?{...e[0]}:{},n=1;for(;n in e;){const r=Object.keys(t).filter(o=>Ur(o)&&t[o]),i=e[n];if(i){const o={...t,...i};for(let a of r)i?.[a]&&(o[a]={...t[a],...i[a]});t=o}n++}return t}/**
|
|
270
|
+
* @license MIT
|
|
271
|
+
* author: Cube Dev Team
|
|
272
|
+
* @cube-dev/ui-kit v0.33.2
|
|
273
|
+
* Released under the MIT license.
|
|
274
|
+
*/const Ad="Anonymous";function Md(e,t=Ad){return typeof e=="function"?e.displayName??e.name??t:t}/**
|
|
275
|
+
* @license MIT
|
|
276
|
+
* author: Cube Dev Team
|
|
277
|
+
* @cube-dev/ui-kit v0.33.2
|
|
278
|
+
* Released under the MIT license.
|
|
279
|
+
*/function k(e,t){if(typeof e=="string"){let u=e,d=t,h=_a`${({$css:g})=>g}`;const p=({breakpoints:g})=>{let m=f.useContext(Vr);g=g??m;const x=g.join(",");let $=f.useMemo(()=>d?`
|
|
280
|
+
{}${u}{${on(d,fr(g||[980]))}}`:"",[x]);return v.jsx(h,{$css:$})};return p.displayName=`TastyStyleDeclaration(${e})`,p}if(Pi.isValidElementType(e)){let{as:u,element:d,...h}=t??{},p=["styles"].concat(Object.keys(h).filter(m=>m.endsWith("Styles"))),g=f.forwardRef((m,x)=>{const{as:$,element:y,...w}=m,T=p.map(L=>m[L]),C=f.useMemo(()=>p.reduce((L,A)=>(w[A]!=null&&h[A]!=null?L[A]=an(h[A],w[A]):L[A]=w[A]||h[A],L),{}),[T]);return v.jsx(e,{ref:x,...h,...w,...C,as:$??u,element:y||d})});return g.displayName=`TastyWrappedComponent(${Md(e,h.qa??u??"Anonymous")})`,g}const n=e;let{as:r="div",element:i,styles:o,styleProps:a,variants:s,...c}=n,l;if(s){const u=Object.keys(s).reduce((d,h)=>{const p=s?.[h];return d[h]=k({as:r,styles:an(o,p),styleProps:a,...c}),d},{});u.default||(u.default=k({as:r,styles:o,styleProps:a,...c})),l=f.forwardRef((d,h)=>{const{variant:p,...g}=d,m=u[p]||u.default;return v.jsx(m,{ref:h,...g})})}else{let u=Bt[r](({$css:m})=>m);const d=Ft(m=>on(o||{},fr(m)));let{qa:h,qaVal:p,...g}=c??{};l=f.forwardRef((m,x)=>{let{as:$,styles:y,variant:w,breakpoints:T,mods:C,element:L,qa:A,qaVal:b,...R}=m,E=(a?a.concat(Re):Re).reduce((pe,ne)=>(ne in R&&(pe[ne]=R[ne],delete R[ne]),pe),{});Object.keys(E).length===0&&(E=null),(!y||y&&Object.keys(y).length===0)&&(y=void 0);const P=JSON.stringify(E),F=f.useMemo(()=>JSON.stringify(y),[y]),S=!E&&!y,I=f.useMemo(()=>`${y?JSON.stringify(y):""}.${E?JSON.stringify(E):""}`,[P,F]);let D=f.useMemo(()=>S?o:an(o,y,E),[I]),Q=f.useContext(Vr);T=T??Q;let M=f.useMemo(()=>S?d(T):on(D,fr(T)),[D,T]);return C&&Object.assign(R,ju(C)),v.jsx(u,{as:$??r,"data-element":L||i,"data-qa":A||h,"data-qaval":b||p,...g,...R,ref:x,$css:M})})}return l.displayName=`TastyComponent(${c.qa||r})`,l}const ws=k({});/**
|
|
281
|
+
* @license MIT
|
|
282
|
+
* author: Cube Dev Team
|
|
283
|
+
* @cube-dev/ui-kit v0.33.2
|
|
284
|
+
* Released under the MIT license.
|
|
285
|
+
*/const Fd=new Set(["id"]),kd=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Od=new Set(["role","as","element","css","qa","mods","qaVal","hidden","isHidden","disabled","isDisabled","children","style","className","href","target","tabIndex"]),Dd=new Set(["onPress","onHoverStart","onHoverEnd","onPressStart","onPressEnd"]),_d=/^((data-).*)$/,Bd=/^on[A-Z].+$/;function Y(e,t={}){let{labelable:n,propNames:r,eventProps:i}=t,o={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(Fd.has(a)||Od.has(a)||n&&kd.has(a)||i&&Bd.test(a)&&!Dd.has(a)||r?.has(a)||_d.test(a))&&(o[a]=e[a]);return o}/**
|
|
286
|
+
* @license MIT
|
|
287
|
+
* author: Cube Dev Team
|
|
288
|
+
* @cube-dev/ui-kit v0.33.2
|
|
289
|
+
* Released under the MIT license.
|
|
290
|
+
*/const V={valTypes:{none:"NONE",primitive:"PRIM",object:"OBJECT",array:"ARRAY"},getValType:function(e){if(!e||typeof e!="object"||Array.isArray(e))return V.valTypes.primitive;if(typeof e=="object")return V.valTypes.object},getPathType:function(e){let t=[];for(let n in e){let r=e[n];r?V.isNumber(r)?t.push(V.valTypes.array):t.push(V.valTypes.object):t.push(V.valTypes.none)}return t},isUndefined:function(e){return typeof e>"u"},isNumber:function(e){return!isNaN(parseInt(e))},isEmptyObj:function(e){for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return JSON.stringify(e)===JSON.stringify({})},isPlainObject:function(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===Object.prototype},isNotObject:function(e){return!e||!this.isPlainObject(e)},isEmptyArray:function(e){return Array.isArray(e)&&e.length==0},isNotArray:function(e){return Array.isArray(e)==!1},removeEmptyArrayItem:function(e){return e.filter(function(t){return t!=null&&t!=""})},getFieldName:function(e,t,n,r,i){return i?(t||"")+(V.isNumber(e)?"["+e+"]":(n&&!t?"":".")+e):r?(t||"")+"["+e+"]":(t?t+".":"")+e},startsWith:function(e,t){return e.indexOf(t)==0},convert:function(e,t=""){let n={};return V.isNotObject(e)?t?(n[t]=e,n):e:function r(i,o,a){let s=Array.isArray(i);for(let c in i){let l=i[c];l&&typeof l=="object"&&!Array.isArray(l)&&V.isPlainObject(l)?s&&V.isEmptyObj(l)==!1?n=r(l,V.getFieldName(c,o,a,!0)):V.isEmptyObj(l)==!1?n=r(l,V.getFieldName(c,o,a)):V.isEmptyObj(l)&&(n[V.getFieldName(c,o,a,s)]=l):s||V.isNumber(c)?n[V.getFieldName(c,o,a,!0)]=l:n[V.getFieldName(c,o,a)]=l}return n}(e,t,!0)},backward:function(e,t){let n={},r=/\[(\d+)\]/g;if(V.isNotObject(e)&&V.isNotArray(e))return t?e[t]:e;for(let a in e){let s=e[a];if(t){let c=new RegExp("^"+t);a=a.replace(c,"")}a=a.replace(r,".$1"),V.startsWith(a,".")&&(a=a.replace(/^\./,""));var i=a.split("."),o=V.getPathType(i);!V.isUndefined(o)&&o[0]==V.valTypes.array&&Array.isArray(n)==!1&&(n=[]),function c(l,u,d,h){let p=i.shift(),g=o.shift();if(typeof p>"u"||p==""){n=l;return}let m=g==V.valTypes.array;if(V.isNumber(p)&&(p=parseInt(p)),i.length>0){typeof u[p]>"u"&&(m?u[p]=[]:u[p]={}),c(l,u[p],p,u);return}g==V.valTypes.array&&d&&h?(Array.isArray(h[d])==!1&&(h[d]=[]),h[d].push(l)):u[p]=l}(s,n)}return n}};/**
|
|
291
|
+
* @license MIT
|
|
292
|
+
* author: Cube Dev Team
|
|
293
|
+
* @cube-dev/ui-kit v0.33.2
|
|
294
|
+
* Released under the MIT license.
|
|
295
|
+
*/function sn(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function $s(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=$s(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Hd(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=$s(e))&&(r&&(r+=" "),r+=t);return r}const dn={prefix:String(Math.round(Math.random()*1e10)),current:0},Es=_.createContext(dn),Nd=_.createContext(!1);let jd=!!(typeof window<"u"&&window.document&&window.document.createElement),pr=new WeakMap;function Vd(e=!1){let t=f.useContext(Es),n=f.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=pr.get(o);a==null?pr.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==a.state&&(t.current=a.id,pr.delete(o))}n.current=++t.current}return n.current}function Kd(e){let t=f.useContext(Es);t===dn&&!jd&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Vd(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Ud(e){let t=_.useId(),[n]=f.useState(Ps()),r=n?"react-aria":`react-aria${dn.prefix}`;return e||`${r}-${t}`}const Ss=typeof _.useId=="function"?Ud:Kd;function zd(){return!1}function Gd(){return!0}function Wd(e){return()=>{}}function Ps(){return typeof _.useSyncExternalStore=="function"?_.useSyncExternalStore(Wd,zd,Gd):f.useContext(Nd)}/**
|
|
296
|
+
* @license MIT
|
|
297
|
+
* author: Cube Dev Team
|
|
298
|
+
* @cube-dev/ui-kit v0.33.2
|
|
299
|
+
* Released under the MIT license.
|
|
300
|
+
*/const Ts=typeof window<"u"?f.useLayoutEffect:f.useEffect;/**
|
|
301
|
+
* @license MIT
|
|
302
|
+
* author: Cube Dev Team
|
|
303
|
+
* @cube-dev/ui-kit v0.33.2
|
|
304
|
+
* Released under the MIT license.
|
|
305
|
+
*/let zr=new Map;function Ro(e){let t=f.useRef(!0);t.current=!0;let[n,r]=f.useState(e),i=f.useRef(null),o=s=>{t.current?i.current=s:r(s)};Ts(()=>{t.current=!1}),f.useEffect(()=>{let s=i.current;s&&(r(s),i.current=null)},[r,o]);let a=Ss(n);return zr.set(a,o),a}function Zd(e,t){if(e===t)return e;let n=zr.get(e);if(n)return n(t),t;let r=zr.get(t);return r?(r(e),e):t}/**
|
|
306
|
+
* @license MIT
|
|
307
|
+
* author: Cube Dev Team
|
|
308
|
+
* @cube-dev/ui-kit v0.33.2
|
|
309
|
+
* Released under the MIT license.
|
|
310
|
+
*/function re(...e){let t={};for(let n of e){for(let r in t)/^on[A-Z]/.test(r)&&typeof t[r]=="function"&&n&&typeof n[r]=="function"?t[r]=sn(t[r],n[r]):r==="className"&&typeof t.className=="string"&&n&&typeof n.className=="string"?t[r]=Hd(t.className,n.className):(r==="styles"||r.endsWith("Styles"))&&typeof t.styles=="object"&&n&&typeof n.styles=="object"?t[r]=an(t[r],n[r]):r==="mods"&&t.mods&&n?.mods?t.mods={...t.mods,...n?.mods}:r==="id"&&t.id&&n?.id?t.id=Zd(t.id,n?.id):t[r]=n&&n[r]!==void 0?n[r]:t[r];for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}/**
|
|
311
|
+
* @license MIT
|
|
312
|
+
* author: Cube Dev Team
|
|
313
|
+
* @cube-dev/ui-kit v0.33.2
|
|
314
|
+
* Released under the MIT license.
|
|
315
|
+
*/const Hn={};let fn=f.createContext(Hn);function Ze(e,t){let n=e.slot||t,i=(f.useContext(fn)??Hn)[n];return re(i,e)}function qd(e){let t=f.useContext(fn)??Hn,{slots:n={},children:r}=e,i=f.useMemo(()=>Object.keys(t).concat(Object.keys(n)).reduce((o,a)=>({...o,[a]:re(t[a]??{},n[a]??{})}),{}),[t,n]);return v.jsx(fn.Provider,{value:i,children:r})}function Xd(e){const{children:t,...n}=e;let r=t;return f.Children.toArray(t).length<=1&&typeof t=="function"&&(r=f.cloneElement(f.Children.only(t),n)),v.jsx(fn.Provider,{value:Hn,children:r})}/**
|
|
316
|
+
* @license MIT
|
|
317
|
+
* author: Cube Dev Team
|
|
318
|
+
* @cube-dev/ui-kit v0.33.2
|
|
319
|
+
* Released under the MIT license.
|
|
320
|
+
*/function Yd(...e){const t=f.useRef();return f.useEffect(()=>{e.forEach(n=>{n&&(typeof n=="function"?n(t.current):n.current=t.current)})},[e]),t}/**
|
|
321
|
+
* @license MIT
|
|
322
|
+
* author: Cube Dev Team
|
|
323
|
+
* @cube-dev/ui-kit v0.33.2
|
|
324
|
+
* Released under the MIT license.
|
|
325
|
+
*/function Jd(e,t){const n=e&&(Array.isArray(e)||Pi.isFragment(e));return!e||!n&&f.isValidElement(e)?e:t()}/**
|
|
326
|
+
* @license MIT
|
|
327
|
+
* author: Cube Dev Team
|
|
328
|
+
* @cube-dev/ui-kit v0.33.2
|
|
329
|
+
* Released under the MIT license.
|
|
330
|
+
*/let Ie=typeof window<"u"&&window.visualViewport;function Qd(e={}){const{isDisabled:t}=e;let[n,r]=f.useState(()=>Lo());return f.useEffect(()=>{if(t)return;let i=()=>{r(o=>{let a=Lo();return a.width===o.width&&a.height===o.height?o:a})};return Ie?Ie.addEventListener("resize",i):window.addEventListener("resize",i),()=>{Ie?Ie.removeEventListener("resize",i):window.removeEventListener("resize",i)}},[t]),n}function Lo(){return{width:Ie&&Ie.width||(typeof window<"u"?window.innerWidth:0),height:Ie&&Ie.height||(typeof window<"u"?window.innerHeight:0)}}/**
|
|
331
|
+
* @license MIT
|
|
332
|
+
* author: Cube Dev Team
|
|
333
|
+
* @cube-dev/ui-kit v0.33.2
|
|
334
|
+
* Released under the MIT license.
|
|
335
|
+
*/const ef=[...Re,...be,...Bn],Cs={transform:"textTransform",weight:"fontWeight",italic:"fontStyle"},tf=k({qa:"Text",as:"span",styles:{display:{"":"inline","ellipsis | block":"block"},margin:"0",whiteSpace:{"":"inherit","nowrap | ellipsis":"nowrap"},textOverflow:{"":!1,ellipsis:"ellipsis"},overflow:{"":!1,ellipsis:"hidden"},width:{"":!1,ellipsis:"max 100%"}}}),Fe=f.forwardRef(function(t,n){t=Ze(t,"text");const{as:r,qa:i,block:o,styleName:a,ellipsis:s,nowrap:c,...l}=t,u=G(l,ef,{},Cs);return v.jsx(tf,{as:r||"span",qa:i||"Text",styleName:a,mods:{nowrap:c,ellipsis:!!s,block:!!o},...Y(l,{eventProps:!0}),ref:n,styles:u})}),Ii=Object.assign(Fe,{Minor:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,color:"#minor",...t})}),Danger:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,role:"alert",color:"#danger-text",...t})}),Success:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,color:"#success-text",...t})}),Strong:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,as:"strong",preset:"strong",color:"#dark",...t})}),Emphasis:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,as:"em",preset:"em",...t})}),Selection:f.forwardRef(function(t,n){return v.jsx(Fe,{ref:n,color:"#dark",fill:"#note.30",...t})})});/**
|
|
336
|
+
* @license MIT
|
|
337
|
+
* author: Cube Dev Team
|
|
338
|
+
* @cube-dev/ui-kit v0.33.2
|
|
339
|
+
* Released under the MIT license.
|
|
340
|
+
*/const nf=[...be,...ee],rf=k({qa:"Title",as:"h1",styles:{gridArea:"heading",display:"block",color:"#dark",preset:{"":"h6",'[data-level="1"]':"h1",'[data-level="2"]':"h2",'[data-level="3"]':"h3",'[data-level="4"]':"h4",'[data-level="5"]':"h5",'[data-level="6"]':"h6"},margin:"0",whiteSpace:{"":"inherit","nowrap | ellipsis":"nowrap"},textOverflow:{"":!1,ellipsis:"ellipsis"},overflow:{"":!1,ellipsis:"hidden"},width:{"":!1,ellipsis:"max 100%"}}}),vr=f.forwardRef(function({qa:t,as:n,styleName:r,inline:i,nowrap:o,ellipsis:a,level:s,...c},l){const u=Ze(c,"heading"),d=`h${s||1}`,h=G(u,nf,{},Cs);return v.jsx(rf,{qa:t||"Title",as:n||d,styleName:r,"data-level":s||1,mods:{nowrap:o,ellipsis:a},inline:i,...Y(u,{eventProps:!0}),ref:l,styles:h})}),Is=Object.assign(vr,{Danger:f.forwardRef(function(t,n){return v.jsx(vr,{ref:n,color:"#danger-text",...t})}),Success:f.forwardRef(function(t,n){return v.jsx(vr,{ref:n,color:"#success-text",...t})})});/**
|
|
341
|
+
* @license MIT
|
|
342
|
+
* author: Cube Dev Team
|
|
343
|
+
* @cube-dev/ui-kit v0.33.2
|
|
344
|
+
* Released under the MIT license.
|
|
345
|
+
*/const of={preset:"p3",color:"#dark.75",display:"block"},af=[...ee,...be],Ri=f.forwardRef(function(t,n){const r=G(t,af,of);return v.jsx(Ii,{as:"p",qa:"Paragraph",...t,ref:n,styles:r})});function sf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lf(e,t,n){sf(e,t),t.set(e,n)}function jt(e,t,n){let[r,i]=f.useState(e||t),o=f.useRef(e!==void 0),a=e!==void 0;f.useEffect(()=>{let l=o.current;l!==a&&console.warn(`WARN: A component changed from ${l?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?e:r,c=f.useCallback((l,...u)=>{let d=(h,...p)=>{n&&(Object.is(s,h)||n(h,...p)),a||(s=h)};typeof l=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((p,...g)=>{let m=l(a?s:p,...g);return d(m,...u),a?p:m})):(a||i(l),d(l,...u))},[a,s,n]);return[s,c]}function Gr(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}const Li={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Rs={...Li,customError:!0,valid:!1},rt={isInvalid:!1,validationDetails:Li,validationErrors:[]},cf=f.createContext({}),Wr="__formValidationState"+Date.now();function Nn(e){if(e[Wr]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}=e[Wr];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}}return uf(e)}function uf(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:o,validate:a,validationBehavior:s="aria"}=e;n&&(t||(t=n==="invalid"));let c=t?{isInvalid:!0,validationErrors:[],validationDetails:Rs}:null,l=f.useMemo(()=>Ao(df(a,i)),[a,i]);o?.validationDetails.valid&&(o=null);let u=f.useContext(cf),d=f.useMemo(()=>r?Array.isArray(r)?r.flatMap(E=>Zr(u[E])):Zr(u[r]):[],[u,r]),[h,p]=f.useState(u),[g,m]=f.useState(!1);u!==h&&(p(u),m(!1));let x=f.useMemo(()=>Ao(g?[]:d),[g,d]),$=f.useRef(rt),[y,w]=f.useState(rt),T=f.useRef(rt),C=()=>{if(!L)return;A(!1);let E=l||o||$.current;mr(E,T.current)||(T.current=E,w(E))},[L,A]=f.useState(!1);return f.useEffect(C),{realtimeValidation:c||x||l||o||rt,displayValidation:s==="native"?c||x||y:c||x||l||o||y,updateValidation(E){s==="aria"&&!mr(y,E)?w(E):$.current=E},resetValidation(){let E=rt;mr(E,T.current)||(T.current=E,w(E)),s==="native"&&A(!1),m(!0)},commitValidation(){s==="native"&&A(!0),m(!0)}}}function Zr(e){return e?Array.isArray(e)?e:[e]:[]}function df(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Zr(n)}return[]}function Ao(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Rs}:null}function mr(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function ff(...e){let t=new Set,n=!1,r={...Li};for(let a of e){var i,o;for(let s of a.validationErrors)t.add(s);n||(n=a.isInvalid);for(let s in r)(i=r)[o=s]||(i[o]=a.validationDetails[s])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function hf(e={}){let[t,n]=jt(e.value,e.defaultValue||[],e.onChange),r=!!e.isRequired&&t.length===0,i=f.useRef(new Map),o=Nn({...e,value:t}),a=o.displayValidation.isInvalid;var s;return{...o,value:t,setValue(l){e.isReadOnly||e.isDisabled||n(l)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(l){return t.includes(l)},addValue(l){e.isReadOnly||e.isDisabled||t.includes(l)||n(t.concat(l))},removeValue(l){e.isReadOnly||e.isDisabled||t.includes(l)&&n(t.filter(u=>u!==l))},toggleValue(l){e.isReadOnly||e.isDisabled||(t.includes(l)?n(t.filter(u=>u!==l)):n(t.concat(l)))},setInvalid(l,u){let d=new Map(i.current);u.isInvalid?d.set(l,u):d.delete(l),i.current=d,o.updateValidation(ff(...d.values()))},validationState:(s=e.validationState)!==null&&s!==void 0?s:a?"invalid":null,isInvalid:a,isRequired:r}}function Ls(e){return null}Ls.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:o}=t,a=t.title||t.children,s=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!s&&!n?.suppressTextValueWarning&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:t,rendered:a,textValue:s,"aria-label":t["aria-label"],hasChildNodes:pf(t),*childNodes(){if(r)for(let c of r)yield{type:"item",value:c};else if(i){let c=[];_.Children.forEach(o,l=>{c.push({type:"item",element:l})}),yield*c}}}};function pf(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&_.Children.count(e.children)>0)}let vf=Ls;class mf{build(t,n){return this.context=n,Mo(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let i of t.items)yield*this.getFullNode({value:i},{renderer:n})}else{let i=[];_.Children.forEach(n,a=>{i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let c of s)o++,yield c}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){let o=t.element;if(!o&&t.value&&n&&n.renderer){let c=this.cache.get(t.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=t.index,c.parentKey=i?i.key:null,yield c;return}o=n.renderer(t.value)}if(_.isValidElement(o)){let c=o.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let h=typeof o.type=="function"?o.type.name:o.type;throw new Error(`Unknown element <${h}> in collection.`)}let l=c.getCollectionNode(o.props,this.context),u=t.index,d=l.next();for(;!d.done&&d.value;){let h=d.value;t.index=u;let p=h.key;p||(p=h.element?null:this.getKey(o,t,n,r));let m=[...this.getFullNode({...h,key:p,index:u,wrapper:gf(t.wrapper,h.wrapper)},this.getChildState(n,h),r?`${r}${o.key}`:o.key,i)];for(let x of m){if(x.value=h.value||t.value,x.value&&this.cache.set(x.value,x),t.type&&x.type!==t.type)throw new Error(`Unsupported type <${gr(x.type)}> in <${gr(i.type)}>. Only <${gr(t.type)}> is supported.`);u++,yield x}d=l.next(m)}return}if(t.key==null)return;let a=this,s={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:t.value,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:t.textValue,"aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes,childNodes:Mo(function*(){if(!t.hasChildNodes)return;let c=0;for(let l of t.childNodes()){l.key!=null&&(l.key=`${s.key}${l.key}`),l.index=c;let u=a.getFullNode(l,a.getChildState(n,l),s.key,s);for(let d of u)c++,yield d}})};yield s}constructor(){this.cache=new WeakMap}}function Mo(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function gf(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function gr(e){return e[0].toUpperCase()+e.slice(1)}function bf(e,t,n){let r=f.useMemo(()=>new mf,[]),{children:i,items:o,collection:a}=e;return f.useMemo(()=>{if(a)return a;let c=r.build({children:i,items:o},n);return t(c)},[r,i,o,a,n,t])}function yf(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function xf(e){return wf(e,0)}function wf(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function br(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Fo(e,t),t],i=[...Fo(e,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(t=r[o],n=i[o],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function Fo(e,t){let n=[];for(;t?.parentKey!=null;)t=e.getItem(t.parentKey),n.unshift(t);return n}class ve extends Set{constructor(t,n,r){super(t),t instanceof ve?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function $f(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ef(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=e,a=f.useRef(!1),[,s]=f.useState(!1),c=f.useRef(null),l=f.useRef(null),[,u]=f.useState(null),d=f.useMemo(()=>ko(e.selectedKeys),[e.selectedKeys]),h=f.useMemo(()=>ko(e.defaultSelectedKeys,new ve),[e.defaultSelectedKeys]),[p,g]=jt(d,h,e.onSelectionChange),m=f.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[x,$]=f.useState(i);i==="replace"&&x==="toggle"&&typeof p=="object"&&p.size===0&&$("replace");let y=f.useRef(i);return f.useEffect(()=>{i!==y.current&&($(i),y.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:x,setSelectionBehavior:$,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(w,T="first"){c.current=w,l.current=T,u(w)},selectedKeys:p,setSelectedKeys(w){(r||!$f(w,p))&&g(w)},disabledKeys:m,disabledBehavior:o}}function ko(e,t){return e?e==="all"?"all":new ve(e):t}class Sf{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&br(this.collection,r,t)<0)&&(t=r)}return t?.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&br(this.collection,r,t)>0)&&(t=r)}return t?.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new ve([t],t,t);else{let r=this.state.selectedKeys,i=r.anchorKey||t;n=new ve(r,i,t);for(let o of this.getKeyRange(i,r.currentKey||t))n.delete(o);for(let o of this.getKeyRange(t,i))this.canSelectItem(o)&&n.add(o)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?br(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let r=[],i=t;for(;i;){let o=this.collection.getItem(i);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===n)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new ve(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new ve([t],t,t):new ve;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new ve;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r;){if(this.canSelectItem(r)){let i=this.collection.getItem(r);i.type==="item"&&t.push(r),i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(xf(yf(i,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ve)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let n=this.collection.getItem(t);return!(!n||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){return this.state.disabledKeys.has(t)&&this.state.disabledBehavior==="all"}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null}}class Oo{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return n?.childNodes||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let a of o.childNodes)n(a)};for(let o of t)n(o);let r,i=0;for(let[o,a]of this.keyMap)r?(r.nextKey=o,a.prevKey=r.key):(this.firstKey=o,a.prevKey=void 0),a.type==="item"&&(a.index=i++),r=a,r.nextKey=void 0;this.lastKey=r?.key}}function Pf(e){let{filter:t}=e,n=Ef(e),r=f.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=f.useCallback(l=>t?new Oo(t(l)):new Oo(l),[t]),o=f.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),a=bf(e,i,o),s=f.useMemo(()=>new Sf(a,n),[a,n]);const c=f.useRef(null);return f.useEffect(()=>{if(n.focusedKey!=null&&!a.getItem(n.focusedKey)){const l=c.current.getItem(n.focusedKey),u=[...c.current.getKeys()].map(m=>{const x=c.current.getItem(m);return x.type==="item"?x:null}).filter(m=>m!==null),d=[...a.getKeys()].map(m=>{const x=a.getItem(m);return x.type==="item"?x:null}).filter(m=>m!==null),h=u.length-d.length;let p=Math.min(h>1?Math.max(l.index-h+1,0):l.index,d.length-1),g;for(;p>=0;){if(!s.isDisabled(d[p].key)){g=d[p];break}p<d.length-1?p++:(p>l.index&&(p=l.index),p--)}n.setFocusedKey(g?g.key:null)}c.current=a},[a,s,n,n.focusedKey]),{collection:a,disabledKeys:r,selectionManager:s}}function Tf(e){let[t,n]=jt(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=f.useCallback(()=>{n(!0)},[n]),i=f.useCallback(()=>{n(!1)},[n]),o=f.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:o}}const Cf=Symbol.for("react-aria.i18n.locale"),If=Symbol.for("react-aria.i18n.strings");let et;class jn{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=Rf(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[Cf];if(et===void 0){let i=window[If];if(!i)return null;et={};for(let o in i)et[o]=new jn({[n]:i[o]},n)}let r=et?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings={...t},this.defaultLocale=n}}function Rf(e,t,n="en-US"){if(t[e])return t[e];let r=Lf(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function Lf(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Do=new Map,_o=new Map;class Af{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=Do.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),Do.set(o,a));let s=a.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=_o.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),_o.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}let Mf=Math.round(Math.random()*1e10),Ff=0;function kf(e){let t=f.useMemo(()=>e.name||`radio-group-${Mf}-${++Ff}`,[e.name]);var n;let[r,i]=jt(e.value,(n=e.defaultValue)!==null&&n!==void 0?n:null,e.onChange),[o,a]=f.useState(null),s=Nn({...e,value:r}),c=u=>{!e.isReadOnly&&!e.isDisabled&&(i(u),s.commitValidation())},l=s.displayValidation.isInvalid;return{...s,name:t,selectedValue:r,setSelectedValue:c,lastFocusedValue:o,setLastFocusedValue:a,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(l?"invalid":null),isInvalid:l}}function As(e={}){let{isReadOnly:t}=e,[n,r]=jt(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function o(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:o}}const Of=1500,Bo=500;let ke={},Df=0,wt=!1,$e=null,Oe=null;function _f(e={}){let{delay:t=Of,closeDelay:n=Bo}=e,{isOpen:r,open:i,close:o}=Tf(e),a=f.useMemo(()=>`${++Df}`,[]),s=f.useRef(),c=()=>{ke[a]=d},l=()=>{for(let p in ke)p!==a&&(ke[p](!0),delete ke[p])},u=()=>{clearTimeout(s.current),s.current=null,l(),c(),wt=!0,i(),$e&&(clearTimeout($e),$e=null),Oe&&(clearTimeout(Oe),Oe=null)},d=p=>{p||n<=0?(clearTimeout(s.current),s.current=null,o()):s.current||(s.current=setTimeout(()=>{s.current=null,o()},n)),$e&&(clearTimeout($e),$e=null),wt&&(Oe&&clearTimeout(Oe),Oe=setTimeout(()=>{delete ke[a],Oe=null,wt=!1},Math.max(Bo,n)))},h=()=>{l(),c(),!r&&!$e&&!wt?$e=setTimeout(()=>{$e=null,wt=!0,u()},t):r||u()};return f.useEffect(()=>()=>{clearTimeout(s.current),ke[a]&&delete ke[a]},[a]),{isOpen:r,open:p=>{!p&&t>0&&!s.current?h():u()},close:d}}/**
|
|
346
|
+
* @license MIT
|
|
347
|
+
* author: Cube Dev Team
|
|
348
|
+
* @cube-dev/ui-kit v0.33.2
|
|
349
|
+
* Released under the MIT license.
|
|
350
|
+
*/const Bf=k({styles:{display:"block"}}),Hf=f.forwardRef(function(t,n){const r=G(t,ee);return v.jsx(Bf,{...Y(t,{eventProps:!0}),ref:n,styles:r})});function Ms(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ms(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nf(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ms(e))&&(r&&(r+=" "),r+=t);return r}const ce=typeof document<"u"?_.useLayoutEffect:()=>{};function oe(e){const t=f.useRef(null);return ce(()=>{t.current=e},[e]),f.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function jf(e){let[t,n]=f.useState(e),r=f.useRef(null),i=oe(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?i():n(a.value)});ce(()=>{r.current&&i()});let o=oe(a=>{r.current=a(t),i()});return[t,o]}let Vf=!!(typeof window<"u"&&window.document&&window.document.createElement),hn=new Map;function pt(e){let[t,n]=f.useState(e),r=f.useRef(null),i=Ss(t),o=f.useCallback(a=>{r.current=a},[]);return Vf&&hn.set(i,o),ce(()=>{let a=i;return()=>{hn.delete(a)}},[i]),f.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Kf(e,t){if(e===t)return e;let n=hn.get(e);if(n)return n(t),t;let r=hn.get(t);return r?(r(e),e):t}function qr(e=[]){let t=pt(),[n,r]=jf(t),i=f.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return ce(i,[t,i,...e]),n}function kt(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const le=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},me=e=>e&&"window"in e&&e.window===e?e:le(e).defaultView||window;function q(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let o=t[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=kt(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?t[i]=Nf(o,a):i==="id"&&o&&a?t.id=Kf(o,a):t[i]=a!==void 0?a:o}}return t}const Uf=new Set(["id"]),zf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Gf=new Set(["href","target","rel","download","ping","referrerPolicy"]),Wf=/^(data-.*)$/;function qe(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(Uf.has(a)||n&&zf.has(a)||r&&Gf.has(a)||i?.has(a)||Wf.test(a))&&(o[a]=e[a]);return o}function Pe(e){if(Zf())e.focus({preventScroll:!0});else{let t=qf(e);e.focus(),Xf(t)}}let qt=null;function Zf(){if(qt==null){qt=!1;try{document.createElement("div").focus({get preventScroll(){return qt=!0,!0}})}catch{}}return qt}function qf(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Xf(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Vn(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Ai(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ve(){return Ai(/^Mac/i)}function Yf(){return Ai(/^iPhone/i)}function Fs(){return Ai(/^iPad/i)||Ve()&&navigator.maxTouchPoints>1}function Kn(){return Yf()||Fs()}function Jf(){return Ve()||Kn()}function ks(){return Vn(/AppleWebKit/i)&&!Qf()}function Qf(){return Vn(/Chrome/i)}function Os(){return Vn(/Android/i)}function eh(){return Vn(/Firefox/i)}const th=f.createContext({isNative:!0,open:rh});function Ds(){return f.useContext(th)}function Ke(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:c}=t;eh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ve()?o=!0:a=!0);let l=ks()&&Ve()&&!Fs()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:c,bubbles:!0,cancelable:!0});Ke.isOpening=n,Pe(e),e.dispatchEvent(l),Ke.isOpening=!1}Ke.isOpening=!1;function nh(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function rh(e,t){nh(e,n=>Ke(n,t))}let it=new Map,Xr=new Set;function Ho(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=it.get(r.target);i||(i=new Set,it.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=it.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),it.delete(r.target)),it.size===0)){for(let o of Xr)o();Xr.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Ho():document.addEventListener("DOMContentLoaded",Ho));function _s(e){requestAnimationFrame(()=>{it.size===0?e():Xr.add(e)})}function Bs(){let e=f.useRef(new Map),t=f.useCallback((i,o,a,s)=>{let c=s?.once?(...l)=>{e.current.delete(a),a(...l)}:a;e.current.set(a,{type:o,eventTarget:i,fn:c,options:s}),i.addEventListener(o,a,s)},[]),n=f.useCallback((i,o,a,s)=>{var c;let l=((c=e.current.get(a))===null||c===void 0?void 0:c.fn)||a;i.removeEventListener(o,l,s),e.current.delete(a)},[]),r=f.useCallback(()=>{e.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return f.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Hs(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=pt(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function ih(e){const t=f.useRef(null);return f.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function oh(){return typeof window.ResizeObserver<"u"}function ah(e){const{ref:t,onResize:n}=e;f.useEffect(()=>{let r=t?.current;if(r)if(oh()){const i=new window.ResizeObserver(o=>{o.length&&n()});return i.observe(r),()=>{r&&i.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function Ns(e,t){ce(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function pn(e,t){let n=e;for(vn(n,t)&&(n=n.parentElement);n&&!vn(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function vn(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}let sh=0;const yr=new Map;function lh(e){let[t,n]=f.useState();return ce(()=>{if(!e)return;let r=yr.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${sh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=e,document.body.appendChild(o),r={refCount:0,element:o},yr.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),yr.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function ch(e,t,n,r){let i=oe(n),o=n==null;f.useEffect(()=>{if(o||!e.current)return;let a=e.current;return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[e,t,r,o,i])}function js(e,t){let n=No(e,t,"left"),r=No(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l}=getComputedStyle(e),u=e.scrollLeft+parseInt(l,10),d=e.scrollTop+parseInt(c,10),h=u+e.clientWidth,p=d+e.clientHeight;n<=a?a=n-parseInt(l,10):n+i>h&&(a+=n+i-h),r<=d?s=r-parseInt(c,10):r+o>p&&(s+=r+o-p),e.scrollLeft=a,e.scrollTop=s}function No(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function jo(e,t){if(document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let c=pn(e);for(;e&&c&&e!==a&&c!==a;)js(c,e),e=c,c=pn(e)}else{var n;let{left:c,top:l}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:u,top:d}=e.getBoundingClientRect();if(Math.abs(c-u)>1||Math.abs(l-d)>1){var r,i,o;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"})}}}}function Yr(e){return e.mozInputSource===0&&e.isTrusted?!0:Os()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uh(e){return!Os()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Vs(e,t,n){let r=f.useRef(t),i=oe(()=>{n&&n(r.current)});f.useEffect(()=>{var o;let a=e==null||(o=e.current)===null||o===void 0?void 0:o.form;return a?.addEventListener("reset",i),()=>{a?.removeEventListener("reset",i)}},[e,i])}function dh(e,t){return t.get?t.get.call(e):t.value}function Ks(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function fh(e,t){var n=Ks(e,t,"get");return dh(e,n)}function hh(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Vo(e,t,n){var r=Ks(e,t,"set");return hh(e,r,n),n}let st="default",Jr="",ln=new WeakMap;function Ko(e){if(Kn()){if(st==="default"){const t=le(e);Jr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}st="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ln.set(e,e.style.userSelect),e.style.userSelect="none")}function Xt(e){if(Kn()){if(st!=="disabled")return;st="restoring",setTimeout(()=>{_s(()=>{if(st==="restoring"){const t=le(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Jr||""),Jr="",st="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ln.has(e)){let t=ln.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ln.delete(e)}}const Us=_.createContext({register:()=>{}});Us.displayName="PressResponderContext";function ph(e){let t=f.useContext(Us);if(t){let{register:n,...r}=t;e=q(r,e),n()}return Ns(t,e.ref),e}var Yt=new WeakMap;class Jt{continuePropagation(){Vo(this,Yt,!1)}get shouldStopPropagation(){return fh(this,Yt)}constructor(t,n,r){lf(this,Yt,{writable:!0,value:void 0}),Vo(this,Yt,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const Uo=Symbol("linkClicked");function Ue(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:c,shouldCancelOnPointerExit:l,allowTextSelectionOnPress:u,ref:d,...h}=ph(e),[p,g]=f.useState(!1),m=f.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:x,removeAllGlobalListeners:$}=Bs(),y=oe((b,R)=>{let E=m.current;if(a||E.didFirePressStart)return!1;let P=!0;if(E.isTriggeringEvent=!0,r){let F=new Jt("pressstart",R,b);r(F),P=F.shouldStopPropagation}return n&&n(!0),E.isTriggeringEvent=!1,E.didFirePressStart=!0,g(!0),P}),w=oe((b,R,E=!0)=>{let P=m.current;if(!P.didFirePressStart)return!1;P.ignoreClickAfterPress=!0,P.didFirePressStart=!1,P.isTriggeringEvent=!0;let F=!0;if(i){let S=new Jt("pressend",R,b);i(S),F=S.shouldStopPropagation}if(n&&n(!1),g(!1),t&&E&&!a){let S=new Jt("press",R,b);t(S),F&&(F=S.shouldStopPropagation)}return P.isTriggeringEvent=!1,F}),T=oe((b,R)=>{let E=m.current;if(a)return!1;if(o){E.isTriggeringEvent=!0;let P=new Jt("pressup",R,b);return o(P),E.isTriggeringEvent=!1,P.shouldStopPropagation}return!0}),C=oe(b=>{let R=m.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&w(Ee(R.target,b),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,$(),u||Xt(R.target))}),L=oe(b=>{l&&C(b)}),A=f.useMemo(()=>{let b=m.current,R={onKeyDown(P){if(xr(P.nativeEvent,P.currentTarget)&&P.currentTarget.contains(P.target)){var F;Go(P.target,P.key)&&P.preventDefault();let S=!0;if(!b.isPressed&&!P.repeat){b.target=P.currentTarget,b.isPressed=!0,S=y(P,"keyboard");let I=P.currentTarget,D=Q=>{xr(Q,I)&&!Q.repeat&&I.contains(Q.target)&&b.target&&T(Ee(b.target,Q),"keyboard")};x(le(P.currentTarget),"keyup",kt(D,E),!0)}S&&P.stopPropagation(),P.metaKey&&Ve()&&((F=b.metaKeyEvents)===null||F===void 0||F.set(P.key,P.nativeEvent))}else P.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(P){if(!(P&&!P.currentTarget.contains(P.target))&&P&&P.button===0&&!b.isTriggeringEvent&&!Ke.isOpening){let F=!0;if(a&&P.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||Yr(P.nativeEvent))){!a&&!c&&Pe(P.currentTarget);let S=y(P,"virtual"),I=T(P,"virtual"),D=w(P,"virtual");F=S&&I&&D}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,F&&P.stopPropagation()}}},E=P=>{var F;if(b.isPressed&&b.target&&xr(P,b.target)){var S;Go(P.target,P.key)&&P.preventDefault();let D=P.target;w(Ee(b.target,P),"keyboard",b.target.contains(D)),$(),P.key!=="Enter"&&Mi(b.target)&&b.target.contains(D)&&!P[Uo]&&(P[Uo]=!0,Ke(b.target,P,!1)),b.isPressed=!1,(S=b.metaKeyEvents)===null||S===void 0||S.delete(P.key)}else if(P.key==="Meta"&&(!((F=b.metaKeyEvents)===null||F===void 0)&&F.size)){var I;let D=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let Q of D.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",Q))}};if(typeof PointerEvent<"u"){R.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(uh(I.nativeEvent)){b.pointerType="virtual";return}wr(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let D=!0;b.isPressed||(b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!c&&Pe(I.currentTarget),u||Ko(b.target),D=y(I,b.pointerType),x(le(I.currentTarget),"pointermove",P,!1),x(le(I.currentTarget),"pointerup",F,!1),x(le(I.currentTarget),"pointercancel",S,!1)),D&&I.stopPropagation()},R.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(wr(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},R.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&tt(I,I.currentTarget)&&T(I,b.pointerType||I.pointerType)};let P=I=>{I.pointerId===b.activePointerId&&(b.target&&tt(I,b.target)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,y(Ee(b.target,I),b.pointerType)):b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Ee(b.target,I),b.pointerType,!1),L(I)))},F=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(tt(I,b.target)&&b.pointerType!=null?w(Ee(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Ee(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,$(),u||Xt(b.target))},S=I=>{C(I)};R.onDragStart=I=>{I.currentTarget.contains(I.target)&&C(I)}}else{R.onMouseDown=S=>{if(S.button!==0||!S.currentTarget.contains(S.target))return;if(wr(S.currentTarget)&&S.preventDefault(),b.ignoreEmulatedMouseEvents){S.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=S.currentTarget,b.pointerType=Yr(S.nativeEvent)?"virtual":"mouse",!a&&!c&&Pe(S.currentTarget),y(S,b.pointerType)&&S.stopPropagation(),x(le(S.currentTarget),"mouseup",P,!1)},R.onMouseEnter=S=>{if(!S.currentTarget.contains(S.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=y(S,b.pointerType)),I&&S.stopPropagation()},R.onMouseLeave=S=>{if(!S.currentTarget.contains(S.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=w(S,b.pointerType,!1),L(S)),I&&S.stopPropagation()},R.onMouseUp=S=>{S.currentTarget.contains(S.target)&&!b.ignoreEmulatedMouseEvents&&S.button===0&&T(S,b.pointerType||"mouse")};let P=S=>{if(S.button===0){if(b.isPressed=!1,$(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&tt(S,b.target)&&b.pointerType!=null?w(Ee(b.target,S),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Ee(b.target,S),b.pointerType,!1),b.isOverTarget=!1}};R.onTouchStart=S=>{if(!S.currentTarget.contains(S.target))return;let I=vh(S.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=S.currentTarget,b.pointerType="touch",!a&&!c&&Pe(S.currentTarget),u||Ko(b.target),y(S,b.pointerType)&&S.stopPropagation(),x(me(S.currentTarget),"scroll",F,!0)},R.onTouchMove=S=>{if(!S.currentTarget.contains(S.target))return;if(!b.isPressed){S.stopPropagation();return}let I=zo(S.nativeEvent,b.activePointerId),D=!0;I&&tt(I,S.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,D=y(S,b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,D=w(S,b.pointerType,!1),L(S)),D&&S.stopPropagation()},R.onTouchEnd=S=>{if(!S.currentTarget.contains(S.target))return;if(!b.isPressed){S.stopPropagation();return}let I=zo(S.nativeEvent,b.activePointerId),D=!0;I&&tt(I,S.currentTarget)&&b.pointerType!=null?(T(S,b.pointerType),D=w(S,b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(D=w(S,b.pointerType,!1)),D&&S.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!u&&Xt(b.target),$()},R.onTouchCancel=S=>{S.currentTarget.contains(S.target)&&(S.stopPropagation(),b.isPressed&&C(S))};let F=S=>{b.isPressed&&S.target.contains(b.target)&&C({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=S=>{S.currentTarget.contains(S.target)&&C(S)}}return R},[x,a,c,$,u,C,L,w,y,T]);return f.useEffect(()=>()=>{var b;u||Xt((b=m.current.target)!==null&&b!==void 0?b:void 0)},[u]),{isPressed:s||p,pressProps:q(h,A)}}function Mi(e){return e.tagName==="A"&&e.hasAttribute("href")}function xr(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof me(i).HTMLInputElement&&!zs(i,n)||i instanceof me(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&Mi(i))&&n!=="Enter")}function vh(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function zo(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function Ee(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function mh(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function gh(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function tt(e,t){let n=t.getBoundingClientRect(),r=mh(e);return gh(n,r)}function wr(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Go(e,t){return e instanceof HTMLInputElement?!zs(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Mi(e)}const bh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function zs(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":bh.has(e.type)}class yh{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Gs(e){let t=f.useRef({isFocused:!1,observer:null});ce(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=oe(r=>{e?.(r)});return f.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=a=>{t.current.isFocused=!1,i.disabled&&n(new yh("blur",a)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Fi(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=f.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),a=Gs(o),s=f.useCallback(c=>{c.target===c.currentTarget&&document.activeElement===c.target&&(n&&n(c),i&&i(!0),a(c))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?o:void 0}}}let Xe=null,Qr=new Set,Lt=new Map,ze=!1,ei=!1;const xh={Tab:!0,Escape:!0};function Un(e,t){for(let n of Qr)n(e,t)}function wh(e){return!(e.metaKey||!Ve()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function mn(e){ze=!0,wh(e)&&(Xe="keyboard",Un("keyboard",e))}function fe(e){Xe="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ze=!0,Un("pointer",e))}function Ws(e){Yr(e)&&(ze=!0,Xe="virtual")}function Zs(e){e.target===window||e.target===document||(!ze&&!ei&&(Xe="virtual",Un("virtual",e)),ze=!1,ei=!1)}function qs(){ze=!1,ei=!0}function ti(e){if(typeof window>"u"||Lt.get(me(e)))return;const t=me(e),n=le(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ze=!0,r.apply(this,arguments)},n.addEventListener("keydown",mn,!0),n.addEventListener("keyup",mn,!0),n.addEventListener("click",Ws,!0),t.addEventListener("focus",Zs,!0),t.addEventListener("blur",qs,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",fe,!0),n.addEventListener("pointermove",fe,!0),n.addEventListener("pointerup",fe,!0)):(n.addEventListener("mousedown",fe,!0),n.addEventListener("mousemove",fe,!0),n.addEventListener("mouseup",fe,!0)),t.addEventListener("beforeunload",()=>{Xs(e)},{once:!0}),Lt.set(t,{focus:r})}const Xs=(e,t)=>{const n=me(e),r=le(e);t&&r.removeEventListener("DOMContentLoaded",t),Lt.has(n)&&(n.HTMLElement.prototype.focus=Lt.get(n).focus,r.removeEventListener("keydown",mn,!0),r.removeEventListener("keyup",mn,!0),r.removeEventListener("click",Ws,!0),n.removeEventListener("focus",Zs,!0),n.removeEventListener("blur",qs,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",fe,!0),r.removeEventListener("pointermove",fe,!0),r.removeEventListener("pointerup",fe,!0)):(r.removeEventListener("mousedown",fe,!0),r.removeEventListener("mousemove",fe,!0),r.removeEventListener("mouseup",fe,!0)),Lt.delete(n))};function $h(e){const t=le(e);let n;return t.readyState!=="loading"?ti(e):(n=()=>{ti(e)},t.addEventListener("DOMContentLoaded",n)),()=>Xs(e,n)}typeof document<"u"&&$h();function zn(){return Xe!=="pointer"}function gn(){return Xe}function Eh(e){Xe=e,Un(e,null)}const Sh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ph(e,t,n){var r;const i=typeof window<"u"?me(n?.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?me(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?me(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?me(n?.target).KeyboardEvent:KeyboardEvent;return e=e||n?.target instanceof i&&!Sh.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||n?.target instanceof o||n?.target instanceof a&&n?.target.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!xh[n.key])}function Th(e={}){let{isTextInput:t,autoFocus:n}=e,[r,i]=f.useState(n||zn());return Ys(o=>{i(o)},[t],{isTextInput:t}),{isFocusVisible:r}}function Ys(e,t,n){ti(),f.useEffect(()=>{let r=(i,o)=>{Ph(!!n?.isTextInput,i,o)&&e(zn())};return Qr.add(r),()=>{Qr.delete(r)}},t)}function Vt(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=f.useRef({isFocusWithin:!1}),a=f.useCallback(l=>{o.current.isFocusWithin&&!l.currentTarget.contains(l.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(l),i&&i(!1))},[n,i,o]),s=Gs(a),c=f.useCallback(l=>{!o.current.isFocusWithin&&document.activeElement===l.target&&(r&&r(l),i&&i(!0),o.current.isFocusWithin=!0,s(l))},[r,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let bn=!1,$r=0;function ni(){bn=!0,setTimeout(()=>{bn=!1},50)}function Wo(e){e.pointerType==="touch"&&ni()}function Ch(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Wo):document.addEventListener("touchend",ni),$r++,()=>{$r--,!($r>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Wo):document.removeEventListener("touchend",ni))}}function Le(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,a]=f.useState(!1),s=f.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;f.useEffect(Ch,[]);let{hoverProps:c,triggerHoverEnd:l}=f.useMemo(()=>{let u=(p,g)=>{if(s.pointerType=g,i||g==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let m=p.currentTarget;s.target=m,t&&t({type:"hoverstart",target:m,pointerType:g}),n&&n(!0),a(!0)},d=(p,g)=>{if(s.pointerType="",s.target=null,g==="touch"||!s.isHovered)return;s.isHovered=!1;let m=p.currentTarget;r&&r({type:"hoverend",target:m,pointerType:g}),n&&n(!1),a(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{bn&&p.pointerType==="mouse"||u(p,p.pointerType)},h.onPointerLeave=p=>{!i&&p.currentTarget.contains(p.target)&&d(p,p.pointerType)}):(h.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!s.ignoreEmulatedMouseEvents&&!bn&&u(p,"mouse"),s.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!i&&p.currentTarget.contains(p.target)&&d(p,"mouse")}),{hoverProps:h,triggerHoverEnd:d}},[t,n,r,i,s]);return f.useEffect(()=>{i&&l({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:c,isHovered:o}}function Ih(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=f.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=oe(c=>{n&&Qt(c,t)&&(i&&i(c),o.current.isPointerDown=!0)}),s=oe(c=>{n&&n(c)});f.useEffect(()=>{let c=o.current;if(r)return;const l=t.current,u=le(l);if(typeof PointerEvent<"u"){let d=h=>{c.isPointerDown&&Qt(h,t)&&s(h),c.isPointerDown=!1};return u.addEventListener("pointerdown",a,!0),u.addEventListener("pointerup",d,!0),()=>{u.removeEventListener("pointerdown",a,!0),u.removeEventListener("pointerup",d,!0)}}else{let d=p=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&Qt(p,t)&&s(p),c.isPointerDown=!1},h=p=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&Qt(p,t)&&s(p),c.isPointerDown=!1};return u.addEventListener("mousedown",a,!0),u.addEventListener("mouseup",d,!0),u.addEventListener("touchstart",a,!0),u.addEventListener("touchend",h,!0),()=>{u.removeEventListener("mousedown",a,!0),u.removeEventListener("mouseup",d,!0),u.removeEventListener("touchstart",a,!0),u.removeEventListener("touchend",h,!0)}}},[t,r,a,s])}function Qt(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function Zo(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function Rh(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Zo(e.onKeyDown),onKeyUp:Zo(e.onKeyUp)}}}const Lh=500;function Ah(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=Lh,accessibilityDescription:a}=e;const s=f.useRef();let{addGlobalListener:c,removeGlobalListener:l}=Bs(),{pressProps:u}=Ue({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),s.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...h,type:"longpress"}),s.current=void 0},o),h.pointerType==="touch")){let p=g=>{g.preventDefault()};c(h.target,"contextmenu",p,{once:!0}),c(window,"pointerup",()=>{setTimeout(()=>{l(h.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(h){s.current&&clearTimeout(s.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),d=lh(i&&!t?a:void 0);return{longPressProps:q(u,d)}}function Ge(e){const t=le(e);if(gn()==="virtual"){let n=t.activeElement;_s(()=>{t.activeElement===n&&e.isConnected&&Pe(e)})}else Pe(e)}function Mh(e){const t=me(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:a,visibility:s}=o(e);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function Fh(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Js(e,t){return e.nodeName!=="#comment"&&Mh(e)&&Fh(e,t)&&(!e.parentElement||Js(e.parentElement,e))}let kh=null;const ki=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Oh=ki.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ki.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Dh=ki.join(':not([hidden]):not([tabindex="-1"]),');function Oi(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function _h(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Xo.traverse(Xo.getTreeNode(t)))if(n&&Oi(e,n.current))return!0;return!1}function Bh(e){return _h(e,kh)}function Qs(e,t,n){let r=t?.tabbable?Dh:Oh,i=le(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(t==null||(a=t.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Js(o)&&(!n||Oi(o,n))&&(!t?.accept||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}class Di{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new qo({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Oi(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Di;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new qo({scopeRef:null}),this.fastMap.set(null,this.root)}}class qo{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Xo=new Di;function el(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=f.useRef({isFocused:!1,isFocusVisible:t||zn()}),[o,a]=f.useState(!1),[s,c]=f.useState(()=>i.current.isFocused&&i.current.isFocusVisible),l=f.useCallback(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=f.useCallback(p=>{i.current.isFocused=p,a(p),l()},[l]);Ys(p=>{i.current.isFocusVisible=p,l()},[],{isTextInput:n});let{focusProps:d}=Fi({isDisabled:r,onFocusChange:u}),{focusWithinProps:h}=Vt({isDisabled:!r,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:s,focusProps:r?h:d}}let tl=_.createContext(null);function Hh(e){let t=f.useContext(tl)||{};Ns(t,e);let{ref:n,...r}=t;return r}function Nh(e,t){let{children:n,...r}=e,i=ih(t),o={...r,ref:i};return _.createElement(tl.Provider,{value:o},n)}let jh=_.forwardRef(Nh);function Kt(e,t){let{focusProps:n}=Fi(e),{keyboardProps:r}=Rh(e),i=q(n,r),o=Hh(t),a=e.isDisabled?{}:o,s=f.useRef(e.autoFocus);return f.useEffect(()=>{s.current&&t.current&&Ge(t.current),s.current=!1},[t]),{focusableProps:q({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}const Vh=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Kh=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Uh(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Vh.has(n.script)}let t=e.split("-")[0];return Kh.has(t)}const zh=Symbol.for("react-aria.i18n.locale");function nl(){let e=typeof window<"u"&&window[zh]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Uh(e)?"rtl":"ltr"}}let ri=nl(),Ct=new Set;function Yo(){ri=nl();for(let e of Ct)e(ri)}function Gh(){let e=Ps(),[t,n]=f.useState(ri);return f.useEffect(()=>(Ct.size===0&&window.addEventListener("languagechange",Yo),Ct.add(n),()=>{Ct.delete(n),Ct.size===0&&window.removeEventListener("languagechange",Yo)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Wh=_.createContext(null);function bt(){let e=Gh();return f.useContext(Wh)||e}const Jo=new WeakMap;function Zh(e){let t=Jo.get(e);return t||(t=new jn(e),Jo.set(e,t)),t}function qh(e,t){return t&&jn.getGlobalDictionaryForPackage(t)||Zh(e)}function Xh(e,t){let{locale:n}=bt(),r=qh(e,t);return f.useMemo(()=>new Af(n,r),[n,r])}let Er=new Map;function Yh(e){let{locale:t}=bt(),n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Er.has(n))return Er.get(n);let r=new Intl.Collator(t,e);return Er.set(n,r),r}var ii=function(e,t){return ii=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ii(e,t)};function Gn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ii(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var j=function(){return j=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},j.apply(this,arguments)};function Jh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Sr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var B;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(B||(B={}));var Z;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Z||(Z={}));var vt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(vt||(vt={}));function Qo(e){return e.type===Z.literal}function Qh(e){return e.type===Z.argument}function rl(e){return e.type===Z.number}function il(e){return e.type===Z.date}function ol(e){return e.type===Z.time}function al(e){return e.type===Z.select}function sl(e){return e.type===Z.plural}function e0(e){return e.type===Z.pound}function ll(e){return e.type===Z.tag}function cl(e){return!!(e&&typeof e=="object"&&e.type===vt.number)}function oi(e){return!!(e&&typeof e=="object"&&e.type===vt.dateTime)}var ul=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,t0=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function n0(e){var t={};return e.replace(t0,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var r0=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function i0(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(r0).filter(function(h){return h.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],c=a.slice(1),l=0,u=c;l<u.length;l++){var d=u[l];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:c})}return n}function o0(e){return e.replace(/^(.*?)-/,"")}var ea=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,dl=/^(@+)?(\+|#+)?[rs]?$/g,a0=/(\*)(0+)|(#+)(0+)|(0+)/g,fl=/^(0+)$/;function ta(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(dl,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function hl(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function s0(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!fl.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function na(e){var t={},n=hl(e);return n||t}function l0(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o0(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=j(j(j({},t),{notation:"scientific"}),i.options.reduce(function(c,l){return j(j({},c),na(l))},{}));continue;case"engineering":t=j(j(j({},t),{notation:"engineering"}),i.options.reduce(function(c,l){return j(j({},c),na(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(a0,function(c,l,u,d,h,p){if(l)t.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(fl.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ea.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ea,function(c,l,u,d,h,p){return u==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&p?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=j(j({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=j(j({},t),ta(o)));continue}if(dl.test(i.stem)){t=j(j({},t),ta(i.stem));continue}var a=hl(i.stem);a&&(t=j(j({},t),a));var s=s0(i.stem);s&&(t=j(j({},t),s))}return t}var en={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function c0(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(o&1),s=o<2?1:3+(o>>1),c="a",l=u0(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=c;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function u0(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=en[r||""]||en[n||""]||en["".concat(n,"-001")]||en["001"];return i[0]}var Pr,d0=new RegExp("^".concat(ul.source,"*")),f0=new RegExp("".concat(ul.source,"*$"));function H(e,t){return{start:e,end:t}}var h0=!!String.prototype.startsWith&&"_a".startsWith("a",1),p0=!!String.fromCodePoint,v0=!!Object.fromEntries,m0=!!String.prototype.codePointAt,g0=!!String.prototype.trimStart,b0=!!String.prototype.trimEnd,y0=!!Number.isSafeInteger,x0=y0?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ai=!0;try{var w0=vl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ai=((Pr=w0.exec("a"))===null||Pr===void 0?void 0:Pr[0])==="a"}catch{ai=!1}var ra=h0?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},si=p0?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},ia=v0?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=s}return n},pl=m0?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},$0=g0?function(t){return t.trimStart()}:function(t){return t.replace(d0,"")},E0=b0?function(t){return t.trimEnd()}:function(t){return t.replace(f0,"")};function vl(e,t){return new RegExp(e,t)}var li;if(ai){var oa=vl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");li=function(t,n){var r;oa.lastIndex=n;var i=oa.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else li=function(t,n){for(var r=[];;){var i=pl(t,n);if(i===void 0||ml(i)||C0(i))break;r.push(i),n+=i>=65536?2:1}return si.apply(void 0,r)};var S0=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:Z.pound,location:H(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(B.UNMATCHED_CLOSING_TAG,H(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&ci(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Z.literal,value:"<".concat(i,"/>"),location:H(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ci(this.char()))return this.error(B.INVALID_TAG,H(s,this.clonePosition()));var c=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(B.UNMATCHED_CLOSING_TAG,H(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Z.tag,value:i,children:a,location:H(r,this.clonePosition())},err:null}:this.error(B.INVALID_TAG,H(s,this.clonePosition())))}else return this.error(B.UNCLOSED_TAG,H(r,this.clonePosition()))}else return this.error(B.INVALID_TAG,H(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&T0(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=H(r,this.clonePosition());return{val:{type:Z.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!P0(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return si.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),si(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE,H(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(B.EMPTY_ARGUMENT,H(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(B.MALFORMED_ARGUMENT,H(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE,H(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Z.argument,value:i,location:H(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE,H(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(B.MALFORMED_ARGUMENT,H(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=li(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),a=H(t,o);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(B.EXPECT_ARGUMENT_TYPE,H(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=E0(d.val);if(h.length===0)return this.error(B.EXPECT_ARGUMENT_STYLE,H(this.clonePosition(),this.clonePosition()));var p=H(u,this.clonePosition());l={style:h,styleLocation:p}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var m=H(i,this.clonePosition());if(l&&ra(l?.style,"::",0)){var x=$0(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(x,l.styleLocation);return d.err?d:{val:{type:Z.number,value:r,location:m,style:d.val},err:null}}else{if(x.length===0)return this.error(B.EXPECT_DATE_TIME_SKELETON,m);var $=x;this.locale&&($=c0(x,this.locale));var h={type:vt.dateTime,pattern:$,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?n0($):{}},y=s==="date"?Z.date:Z.time;return{val:{type:y,value:r,location:m,style:h},err:null}}}return{val:{type:s==="number"?Z.number:s==="date"?Z.date:Z.time,value:r,location:m,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(B.EXPECT_SELECT_ARGUMENT_OPTIONS,H(w,j({},w)));this.bumpSpace();var T=this.parseIdentifierIfPossible(),C=0;if(s!=="select"&&T.value==="offset"){if(!this.bumpIf(":"))return this.error(B.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(B.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,B.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),T=this.parseIdentifierIfPossible(),C=d.val}var L=this.tryParsePluralOrSelectOptions(t,s,n,T);if(L.err)return L;var g=this.tryParseArgumentClose(i);if(g.err)return g;var A=H(i,this.clonePosition());return s==="select"?{val:{type:Z.select,value:r,options:ia(L.val),location:A},err:null}:{val:{type:Z.plural,value:r,options:ia(L.val),offset:C,pluralType:s==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(B.INVALID_ARGUMENT_TYPE,H(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(B.EXPECT_ARGUMENT_CLOSING_BRACE,H(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(B.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,H(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=i0(t)}catch{return this.error(B.INVALID_NUMBER_SKELETON,n)}return{val:{type:vt.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?l0(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,a=!1,s=[],c=new Set,l=i.value,u=i.location;;){if(l.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(B.EXPECT_PLURAL_ARGUMENT_SELECTOR,B.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=H(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(n==="select"?B.DUPLICATE_SELECT_ARGUMENT_SELECTOR:B.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);l==="other"&&(a=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?B.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:B.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,H(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,r);if(g.err)return g;var m=this.tryParseArgumentClose(p);if(m.err)return m;s.push([l,{value:g.val,location:H(p,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,u=o.location}return s.length===0?this.error(n==="select"?B.EXPECT_SELECT_ARGUMENT_SELECTOR:B.EXPECT_PLURAL_ARGUMENT_SELECTOR,H(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(B.MISSING_OTHER_CLAUSE,H(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=H(i,this.clonePosition());return o?(a*=r,x0(a)?{val:a,err:null}:this.error(n,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=pl(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ra(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ml(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function ci(e){return e>=97&&e<=122||e>=65&&e<=90}function P0(e){return ci(e)||e===47}function T0(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function ml(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function C0(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ui(e){e.forEach(function(t){if(delete t.location,al(t)||sl(t))for(var n in t.options)delete t.options[n].location,ui(t.options[n].value);else rl(t)&&cl(t.style)||(il(t)||ol(t))&&oi(t.style)?delete t.style.location:ll(t)&&ui(t.children)})}function I0(e,t){t===void 0&&(t={}),t=j({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new S0(e,t).parse();if(n.err){var r=SyntaxError(B[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ui(n.val),n.val}function Tr(e,t){var n=t&&t.cache?t.cache:k0,r=t&&t.serializer?t.serializer:F0,i=t&&t.strategy?t.strategy:L0;return i(e,{cache:n,serializer:r})}function R0(e){return e==null||typeof e=="number"||typeof e=="boolean"}function gl(e,t,n,r){var i=R0(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function bl(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function _i(e,t,n,r,i){return n.bind(t,e,r,i)}function L0(e,t){var n=e.length===1?gl:bl;return _i(e,this,n,t.cache.create(),t.serializer)}function A0(e,t){return _i(e,this,bl,t.cache.create(),t.serializer)}function M0(e,t){return _i(e,this,gl,t.cache.create(),t.serializer)}var F0=function(){return JSON.stringify(arguments)};function Bi(){this.cache=Object.create(null)}Bi.prototype.get=function(e){return this.cache[e]};Bi.prototype.set=function(e,t){this.cache[e]=t};var k0={create:function(){return new Bi}},Cr={variadic:A0,monadic:M0},mt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(mt||(mt={}));var Wn=function(e){Gn(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),aa=function(e){Gn(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),mt.INVALID_VALUE,o)||this}return t}(Wn),O0=function(e){Gn(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),mt.INVALID_VALUE,i)||this}return t}(Wn),D0=function(e){Gn(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),mt.MISSING_VALUE,r)||this}return t}(Wn),ie;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ie||(ie={}));function _0(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==ie.literal||n.type!==ie.literal?t.push(n):r.value+=n.value,t},[])}function B0(e){return typeof e=="function"}function cn(e,t,n,r,i,o,a){if(e.length===1&&Qo(e[0]))return[{type:ie.literal,value:e[0].value}];for(var s=[],c=0,l=e;c<l.length;c++){var u=l[c];if(Qo(u)){s.push({type:ie.literal,value:u.value});continue}if(e0(u)){typeof o=="number"&&s.push({type:ie.literal,value:n.getNumberFormat(t).format(o)});continue}var d=u.value;if(!(i&&d in i))throw new D0(d,a);var h=i[d];if(Qh(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),s.push({type:typeof h=="string"?ie.literal:ie.object,value:h});continue}if(il(u)){var p=typeof u.style=="string"?r.date[u.style]:oi(u.style)?u.style.parsedOptions:void 0;s.push({type:ie.literal,value:n.getDateTimeFormat(t,p).format(h)});continue}if(ol(u)){var p=typeof u.style=="string"?r.time[u.style]:oi(u.style)?u.style.parsedOptions:r.time.medium;s.push({type:ie.literal,value:n.getDateTimeFormat(t,p).format(h)});continue}if(rl(u)){var p=typeof u.style=="string"?r.number[u.style]:cl(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(h=h*(p.scale||1)),s.push({type:ie.literal,value:n.getNumberFormat(t,p).format(h)});continue}if(ll(u)){var g=u.children,m=u.value,x=i[m];if(!B0(x))throw new O0(m,"function",a);var $=cn(g,t,n,r,i,o),y=x($.map(function(C){return C.value}));Array.isArray(y)||(y=[y]),s.push.apply(s,y.map(function(C){return{type:typeof C=="string"?ie.literal:ie.object,value:C}}))}if(al(u)){var w=u.options[h]||u.options.other;if(!w)throw new aa(u.value,h,Object.keys(u.options),a);s.push.apply(s,cn(w.value,t,n,r,i));continue}if(sl(u)){var w=u.options["=".concat(h)];if(!w){if(!Intl.PluralRules)throw new Wn(`Intl.PluralRules is not available in this environment.
|
|
351
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
352
|
+
`,mt.MISSING_INTL_API,a);var T=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));w=u.options[T]||u.options.other}if(!w)throw new aa(u.value,h,Object.keys(u.options),a);s.push.apply(s,cn(w.value,t,n,r,i,h-(u.offset||0)));continue}}return _0(s)}function H0(e,t){return t?j(j(j({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=j(j({},e[r]),t[r]||{}),n},{})):e}function N0(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=H0(e[r],t[r]),n},j({},e)):e}function Ir(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function j0(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Tr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Sr([void 0],n,!1)))},{cache:Ir(e.number),strategy:Cr.variadic}),getDateTimeFormat:Tr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Sr([void 0],n,!1)))},{cache:Ir(e.dateTime),strategy:Cr.variadic}),getPluralRules:Tr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Sr([void 0],n,!1)))},{cache:Ir(e.pluralRules),strategy:Cr.variadic})}}var V0=function(){function e(t,n,r,i){var o=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var l=o.formatToParts(c);if(l.length===1)return l[0].value;var u=l.reduce(function(d,h){return!d.length||h.type!==ie.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(c){return cn(o.ast,o.locales,o.formatters,o.formats,c,void 0,o.message)},this.resolvedOptions=function(){var c;return{locale:((c=o.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=Jh(a,["formatters"]);this.ast=e.__parse(t,j(j({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=N0(e.formats,r),this.formatters=i&&i.formatters||j0(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=I0,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();class K0{getStringForLocale(t,n){let r=this.messages[n];r||(r=U0(n,this.messages,this.defaultLocale),this.messages[n]=r);let i=r[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}constructor(t,n="en-US"){this.messages={...t},this.defaultLocale=n}}function U0(e,t,n="en-US"){if(t[e])return t[e];let r=z0(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function z0(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}class G0{format(t,n){let r=this.cache[t];if(!r){let o=this.messages.getStringForLocale(t,this.locale);if(!o)throw new Error(`Could not find intl message ${t} in ${this.locale} locale`);r=new V0(o,this.locale),this.cache[t]=r}let i;return n&&(i=Object.keys(n).reduce((o,a)=>(o[a]=n[a]==null?!1:n[a],o),{})),r.format(i)}constructor(t,n){this.locale=t,this.messages=n,this.cache={}}}const sa=new WeakMap;function W0(e){let t=sa.get(e);return t||(t=new K0(e),sa.set(e,t)),t}function Z0(e){let{locale:t}=bt(),n=f.useMemo(()=>W0(e),[e]),r=f.useMemo(()=>new G0(t,n),[t,n]);return f.useCallback((i,o)=>r.format(i,o),[r])}function q0(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:a,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:h,target:p,rel:g,type:m="button"}=e,x;n==="button"?x={type:m,disabled:r}:x={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:h,target:n==="a"?p:void 0,type:n==="input"?m:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:$,isPressed:y}=Ue({onPressStart:o,onPressEnd:a,onPressChange:c,onPress:i,onPressUp:s,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:w}=Kt(e,t);u&&(w.tabIndex=r?-1:w.tabIndex);let T=q(w,$,qe(e,{labelable:!0}));return{isPressed:y,buttonProps:q(x,T,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:C=>{d&&(d(C),console.warn("onClick is deprecated, please use onPress"))}})}}function yl(e,t,n){let{validationBehavior:r,focus:i}=e;ce(()=>{if(r==="native"&&n?.current){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(c),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(Y0(n.current))}});let o=oe(()=>{t.resetValidation()}),a=oe(c=>{var l;t.displayValidation.isInvalid||t.commitValidation();let u=n==null||(l=n.current)===null||l===void 0?void 0:l.form;if(!c.defaultPrevented&&n&&u&&J0(u)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),Eh("keyboard")}c.preventDefault()}),s=oe(()=>{t.commitValidation()});f.useEffect(()=>{let c=n?.current;if(!c)return;let l=c.form;return c.addEventListener("invalid",a),c.addEventListener("change",s),l?.addEventListener("reset",o),()=>{c.removeEventListener("invalid",a),c.removeEventListener("change",s),l?.removeEventListener("reset",o)}},[n,a,s,o,r])}function X0(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function Y0(e){return{isInvalid:!e.validity.valid,validationDetails:X0(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function J0(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function Q0(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:o,name:a,children:s,"aria-label":c,"aria-labelledby":l,validationState:u="valid",isInvalid:d}=e,h=L=>{L.stopPropagation(),t.setSelected(L.target.checked)},p=s!=null,g=c!=null||l!=null;!p&&!g&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:x}=Ue({isDisabled:r}),{pressProps:$,isPressed:y}=Ue({isDisabled:r||i,onPress(){t.toggle()}}),{focusableProps:w}=Kt(e,n),T=q(m,w),C=qe(e,{labelable:!0});return Vs(n,t.isSelected,t.setSelected),{labelProps:q($,{onClick:L=>L.preventDefault()}),inputProps:q(C,{"aria-invalid":d||u==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:h,disabled:r,...o==null?{}:{value:o},name:a,type:"checkbox",...T}),isSelected:t.isSelected,isPressed:x||y,isDisabled:r,isReadOnly:i,isInvalid:d||u==="invalid"}}function ep(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=pt(t);let a=pt(),s={};n?(r=r?`${a} ${r}`:a,s={id:a,htmlFor:o==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Hs({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}function xl(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:o,fieldProps:a}=ep(e),s=qr([!!t,!!n,r,i]),c=qr([!!t,!!n,r,i]);return a=q(a,{"aria-describedby":[s,c,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:a,descriptionProps:{id:s},errorMessageProps:{id:c}}}function wl(e,t,n){let r=Nn({...e,value:t.isSelected}),{isInvalid:i,validationErrors:o,validationDetails:a}=r.displayValidation,{labelProps:s,inputProps:c,isSelected:l,isPressed:u,isDisabled:d,isReadOnly:h}=Q0({...e,isInvalid:i},t,n);yl(e,r,n);let{isIndeterminate:p,isRequired:g,validationBehavior:m="aria"}=e;return f.useEffect(()=>{n.current&&(n.current.indeterminate=!!p)}),{labelProps:s,inputProps:{...c,checked:l,"aria-required":g&&m==="aria"||void 0,required:g&&m==="native"},isSelected:l,isPressed:u,isDisabled:d,isReadOnly:h,isInvalid:i,validationErrors:o,validationDetails:a}}const $l=new WeakMap;function tp(e,t){let{isDisabled:n,name:r,validationBehavior:i="aria"}=e,{isInvalid:o,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:c,fieldProps:l,descriptionProps:u,errorMessageProps:d}=xl({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||a});$l.set(t,{name:r,descriptionId:u.id,errorMessageId:d.id,validationBehavior:i});let h=qe(e,{labelable:!0}),{focusWithinProps:p}=Vt({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:q(h,{role:"group","aria-disabled":n||void 0,...l,...p}),labelProps:c,descriptionProps:u,errorMessageProps:d,isInvalid:o,validationErrors:a,validationDetails:s}}function np(e,t,n){const r=As({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(x){x?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(x)}});let{name:i,descriptionId:o,errorMessageId:a,validationBehavior:s}=$l.get(t);var c;s=(c=e.validationBehavior)!==null&&c!==void 0?c:s;let{realtimeValidation:l}=Nn({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),u=f.useRef(rt),d=()=>{t.setInvalid(e.value,l.isInvalid?l:u.current)};f.useEffect(d);let h=t.realtimeValidation.isInvalid?t.realtimeValidation:l,p=s==="native"?t.displayValidation:h;var g;let m=wl({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(g=e.isRequired)!==null&&g!==void 0?g:t.isRequired,validationBehavior:s,[Wr]:{realtimeValidation:h,displayValidation:p,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(x){u.current=x,d()}}},r,n);return{...m,inputProps:{...m.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,o].filter(Boolean).join(" ")||void 0}}}var El={};El={dismiss:"تجاهل"};var Sl={};Sl={dismiss:"Отхвърляне"};var Pl={};Pl={dismiss:"Odstranit"};var Tl={};Tl={dismiss:"Luk"};var Cl={};Cl={dismiss:"Schließen"};var Il={};Il={dismiss:"Απόρριψη"};var Rl={};Rl={dismiss:"Dismiss"};var Ll={};Ll={dismiss:"Descartar"};var Al={};Al={dismiss:"Lõpeta"};var Ml={};Ml={dismiss:"Hylkää"};var Fl={};Fl={dismiss:"Rejeter"};var kl={};kl={dismiss:"התעלם"};var Ol={};Ol={dismiss:"Odbaci"};var Dl={};Dl={dismiss:"Elutasítás"};var _l={};_l={dismiss:"Ignora"};var Bl={};Bl={dismiss:"閉じる"};var Hl={};Hl={dismiss:"무시"};var Nl={};Nl={dismiss:"Atmesti"};var jl={};jl={dismiss:"Nerādīt"};var Vl={};Vl={dismiss:"Lukk"};var Kl={};Kl={dismiss:"Negeren"};var Ul={};Ul={dismiss:"Zignoruj"};var zl={};zl={dismiss:"Descartar"};var Gl={};Gl={dismiss:"Dispensar"};var Wl={};Wl={dismiss:"Revocare"};var Zl={};Zl={dismiss:"Пропустить"};var ql={};ql={dismiss:"Zrušiť"};var Xl={};Xl={dismiss:"Opusti"};var Yl={};Yl={dismiss:"Odbaci"};var Jl={};Jl={dismiss:"Avvisa"};var Ql={};Ql={dismiss:"Kapat"};var ec={};ec={dismiss:"Скасувати"};var tc={};tc={dismiss:"取消"};var nc={};nc={dismiss:"關閉"};const la={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function rp(e={}){let{style:t,isFocusable:n}=e,[r,i]=f.useState(!1),{focusWithinProps:o}=Vt({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=f.useMemo(()=>r?t:t?{...la,...t}:la,[r]);return{visuallyHiddenProps:{...o,style:a}}}function ip(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...o}=e,{visuallyHiddenProps:a}=rp(e);return _.createElement(n,q(o,a),t)}function op(e){return e&&e.__esModule?e.default:e}const lt={top:"top",bottom:"top",left:"left",right:"left"},yn={top:"bottom",bottom:"top",left:"right",right:"left"},ap={top:"left",left:"top"},di={top:"height",left:"width"},rc={width:"totalWidth",height:"totalHeight"},tn={};let se=typeof document<"u"&&window.visualViewport;function ca(e){let t=0,n=0,r=0,i=0,o=0,a=0,s={},c=se?.scale>1;if(e.tagName==="BODY"){let d=document.documentElement;r=d.clientWidth,i=d.clientHeight;var l;t=(l=se?.width)!==null&&l!==void 0?l:r;var u;n=(u=se?.height)!==null&&u!==void 0?u:i,s.top=d.scrollTop||e.scrollTop,s.left=d.scrollLeft||e.scrollLeft,se&&(o=se.offsetTop,a=se.offsetLeft)}else({width:t,height:n,top:o,left:a}=dt(e)),s.top=e.scrollTop,s.left=e.scrollLeft,r=t,i=n;return ks()&&(e.tagName==="BODY"||e.tagName==="HTML")&&c&&(s.top=0,s.left=0,o=se.pageTop,a=se.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function sp(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ua(e,t,n,r,i,o,a){let s=i.scroll[e],c=r[di[e]],l=r.scroll[lt[e]]+o,u=c+r.scroll[lt[e]]-o,d=t-s+a[e]-r[lt[e]],h=t-s+n+a[e]-r[lt[e]];return d<l?l-d:h>u?Math.max(u-h,l-d):0}function lp(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function da(e){if(tn[e])return tn[e];let[t,n]=e.split(" "),r=lt[t]||"right",i=ap[r];lt[n]||(n="center");let o=di[r],a=di[i];return tn[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},tn[e]}function Rr(e,t,n,r,i,o,a,s,c,l){let{placement:u,crossPlacement:d,axis:h,crossAxis:p,size:g,crossSize:m}=r,x={};x[p]=e[p],d==="center"?x[p]+=(e[m]-n[m])/2:d!==p&&(x[p]+=e[m]-n[m]),x[p]+=o;const $=e[p]-n[m]+c+l,y=e[p]+e[m]-c-l;if(x[p]=Gr(x[p],$,y),u===h){const w=s?a[g]:t[rc[g]];x[yn[h]]=Math.floor(w-e[h]+i)}else x[h]=Math.floor(e[h]+e[g]+i);return x}function cp(e,t,n,r,i,o,a,s){const c=r?n.height:t[rc.height];let l=e.top!=null?n.top+e.top:n.top+(c-e.bottom-a),u=s!=="top"?Math.max(0,t.height+t.top+t.scroll.top-l-(i.top+i.bottom+o)):Math.max(0,l+a-(t.top+t.scroll.top)-(i.top+i.bottom+o));return Math.min(t.height-o*2,u)}function fa(e,t,n,r,i,o){let{placement:a,axis:s,size:c}=o;return a===s?Math.max(0,n[s]-e[s]-e.scroll[s]+t[s]-r[s]-r[yn[s]]-i):Math.max(0,e[c]+e[s]+e.scroll[s]-t[s]-n[s]-n[c]-r[s]-r[yn[s]]-i)}function up(e,t,n,r,i,o,a,s,c,l,u,d,h,p,g,m){let x=da(e),{size:$,crossAxis:y,crossSize:w,placement:T,crossPlacement:C}=x,L=Rr(t,s,n,x,u,d,l,h,g,m),A=u,b=fa(s,l,t,i,o+u,x);if(a&&r[$]>b){let ne=da(`${yn[T]} ${C}`),O=Rr(t,s,n,ne,u,d,l,h,g,m);fa(s,l,t,i,o+u,ne)>b&&(x=ne,L=O,A=u)}let R="bottom";x.axis==="top"?x.placement==="top"?R="top":x.placement==="bottom"&&(R="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?R="bottom":x.crossPlacement==="bottom"&&(R="top"));let E=ua(y,L[y],n[w],s,c,o,l);L[y]+=E;let P=cp(L,s,l,h,i,o,n.height,R);p&&p<P&&(P=p),n.height=Math.min(n.height,P),L=Rr(t,s,n,x,A,d,l,h,g,m),E=ua(y,L[y],n[w],s,c,o,l),L[y]+=E;let F={},S=t[y]+.5*t[w]-n[y];const I=g/2+m,D=n[w]-g/2-m,Q=t[y]-n[y]+g/2,M=t[y]+t[w]-n[y]-g/2,pe=Gr(S,Q,M);return F[y]=Gr(pe,I,D),{position:L,maxHeight:P,arrowOffsetLeft:F.left,arrowOffsetTop:F.top,placement:x.placement}}function dp(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:c,crossOffset:l,maxHeight:u,arrowSize:d=0,arrowBoundaryOffset:h=0}=e,p=r instanceof HTMLElement?fp(r):document.documentElement,g=p===document.documentElement;const m=window.getComputedStyle(p).position;let x=!!m&&m!=="static",$=g?dt(n):ha(n,p);if(!g){let{marginTop:b,marginLeft:R}=window.getComputedStyle(n);$.top+=parseInt(b,10)||0,$.left+=parseInt(R,10)||0}let y=dt(r),w=lp(r);y.width+=w.left+w.right,y.height+=w.top+w.bottom;let T=sp(i),C=ca(s),L=ca(p),A=s.tagName==="BODY"?dt(p):ha(p,s);return p.tagName==="HTML"&&s.tagName==="BODY"&&(L.scroll.top=0,L.scroll.left=0),up(t,$,y,T,w,o,a,C,L,A,c,l,x,u,d,h)}function dt(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:c}=document.documentElement;return{top:t+o-s,left:n+a-c,width:r,height:i}}function ha(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=e.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=dt(e);let i=dt(t),o=window.getComputedStyle(t);i.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function fp(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!pa(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!pa(t);)t=t.parentElement;return t||document.documentElement}function pa(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const hp=new WeakMap;function pp(e){let{triggerRef:t,isOpen:n,onClose:r}=e;f.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!t.current||a instanceof Node&&!a.contains(t.current))return;let s=r||hp.get(t.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let X=typeof document<"u"&&window.visualViewport;function vp(e){let{direction:t}=bt(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:c=!0,boundaryElement:l=typeof document<"u"?document.body:null,offset:u=0,crossOffset:d=0,shouldUpdatePosition:h=!0,isOpen:p=!0,onClose:g,maxHeight:m,arrowBoundaryOffset:x=0}=e,[$,y]=f.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),w=[h,a,i.current,r.current,o.current,s,c,l,u,d,p,t,m,x,n],T=f.useRef(X?.scale);f.useEffect(()=>{p&&(T.current=X?.scale)},[p]);let C=f.useCallback(()=>{if(h===!1||!p||!i.current||!r.current||!o.current||!l||X?.scale!==T.current)return;!m&&i.current&&(i.current.style.maxHeight="none");let b=dp({placement:gp(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current,padding:s,shouldFlip:c,boundaryElement:l,offset:u,crossOffset:d,maxHeight:m,arrowSize:n,arrowBoundaryOffset:x});Object.keys(b.position).forEach(R=>i.current.style[R]=b.position[R]+"px"),i.current.style.maxHeight=b.maxHeight!=null?b.maxHeight+"px":void 0,y(b)},w);ce(C,w),mp(C),ah({ref:i,onResize:C});let L=f.useRef(!1);ce(()=>{let b,R=()=>{L.current=!0,clearTimeout(b),b=setTimeout(()=>{L.current=!1},500),C()},E=()=>{L.current&&R()};return X?.addEventListener("resize",R),X?.addEventListener("scroll",E),()=>{X?.removeEventListener("resize",R),X?.removeEventListener("scroll",E)}},[C]);let A=f.useCallback(()=>{L.current||g()},[g,L]);return pp({triggerRef:r,isOpen:p,onClose:g&&A}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...$.position,maxHeight:$.maxHeight}},placement:$.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$.arrowOffsetLeft,top:$.arrowOffsetTop}},updatePosition:C}}function mp(e){ce(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function gp(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const Se=[];function bp(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;f.useEffect(()=>(i&&Se.push(t),()=>{let g=Se.indexOf(t);g>=0&&Se.splice(g,1)}),[i,t]);let c=()=>{Se[Se.length-1]===t&&n&&n()},l=g=>{(!s||s(g.target))&&Se[Se.length-1]===t&&(g.stopPropagation(),g.preventDefault())},u=g=>{(!s||s(g.target))&&(Se[Se.length-1]===t&&(g.stopPropagation(),g.preventDefault()),c())},d=g=>{g.key==="Escape"&&!a&&(g.stopPropagation(),g.preventDefault(),c())};Ih({ref:t,onInteractOutside:o&&i?u:null,onInteractOutsideStart:l});let{focusWithinProps:h}=Vt({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||Bh(g.relatedTarget)||(!s||s(g.relatedTarget))&&n()}}),p=g=>{g.target===g.currentTarget&&g.preventDefault()};return{overlayProps:{onKeyDown:d,...h},underlayProps:{onPointerDown:p}}}const Lr=typeof document<"u"&&window.visualViewport,yp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let nn=0,Ar;function xp(e={}){let{isDisabled:t}=e;ce(()=>{if(!t)return nn++,nn===1&&(Kn()?Ar=$p():Ar=wp()),()=>{nn--,nn===0&&Ar()}},[t])}function wp(){return kt(ct(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ct(document.documentElement,"overflow","hidden"))}function $p(){let e,t,n=l=>{e=pn(l.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=ct(e,"overscrollBehavior","contain"))},r=l=>{if(!e||e===document.documentElement||e===document.body){l.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&l.preventDefault()},i=l=>{let u=l.target;ma(u)&&u!==document.activeElement&&(l.preventDefault(),s(),u.style.transform="translateY(-2000px)",u.focus(),requestAnimationFrame(()=>{u.style.transform=""})),t&&t()},o=l=>{let u=l.target;ma(u)&&(s(),u.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{u.style.transform="",Lr&&(Lr.height<window.innerHeight?requestAnimationFrame(()=>{va(u)}):Lr.addEventListener("resize",()=>va(u),{once:!0}))}))},a=null,s=()=>{if(a)return;let l=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset;a=kt($t(window,"scroll",l),ct(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),ct(document.documentElement,"overflow","hidden"),ct(document.body,"marginTop",`-${d}px`),()=>{window.scrollTo(u,d)}),window.scrollTo(0,0)},c=kt($t(document,"touchstart",n,{passive:!1,capture:!0}),$t(document,"touchmove",r,{passive:!1,capture:!0}),$t(document,"touchend",i,{passive:!1,capture:!0}),$t(document,"focus",o,!0));return()=>{t?.(),a?.(),c()}}function ct(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function $t(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function va(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=pn(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function ma(e){return e instanceof HTMLInputElement&&!yp.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const fi=_.createContext(null);function Ep(e){let{children:t}=e,n=f.useContext(fi),[r,i]=f.useState(0),o=f.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return _.createElement(fi.Provider,{value:o},t)}function Sp(e){let t=f.useContext(fi);if(!t)throw new Error("Modal is not contained within a provider");return f.useEffect(()=>{if(!(e?.isDisabled||!t||!t.parent))return t.parent.addModal(),()=>{t&&t.parent&&t.parent.removeModal()}},[t,t.parent,e?.isDisabled]),{modalProps:{"data-ismodal":!e?.isDisabled}}}var ic={};ic={"ar-AE":El,"bg-BG":Sl,"cs-CZ":Pl,"da-DK":Tl,"de-DE":Cl,"el-GR":Il,"en-US":Rl,"es-ES":Ll,"et-EE":Al,"fi-FI":Ml,"fr-FR":Fl,"he-IL":kl,"hr-HR":Ol,"hu-HU":Dl,"it-IT":_l,"ja-JP":Bl,"ko-KR":Hl,"lt-LT":Nl,"lv-LV":jl,"nb-NO":Vl,"nl-NL":Kl,"pl-PL":Ul,"pt-BR":zl,"pt-PT":Gl,"ro-RO":Wl,"ru-RU":Zl,"sk-SK":ql,"sl-SI":Xl,"sr-SP":Yl,"sv-SE":Jl,"tr-TR":Ql,"uk-UA":ec,"zh-CN":tc,"zh-TW":nc};function Pp(e){let{onDismiss:t,...n}=e,r=Xh(op(ic),"@react-aria/overlays"),i=Hs(n,r.format("dismiss")),o=()=>{t&&t()};return _.createElement(ip,null,_.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}const Tp=_.createContext(null);function Cp(){let e=f.useContext(Tp),t=e?.setContain;ce(()=>{t?.(!0)},[t])}function hi(e){return Jf()?e.altKey:e.ctrlKey}function ot(e){return Ve()?e.metaKey:e.ctrlKey}const Ip=1e3;function Rp(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=f.useRef({search:"",timeout:null}).current,o=a=>{let s=Lp(a.key);if(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))return;s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s;let c=t.getKeyForSearch(i.search,n.focusedKey);c==null&&(c=t.getKeyForSearch(i.search)),c!=null&&(n.setFocusedKey(c),r&&r(c)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Ip)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:null}}}function Lp(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Ap(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:l=!1,shouldUseVirtualFocus:u,allowsTabNavigation:d=!1,isVirtualized:h,scrollRef:p=r,linkBehavior:g="action"}=e,{direction:m}=bt(),x=Ds(),$=E=>{if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!r.current.contains(E.target))return;const P=(O,de)=>{if(O!=null){if(t.isLink(O)&&g==="selection"&&c&&!hi(E)){$i.flushSync(()=>{t.setFocusedKey(O,de)});let ge=p.current.querySelector(`[data-key="${CSS.escape(O.toString())}"]`);x.open(ge,E);return}if(t.setFocusedKey(O,de),t.isLink(O)&&g==="override")return;E.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):c&&!hi(E)&&t.replaceSelection(O)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var F,S;E.preventDefault();let O=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):(F=n.getFirstKey)===null||F===void 0?void 0:F.call(n);O==null&&o&&(O=(S=n.getFirstKey)===null||S===void 0?void 0:S.call(n,t.focusedKey)),P(O)}break;case"ArrowUp":if(n.getKeyAbove){var I,D;E.preventDefault();let O=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):(I=n.getLastKey)===null||I===void 0?void 0:I.call(n);O==null&&o&&(O=(D=n.getLastKey)===null||D===void 0?void 0:D.call(n,t.focusedKey)),P(O)}break;case"ArrowLeft":if(n.getKeyLeftOf){var Q,M;E.preventDefault();let O=n.getKeyLeftOf(t.focusedKey);O==null&&o&&(O=m==="rtl"?(Q=n.getFirstKey)===null||Q===void 0?void 0:Q.call(n,t.focusedKey):(M=n.getLastKey)===null||M===void 0?void 0:M.call(n,t.focusedKey)),P(O,m==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var pe,ne;E.preventDefault();let O=n.getKeyRightOf(t.focusedKey);O==null&&o&&(O=m==="rtl"?(pe=n.getLastKey)===null||pe===void 0?void 0:pe.call(n,t.focusedKey):(ne=n.getFirstKey)===null||ne===void 0?void 0:ne.call(n,t.focusedKey)),P(O,m==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){E.preventDefault();let O=n.getFirstKey(t.focusedKey,ot(E));t.setFocusedKey(O),ot(E)&&E.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):c&&t.replaceSelection(O)}break;case"End":if(n.getLastKey){E.preventDefault();let O=n.getLastKey(t.focusedKey,ot(E));t.setFocusedKey(O),ot(E)&&E.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):c&&t.replaceSelection(O)}break;case"PageDown":if(n.getKeyPageBelow){E.preventDefault();let O=n.getKeyPageBelow(t.focusedKey);P(O)}break;case"PageUp":if(n.getKeyPageAbove){E.preventDefault();let O=n.getKeyPageAbove(t.focusedKey);P(O)}break;case"a":ot(E)&&t.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),t.selectAll());break;case"Escape":E.preventDefault(),a||t.clearSelection();break;case"Tab":if(!d){if(E.shiftKey)r.current.focus();else{let O=Qs(r.current,{tabbable:!0}),de,ge;do ge=O.lastChild(),ge&&(de=ge);while(ge);de&&!de.contains(document.activeElement)&&Pe(de)}break}}},y=f.useRef({top:0,left:0});ch(p,"scroll",h?null:()=>{y.current={top:p.current.scrollTop,left:p.current.scrollLeft}});let w=E=>{if(t.isFocused){E.currentTarget.contains(E.target)||t.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(t.setFocused(!0),t.focusedKey==null){let S=D=>{D!=null&&(t.setFocusedKey(D),c&&t.replaceSelection(D))},I=E.relatedTarget;var P,F;I&&E.currentTarget.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING?S((P=t.lastSelectedKey)!==null&&P!==void 0?P:n.getLastKey()):S((F=t.firstSelectedKey)!==null&&F!==void 0?F:n.getFirstKey())}else h||(p.current.scrollTop=y.current.top,p.current.scrollLeft=y.current.left);if(!h&&t.focusedKey!=null){let S=p.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);S&&(S.contains(document.activeElement)||Pe(S),gn()==="keyboard"&&jo(S,{containingElement:r.current}))}}},T=E=>{E.currentTarget.contains(E.relatedTarget)||t.setFocused(!1)};const C=f.useRef(i);f.useEffect(()=>{if(C.current){let E=null;i==="first"&&(E=n.getFirstKey()),i==="last"&&(E=n.getLastKey());let P=t.selectedKeys;if(P.size){for(let F of P)if(t.canSelectItem(F)){E=F;break}}t.setFocused(!0),t.setFocusedKey(E),E==null&&!u&&Ge(r.current)}},[]);let L=f.useRef(t.focusedKey);f.useEffect(()=>{let E=gn();if(t.isFocused&&t.focusedKey!=null&&p?.current){let P=p.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);P&&(E==="keyboard"||C.current)&&(h||js(p.current,P),E!=="virtual"&&jo(P,{containingElement:r.current}))}t.isFocused&&t.focusedKey==null&&L.current!=null&&Ge(r.current),L.current=t.focusedKey,C.current=!1},[h,p,t.focusedKey,t.isFocused,r]);let A={onKeyDown:$,onFocus:w,onBlur:T,onMouseDown(E){p.current===E.target&&E.preventDefault()}},{typeSelectProps:b}=Rp({keyboardDelegate:n,selectionManager:t});l||(A=q(b,A));let R;return u||(R=t.focusedKey==null?0:-1),{collectionProps:{...A,tabIndex:R}}}function Mp(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:o,focus:a,isDisabled:s,onAction:c,allowsDifferentPressOrigin:l,linkBehavior:u="action"}=e,d=Ds(),h=M=>{if(M.pointerType==="keyboard"&&hi(M))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(u==="selection"){d.open(r.current,M),t.setSelectedKeys(t.selectedKeys);return}else if(u==="override"||u==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):M&&M.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||M&&(ot(M)||M.pointerType==="touch"||M.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};f.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!o&&(a?a():document.activeElement!==r.current&&Ge(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,o]),s=s||t.isDisabled(n);let p={};!o&&!s?p={tabIndex:n===t.focusedKey?0:-1,onFocus(M){M.target===r.current&&t.setFocusedKey(n)}}:s&&(p.onMouseDown=M=>{M.preventDefault()});let g=t.isLink(n)&&u==="override",m=t.isLink(n)&&u!=="selection"&&u!=="none",x=!s&&t.canSelectItem(n)&&!g,$=(c||m)&&!s,y=$&&(t.selectionBehavior==="replace"?!x:!x||t.isEmpty),w=$&&x&&t.selectionBehavior==="replace",T=y||w,C=f.useRef(null),L=T&&x,A=f.useRef(!1),b=f.useRef(!1),R=M=>{c&&c(),m&&d.open(r.current,M)},E={};i?(E.onPressStart=M=>{C.current=M.pointerType,A.current=L,M.pointerType==="keyboard"&&(!T||ba())&&h(M)},l?(E.onPressUp=y?null:M=>{M.pointerType!=="keyboard"&&x&&h(M)},E.onPress=y?R:null):E.onPress=M=>{if(y||w&&M.pointerType!=="mouse"){if(M.pointerType==="keyboard"&&!ga())return;R(M)}else M.pointerType!=="keyboard"&&x&&h(M)}):(E.onPressStart=M=>{C.current=M.pointerType,A.current=L,b.current=y,x&&(M.pointerType==="mouse"&&!y||M.pointerType==="keyboard"&&(!$||ba()))&&h(M)},E.onPress=M=>{(M.pointerType==="touch"||M.pointerType==="pen"||M.pointerType==="virtual"||M.pointerType==="keyboard"&&T&&ga()||M.pointerType==="mouse"&&b.current)&&(T?R(M):x&&h(M))}),p["data-key"]=n,E.preventFocusOnPress=o;let{pressProps:P,isPressed:F}=Ue(E),S=w?M=>{C.current==="mouse"&&(M.stopPropagation(),M.preventDefault(),R(M))}:void 0,{longPressProps:I}=Ah({isDisabled:!L,onLongPress(M){M.pointerType==="touch"&&(h(M),t.setSelectionBehavior("toggle"))}}),D=M=>{C.current==="touch"&&A.current&&M.preventDefault()},Q=t.isLink(n)?M=>{Ke.isOpening||M.preventDefault()}:void 0;return{itemProps:q(p,x||y?P:{},L?I:{},{onDoubleClick:S,onDragStartCapture:D,onClick:Q}),isPressed:F,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:s,allowsSelection:x,hasAction:T}}function ga(){let e=window.event;return e?.key==="Enter"}function ba(){let e=window.event;return e?.key===" "||e?.code==="Space"}class Fp{getNextKey(t){for(t=this.collection.getKeyAfter(t);t!=null;){if(this.collection.getItem(t).type==="item"&&!this.disabledKeys.has(t))return t;t=this.collection.getKeyAfter(t)}return null}getPreviousKey(t){for(t=this.collection.getKeyBefore(t);t!=null;){if(this.collection.getItem(t).type==="item"&&!this.disabledKeys.has(t))return t;t=this.collection.getKeyBefore(t)}return null}findKey(t,n,r){let i=this.getItem(t);if(!i)return null;let o=i.getBoundingClientRect();do t=n(t),i=this.getItem(t);while(i&&r(o,i.getBoundingClientRect()));return t}isSameRow(t,n){return t.top===n.top||t.left!==n.left}isSameColumn(t,n){return t.left===n.left||t.top!==n.top}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();for(;t!=null;){let n=this.collection.getItem(t);if(n?.type==="item"&&!this.disabledKeys.has(t))return t;t=this.collection.getKeyAfter(t)}return null}getLastKey(){let t=this.collection.getLastKey();for(;t!=null;){if(this.collection.getItem(t).type==="item"&&!this.disabledKeys.has(t))return t;t=this.collection.getKeyBefore(t)}return null}getItem(t){return this.ref.current.querySelector(`[data-key="${CSS.escape(t.toString())}"]`)}getKeyPageAbove(t){let n=this.ref.current,r=this.getItem(t);if(!r)return null;if(!vn(n))return this.getFirstKey();let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();if(this.orientation==="horizontal"){let a=i.x-n.scrollLeft,s=Math.max(0,o.x-a+o.width-i.width);for(;r&&o.x-a>s;)t=this.getKeyAbove(t),r=t==null?null:this.getItem(t),o=r?.getBoundingClientRect()}else{let a=i.y-n.scrollTop,s=Math.max(0,o.y-a+o.height-i.height);for(;r&&o.y-a>s;)t=this.getKeyAbove(t),r=t==null?null:this.getItem(t),o=r?.getBoundingClientRect()}return t??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.getItem(t);if(!r)return null;if(!vn(n))return this.getLastKey();let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();if(this.orientation==="horizontal"){let a=i.x-n.scrollLeft,s=Math.min(n.scrollWidth,o.x-a-o.width+i.width);for(;r&&o.x-a<s;)t=this.getKeyBelow(t),r=t==null?null:this.getItem(t),o=r?.getBoundingClientRect()}else{let a=i.y-n.scrollTop,s=Math.min(n.scrollHeight,o.y-a-o.height+i.height);for(;r&&o.y-a<s;)t=this.getKeyBelow(t),r=t==null?null:this.getItem(t),o=r?.getBoundingClientRect()}return t??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i),a=o.textValue.slice(0,t.length);if(o.textValue&&this.collator.compare(a,t)===0)return i;i=this.getKeyBelow(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.orientation=n.orientation,this.direction=n.direction,this.layout=n.layout||"stack"}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical";this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function kp(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o}=e,a=Yh({usage:"search",sensitivity:"base"}),s=t.disabledBehavior,c=f.useMemo(()=>o||new Fp(n,s==="selection"?new Set:r,i,a),[o,n,r,i,a,s]),{collectionProps:l}=Ap({...e,ref:i,selectionManager:t,keyboardDelegate:c});return{listProps:l}}function Op(e,t){let{role:n="dialog"}=e,r=qr();r=e["aria-label"]?void 0:r;let i=f.useRef(!1);return f.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Ge(t.current);let o=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Ge(t.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),Cp(),{dialogProps:{...qe(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}},titleProps:{id:r}}}const oc=new WeakMap;function Dp(e,t,n){let{value:r,children:i,"aria-label":o,"aria-labelledby":a}=e;const s=e.isDisabled||t.isDisabled;let c=i!=null,l=o!=null||a!=null;!c&&!l&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let u=t.selectedValue===r,d=b=>{b.stopPropagation(),t.setSelectedValue(r)},{pressProps:h,isPressed:p}=Ue({isDisabled:s}),{pressProps:g,isPressed:m}=Ue({isDisabled:s,onPress(){t.setSelectedValue(r)}}),{focusableProps:x}=Kt(q(e,{onFocus:()=>t.setLastFocusedValue(r)}),n),$=q(h,x),y=qe(e,{labelable:!0}),w=-1;t.selectedValue!=null?t.selectedValue===r&&(w=0):(t.lastFocusedValue===r||t.lastFocusedValue==null)&&(w=0),s&&(w=void 0);let{name:T,descriptionId:C,errorMessageId:L,validationBehavior:A}=oc.get(t);return Vs(n,t.selectedValue,t.setSelectedValue),yl({validationBehavior:A},t,n),{labelProps:q(g,{onClick:b=>b.preventDefault()}),inputProps:q(y,{...$,type:"radio",name:T,tabIndex:w,disabled:s,required:t.isRequired&&A==="native",checked:u,value:r,onChange:d,"aria-describedby":[e["aria-describedby"],t.isInvalid?L:null,C].filter(Boolean).join(" ")||void 0}),isDisabled:s,isSelected:u,isPressed:p||m}}function _p(e,t){let{name:n,isReadOnly:r,isRequired:i,isDisabled:o,orientation:a="vertical",validationBehavior:s="aria"}=e,{direction:c}=bt(),{isInvalid:l,validationErrors:u,validationDetails:d}=t.displayValidation,{labelProps:h,fieldProps:p,descriptionProps:g,errorMessageProps:m}=xl({...e,labelElementType:"span",isInvalid:t.isInvalid,errorMessage:e.errorMessage||u}),x=qe(e,{labelable:!0}),{focusWithinProps:$}=Vt({onBlurWithin(T){var C;(C=e.onBlur)===null||C===void 0||C.call(e,T),t.selectedValue||t.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),y=T=>{let C;switch(T.key){case"ArrowRight":c==="rtl"&&a!=="vertical"?C="prev":C="next";break;case"ArrowLeft":c==="rtl"&&a!=="vertical"?C="next":C="prev";break;case"ArrowDown":C="next";break;case"ArrowUp":C="prev";break;default:return}T.preventDefault();let L=Qs(T.currentTarget,{from:T.target}),A;C==="next"?(A=L.nextNode(),A||(L.currentNode=T.currentTarget,A=L.firstChild())):(A=L.previousNode(),A||(L.currentNode=T.currentTarget,A=L.lastChild())),A&&(A.focus(),t.setSelectedValue(A.value))},w=pt(n);return oc.set(t,{name:w,descriptionId:g.id,errorMessageId:m.id,validationBehavior:s}),{radioGroupProps:q(x,{role:"radiogroup",onKeyDown:y,"aria-invalid":t.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":i||void 0,"aria-disabled":o||void 0,"aria-orientation":a,...p,...$}),labelProps:h,descriptionProps:g,errorMessageProps:m,isInvalid:l,validationErrors:u,validationDetails:d}}function Bp(e,t){let n=qe(e,{labelable:!0}),{hoverProps:r}=Le({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:q(n,r,{role:"tooltip"})}}function Hp(e,t,n){let{isDisabled:r,trigger:i}=e,o=pt(),a=f.useRef(!1),s=f.useRef(!1),c=()=>{(a.current||s.current)&&t.open(s.current)},l=$=>{!a.current&&!s.current&&t.close($)};f.useEffect(()=>{let $=y=>{n&&n.current&&y.key==="Escape"&&(y.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",$,!0),()=>{document.removeEventListener("keydown",$,!0)}},[n,t]);let u=()=>{i!=="focus"&&(gn()==="pointer"?a.current=!0:a.current=!1,c())},d=()=>{i!=="focus"&&(s.current=!1,a.current=!1,l())},h=()=>{s.current=!1,a.current=!1,l(!0)},p=()=>{zn()&&(s.current=!0,c())},g=()=>{s.current=!1,a.current=!1,l(!0)},{hoverProps:m}=Le({isDisabled:r,onHoverStart:u,onHoverEnd:d}),{focusableProps:x}=Kt({isDisabled:r,onFocus:p,onBlur:g},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...q(x,m,{onPointerDown:h,onKeyDown:h})},tooltipProps:{id:o}}}function Hi(e){return{UNSAFE_getDOMNode(){return e.current}}}function Np(e,t=e){return{...Hi(e),focus(){t.current&&t.current.focus()}}}function yt(e){let t=f.useRef(null);return f.useImperativeHandle(e,()=>Hi(t)),t}function Zn(e,t){let n=f.useRef(null);return f.useImperativeHandle(e,()=>Np(n,t)),n}const jp=_.createContext(null);jp.displayName="BreakpointContext";/**
|
|
353
|
+
* @license MIT
|
|
354
|
+
* author: Cube Dev Team
|
|
355
|
+
* @cube-dev/ui-kit v0.33.2
|
|
356
|
+
* Released under the MIT license.
|
|
357
|
+
*/function qn({isDisabled:e},t=!1){f.useEffect(()=>{r(!1)},[e]);let[n,r]=f.useState(!1),{isFocusVisible:i}=Th({}),{focusProps:o}=Fi({isDisabled:e,onFocusChange:r});return{focusProps:o,isFocused:n&&(t?i:!0)}}/**
|
|
358
|
+
* @license MIT
|
|
359
|
+
* author: Cube Dev Team
|
|
360
|
+
* @cube-dev/ui-kit v0.33.2
|
|
361
|
+
* Released under the MIT license.
|
|
362
|
+
*/const Vp={display:"inline-grid",position:"relative",opacity:{"":1,"[disabled]":.4},transition:"theme"},Kp=[...ee,...be];function Up({as:e,label:t,onClick:n,...r},i){const o=r.isDisabled,a=G(r,Kp,Vp),s=Zn(i);let{hoverProps:c,isHovered:l}=Le({isDisabled:o}),{focusProps:u,isFocused:d}=qn({isDisabled:o}),{focusableProps:h}=Kt(r,s);return v.jsx(ws,{"data-is-hovered":l&&!o?"":null,"data-is-focused":d&&!o?"":null,"data-is-disabled":o||null,"aria-label":t,...re(c,u,h,{onClick:n},Y(r,{eventProps:!0})),ref:s,tabIndex:r.excludeFromTabOrder||o?-1:0,as:e,styles:a})}const zp=f.forwardRef(Up);/**
|
|
363
|
+
* @license MIT
|
|
364
|
+
* author: Cube Dev Team
|
|
365
|
+
* @cube-dev/ui-kit v0.33.2
|
|
366
|
+
* Released under the MIT license.
|
|
367
|
+
*/function ya(...e){}function Gp(e,{property:t,name:n,betterAlternative:r,reason:i}){}/**
|
|
368
|
+
* @license MIT
|
|
369
|
+
* author: Cube Dev Team
|
|
370
|
+
* @cube-dev/ui-kit v0.33.2
|
|
371
|
+
* Released under the MIT license.
|
|
372
|
+
*/const xn=f.createContext({});function Ni(e){let{breakpoints:t,children:n,insideForm:r,isDisabled:i,isReadOnly:o,isRequired:a,validationState:s,router:c,root:l,ref:u}=e;const d=f.useContext(xn);t&&(n=v.jsx(Hu,{value:t,children:n}));const h=f.useMemo(()=>({ref:u,breakpoints:t,insideForm:r,isDisabled:i,isReadOnly:o,isRequired:a,validationState:s,router:c,root:l}),[u,t,r,i,o,a,s,c,l]),p=f.useMemo(()=>{let g=Object.assign({},d);return Object.keys(h).forEach(m=>{h[m]!=null&&(g[m]=h[m])}),g},[d,h]);return v.jsx(xn.Provider,{value:p,children:n})}function Ye(e){return{...f.useContext(xn),...e}}/**
|
|
373
|
+
* @license MIT
|
|
374
|
+
* author: Cube Dev Team
|
|
375
|
+
* @cube-dev/ui-kit v0.33.2
|
|
376
|
+
* Released under the MIT license.
|
|
377
|
+
*/const ac=f.createContext({event(){}});function Wp({children:e,event:t}){const n=f.useMemo(()=>({event:t}),[t]);return t?v.jsx(ac.Provider,{value:n,children:e}):v.jsx(v.Fragment,{children:e})}function Zp(){return f.useContext(ac)}/**
|
|
378
|
+
* @license MIT
|
|
379
|
+
* author: Cube Dev Team
|
|
380
|
+
* @cube-dev/ui-kit v0.33.2
|
|
381
|
+
* Released under the MIT license.
|
|
382
|
+
*/function qp(...e){const t=_.useRef(!1);f.useEffect(()=>{t.current||(t.current=!0,Gp(...e))},[e[0]])}/**
|
|
383
|
+
* @license MIT
|
|
384
|
+
* author: Cube Dev Team
|
|
385
|
+
* @cube-dev/ui-kit v0.33.2
|
|
386
|
+
* Released under the MIT license.
|
|
387
|
+
*/function Xp(e){const t=f.useRef(e);return Ts(()=>{t.current=e}),t}/**
|
|
388
|
+
* @license MIT
|
|
389
|
+
* author: Cube Dev Team
|
|
390
|
+
* @cube-dev/ui-kit v0.33.2
|
|
391
|
+
* Released under the MIT license.
|
|
392
|
+
*/function ae(e){const t=Xp(e);return f.useCallback((...n)=>t.current(...n),[])}/**
|
|
393
|
+
* @license MIT
|
|
394
|
+
* author: Cube Dev Team
|
|
395
|
+
* @cube-dev/ui-kit v0.33.2
|
|
396
|
+
* Released under the MIT license.
|
|
397
|
+
*/function wn(...e){return ae((...t)=>{e.forEach(n=>{typeof n=="function"&&n(...t)})})}/**
|
|
398
|
+
* @license MIT
|
|
399
|
+
* author: Cube Dev Team
|
|
400
|
+
* @cube-dev/ui-kit v0.33.2
|
|
401
|
+
* Released under the MIT license.
|
|
402
|
+
*/class xa{get status(){return this._status}set status(t){this._status=t}constructor(t,n){this.timerId=null,this.startTime=null,this._status="stopped",this.callback=t,this.delay=n,this.remaining=n,this.resume()}reset(){this.clear(),this.remaining=this.delay,this.status="stopped"}pause(){this.timerId===null||this.startTime===null||(this.clear(),this.remaining-=Date.now()-this.startTime,this.status="paused")}resume(){this.timerId===null&&(this.startTime=Date.now(),this.clear(),this.timerId=setTimeout(()=>{this.reset(),this.callback()},this.remaining),this.status="running")}clear(){this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}}/**
|
|
403
|
+
* @license MIT
|
|
404
|
+
* author: Cube Dev Team
|
|
405
|
+
* @cube-dev/ui-kit v0.33.2
|
|
406
|
+
* Released under the MIT license.
|
|
407
|
+
*/function sc(e={}){const{callback:t,delay:n,isDisabled:r,timer:i=null}=e,o=ae(()=>t?.()),[a,s]=f.useState(()=>i||(typeof n=="number"?new xa(o,n):null));return r?a?.reset():a?.resume(),f.useEffect(()=>(s(i),()=>a?.reset()),[i]),f.useEffect(()=>{if(!i)return typeof n=="number"&&s(new xa(o,n)),()=>a?.reset()},[n,i]),f.useEffect(()=>()=>a?.reset(),[a]),{timer:a}}/**
|
|
408
|
+
* @license MIT
|
|
409
|
+
* author: Cube Dev Team
|
|
410
|
+
* @cube-dev/ui-kit v0.33.2
|
|
411
|
+
* Released under the MIT license.
|
|
412
|
+
*/function Yp(){const e=f.useRef(!0);return e.current?(e.current=!1,!0):e.current}/**
|
|
413
|
+
* @license MIT
|
|
414
|
+
* author: Cube Dev Team
|
|
415
|
+
* @cube-dev/ui-kit v0.33.2
|
|
416
|
+
* Released under the MIT license.
|
|
417
|
+
*/const Et="Link Press",Jp="Button Press",Qp={propNames:new Set(["onMouseEnter","onMouseLeave"])};function wa(e,t){const n=document.createElement("a");n.href=e,t&&(n.target=t===!0?"_blank":t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function lc(e){const t=e&&typeof e=="string"&&e.startsWith("!"),n=e&&typeof e=="string"&&e.startsWith("@"),r=e&&typeof e=="string"?t||n?e.slice(1):e:void 0;return{newTab:t,nativeRoute:n,href:r}}function ev(e,{router:t,to:n,onPress:r,tracking:i}){const{newTab:o,nativeRoute:a,href:s}=lc(n),c=e.target,l=c?.getAttribute("data-qa");if(r?.(e),!n){i.event(Jp,{qa:l},c);return}if(e.shiftKey||e.metaKey||o){wa(s,!0),i.event(Et,{qa:l,href:s,type:"tab"},c);return}if(a)wa(s||window.location.href),i.event(Et,{qa:l,href:s,type:"native"},c);else if(s&&s.startsWith("#")){const u=s.slice(1),d=document.getElementById(u);if(i.event(Et,{qa:l,href:s,type:"hash",target:u},d),d){d.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});return}}t?(i.event(Et,{qa:l,href:s,type:"router"},c),t.push(s)):s&&(i.event(Et,{qa:l,href:s,type:"native"},c),window.location.href=s)}const cc=function({to:t,as:n,htmlType:r,label:i,mods:o,onPress:a,...s},c){n=t?"a":n||"button";const l=Zp(),u=f.useContext(xn).router,d=s.isDisabled,{newTab:h,href:p}=lc(t),g=h?"_blank":void 0,m=Zn(c),x=ae(b=>{ev(b,{router:u,to:t,onPress:a,tracking:l})});let{buttonProps:$,isPressed:y}=q0({"aria-label":i,...s,onPress:x},m),{hoverProps:w,isHovered:T}=Le({isDisabled:d}),{focusProps:C,isFocused:L}=qn({isDisabled:d},!0);const A=t?{onClick(b){b.preventDefault()}}:{};return{actionProps:{mods:{hovered:T&&!d,pressed:y&&!d,focused:L&&!d,disabled:d,...o},...re($,w,C,A,Y(s,Qp)),ref:m,type:r||"button",rel:n==="a"&&h?'rel="noopener noreferrer"':void 0,as:n,isDisabled:d,target:g,href:p}}};/**
|
|
418
|
+
* @license MIT
|
|
419
|
+
* author: Cube Dev Team
|
|
420
|
+
* @cube-dev/ui-kit v0.33.2
|
|
421
|
+
* Released under the MIT license.
|
|
422
|
+
*/const tv=[...ee,...be],nv={display:"inline-grid",placeItems:"center stretch",placeContent:"center",position:"relative",margin:0,outline:{"":"#purple-03.0",focused:"#purple-03"},cursor:"pointer",gap:"1x",flow:"column",preset:{"":"t3m",'[data-size="large"]':"t2m"},textDecoration:"none",transition:"theme",reset:"button",padding:{"":"(1.25x - 1bw) (2x - 1bw)",'[data-size="small"]':"(.75x - 1bw) (1.5x - 1bw)",'[data-size="medium"]':"(1.25x - 1bw) (2x - 1bw)",'[data-size="large"]':"1.5x (2.5x - 1bw)",'single-icon-only | [data-type="link"]':0},width:{"":"initial",'[data-size="small"] & single-icon-only':"4x 4x",'[data-size="medium"] & single-icon-only':"5x 5x",'[data-size="large"] & single-icon-only':"6x 6x"},height:{"":"initial",'[data-size="small"] & single-icon-only':"4x 4x",'[data-size="medium"] & single-icon-only':"5x 5x",'[data-size="large"] & single-icon-only':"6x 6x"},whiteSpace:"nowrap",radius:{"":!0,'[data-type="link"] & !focused':0},"& .anticon":{transition:"display .2s steps(1, start), margin .2s linear, opacity .2s linear"},ButtonIcon:{display:"grid",fontSize:"@icon-size"}},rv=k({qa:"Button",styles:nv,variants:{default:{shadow:{"":!1,'[data-type="link"]':"0 @border-width 0 0 #purple.20",'[data-type="link"] & (pressed | hovered | [disabled])':"0 0 0 0 #purple.20"},outline:{"":"0 #purple-03.0",focused:"@outline-width #purple-03"},border:{"":"#clear",'[data-type="primary"] & pressed':"#purple-text",'[data-type="secondary"] & pressed':"#purple.3",'[data-type="outline"]':"#purple.3",'[data-type="outline"] & [disabled]':"#dark.12",'([data-type="clear"] | [data-type="outline"]) & pressed':"#purple-text.10",'[data-type="link"]':"0"},fill:{"":"#clear",'[data-type="primary"]':"#purple",'[data-type="primary"] & pressed':"#purple",'[data-type="primary"] & hovered':"#purple-text",'[data-type="secondary"]':"#purple.10",'[data-type="secondary"] & hovered':"#purple.16",'[data-type="secondary"] & pressed':"#purple-text.10",'[data-type="neutral"]':"#dark.0",'[data-type="neutral"] & hovered':"#dark.04",'[data-type="neutral"] & pressed':"#dark.05",'[disabled] & ![data-type="link"]':"#dark.04",'([data-type="clear"] | [data-type="outline"])':"#purple.0",'([data-type="clear"] | [data-type="outline"]) & hovered':"#purple.16",'([data-type="clear"] | [data-type="outline"]) & pressed':"#purple.10",'([data-type="clear"] | [data-type="outline"]) & [disabled]':"#purple.0"},color:{"":"#white",'[data-type="secondary"]':"#purple",'[data-type="clear"] | [data-type="outline"] | [data-type="link"]':"#purple-text",'[data-type="link"] & pressed':"#purple",'[data-type="neutral"]':"#dark.75",'[data-type="neutral"] & hovered':"#dark.75",'[data-type="neutral"] & pressed':"#purple","[disabled]":"#dark.30"}},danger:{shadow:{"":!1,'[data-type="link"]':"0 @border-width 0 0 #danger.20",'[data-type="link"] & (pressed | hovered | [disabled])':"0 0 0 0 #danger.20"},outline:{"":"0 #danger.0",focused:"@outline-width #danger.50"},border:{"":"#clear",'[data-type="primary"] & pressed':"#danger-text",'[data-type="secondary"] & pressed':"#danger.3",'[data-type="outline"]':"#danger-text.3",'([data-type="clear"] | [data-type="outline"]) & pressed':"#danger-text.10",'[data-type="outline"] & pressed':"#danger.3",'[data-type="link"]':"#clear"},fill:{"":"#clear",'[data-type="primary"]':"#danger",'[data-type="primary"] & hovered':"#danger-text",'[data-type="primary"] & pressed':"#danger",'[data-type="secondary"]':"#danger.05",'[data-type="secondary"] & hovered':"#danger.1",'[data-type="secondary"] & pressed':"#danger.05",'[data-type="neutral"]':"#dark.0",'[data-type="neutral"] & hovered':"#dark.04",'[data-type="neutral"] & pressed':"#dark.05",'[disabled] & ![data-type="link"]':"#dark.04",'[data-type="clear"] | [data-type="outline"]':"#danger.0",'([data-type="clear"] | [data-type="outline"]) & hovered':"#danger.1",'([data-type="clear"] | [data-type="outline"]) & pressed':"#danger.05",'([data-type="clear"] | [data-type="outline"]) & [disabled]':"#danger.0"},color:{"":"#white",'[data-type="neutral"]':"#dark.75",'[data-type="neutral"] & hovered':"#dark.75",'[data-type="secondary"]':"#danger",'[data-type="clear"] | [data-type="outline"] | [data-type="link"]':"#danger-text",'[data-type="link"] & pressed':"#danger",'[data-type="neutral"] & pressed':"#danger","[disabled]":"#dark.30"}},special:{shadow:{"":!1,'[data-type="link"]':"0 @border-width 0 0 #white.44",'[data-type="link"] & (pressed | hovered | [disabled])':"0 0 0 0 #white.44"},outline:{"":"0 #white.0",focused:"@outline-width #white.44",'([data-type="primary"] | [data-type="clear"])':"0 #dark-03.80",'([data-type="primary"] | [data-type="clear"]) & focused':"@outline-width #purple-03.80"},border:{"":"#clear",'[data-type="primary"] & pressed':"#purple-03",'[data-type="secondary"] & pressed':"#white.44",'[data-type="outline"] & !pressed':"#white.44"},fill:{"":"#clear",'[data-type="primary"]':"#purple",'[data-type="primary"] & pressed':"#purple",'[data-type="primary"] & hovered':"#purple-text",'[data-type="secondary"]':"#white.12",'[data-type="clear"]':"#white",'[data-type="clear"] & hovered':"#white.94",'[data-type="clear"] & pressed':"#white",'[disabled] & ![data-type="link"]':"#white.12",'([data-type="neutral"] | [data-type="outline"])':"#white.0",'([data-type="neutral"] | [data-type="outline"] | [data-type="secondary"]) & hovered':"#white.18",'([data-type="neutral"] | [data-type="outline"] | [data-type="secondary"]) & pressed':"#white.12",'([data-type="clear"] | [data-type="outline"]) & [disabled]':"#white.0"},color:{"":"#white",'[data-type="clear"]':"#purple","[disabled]":"#white.30"}}}}),iv=f.forwardRef(function(t,n){let{type:r,size:i,label:o,children:a,theme:s="default",icon:c,rightIcon:l,mods:u,...d}=t;const h=d.isDisabled||d.isLoading,p=d.isLoading,g=d.isSelected;if(a=a||c||l?a:o,!a){const T=o??d["aria-label"]??d["aria-labelledby"];T||(o="Unnamed")}c&&(c=f.cloneElement(c,{"data-element":"ButtonIcon"})),l&&(l=f.cloneElement(l,{"data-element":"ButtonIcon"}));const m=!!((c&&!l||l&&!c)&&!a),x=f.useMemo(()=>({loading:p,selected:g,"single-icon-only":m,...u}),[u,h,p,g,m]),{actionProps:$}=cc({...t,isDisabled:h,mods:x,...o?{label:o}:{}},n),y=G(d,tv),w=$.isDisabled;return delete $.isDisabled,v.jsxs(rv,{...$,disabled:w,variant:s,"data-theme":s,"data-type":r??"secondary","data-size":i??"medium",styles:y,children:[c||p?p?v.jsx(Iu,{"data-element":"ButtonIcon"}):c:null,a,l]})});/**
|
|
423
|
+
* @license MIT
|
|
424
|
+
* author: Cube Dev Team
|
|
425
|
+
* @cube-dev/ui-kit v0.33.2
|
|
426
|
+
* Released under the MIT license.
|
|
427
|
+
*/function $a(e=30){return new Promise(t=>{setTimeout(t,e)})}var uc={exports:{}};(function(e){(function(t){t.exports.is_uri=r,t.exports.is_http_uri=i,t.exports.is_https_uri=o,t.exports.is_web_uri=a,t.exports.isUri=r,t.exports.isHttpUri=i,t.exports.isHttpsUri=o,t.exports.isWebUri=a;var n=function(s){var c=s.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return c};function r(s){if(s&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(s)&&!/%[^0-9a-f]/i.test(s)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(s)){var c=[],l="",u="",d="",h="",p="",g="";if(c=n(s),l=c[1],u=c[2],d=c[3],h=c[4],p=c[5],!!(l&&l.length&&d.length>=0)){if(u&&u.length){if(!(d.length===0||/^\//.test(d)))return}else if(/^\/\//.test(d))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(l.toLowerCase()))return g+=l+":",u&&u.length&&(g+="//"+u),g+=d,h&&h.length&&(g+="?"+h),p&&p.length&&(g+="#"+p),g}}}function i(s,c){if(r(s)){var l=[],u="",d="",h="",p="",g="",m="",x="";if(l=n(s),u=l[1],d=l[2],h=l[3],g=l[4],m=l[5],!!u){if(c){if(u.toLowerCase()!="https")return}else if(u.toLowerCase()!="http")return;if(d)return/:(\d+)$/.test(d)&&(p=d.match(/:(\d+)$/)[0],d=d.replace(/:\d+$/,"")),x+=u+":",x+="//"+d,p&&(x+=p),x+=h,g&&g.length&&(x+="?"+g),m&&m.length&&(x+="#"+m),x}}}function o(s){return i(s,!0)}function a(s){return i(s)||o(s)}})(e)})(uc);var ov=uc.exports;const av=Tu(ov);var sv=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/,lv=function(e){if(!e||e.length>254)return!1;var t=sv.test(e);if(!t)return!1;var n=e.split("@");if(n[0].length>64)return!1;var r=n[1].split(".");return!r.some(function(i){return i.length>63})};/**
|
|
428
|
+
* @license MIT
|
|
429
|
+
* author: Cube Dev Team
|
|
430
|
+
* @cube-dev/ui-kit v0.33.2
|
|
431
|
+
* Released under the MIT license.
|
|
432
|
+
*/const dc={string(e){return typeof e=="string"},number(e){return typeof e=="number"},boolean(e){return typeof e=="boolean"},method(e){return typeof e=="function"},regexp(e){return e instanceof RegExp},integer(e){return typeof e=="number"&&e===parseInt(String(e),10)},array(e){return Array.isArray(e)},object(e){return typeof e=="object"&&!Array.isArray(e)},date(e){return e instanceof Date},url(e){return typeof e=="string"&&av.isUri(e)},hex(e){return typeof e=="string"&&e.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/)},email(e){return lv(e)},any(e){return!0}},cv=Object.keys(dc),fc={async required(e){return Array.isArray(e)?e.length?Promise.resolve():Promise.reject():e||e===0?Promise.resolve():Promise.reject()},async whitespace(e){return typeof e!="string"||e.trim()?Promise.resolve():Promise.reject()},async pattern(e,t){const n=t.pattern;return typeof e!="string"||e.match(n)?Promise.resolve():Promise.reject()},async enum(e,t){const n=t.enum||[];return!e&&e!==0||n.includes(e)?Promise.resolve():Promise.reject()},async len(e,t){const n=t.len;return typeof e=="number"?e===n?Promise.resolve():Promise.reject():!e||!("length"in e)||e.length===n?Promise.resolve():Promise.reject()},async max(e,t){const n=t.max;return typeof e=="number"?e<=n?Promise.resolve():Promise.reject():!e||typeof e!="string"&&!Array.isArray(e)||e.length<=n?Promise.resolve():Promise.reject()},async min(e,t){const n=t.min;return typeof e=="number"?e>=n?Promise.resolve():Promise.reject():!e||typeof e!="string"&&!Array.isArray(e)||e.length>=n?Promise.resolve():Promise.reject()},async validator(e,t){return t.validator(t,e)},async type(e,t){const n=t.type;return cv.includes(n)?dc[n](e)?Promise.resolve():Promise.reject():Promise.resolve()}},uv=Object.keys(fc);async function dv(e,t,n){typeof t=="function"&&(t=t(n)),typeof t.transform=="function"&&(e=t.transform(e));for(let r of uv){if(!(r in t))continue;const i=fc[r];await i(e,t)}}async function fv(e,t,n=0){const{value:r,rules:i}=e;if(!(!i||!i.length))for(let o of i){if(e.validationId&&n!==e.validationId)return;await dv(r,o,t).catch(a=>{throw a instanceof Error&&(a=a?.message||o.message),a||o.message})}}const hv=(e=500)=>{let t,n;return{async validator(){return clearTimeout(t),n&&n(),new Promise(r=>{n=r,t=setTimeout(()=>{r()},e)})}}};/**
|
|
433
|
+
* @license MIT
|
|
434
|
+
* author: Cube Dev Team
|
|
435
|
+
* @cube-dev/ui-kit v0.33.2
|
|
436
|
+
* Released under the MIT license.
|
|
437
|
+
*/function pv(e,t,n){let r=t.split("."),i=e;for(;r.length-1;){let o=r.shift();o in i||(i[o]={}),i=i[o]}i[r[0]]=n}function Ea(e,t){return JSON.stringify(e)===JSON.stringify(t)}class vv{constructor(t=()=>{}){this.forceReRender=()=>{},this.initialFields={},this.fields={},this.ref={},this.isSubmitting=!1,this.submitError=null,this.onValuesChange=()=>{},this.onSubmit=()=>{},this.setFieldsValue=(n,r,i,o=!1,a=!1)=>{let s=!1;Object.keys(n).forEach(c=>{let l=this.fields[c];if(!l&&o&&(this.createField(c,i),l=this.fields[c]),!l||Ea(l.value,n[c])){l&&r===!1&&(l.errors=[]);return}s=!0,a||(l.value=n[c]),l.inputValue=n[c],r===!0?l.touched=r:r===!1&&(l.touched=!1,l.errors=[])}),s&&!i&&(r&&!a&&(this.onValuesChange&&this.onValuesChange(this.getFormData()),this.submitError=null),this.forceReRender())},this.forceReRender=t,this.getFieldValue=this.getFieldValue.bind(this),this.getFieldsValue=this.getFieldsValue.bind(this),this.setFieldValue=this.setFieldValue.bind(this),this.getFieldError=this.getFieldError.bind(this),this.getFieldInstance=this.getFieldInstance.bind(this),this.setInitialFieldsValue=this.setInitialFieldsValue.bind(this),this.resetFields=this.resetFields.bind(this),this.validateField=this.validateField.bind(this),this.validateFields=this.validateFields.bind(this),this.isFieldValid=this.isFieldValid.bind(this),this.createField=this.createField.bind(this),this.isFieldInvalid=this.isFieldInvalid.bind(this),this.isFieldTouched=this.isFieldTouched.bind(this),this.setFields=this.setFields.bind(this)}async submit(){return this.onSubmit?.(this.getFormData())}getFieldValue(t){return this.fields[t]?.value}getFieldsValue(){return Object.values(this.fields).reduce((t,n)=>(n&&t&&(t[n.name]=n.value),t),{})}getFormData(){const t=this.getFieldsValue();return Object.keys(t).reduce((n,r)=>(pv(n,r,t[r]),r.includes(".")&&delete n[r],n),{})}setFieldValue(t,n,r=!1,i=!1,o=!1){const a=this.fields[t];!a||Ea(n,o?a.inputValue:a.value)||(o||(a.value=n,a.status=void 0),a.inputValue=n,r&&(a.touched=r),i||(a.errors=[]),r&&!o&&(this.onValuesChange&&this.onValuesChange(this.getFormData()),this.submitError=null),i||this.forceReRender())}getFieldInstance(t){return this.fields[t]}setInitialFieldsValue(t){this.initialFields=V.convert(t)??{}}updateInitialFieldsValue(t){this.initialFields={...this.initialFields,...V.convert(t)}}resetFields(t,n){const r=this.getFieldsValue(),i=Object.keys({...r,...this.initialFields}),a=(t?i.filter(s=>t.includes(s)):i).reduce((s,c)=>(c in this.initialFields?s[c]=this.initialFields[c]:s[c]=void 0,s),{});this.setFieldsValue(a,!1,n,!0)}async validateField(t){const n=this.getFieldInstance(t);if(!n||!n.rules||n.status==="valid")return Promise.resolve();if(n.status==="invalid")return Promise.reject(n.errors[0]);n.validating=!0,n.validationId?n.validationId++:n.validationId=1;const r=n.validationId;return fv(n,this,r).then(()=>{n.validationId===r&&(n.validating=!1,(!n.errors||n.errors.length)&&(n.errors=[]),n.status="valid",this.forceReRender())}).catch(i=>(n.validationId===r&&(n.errors=[i],n.validating=!1,n.status="invalid",this.forceReRender()),Promise.reject([i])))}validateFields(t){const n=t||Object.keys(this.fields),r=[];return Promise.allSettled(n.map(i=>this.validateField(i).catch(o=>(r.push({name:i,errors:o}),Promise.reject())))).then(()=>r.length?Promise.reject(r):this.getFormData())}isFieldValid(t){const n=this.getFieldInstance(t);return n?!n.errors.length:!0}isFieldInvalid(t){const n=this.getFieldInstance(t);return n?!!n.errors.length:!1}isFieldTouched(t){const n=this.getFieldInstance(t);return n?!!n.touched:!1}getFieldError(t){const n=this.getFieldInstance(t);return n?n.errors||[]:[]}createField(t,n){return t?(this.fields[t]||(this.fields[t]=this._createField(t)),n||this.forceReRender(),this.fields[t]):this._createField(t)}removeField(t,n){this.fields[t]&&delete this.fields[t],n||this.forceReRender()}setFields(t){t.forEach(({name:n,value:r,errors:i})=>{this.fields[n]=this._createField(n,{value:r,errors:i})}),this.forceReRender()}setSubmitting(t){this.isSubmitting!==t&&(this.isSubmitting=t,this.forceReRender())}_createField(t,n){let r={name:t,validating:!1,touched:!1,errors:[],validationId:0,...n,status:n?.errors?.length?"invalid":void 0};return r&&(r.inputValue=r.value),r}}function hc(e,t,n={}){const{onSubmit:r,onValuesChange:i}=n,o=f.useRef(),[,a]=f.useState({});if(!o.current){if(e)o.current=e;else{const s=()=>{a({})};e=o.current=new vv(s)}e.ref=t}return r&&(o.current.onSubmit=r),i&&(o.current.onValuesChange=i),[o.current]}/**
|
|
438
|
+
* @license MIT
|
|
439
|
+
* author: Cube Dev Team
|
|
440
|
+
* @cube-dev/ui-kit v0.33.2
|
|
441
|
+
* Released under the MIT license.
|
|
442
|
+
*/const Ut=f.createContext({}),mv=k({as:"form",qa:"Form",styles:{display:{"":"block",horizontal:"flex"},flow:{"":"column",horizontal:"row"},placeItems:{"":"initial",horizontal:"center"},gap:"2x","@label-width":"25x"}});function xt(e){return{...f.useContext(Ut),...e}}const gv=new Set(["action","autoComplete","encType","method","target"]);function bv(e,t){e=Ye(e);let{qa:n,name:r,children:i,labelPosition:o,orientation:a,isRequired:s,necessityIndicator:c,isDisabled:l,isReadOnly:u,validationState:d,labelStyles:h,validateTrigger:p,showValid:g,defaultValues:m,onValuesChange:x,requiredMark:$=!0,form:y,labelWidth:w,onSubmit:T,onSubmitFailed:C,...L}=e;const A=f.useRef(!0),b=a==="horizontal";a||(a="vertical"),o||(o=b?"side":"top"),w||(w=b?"auto":void 0),t=Yd(t);let R;(T||C)&&!L.action&&(R=async S=>{if(S&&S?.preventDefault&&(S&&S?.preventDefault&&S?.preventDefault(),S&&S?.stopPropagation&&S?.stopPropagation(),S.nativeEvent)){const I=S.nativeEvent;if(I.submitter&&I.submitter.getAttribute("type")!=="submit")return}if(!(!y||y.isSubmitting)){y.submitError=null,y.setSubmitting(!0);try{try{await y.validateFields()}catch{y?.setSubmitting(!1);return}await $a(),await T?.(y.getFormData())}catch(I){if(await $a(),y.submitError=I,C?.(I),I instanceof Error)throw I}finally{y?.setSubmitting(!1)}}}),[y]=hc(y,t&&t.current,{onSubmit:R,onValuesChange:x});let E=G(L,ee);w&&(E["@label-width"]=w);let P=yt(t),F={labelPosition:o,labelStyles:h,orientation:a,necessityIndicator:c,validateTrigger:p,requiredMark:$,showValid:g,form:y,submitError:y.submitError,idPrefix:r};return A.current&&y&&m&&(y.setInitialFieldsValue(m),y.resetFields(void 0,!0),A.current=!1),f.useEffect(()=>{m&&y?.setInitialFieldsValue(m)},[m]),v.jsx(mv,{...Y(L,{propNames:gv}),ref:P,noValidate:!0,styles:E,mods:{"has-sider":o==="side",horizontal:b},onSubmit:R,children:v.jsx(Ut.Provider,{value:F,children:v.jsx(Ni,{insideForm:!0,isDisabled:l,isReadOnly:u,isRequired:s,validationState:d,children:i})})})}const yv=f.forwardRef(bv);/**
|
|
443
|
+
* @license MIT
|
|
444
|
+
* author: Cube Dev Team
|
|
445
|
+
* @cube-dev/ui-kit v0.33.2
|
|
446
|
+
* Released under the MIT license.
|
|
447
|
+
*/const xv=k({styles:{display:"flex",gap:!0,flow:{"":"row",vertical:"column"},placeItems:{"":"center stretch",vertical:"stretch"}}}),pc=f.forwardRef(function(t,n){const{mods:r,direction:i,...o}=t,a=G(o,ee);return v.jsx(xv,{...Y(o,{eventProps:!0}),ref:n,mods:{vertical:i==="vertical"||o.flow==="column",...r},styles:a})});/**
|
|
448
|
+
* @license MIT
|
|
449
|
+
* author: Cube Dev Team
|
|
450
|
+
* @cube-dev/ui-kit v0.33.2
|
|
451
|
+
* Released under the MIT license.
|
|
452
|
+
*/const wv=k(pc,{qa:"ButtonGroup",styles:{gridArea:"buttonGroup"}}),ji=f.forwardRef(function(t,n){return v.jsx(wv,{ref:n,...Ze(t,"buttonGroup")})});/**
|
|
453
|
+
* @license MIT
|
|
454
|
+
* author: Cube Dev Team
|
|
455
|
+
* @cube-dev/ui-kit v0.33.2
|
|
456
|
+
* Released under the MIT license.
|
|
457
|
+
*/const $v={reset:"button",position:"relative",margin:0,preset:"inherit",border:0,padding:0,outline:{"":"#purple-03.0",focused:"#purple-03"},transition:"theme",cursor:"pointer",textDecoration:"none",fill:"#clear"},Ev=k({as:"button",styles:$v}),Sv=[...ee,...be],$y=f.forwardRef(function({to:t,as:n,htmlType:r,label:i,theme:o,mods:a,onPress:s,...c},l){const{actionProps:u}=cc({to:t,as:n,htmlType:r,label:i,onPress:s,mods:a,...c},l),d=G(c,Sv);return v.jsx(Ev,{"data-theme":o,...u,styles:d})});/**
|
|
458
|
+
* @license MIT
|
|
459
|
+
* author: Cube Dev Team
|
|
460
|
+
* @cube-dev/ui-kit v0.33.2
|
|
461
|
+
* Released under the MIT license.
|
|
462
|
+
*/const At=Object.assign(iv,{Group:ji});function pi(e,t){return pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pi(e,t)}function Xn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pi(e,t)}function Pv(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Tv(e,t){e.classList?e.classList.add(t):Pv(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Sa(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Cv(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Sa(e.className,t):e.setAttribute("class",Sa(e.className&&e.className.baseVal||"",t))}const Pa={disabled:!1},$n=_.createContext(null);var vc=function(t){return t.scrollTop},It="unmounted",De="exited",_e="entering",at="entered",vi="exiting",Ce=function(e){Xn(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?s?(c=De,o.appearStatus=_e):c=at:r.unmountOnExit||r.mountOnEnter?c=It:c=De,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===It?{status:De}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==_e&&a!==at&&(o=_e):(a===_e||a===at)&&(o=vi)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===_e){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Tt.findDOMNode(this);a&&vc(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===De&&this.setState({status:It})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,c=this.props.nodeRef?[s]:[Tt.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),h=s?d.appear:d.enter;if(!i&&!a||Pa.disabled){this.safeSetState({status:at},function(){o.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:_e},function(){o.props.onEntering(l,u),o.onTransitionEnd(h,function(){o.safeSetState({status:at},function(){o.props.onEntered(l,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Tt.findDOMNode(this);if(!o||Pa.disabled){this.safeSetState({status:De},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:vi},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:De},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Tt.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===It)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Tn(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement($n.Provider,{value:null},typeof a=="function"?a(i,s):_.cloneElement(_.Children.only(a),s))},t}(_.Component);Ce.contextType=$n;Ce.propTypes={};function nt(){}Ce.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:nt,onEntering:nt,onEntered:nt,onExit:nt,onExiting:nt,onExited:nt};Ce.UNMOUNTED=It;Ce.EXITED=De;Ce.ENTERING=_e;Ce.ENTERED=at;Ce.EXITING=vi;const mc=Ce;var Iv=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Tv(t,r)})},Mr=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Cv(t,r)})},Vi=function(e){Xn(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var l=r.resolveArguments(s,c),u=l[0],d=l[1];r.removeClasses(u,"exit"),r.addClass(u,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var l=r.resolveArguments(s,c),u=l[0],d=l[1],h=d?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var l=r.resolveArguments(s,c),u=l[0],d=l[1],h=d?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,l=typeof c=="string",u=l&&c?c+"-":"",d=l?""+u+s:c[s],h=l?d+"-active":c[s+"Active"],p=l?d+"-done":c[s+"Done"];return{baseClassName:d,activeClassName:h,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;o==="appear"&&a==="done"&&l&&(s+=" "+l),a==="active"&&i&&vc(i),s&&(this.appliedClasses[o][a]=s,Iv(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,c=a.active,l=a.done;this.appliedClasses[o]={},s&&Mr(i,s),c&&Mr(i,c),l&&Mr(i,l)},n.render=function(){var i=this.props;i.classNames;var o=Tn(i,["classNames"]);return _.createElement(mc,Mt({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);Vi.defaultProps={classNames:""};Vi.propTypes={};const gc=Vi;function Rv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ki(e,t){var n=function(o){return t&&f.isValidElement(o)?t(o):o},r=Object.create(null);return e&&f.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Lv(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var a,s={};for(var c in t){if(r[c])for(a=0;a<r[c].length;a++){var l=r[c][a];s[r[c][a]]=n(l)}s[c]=n(c)}for(a=0;a<i.length;a++)s[i[a]]=n(i[a]);return s}function Be(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Av(e,t){return Ki(e.children,function(n){return f.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Be(n,"appear",e),enter:Be(n,"enter",e),exit:Be(n,"exit",e)})})}function Mv(e,t,n){var r=Ki(e.children),i=Lv(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if(f.isValidElement(a)){var s=o in t,c=o in r,l=t[o],u=f.isValidElement(l)&&!l.props.in;c&&(!s||u)?i[o]=f.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Be(a,"exit",e),enter:Be(a,"enter",e)}):!c&&s&&!u?i[o]=f.cloneElement(a,{in:!1}):c&&s&&f.isValidElement(l)&&(i[o]=f.cloneElement(a,{onExited:n.bind(null,a),in:l.props.in,exit:Be(a,"exit",e),enter:Be(a,"enter",e)}))}}),i}var Fv=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},kv={component:"div",childFactory:function(t){return t}},Ui=function(e){Xn(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=o.handleExited.bind(Rv(o));return o.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},o}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,o){var a=o.children,s=o.handleExited,c=o.firstRender;return{children:c?Av(i,s):Mv(i,a,s),firstRender:!1}},n.handleExited=function(i,o){var a=Ki(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(s){var c=Mt({},s.children);return delete c[i.key],{children:c}}))},n.render=function(){var i=this.props,o=i.component,a=i.childFactory,s=Tn(i,["component","childFactory"]),c=this.state.contextValue,l=Fv(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,o===null?_.createElement($n.Provider,{value:c},l):_.createElement($n.Provider,{value:c},_.createElement(o,s,l))},t}(_.Component);Ui.propTypes={};Ui.defaultProps=kv;const Ov=Ui;/**
|
|
463
|
+
* @license MIT
|
|
464
|
+
* author: Cube Dev Team
|
|
465
|
+
* @cube-dev/ui-kit v0.33.2
|
|
466
|
+
* Released under the MIT license.
|
|
467
|
+
*/const bc=f.createContext(null);function Dv(){return{root:f.useContext(bc)}}const _v=bc.Provider;var Bv="Invariant failed";function yc(e,t){if(!e)throw new Error(Bv)}/**
|
|
468
|
+
* @license MIT
|
|
469
|
+
* author: Cube Dev Team
|
|
470
|
+
* @cube-dev/ui-kit v0.33.2
|
|
471
|
+
* Released under the MIT license.
|
|
472
|
+
*/function Hv(e){const{children:t,isDisabled:n=!1,root:r=null,onMount:i}=e,o=f.useRef(i),a=Dv(),[s,c]=f.useState(null);return o.current=i,f.useEffect(()=>{if(!n){const l=a.root,u=r?.current??null,d=l?.current??null;yc(!(l===null&&u===null)),c(u??d)}},[r,a.root,n]),f.useEffect(()=>{(n||s)&&o.current?.()},[n,s]),{isDisabled:n,children:t,mountRoot:s}}/**
|
|
473
|
+
* @license MIT
|
|
474
|
+
* author: Cube Dev Team
|
|
475
|
+
* @cube-dev/ui-kit v0.33.2
|
|
476
|
+
* Released under the MIT license.
|
|
477
|
+
*/function En(e){const{children:t,mountRoot:n,isDisabled:r}=Hv(e);return r?v.jsx(v.Fragment,{children:t}):n?Tt.createPortal(t,n):null}/**
|
|
478
|
+
* @license MIT
|
|
479
|
+
* author: Cube Dev Team
|
|
480
|
+
* @cube-dev/ui-kit v0.33.2
|
|
481
|
+
* Released under the MIT license.
|
|
482
|
+
*/function Nv({isOpen:e,placement:t,minOffset:n,minScale:r,children:i,container:o=null}){const a=f.useRef(o);typeof n=="number"&&(n=`${n}px`);const s=v.jsx(gc,{unmountOnExit:!0,in:e,timeout:180,classNames:"cube-overlay-transition",children:v.jsx(v.Fragment,{children:i})});return v.jsx(En,{root:a,children:s})}/**
|
|
483
|
+
* @license MIT
|
|
484
|
+
* author: Cube Dev Team
|
|
485
|
+
* @cube-dev/ui-kit v0.33.2
|
|
486
|
+
* Released under the MIT license.
|
|
487
|
+
*/const xc=_.createContext({});/**
|
|
488
|
+
* @license MIT
|
|
489
|
+
* author: Cube Dev Team
|
|
490
|
+
* @cube-dev/ui-kit v0.33.2
|
|
491
|
+
* Released under the MIT license.
|
|
492
|
+
*/const jv=8,Vv=0;function Kv(e){let{children:t,activeWrap:n,crossOffset:r=Vv,isDisabled:i,isMaterial:o,offset:a=jv,trigger:s,delay:c=250,isOpen:l,onOpenChange:u,defaultOpen:d}=e,[h,p]=f.Children.toArray(t),g=_f({delay:c,...e}),m=f.useRef(null),x=f.useRef(null),{triggerProps:$,tooltipProps:y}=Hp({isDisabled:i,trigger:s,delay:c,isOpen:l,onOpenChange:u,defaultOpen:d},g,m),{overlayProps:w,arrowProps:T,placement:C}=vp({placement:e.placement||"top",targetRef:m,overlayRef:x,offset:a,crossOffset:r,isOpen:g.isOpen});if(!n&&typeof h=="string")return console.warn("CubeUIKit: Tooltips are only supported on elements that are both focusable and hoverable. To solve this issue you can: 1) Use active element as a trigger (`Button`, `Link`, etc); 2) Use `activeWrap` attribute to automatically wrap the content; 3) Use `ActiveZone` component to manually wrap the content."),v.jsx(Hf,{children:h});function L(A){A?.currentTarget?.parentNode.click()}return v.jsxs(jh,{...$,ref:m,children:[n?v.jsx(zp,{onClick:L,children:h}):h,v.jsx(xc.Provider,{value:{state:g,placement:C,ref:x,overlayProps:w,arrowProps:T,minOffset:"var(--gap)",minScale:"1",isMaterial:o,...y},children:v.jsx(Nv,{isOpen:g.isOpen,placement:e.placement||"top",children:p})})]})}let Uv=Kv;/**
|
|
493
|
+
* @license MIT
|
|
494
|
+
* author: Cube Dev Team
|
|
495
|
+
* @cube-dev/ui-kit v0.33.2
|
|
496
|
+
* Released under the MIT license.
|
|
497
|
+
*/const zv={initial:"top center",top:"bottom center",right:"center left",left:"center right",bottom:"top center"},Gv={initial:"translate(0px, calc(-1 * var(--overlay-offset)))",top:"translate(0px, calc(1 * var(--overlay-offset)))",right:"translate(calc(-1 * var(--overlay-offset)), 0px)",left:"translate(calc(1 * var(--overlay-offset)), 0px)",bottom:"translate(0px, calc(-1 * var(--overlay-offset)))"},Wv=({suffix:e="",placement:t="initial",minScale:n=.8,minOffset:r="8px"}={})=>`
|
|
498
|
+
&${e} {
|
|
499
|
+
transform: var(--overlay-position);
|
|
500
|
+
transform-origin: ${zv[t]};
|
|
501
|
+
--overlay-offset: ${r};
|
|
502
|
+
--overlay-hidden-x-scale: ${t==="top"||t==="bottom"||t==="initial"?"1":n};
|
|
503
|
+
--overlay-hidden-y-scale: ${t==="left"||t==="right"?"1":n};
|
|
504
|
+
--overlay-translate-visible: translate(0px, 0px);
|
|
505
|
+
--overlay-translate-hidden: ${Gv[t]};
|
|
506
|
+
--overlay-transition: 180ms;
|
|
507
|
+
--overlay-hidden-scale: scale(var(--overlay-hidden-x-scale), var(--overlay-hidden-y-scale));
|
|
508
|
+
--overlay-normal-scale: scale(1, 1);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
&.cube-overlay-transition-enter${e} {
|
|
512
|
+
opacity: 0;
|
|
513
|
+
transform: var(--overlay-translate-hidden) var(--overlay-hidden-scale);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
&.cube-overlay-transition-enter-active${e} {
|
|
517
|
+
opacity: 1;
|
|
518
|
+
transform: var(--overlay-translate-visible) var(--overlay-normal-scale);
|
|
519
|
+
transition: transform var(--overlay-transition) cubic-bezier(0, .66, 0, .66), opacity var(--overlay-transition) cubic-bezier(0, .66, 0, .66);
|
|
520
|
+
pointer-events: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
&.cube-overlay-transition-exit${e} {
|
|
524
|
+
opacity: 1;
|
|
525
|
+
transform: var(--overlay-translate-visible) var(--overlay-normal-scale);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
&.cube-overlay-transition-exit-active${e} {
|
|
529
|
+
opacity: 0;
|
|
530
|
+
transform: var(--overlay-translate-hidden) var(--overlay-hidden-scale);
|
|
531
|
+
pointer-events: none;
|
|
532
|
+
transition: transform var(--overlay-transition) cubic-bezier(.66, 0, .66, 0), opacity var(--overlay-transition) cubic-bezier(.66, 0, .66, 0);
|
|
533
|
+
}
|
|
534
|
+
`;/**
|
|
535
|
+
* @license MIT
|
|
536
|
+
* author: Cube Dev Team
|
|
537
|
+
* @cube-dev/ui-kit v0.33.2
|
|
538
|
+
* Released under the MIT license.
|
|
539
|
+
*/const Zv=k({styles:{display:"block",fill:"#dark.85",color:"#white",width:"initial 36x max-content",radius:!0,padding:".75x 1x",preset:"t3",backdropFilter:"blur(.5x)",whiteSpace:"pre-line",pointerEvents:{"":"none",material:"auto"}}}),qv=k({styles:{position:"absolute",width:"1px",height:"1px",border:".5x #clear",borderTop:".5x solid #dark.85",borderBottom:"0",top:{"":"initial",'[data-placement="left"] | [data-placement="right"]':"50%",'[data-placement="top"]':"100%"},left:{"":"initial",'[data-placement="top"] | [data-placement="bottom"]':"50%",'[data-placement="left"]':"100%"},right:{"":"initial",'[data-placement="right"]':"100%"},bottom:{"":"initial",'[data-placement="bottom"]':"100%"},transform:{"":"translate((-.375x - 1px), 0)",'[data-placement="bottom"]':"translate((-.375x - 1px), 0) rotate(180deg)",'[data-placement="left"]':"translate(-.25x, -.25x) rotate(270deg)",'[data-placement="right"]':"translate(.25x, -.25x) rotate(90deg)"},transition:"theme"}}),Xv=Bt(Zv)`
|
|
540
|
+
${e=>Wv({placement:e?.["data-position"],minOffset:"0",minScale:1})}
|
|
541
|
+
`;function Yv(e,t){let{ref:n,arrowProps:r,state:i,overlayProps:o,minOffset:a,minScale:s,...c}=f.useContext(xc),l=f.useRef(null);const u=n??l;e=re(e,c);let{placement:d="top",isOpen:h,tipStyles:p,showIcon:g,isMaterial:m,...x}=e;const $=G(x,ee);let{tooltipProps:y}=Bp(e,i);return f.useImperativeHandle(t,()=>Hi(u)),typeof a=="number"&&(a=`${a}px`),typeof s=="number"&&(s=String(s)),v.jsxs(Xv,{...y,...o,ref:n,styles:$,mods:{open:h,material:m},"data-min-offset":a,"data-min-scale":s,"data-placement":d,children:[e.children,v.jsx(qv,{"data-placement":d,styles:p,...r})]})}let Jv=f.forwardRef(Yv);/**
|
|
542
|
+
* @license MIT
|
|
543
|
+
* author: Cube Dev Team
|
|
544
|
+
* @cube-dev/ui-kit v0.33.2
|
|
545
|
+
* Released under the MIT license.
|
|
546
|
+
*/function Qv(e){const{ref:t,children:n,items:r}=e,i=Pf({selectionMode:"none",children:n,items:r,suppressTextValueWarning:!0}),{listProps:o}=kp({ref:t,allowsTabNavigation:!0,...i});return{listProps:o,state:i}}/**
|
|
547
|
+
* @license MIT
|
|
548
|
+
* author: Cube Dev Team
|
|
549
|
+
* @cube-dev/ui-kit v0.33.2
|
|
550
|
+
* Released under the MIT license.
|
|
551
|
+
*/function em(e){const{ref:t,key:n,state:{selectionManager:r}}=e;return Mp({ref:t,key:n,selectionManager:r})}/**
|
|
552
|
+
* @license MIT
|
|
553
|
+
* author: Cube Dev Team
|
|
554
|
+
* @cube-dev/ui-kit v0.33.2
|
|
555
|
+
* Released under the MIT license.
|
|
556
|
+
*/const tm=k({as:"span",styles:{display:"inline-grid",verticalAlign:"middle",width:"1em 1em",height:"1em 1em","& svg":{width:"1em 1em",height:"1em 1em"}},styleProps:[...Nt,...Re,...Bn]}),nm=f.memo(function(t){const{size:n,...r}=t;return v.jsx(tm,{qa:"Icon",...r,styles:n||t.styles?{fontSize:n,...t.styles}:void 0})});/**
|
|
557
|
+
* @license MIT
|
|
558
|
+
* author: Cube Dev Team
|
|
559
|
+
* @cube-dev/ui-kit v0.33.2
|
|
560
|
+
* Released under the MIT license.
|
|
561
|
+
*/function N(e,t){function n(r){return v.jsx(nm,{qa:e,"aria-hidden":"true",...r,children:t})}return n.displayName=e,n}/**
|
|
562
|
+
* @license MIT
|
|
563
|
+
* author: Cube Dev Team
|
|
564
|
+
* @cube-dev/ui-kit v0.33.2
|
|
565
|
+
* Released under the MIT license.
|
|
566
|
+
*/const rm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.626 2.732a.6.6 0 0 0 0 .849L7.046 8l-4.42 4.42a.6.6 0 0 0 0 .848l.141.141a.6.6 0 0 0 .849 0l4.42-4.42 4.348 4.35a.6.6 0 0 0 .849 0l.141-.142a.6.6 0 0 0 0-.848L9.025 8l4.349-4.349a.6.6 0 0 0 0-.848l-.141-.142a.6.6 0 0 0-.849 0L8.035 7.01 3.616 2.59a.6.6 0 0 0-.849 0l-.141.142Z",clipRule:"evenodd"})});/**
|
|
567
|
+
* @license MIT
|
|
568
|
+
* author: Cube Dev Team
|
|
569
|
+
* @cube-dev/ui-kit v0.33.2
|
|
570
|
+
* Released under the MIT license.
|
|
571
|
+
*/const im=v.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M7.94 11.04c-.82 0-1.49.67-1.49 1.49.08 1.96 2.9 1.96 2.97 0 0-.82-.67-1.49-1.48-1.49ZM9.42 2.68a1.93 1.93 0 0 0-3.39 1.58l.9 5.13c.2 1.12 1.8 1.12 2.02 0l.9-5.13c.1-.56-.06-1.14-.43-1.58Z"})});/**
|
|
572
|
+
* @license MIT
|
|
573
|
+
* author: Cube Dev Team
|
|
574
|
+
* @cube-dev/ui-kit v0.33.2
|
|
575
|
+
* Released under the MIT license.
|
|
576
|
+
*/const om=v.jsxs("svg",{fill:"currentColor",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{d:"M13.58 15.5H2.42a2.4 2.4 0 0 1-2.1-1.21 2.4 2.4 0 0 1 0-2.42l5.59-9.66A2.4 2.4 0 0 1 8 1c.87 0 1.66.45 2.1 1.2l5.57 9.67a2.4 2.4 0 0 1 0 2.42 2.4 2.4 0 0 1-2.09 1.2ZM8 2.6a.8.8 0 0 0-.7.4l-5.58 9.67a.8.8 0 0 0 0 .8c.07.12.28.4.7.4h11.16a.8.8 0 0 0 .7-.4.8.8 0 0 0 0-.8L8.7 3a.8.8 0 0 0-.7-.4Zm0 9.67a.8.8 0 1 1 0-1.62.8.8 0 1 1 0 1.62Zm0-3.23a.8.8 0 0 1-.8-.8V6.64a.8.8 0 1 1 1.6 0v1.6a.8.8 0 0 1-.8.81Z"}),v.jsx("path",{d:"M7.2 6.8a.8.8 0 1 1 1.6 0v2.4a.8.8 0 0 1-1.6 0V6.8Z"})]});/**
|
|
577
|
+
* @license MIT
|
|
578
|
+
* author: Cube Dev Team
|
|
579
|
+
* @cube-dev/ui-kit v0.33.2
|
|
580
|
+
* Released under the MIT license.
|
|
581
|
+
*/const am=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.9 1.5a.6.6 0 0 0-.6.6v5.2H2.1a.6.6 0 0 0-.6.6v.2a.6.6 0 0 0 .6.6h5.2v5.2a.6.6 0 0 0 .6.6h.2a.6.6 0 0 0 .6-.6V8.7h5.2a.6.6 0 0 0 .6-.6v-.2a.6.6 0 0 0-.6-.6H8.7V2.1a.6.6 0 0 0-.6-.6h-.2Z",clipRule:"evenodd"})});/**
|
|
582
|
+
* @license MIT
|
|
583
|
+
* author: Cube Dev Team
|
|
584
|
+
* @cube-dev/ui-kit v0.33.2
|
|
585
|
+
* Released under the MIT license.
|
|
586
|
+
*/const sm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.704 3.88a.6.6 0 0 1-1.2 0V1.468a.6.6 0 0 1 1.2 0V3.88ZM8.662 6.454a.625.625 0 0 1 .884.884l-7.468 7.468a.625.625 0 1 1-.884-.884l7.468-7.468Zm.442 6.47a.6.6 0 0 0 .6-.6V9.912a.6.6 0 0 0-1.2 0v2.412a.6.6 0 0 0 .6.6ZM6.088 6.296a.6.6 0 0 1 0 1.2H3.676a.6.6 0 1 1 0-1.2h2.412Zm9.044.6a.6.6 0 0 0-.6-.6H12.12a.6.6 0 1 0 0 1.2h2.412a.6.6 0 0 0 .6-.6ZM11.66 5.188a.6.6 0 1 1-.848-.849l1.705-1.705a.6.6 0 1 1 .849.848L11.66 5.188Zm-4.264 0a.6.6 0 0 0 0-.849L5.69 2.634a.6.6 0 1 0-.848.848l1.705 1.706a.6.6 0 0 0 .849 0Zm5.97 5.122a.6.6 0 1 1-.848.848l-1.706-1.705a.6.6 0 0 1 .849-.849l1.705 1.706Z",clipRule:"evenodd"})});/**
|
|
587
|
+
* @license MIT
|
|
588
|
+
* author: Cube Dev Team
|
|
589
|
+
* @cube-dev/ui-kit v0.33.2
|
|
590
|
+
* Released under the MIT license.
|
|
591
|
+
*/const lm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.4 7.048V13.4H2.6v-2.269l4.332-2.976L8.58 9.77a.6.6 0 0 0 .76.067l4.06-2.79Zm1.2-1.149V1.982a.6.6 0 0 0-.94-.495L9.068 4.643 7.42 3.026a.6.6 0 0 0-.76-.067L2.6 5.75V2a.6.6 0 0 0-1.2 0v12a.6.6 0 0 0 .6.6h12a.6.6 0 0 0 .588-.72.6.6 0 0 0 .012-.12V5.9Zm-1.2-.307L9.068 8.569 7.42 6.952a.6.6 0 0 0-.76-.066L2.6 9.676V7.204l4.332-2.977L8.58 5.845a.6.6 0 0 0 .76.067l4.06-2.79v2.47Z",clipRule:"evenodd"})});/**
|
|
592
|
+
* @license MIT
|
|
593
|
+
* author: Cube Dev Team
|
|
594
|
+
* @cube-dev/ui-kit v0.33.2
|
|
595
|
+
* Released under the MIT license.
|
|
596
|
+
*/const cm=v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8.676 8 4.738-4.738a.6.6 0 0 0 0-.848l-.142-.142a.6.6 0 0 0-.848 0L7.12 7.576a.6.6 0 0 0 0 .848l5.303 5.304a.6.6 0 0 0 .848 0l.142-.142a.6.6 0 0 0 0-.848L8.676 8Z",clipRule:"evenodd"}),v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.676 8.152 4.738-4.738a.6.6 0 0 0 0-.848l-.142-.142a.6.6 0 0 0-.848 0L2.12 7.728a.6.6 0 0 0 0 .848l5.303 5.303a.6.6 0 0 0 .848 0l.142-.141a.6.6 0 0 0 0-.849L3.676 8.152Z",clipRule:"evenodd"})]});/**
|
|
597
|
+
* @license MIT
|
|
598
|
+
* author: Cube Dev Team
|
|
599
|
+
* @cube-dev/ui-kit v0.33.2
|
|
600
|
+
* Released under the MIT license.
|
|
601
|
+
*/const um=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 1.4a.6.6 0 0 1 .6.6v11.4H14a.6.6 0 1 1 0 1.2H2a.6.6 0 0 1-.6-.6V2a.6.6 0 0 1 .6-.6Zm2.4 9.225V8.3a.7.7 0 0 1 1.4 0v2.6a.7.7 0 1 1-1.4 0v-.275ZM7.2 6.3V10.9a.7.7 0 1 0 1.4 0V6.3a.7.7 0 1 0-1.4 0Zm2.8 4.325V8.3a.7.7 0 1 1 1.4 0v2.6a.7.7 0 1 1-1.4 0v-.275ZM12.8 3.3V10.9a.7.7 0 1 0 1.4 0V3.3a.7.7 0 1 0-1.4 0Z",clipRule:"evenodd"})});/**
|
|
602
|
+
* @license MIT
|
|
603
|
+
* author: Cube Dev Team
|
|
604
|
+
* @cube-dev/ui-kit v0.33.2
|
|
605
|
+
* Released under the MIT license.
|
|
606
|
+
*/const dm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.427 1.013 4.195 15.001H2.833l8.232-13.988h1.362ZM.04 2.964V1.821H5.25v1.143H3.292V8H1.997V2.964H.04Zm11.736 5.038v6.2h1.238v-2.22h2.591v-1.144h-2.59V9.145h2.868V8.002h-4.107Z",clipRule:"evenodd"})});/**
|
|
607
|
+
* @license MIT
|
|
608
|
+
* author: Cube Dev Team
|
|
609
|
+
* @cube-dev/ui-kit v0.33.2
|
|
610
|
+
* Released under the MIT license.
|
|
611
|
+
*/const fm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.6 2.2H6.4c-1.14 0-1.923 0-2.53.05-.592.049-.91.138-1.141.255A2.8 2.8 0 0 0 1.505 3.73c-.117.23-.206.549-.254 1.142C1.2 5.477 1.2 6.26 1.2 7.4v1.2c0 1.14 0 1.923.05 2.53.049.592.138.91.255 1.141a2.8 2.8 0 0 0 1.224 1.224c.23.117.549.206 1.142.255.606.05 1.39.05 2.529.05h3.2c1.14 0 1.923 0 2.53-.05.592-.049.91-.138 1.141-.255a2.8 2.8 0 0 0 1.224-1.224c.117-.23.206-.549.255-1.142.05-.606.05-1.39.05-2.529V7.4c0-1.14 0-1.923-.05-2.53-.049-.592-.138-.91-.255-1.141a2.8 2.8 0 0 0-1.224-1.224c-.23-.117-.549-.206-1.142-.254C11.524 2.2 10.74 2.2 9.6 2.2Zm-9.164.984C0 4.04 0 5.16 0 7.4v1.2c0 2.24 0 3.36.436 4.216a4 4 0 0 0 1.748 1.748C3.04 15 4.16 15 6.4 15h3.2c2.24 0 3.36 0 4.216-.436a4 4 0 0 0 1.748-1.748C16 11.96 16 10.84 16 8.6V7.4c0-2.24 0-3.36-.436-4.216a4 4 0 0 0-1.748-1.748C12.96 1 11.84 1 9.6 1H6.4c-2.24 0-3.36 0-4.216.436A4 4 0 0 0 .436 3.184Zm5.443.998V10h-1.23V5.35h-.035l-1.332.835V5.094l1.44-.912H5.88Zm2.48 6.932V12h4.147v-1.006h-2.443v-.04l.85-.832c.399-.363.709-.675.928-.934.22-.262.373-.5.458-.714.087-.214.13-.43.13-.65 0-.335-.086-.633-.258-.892a1.726 1.726 0 0 0-.725-.608c-.308-.148-.671-.222-1.088-.222-.405 0-.763.077-1.074.23-.31.154-.552.37-.724.65-.172.281-.258.612-.258.992h1.167c0-.185.036-.345.108-.48a.744.744 0 0 1 .307-.31.962.962 0 0 1 .466-.107c.17 0 .323.034.457.102.135.066.24.162.318.287.078.123.117.27.117.44a.993.993 0 0 1-.094.43c-.062.13-.154.263-.275.4-.12.136-.268.29-.444.46l-2.07 1.918Z",clipRule:"evenodd"})});/**
|
|
612
|
+
* @license MIT
|
|
613
|
+
* author: Cube Dev Team
|
|
614
|
+
* @cube-dev/ui-kit v0.33.2
|
|
615
|
+
* Released under the MIT license.
|
|
616
|
+
*/const hm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.494.632a1.22 1.22 0 0 1 1.012 0l5.954 2.712c.435.198.714.632.714 1.11v7.096c0 .478-.28.912-.715 1.11l-5.954 2.708a1.22 1.22 0 0 1-1.01 0L1.541 12.66a1.22 1.22 0 0 1-.715-1.11V4.454c0-.478.279-.912.714-1.11L7.494.632ZM8 1.765 2.734 4.162 8 6.482l5.266-2.32L8 1.765Zm-5.934 9.772V5.223l5.314 2.34v6.39l-5.314-2.416Zm6.554 2.416 5.314-2.416V5.223L8.62 7.563v6.39Z",clipRule:"evenodd"})});/**
|
|
617
|
+
* @license MIT
|
|
618
|
+
* author: Cube Dev Team
|
|
619
|
+
* @cube-dev/ui-kit v0.33.2
|
|
620
|
+
* Released under the MIT license.
|
|
621
|
+
*/const pm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",d:"M3.085 14.902a1.27 1.27 0 0 1-.931-.39 1.27 1.27 0 0 1-.39-.93V3.418c0-.364.13-.676.39-.938.26-.26.57-.392.93-.392h1v-.382c0-.17.06-.316.183-.437a.6.6 0 0 1 .436-.18c.174 0 .321.06.442.18s.182.267.182.438v.381h5.346v-.382c0-.17.061-.316.184-.437a.6.6 0 0 1 .436-.18c.174 0 .32.06.442.18.121.12.182.267.182.438v.381h.998c.364 0 .677.131.938.392.261.262.392.574.392.938v10.164c0 .361-.13.671-.392.93-.261.26-.574.39-.938.39h-9.83Zm0-1.32h9.83V6.5h-9.83v7.082Zm0-8.082h9.83V3.418h-9.83V5.5Z"})});/**
|
|
622
|
+
* @license MIT
|
|
623
|
+
* author: Cube Dev Team
|
|
624
|
+
* @cube-dev/ui-kit v0.33.2
|
|
625
|
+
* Released under the MIT license.
|
|
626
|
+
*/const vm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.2 8a5.8 5.8 0 0 0 8.932 4.882l-1.446-1.814A3.5 3.5 0 1 1 7.4 4.55v-2.32A5.8 5.8 0 0 0 2.2 8Zm6.4-3.449a3.504 3.504 0 0 1 2.804 2.633h2.339A5.803 5.803 0 0 0 8.6 2.231v2.32Zm2.88 3.833a3.486 3.486 0 0 1-.857 1.934l1.446 1.815a5.782 5.782 0 0 0 1.718-3.749H11.48ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm0 9.3a2.3 2.3 0 1 1 0-4.6 2.3 2.3 0 0 1 0 4.6Z",clipRule:"evenodd"})});/**
|
|
627
|
+
* @license MIT
|
|
628
|
+
* author: Cube Dev Team
|
|
629
|
+
* @cube-dev/ui-kit v0.33.2
|
|
630
|
+
* Released under the MIT license.
|
|
631
|
+
*/const mm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8 10.324 4.738-4.738a.6.6 0 0 1 .848 0l.142.142a.6.6 0 0 1 0 .848L8.424 11.88a.6.6 0 0 1-.848 0L2.272 6.576a.6.6 0 0 1 0-.848l.142-.142a.6.6 0 0 1 .848 0L8 10.324Z",clipRule:"evenodd"})});/**
|
|
632
|
+
* @license MIT
|
|
633
|
+
* author: Cube Dev Team
|
|
634
|
+
* @cube-dev/ui-kit v0.33.2
|
|
635
|
+
* Released under the MIT license.
|
|
636
|
+
*/const gm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.25 2.7h9.5c.306 0 .53 0 .703.006-.079.153-.187.35-.336.618l-3.045 5.493-.017.03c-.038.07-.088.158-.134.257a.604.604 0 0 0-.068-.004H6.077a4.023 4.023 0 0 0-.132-.253l-.017-.03-3.045-5.493a26.772 26.772 0 0 1-.336-.618c.172-.005.396-.006.703-.006Zm3.032 7.6v2.58c0 .148 0 .264.002.364v.053l.054.001c.1.002.216.002.364.002h2.596c.148 0 .264 0 .364-.002h.053l.001-.054c.002-.1.002-.216.002-.364V10.3H6.282Zm7.885-6.395c.448-.808.672-1.212.626-1.542a1 1 0 0 0-.39-.663c-.267-.2-.73-.2-1.653-.2h-9.5c-.924 0-1.386 0-1.653.2a1 1 0 0 0-.39.663c-.046.33.178.734.626 1.542L4.88 9.4c.077.14.116.21.143.283a1 1 0 0 1 .048.186c.012.078.012.157.012.316v2.696c0 .579 0 .868.116 1.088a1 1 0 0 0 .416.416c.22.116.509.116 1.088.116h2.596c.579 0 .868 0 1.088-.116a1 1 0 0 0 .416-.416c.116-.22.116-.51.116-1.088v-2.696c0-.159 0-.238.012-.316a.995.995 0 0 1 .048-.186c.027-.074.066-.144.143-.283l3.046-5.494Z",clipRule:"evenodd"})});/**
|
|
637
|
+
* @license MIT
|
|
638
|
+
* author: Cube Dev Team
|
|
639
|
+
* @cube-dev/ui-kit v0.33.2
|
|
640
|
+
* Released under the MIT license.
|
|
641
|
+
*/const bm=v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.324 8 2.586 3.262a.6.6 0 0 1 0-.848l.142-.142a.6.6 0 0 1 .848 0L8.88 7.576a.6.6 0 0 1 0 .848l-5.303 5.304a.6.6 0 0 1-.848 0l-.142-.142a.6.6 0 0 1 0-.848L7.324 8Z",clipRule:"evenodd"}),v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.324 8.152 7.586 3.414a.6.6 0 0 1 0-.848l.142-.142a.6.6 0 0 1 .848 0l5.303 5.304a.6.6 0 0 1 0 .848L8.576 13.88a.6.6 0 0 1-.848 0l-.142-.141a.6.6 0 0 1 0-.849l4.738-4.737Z",clipRule:"evenodd"})]});/**
|
|
642
|
+
* @license MIT
|
|
643
|
+
* author: Cube Dev Team
|
|
644
|
+
* @cube-dev/ui-kit v0.33.2
|
|
645
|
+
* Released under the MIT license.
|
|
646
|
+
*/const ym=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 2.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Zm-2.4 6a4 4 0 1 0-.841-.856l-5.532 5.53a.6.6 0 1 0 .849.85l.942-.944 1.166 1.166.424.424.849-.848-.425-.425-1.165-1.165.797-.797 1.187 1.187.425.425.848-.85-.424-.423-1.188-1.188L8.6 8.2Z",clipRule:"evenodd"})});/**
|
|
647
|
+
* @license MIT
|
|
648
|
+
* author: Cube Dev Team
|
|
649
|
+
* @cube-dev/ui-kit v0.33.2
|
|
650
|
+
* Released under the MIT license.
|
|
651
|
+
*/const xm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m5.676 8 4.738-4.738a.6.6 0 0 0 0-.848l-.142-.142a.6.6 0 0 0-.848 0L4.12 7.576a.6.6 0 0 0 0 .848l5.303 5.304a.6.6 0 0 0 .848 0l.142-.142a.6.6 0 0 0 0-.848L5.676 8Z",clipRule:"evenodd"})});/**
|
|
652
|
+
* @license MIT
|
|
653
|
+
* author: Cube Dev Team
|
|
654
|
+
* @cube-dev/ui-kit v0.33.2
|
|
655
|
+
* Released under the MIT license.
|
|
656
|
+
*/const wm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.6 2a.6.6 0 0 0-1.2 0v8.995a.59.59 0 0 0 0 .01V14a.6.6 0 0 0 .6.6h12a.6.6 0 1 0 0-1.2H2.6v-2.112l4.355-3.484 1.62 1.62a.6.6 0 0 0 .8.045l5-4a.6.6 0 1 0-.75-.938l-4.58 3.665-1.62-1.62a.6.6 0 0 0-.8-.045L2.6 9.751V2Z",clipRule:"evenodd"})});/**
|
|
657
|
+
* @license MIT
|
|
658
|
+
* author: Cube Dev Team
|
|
659
|
+
* @cube-dev/ui-kit v0.33.2
|
|
660
|
+
* Released under the MIT license.
|
|
661
|
+
*/const $m=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.575.8h.85c.539 0 .98 0 1.337.03.371.03.706.094 1.018.253a2.6 2.6 0 0 1 1.137 1.137c.159.312.223.647.254 1.018.03.358.03.798.029 1.337v1.433c.462.015.765.06 1.017.188a1.8 1.8 0 0 1 .787.787c.196.385.196.889.196 1.897v3.24c0 1.008 0 1.512-.196 1.897a1.8 1.8 0 0 1-.787.787c-.385.196-.889.196-1.897.196H4.68c-1.008 0-1.512 0-1.897-.196a1.8 1.8 0 0 1-.787-.787c-.196-.385-.196-.889-.196-1.897V8.88c0-1.008 0-1.512.196-1.897a1.8 1.8 0 0 1 .787-.787c.252-.128.555-.173 1.017-.188V4.575c0-.539 0-.98.03-1.337.03-.371.094-.706.253-1.018A2.6 2.6 0 0 1 5.22 1.083C5.532.924 5.867.86 6.238.83 6.596.8 7.036.8 7.575.8ZM11 4.6V6H5V4.6c0-.57 0-.961.025-1.265.025-.296.069-.455.128-.57a1.4 1.4 0 0 1 .611-.612c.116-.06.275-.103.571-.128C6.64 2 7.03 2 7.6 2h.8c.57 0 .961 0 1.265.025.296.025.455.069.57.128a1.4 1.4 0 0 1 .613.611c.058.116.103.275.127.571C11 3.64 11 4.03 11 4.6ZM9.1 9.718c0 .36-.173.68-.44.88v1.56H7.34v-1.56A1.098 1.098 0 0 1 8 8.618a1.1 1.1 0 0 1 1.1 1.1Z",clipRule:"evenodd"})});/**
|
|
662
|
+
* @license MIT
|
|
663
|
+
* author: Cube Dev Team
|
|
664
|
+
* @cube-dev/ui-kit v0.33.2
|
|
665
|
+
* Released under the MIT license.
|
|
666
|
+
*/const Em=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.425.8h-.85c-.539 0-.98 0-1.337.03-.371.03-.706.094-1.018.253A2.6 2.6 0 0 0 4.083 2.22c-.159.312-.223.647-.254 1.018-.029.358-.029.798-.029 1.337v1.433c-.462.015-.765.06-1.017.188a1.8 1.8 0 0 0-.787.787C1.8 7.368 1.8 7.872 1.8 8.88v3.24c0 1.008 0 1.512.196 1.897a1.8 1.8 0 0 0 .787.787C3.168 15 3.672 15 4.68 15h6.64c1.008 0 1.512 0 1.897-.196a1.8 1.8 0 0 0 .787-.787c.196-.385.196-.889.196-1.897V8.88c0-1.008 0-1.512-.196-1.897a1.8 1.8 0 0 0-.787-.787c-.252-.128-.555-.173-1.017-.188V4.575c0-.539 0-.98-.03-1.337-.03-.371-.094-.706-.253-1.018a2.6 2.6 0 0 0-1.137-1.137C10.468.924 10.133.86 9.762.83 9.404.8 8.964.8 8.425.8ZM11 6V4.6c0-.57 0-.961-.025-1.265-.024-.296-.069-.455-.127-.57a1.4 1.4 0 0 0-.612-.612c-.116-.06-.275-.103-.571-.128C9.36 2 8.97 2 8.4 2h-.8c-.57 0-.961 0-1.265.025-.296.025-.455.069-.57.128a1.4 1.4 0 0 0-.612.611c-.06.116-.103.275-.128.571C5.001 3.64 5 4.03 5 4.6V6h6ZM4.68 7.2h6.64c.524 0 .845 0 1.085.02a1.536 1.536 0 0 1 .258.042.142.142 0 0 1 .008.003h.001a.6.6 0 0 1 .263.263l.001.003.002.006a1.528 1.528 0 0 1 .041.259c.02.24.021.56.021 1.084v3.24c0 .524 0 .845-.02 1.085a1.528 1.528 0 0 1-.042.258.6.6 0 0 1-.266.272h-.002l-.007.003a1.546 1.546 0 0 1-.258.041c-.24.02-.561.021-1.085.021H4.68c-.524 0-.845-.001-1.084-.02a1.547 1.547 0 0 1-.259-.042.6.6 0 0 1-.272-.266l-.003-.009a1.538 1.538 0 0 1-.041-.258C3 12.964 3 12.643 3 12.12V8.88c0-.524.001-.845.02-1.085a1.538 1.538 0 0 1 .042-.258l.003-.01a.6.6 0 0 1 .263-.262l.009-.003a1.537 1.537 0 0 1 .259-.041c.24-.02.56-.021 1.084-.021Zm3.92 3.429a1 1 0 1 0-1.2 0v1.418h1.2v-1.418Z",clipRule:"evenodd"})});/**
|
|
667
|
+
* @license MIT
|
|
668
|
+
* author: Cube Dev Team
|
|
669
|
+
* @cube-dev/ui-kit v0.33.2
|
|
670
|
+
* Released under the MIT license.
|
|
671
|
+
*/const Sm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.2 3.2a1.2 1.2 0 1 1-2.4 0 1.2 1.2 0 0 1 2.4 0Zm0 4.8a1.2 1.2 0 1 1-2.4 0 1.2 1.2 0 0 1 2.4 0ZM8 14a1.2 1.2 0 1 0 0-2.4A1.2 1.2 0 0 0 8 14Z",clipRule:"evenodd"})});/**
|
|
672
|
+
* @license MIT
|
|
673
|
+
* author: Cube Dev Team
|
|
674
|
+
* @cube-dev/ui-kit v0.33.2
|
|
675
|
+
* Released under the MIT license.
|
|
676
|
+
*/const Pm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.425 1h1.289l-.887 3.64h3.983L11.697 1h1.289l-.887 3.64h3.195l-.313 1.283h-3.195l-1.024 4.205h3.514l-.313 1.283H10.45L9.575 15H8.286l.875-3.589H5.178L4.303 15H3.014l.875-3.589H.706l.313-1.283H4.2l1.025-4.205H1.724l.313-1.283h3.501L6.425 1Zm3.048 9.128 1.025-4.205H6.515L5.49 10.128h3.983Z",clipRule:"evenodd"})});/**
|
|
677
|
+
* @license MIT
|
|
678
|
+
* author: Cube Dev Team
|
|
679
|
+
* @cube-dev/ui-kit v0.33.2
|
|
680
|
+
* Released under the MIT license.
|
|
681
|
+
*/const Tm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.8a5.8 5.8 0 0 1-.6-11.57v5.765a.6.6 0 0 0 .134.384l3.602 4.501c-.904.582-1.98.92-3.136.92Zm4.072-1.67a5.781 5.781 0 0 0 1.716-3.759H9.065l3.007 3.759Zm1.67-4.959A5.803 5.803 0 0 0 8.6 2.231v4.94h5.141ZM1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Z",clipRule:"evenodd"})});/**
|
|
682
|
+
* @license MIT
|
|
683
|
+
* author: Cube Dev Team
|
|
684
|
+
* @cube-dev/ui-kit v0.33.2
|
|
685
|
+
* Released under the MIT license.
|
|
686
|
+
*/const Cm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.324 8 5.586 3.262a.6.6 0 0 1 0-.848l.142-.142a.6.6 0 0 1 .848 0l5.303 5.304a.6.6 0 0 1 0 .848l-5.303 5.304a.6.6 0 0 1-.848 0l-.142-.142a.6.6 0 0 1 0-.848L10.324 8Z",clipRule:"evenodd"})});/**
|
|
687
|
+
* @license MIT
|
|
688
|
+
* author: Cube Dev Team
|
|
689
|
+
* @cube-dev/ui-kit v0.33.2
|
|
690
|
+
* Released under the MIT license.
|
|
691
|
+
*/const Im=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",d:"M8.214 12.787c1.743 0 2.75-1.779 2.75-4.855 0-3.065-1.007-4.832-2.75-4.832C6.482 3.1 5.5 4.867 5.5 7.932c0 3.076.982 4.855 2.714 4.855Zm-5.674 0c1.1 0 2.246-.808 2.246-2.445 0-1.65-1.041-2.235-1.907-2.995-.667-.597-1.24-1.217-1.24-1.919 0-.585.41-.994.9-.994.691 0 .972.854.96 1.567h1.182C4.692 4.341 4.178 3.1 2.54 3.1.715 3.1.352 4.586.352 5.451c0 1.334.866 2.27 1.65 2.96.164.152.327.281.48.398.573.456 1.017.819 1.017 1.51 0 .56-.28 1.122-.96 1.122-.888 0-1.064-.924-1.122-1.836H.2c-.012 1.72.69 3.182 2.34 3.182ZM8.86 14.6h1.31l-.843-2.398h-1.31L8.86 14.6Zm-.647-3.124c-.89 0-1.463-1.38-1.463-3.544 0-2.153.574-3.522 1.463-3.522.889 0 1.462 1.369 1.462 3.522 0 2.164-.573 3.544-1.462 3.544Zm3.884 1.205h3.767v-1.263h-2.48V3.205h-1.287v9.476Z"})});/**
|
|
692
|
+
* @license MIT
|
|
693
|
+
* author: Cube Dev Team
|
|
694
|
+
* @cube-dev/ui-kit v0.33.2
|
|
695
|
+
* Released under the MIT license.
|
|
696
|
+
*/const Rm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 1.4a.6.6 0 0 0-.6.6v12a.6.6 0 0 0 .6.6h14a.6.6 0 0 0 .6-.6V2a.6.6 0 0 0-.6-.6H1Zm.6 4.15V2.6h3.617v2.95H1.6Zm4.517.9v3.1h3.766v-3.1H6.117Zm4.666-.9V2.6H14.4v2.95h-3.617Zm3.617.9v3.1h-3.617v-3.1H14.4Zm0 4v2.95h-3.617v-2.95H14.4ZM6.117 13.4h3.766v-2.95H6.117v2.95ZM1.6 10.45h3.617v2.95H1.6v-2.95Zm4.517-4.9h3.766V2.6H6.117v2.95Zm-4.517.9h3.617v3.1H1.6v-3.1Z",clipRule:"evenodd"})});/**
|
|
697
|
+
* @license MIT
|
|
698
|
+
* author: Cube Dev Team
|
|
699
|
+
* @cube-dev/ui-kit v0.33.2
|
|
700
|
+
* Released under the MIT license.
|
|
701
|
+
*/const Lm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.995 14.306c-.053.217.21.375.374.216l9.036-8.621a.224.224 0 0 0-.155-.387h-3.235l2.967-3.749a.226.226 0 0 0-.177-.365H6.813a.224.224 0 0 0-.195.113L2.57 8.504a.225.225 0 0 0 .194.338h2.597l-1.225 4.9-.14.564ZM10.997 2.5 7.741 6.614h3.323l-5.269 5.027.975-3.899H4.282L7.317 2.5h3.68Z",clipRule:"evenodd"})});/**
|
|
702
|
+
* @license MIT
|
|
703
|
+
* author: Cube Dev Team
|
|
704
|
+
* @cube-dev/ui-kit v0.33.2
|
|
705
|
+
* Released under the MIT license.
|
|
706
|
+
*/const Am=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m13.338 5.578-2.536 2.42L5.92 2.67l.786-1.358a.124.124 0 0 1 .108-.063h5.993c.104 0 .162.12.098.203L9.81 5.364h3.442c.112 0 .167.138.086.214ZM8.731 9.975l3.131 3.434h1.697L3.241 2.091H1.543l2.882 3.161-1.767 3.053a.125.125 0 0 0 .108.187H5.49L4.094 14.08c-.03.122.117.208.208.12L8.73 9.975Z",clipRule:"evenodd"})});/**
|
|
707
|
+
* @license MIT
|
|
708
|
+
* author: Cube Dev Team
|
|
709
|
+
* @cube-dev/ui-kit v0.33.2
|
|
710
|
+
* Released under the MIT license.
|
|
711
|
+
*/const Mm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",d:"M13.25 5.614H9.808l3.095-3.91a.126.126 0 0 0-.098-.204H6.813a.124.124 0 0 0-.108.063L2.656 8.555a.125.125 0 0 0 .108.187H5.49L4.092 14.33c-.03.122.117.207.208.12l9.036-8.622a.124.124 0 0 0-.086-.214Z"})});/**
|
|
712
|
+
* @license MIT
|
|
713
|
+
* author: Cube Dev Team
|
|
714
|
+
* @cube-dev/ui-kit v0.33.2
|
|
715
|
+
* Released under the MIT license.
|
|
716
|
+
*/const Fm=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.7 8A5.7 5.7 0 1 1 2.3 8a5.7 5.7 0 0 1 11.4 0ZM15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM8.654 5.091V7.74l2.151 2.173a.616.616 0 0 1 .188.451.585.585 0 0 1-.188.442.662.662 0 0 1-.45.187.582.582 0 0 1-.45-.187l-2.288-2.37a.798.798 0 0 1-.128-.215.654.654 0 0 1-.043-.239v-2.89a.59.59 0 0 1 .606-.604.583.583 0 0 1 .602.604Z",clipRule:"evenodd"})});/**
|
|
717
|
+
* @license MIT
|
|
718
|
+
* author: Cube Dev Team
|
|
719
|
+
* @cube-dev/ui-kit v0.33.2
|
|
720
|
+
* Released under the MIT license.
|
|
721
|
+
*/const km=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8 5.676-4.738 4.738a.6.6 0 0 1-.848 0l-.142-.142a.6.6 0 0 1 0-.848L7.576 4.12a.6.6 0 0 1 .848 0l5.304 5.303a.6.6 0 0 1 0 .848l-.142.142a.6.6 0 0 1-.848 0L8 5.676Z",clipRule:"evenodd"})});/**
|
|
722
|
+
* @license MIT
|
|
723
|
+
* author: Cube Dev Team
|
|
724
|
+
* @cube-dev/ui-kit v0.33.2
|
|
725
|
+
* Released under the MIT license.
|
|
726
|
+
*/const Om=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.305 1.866A1.22 1.22 0 0 0 .182 3.562l4.16 9.827a1.22 1.22 0 0 0 1.123.745h5.07c.49 0 .933-.293 1.124-.745l4.16-9.827a1.22 1.22 0 0 0-1.125-1.696h-4.45c-.49 0-.932.293-1.123.745L8 5.258 6.88 2.611a1.22 1.22 0 0 0-1.124-.745h-4.45ZM8.673 6.85l2.204 5.207 3.787-8.95h-4.407L8.673 6.85Zm1.212 6.045L5.743 3.106H1.336l4.142 9.788h4.407Z",clipRule:"evenodd"})});/**
|
|
727
|
+
* @license MIT
|
|
728
|
+
* author: Cube Dev Team
|
|
729
|
+
* @cube-dev/ui-kit v0.33.2
|
|
730
|
+
* Released under the MIT license.
|
|
731
|
+
*/const wc=N("CloseIcon",rm),Dm=N("ExclamationIcon",im),_m=N("DangerIcon",om);N("PlusIcon",am);N("AiIcon",sm);const Ey=N("AreaChartIcon",lm);N("BackwardIcon",cm);const Sy=N("BarChartIcon",um);N("BooleanIcon",dm);N("CountIcon",fm);N("CubeIcon",hm);N("DateIcon",pm);const Py=N("DonutIcon",vm);N("DownIcon",mm);N("FilterIcon",gm);N("ForwardIcon",bm);N("KeyIcon",ym);N("LeftIcon",xm);const Ty=N("LineChartIcon",wm);N("LockFilledIcon",$m);N("LockIcon",Em);N("MoreIcon",Sm);N("NumberIcon",Pm);const Cy=N("PieChartIcon",Tm);N("RightIcon",Cm);N("SqlIcon",Im);const Iy=N("TableIcon",Rm);N("ThunderboltIcon",Lm);N("ThunderboltCrossedIcon",Am);N("ThunderboltFilledIcon",Mm);N("TimeIcon",Fm);N("UpIcon",km);N("ViewIcon",Om);/**
|
|
732
|
+
* @license MIT
|
|
733
|
+
* author: Cube Dev Team
|
|
734
|
+
* @cube-dev/ui-kit v0.33.2
|
|
735
|
+
* Released under the MIT license.
|
|
736
|
+
*/const Bm=N("SuccessIcon",v.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"m13.67 5.88-5.8 5.8a1.1 1.1 0 0 1-1.55 0l-3-3a1.1 1.1 0 0 1 1.56-1.55l2.21 2.21 5.03-5.02a1.1 1.1 0 0 1 1.55 1.56Z"})})),Hm=k({styles:{boxSizing:"border-box",display:"flex",alignSelf:"start",gridArea:"icon",minHeight:"3x",placeContent:"center"}}),Nm=k({styles:{boxSizing:"border-box",display:"flex",fill:{"":"#note-bg",attention:"#note-bg",success:"#success-bg",danger:"#danger-bg"},color:{"":"#note-text",attention:"#note-text",success:"#success-text",danger:"#danger-text"},borderRadius:"0.5x",width:"3x",height:"3x",padding:"0.5x",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%"}}}),jm=f.memo(function(t){const{icon:n,type:r}=t;return v.jsx(Hm,{children:n||v.jsx(Nm,{mods:{attention:r==="attention",success:r==="success",danger:r==="danger"},children:Vm[r]})})}),Vm={attention:v.jsx(Dm,{}),success:v.jsx(Bm,{}),danger:v.jsx(_m,{})};/**
|
|
737
|
+
* @license MIT
|
|
738
|
+
* author: Cube Dev Team
|
|
739
|
+
* @cube-dev/ui-kit v0.33.2
|
|
740
|
+
* Released under the MIT license.
|
|
741
|
+
*/const Km=k(Is,{as:"div",preset:"h6",styles:{gridArea:"header",cursor:"default","&:not(:empty)":{margin:"0.25x 0 0.5x"}}}),Um=f.memo(function(t){const{header:n,...r}=t;return v.jsx(Km,{...r,children:n})});/**
|
|
742
|
+
* @license MIT
|
|
743
|
+
* author: Cube Dev Team
|
|
744
|
+
* @cube-dev/ui-kit v0.33.2
|
|
745
|
+
* Released under the MIT license.
|
|
746
|
+
*/const zm=k(Ri,{as:"p",preset:"t4",styles:{gridArea:"description",display:"-webkit-box","-webkit-line-clamp":3,"-webkit-box-orient":"vertical",overflow:"hidden"}}),Gm=f.memo(function(t){const{description:n,...r}=t;return v.jsx(zm,{...re(r,{onPointerDown:i=>i.stopPropagation(),onMouseDown:i=>i.stopPropagation()}),children:n})});var $c={},Ec={exports:{}},U={};/** @license React v16.13.1
|
|
747
|
+
* react-is.production.min.js
|
|
748
|
+
*
|
|
749
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
750
|
+
*
|
|
751
|
+
* This source code is licensed under the MIT license found in the
|
|
752
|
+
* LICENSE file in the root directory of this source tree.
|
|
753
|
+
*/var te=typeof Symbol=="function"&&Symbol.for,zi=te?Symbol.for("react.element"):60103,Gi=te?Symbol.for("react.portal"):60106,Yn=te?Symbol.for("react.fragment"):60107,Jn=te?Symbol.for("react.strict_mode"):60108,Qn=te?Symbol.for("react.profiler"):60114,er=te?Symbol.for("react.provider"):60109,tr=te?Symbol.for("react.context"):60110,Wi=te?Symbol.for("react.async_mode"):60111,nr=te?Symbol.for("react.concurrent_mode"):60111,rr=te?Symbol.for("react.forward_ref"):60112,ir=te?Symbol.for("react.suspense"):60113,Wm=te?Symbol.for("react.suspense_list"):60120,or=te?Symbol.for("react.memo"):60115,ar=te?Symbol.for("react.lazy"):60116,Zm=te?Symbol.for("react.block"):60121,qm=te?Symbol.for("react.fundamental"):60117,Xm=te?Symbol.for("react.responder"):60118,Ym=te?Symbol.for("react.scope"):60119;function ue(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case zi:switch(e=e.type,e){case Wi:case nr:case Yn:case Qn:case Jn:case ir:return e;default:switch(e=e&&e.$$typeof,e){case tr:case rr:case ar:case or:case er:return e;default:return t}}case Gi:return t}}}function Sc(e){return ue(e)===nr}U.AsyncMode=Wi;U.ConcurrentMode=nr;U.ContextConsumer=tr;U.ContextProvider=er;U.Element=zi;U.ForwardRef=rr;U.Fragment=Yn;U.Lazy=ar;U.Memo=or;U.Portal=Gi;U.Profiler=Qn;U.StrictMode=Jn;U.Suspense=ir;U.isAsyncMode=function(e){return Sc(e)||ue(e)===Wi};U.isConcurrentMode=Sc;U.isContextConsumer=function(e){return ue(e)===tr};U.isContextProvider=function(e){return ue(e)===er};U.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===zi};U.isForwardRef=function(e){return ue(e)===rr};U.isFragment=function(e){return ue(e)===Yn};U.isLazy=function(e){return ue(e)===ar};U.isMemo=function(e){return ue(e)===or};U.isPortal=function(e){return ue(e)===Gi};U.isProfiler=function(e){return ue(e)===Qn};U.isStrictMode=function(e){return ue(e)===Jn};U.isSuspense=function(e){return ue(e)===ir};U.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yn||e===nr||e===Qn||e===Jn||e===ir||e===Wm||typeof e=="object"&&e!==null&&(e.$$typeof===ar||e.$$typeof===or||e.$$typeof===er||e.$$typeof===tr||e.$$typeof===rr||e.$$typeof===qm||e.$$typeof===Xm||e.$$typeof===Ym||e.$$typeof===Zm)};U.typeOf=ue;Ec.exports=U;var Jm=Ec.exports;Object.defineProperty($c,"__esModule",{value:!0});var Fr=f,Qm=Jm;function Pc(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=[]),Fr.Children.toArray(e).reduce(function(r,i,o){return Qm.isFragment(i)?r.push.apply(r,Pc(i.props.children,t+1,n.concat(i.key||o))):Fr.isValidElement(i)?r.push(Fr.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r},[])}var eg=$c.default=Pc;/**
|
|
754
|
+
* @license MIT
|
|
755
|
+
* author: Cube Dev Team
|
|
756
|
+
* @cube-dev/ui-kit v0.33.2
|
|
757
|
+
* Released under the MIT license.
|
|
758
|
+
*/const tg=k(ji,{styles:{gridArea:"footer",gap:"1x 2x",flow:"row wrap","&:not(:empty)":{margin:{"":"0.5x top","has-description":"1x top"}}}}),ng=f.memo(function(t){const{actions:n,onClose:r,onDismiss:i,hasDescription:o}=t;return v.jsx(tg,{mods:{"has-description":o},children:eg(typeof n=="function"?n({onClose:r,onDismiss:i}):n).filter(a=>Pi.isElement(a)).map((a,s)=>{const{props:c}=a,l=s===0?"primary":"secondary";return _.cloneElement(a,{...c,type:c.type??l},c.children)})})});/**
|
|
759
|
+
* @license MIT
|
|
760
|
+
* author: Cube Dev Team
|
|
761
|
+
* @cube-dev/ui-kit v0.33.2
|
|
762
|
+
* Released under the MIT license.
|
|
763
|
+
*/const rg=k(At,{icon:v.jsx(wc,{}),label:"Close the notification",qa:"NotificationCloseButton",type:"neutral",size:"small",styles:{gridArea:"close",display:"flex",padding:"1x"}}),ig=f.memo(function(t){const{onPress:n}=t;return v.jsx(rg,{onPress:n})});/**
|
|
764
|
+
* @license MIT
|
|
765
|
+
* author: Cube Dev Team
|
|
766
|
+
* @cube-dev/ui-kit v0.33.2
|
|
767
|
+
* Released under the MIT license.
|
|
768
|
+
*/const og=f.createContext(null);function ag(e){const{children:t,...n}=e;return v.jsx(og.Provider,{value:n,children:t})}/**
|
|
769
|
+
* @license MIT
|
|
770
|
+
* author: Cube Dev Team
|
|
771
|
+
* @cube-dev/ui-kit v0.33.2
|
|
772
|
+
* Released under the MIT license.
|
|
773
|
+
*/const sg=k({styles:{boxSizing:"border-box",position:"relative",display:"grid",width:"100%",padding:"0.5x 0.5x 1.5x 1.5x",gridAreas:`
|
|
774
|
+
". . . . close"
|
|
775
|
+
"icon . header . close"
|
|
776
|
+
"icon . description . close"
|
|
777
|
+
". . footer footer footer"
|
|
778
|
+
`,gridColumns:"min-content 1x minmax(0, auto) 1x minmax(0, min-content)",gridRows:"1x minmax(0, auto) minmax(0, auto) minmax(0, auto)",fill:"#white",boxShadow:{"":"0 0 0 4bw #purple-04.0 inset",focused:"0 0 0 4bw #purple-04 inset"}}}),lg=f.forwardRef(function(t,n){const{onClose:r,actions:i,header:o,icon:a,description:s,id:c,styles:l,type:u="attention",isDismissible:d=!0,duration:h=null,attributes:p={},qa:g="notification",timer:m,onDismiss:x}=t,$=Ro(),y=Ro(),w=ae(()=>{r?.()}),T=ae(()=>{d&&x?.()}),{hoverProps:C,isHovered:L}=Le({}),{isFocusVisible:A,focusProps:b}=el({within:!0});return sc({timer:m,delay:h,callback:T,isDisabled:A||L||!d}),v.jsx(Xd,{children:v.jsx(ag,{onClose:r,children:v.jsxs(sg,{...re(p,C,b),ref:n,styles:l,"data-id":c,"data-qa":g,"aria-labelledby":$,"aria-describedby":y,mods:{focused:A,"is-dismissible":d},children:[v.jsx(jm,{icon:a,type:u}),v.jsx(Um,{header:o,id:$}),s&&v.jsx(Gm,{description:s,id:y}),v.jsx(ng,{hasDescription:!!s,actions:i,onClose:w,onDismiss:T}),d&&v.jsx(ig,{onPress:T})]})})})});/**
|
|
779
|
+
* @license MIT
|
|
780
|
+
* author: Cube Dev Team
|
|
781
|
+
* @cube-dev/ui-kit v0.33.2
|
|
782
|
+
* Released under the MIT license.
|
|
783
|
+
*/const cg=k({styles:{overflow:"hidden",radius:"0.5x",boxShadow:"0 0.5x 2x #shadow",pointerEvents:"auto"}}),ug=f.memo(function(t){const{item:n,state:r,onRemoveNotification:i,id:o,isDisabledTimer:a,onDismissNotification:s}=t,{props:c,key:l}=n,u=f.useRef(null),d=wn(()=>i(o),c.onClose),h=wn(()=>s(o),()=>i(o),c.onDismiss),p=ae(({key:x})=>{if(c.isDismissible===!1)return;["Delete","Backspace","Escape"].includes(x)&&h()}),{itemProps:g}=em({key:l,ref:u,state:r}),{timer:m}=sc({callback:h,delay:c.duration,isDisabled:a});return v.jsx(cg,{children:v.jsx(lg,{ref:u,...c,timer:m,attributes:{...g,onKeyDown:p,role:"status","aria-atomic":"true"},qa:"FloatingNotification",onDismiss:h,onClose:d})})});/**
|
|
784
|
+
* @license MIT
|
|
785
|
+
* author: Cube Dev Team
|
|
786
|
+
* @cube-dev/ui-kit v0.33.2
|
|
787
|
+
* Released under the MIT license.
|
|
788
|
+
*/const Tc="cube-notifications-css-transition",Cc=250;function dg(e){const{children:t,...n}=e,r=f.useRef(null),i=f.useCallback(()=>{r.current&&r.current.style.setProperty("--__notification-size__",`${r.current.scrollHeight}px`)},[]);return v.jsx(gc,{unmountOnExit:!0,mountOnEnter:!0,timeout:Cc,classNames:Tc,onEnter:i,onExit:i,...n,children:v.jsx(fg,{ref:r,children:t})})}const fg=Bt.div`
|
|
789
|
+
transition-property: height, opacity, margin-top, margin-bottom;
|
|
790
|
+
transition-duration: ${Cc}ms;
|
|
791
|
+
transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
792
|
+
|
|
793
|
+
&.${Tc} {
|
|
794
|
+
&-enter {
|
|
795
|
+
height: 0;
|
|
796
|
+
opacity: 0;
|
|
797
|
+
will-change: height, opacity;
|
|
798
|
+
}
|
|
799
|
+
&-enter-active {
|
|
800
|
+
height: var(--__notification-size__);
|
|
801
|
+
opacity: 1;
|
|
802
|
+
will-change: height, opacity;
|
|
803
|
+
}
|
|
804
|
+
&-exit {
|
|
805
|
+
height: var(--__notification-size__);
|
|
806
|
+
opacity: 1;
|
|
807
|
+
will-change: height, opacity, margin-top;
|
|
808
|
+
}
|
|
809
|
+
&-exit-active {
|
|
810
|
+
margin-top: -8px;
|
|
811
|
+
height: 0;
|
|
812
|
+
opacity: 0;
|
|
813
|
+
will-change: height, opacity;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
`;/**
|
|
817
|
+
* @license MIT
|
|
818
|
+
* author: Cube Dev Team
|
|
819
|
+
* @cube-dev/ui-kit v0.33.2
|
|
820
|
+
* Released under the MIT license.
|
|
821
|
+
*/const hg=k({styles:{boxSizing:"border-box",position:"fixed",bottom:"env(safe-area-inset-bottom, 0)",right:"env(safe-area-inset-right, 0)",display:"flex",flexDirection:"column-reverse",width:"auto 100% 50x",height:"100dvh max",padding:"2x",gap:"1x",zIndex:2147483647,overflow:"hidden",isolation:"isolate",pointerEvents:"none"}});function mi(e){const{items:t,children:n,onRemoveNotification:r,onDismissNotification:i,limit:o=5}=e,a=f.useRef(null),[s,c]=f.useState(o+1),l=f.useRef(),{listProps:u,state:d}=Qv({items:t,children:n,ref:a}),{hoverProps:h,isHovered:p}=Le({}),{focusProps:g,isFocusVisible:m}=el({within:!0}),x=ae(C=>{const L=d.collection.getKeyBefore(C.toString())??d.collection.getKeyAfter(C.toString())??d.collection.getLastKey(),A=a.current?.querySelector(`[data-id="${L}"]`);A&&Ge(A)}),$=wn(r,x);let y=[...d.collection].reverse();const w=y.length,T=y.findIndex(C=>C.props.id===l.current);return T!==-1&&(y=y.slice(0,T)),f.useLayoutEffect(()=>{c(o+1)},[w]),f.useLayoutEffect(()=>{s>o&&c(o)},[s]),y.slice(s).forEach(C=>{l.current=C.props.id}),f.useEffect(()=>{l.current&&(i(l.current),r(l.current),y.find(L=>L.props.id===l.current)?.props.onDismiss?.())},[l.current]),v.jsx(hg,{ref:a,qa:"NotificationsBar",role:"region","aria-live":"polite",...re(u,h,g),children:v.jsx(Ov,{enter:!0,exit:!0,component:null,children:y.slice(0,s).map(C=>v.jsx(dg,{children:v.jsx(ug,{isDisabledTimer:p||m,id:C.props.id,item:C,state:d,onRemoveNotification:$,onDismissNotification:i})},C.props.id))})})}mi.Item=vf;/**
|
|
822
|
+
* @license MIT
|
|
823
|
+
* author: Cube Dev Team
|
|
824
|
+
* @cube-dev/ui-kit v0.33.2
|
|
825
|
+
* Released under the MIT license.
|
|
826
|
+
*/const kr="cube:notification:dismiss";function pg(e){const t=f.useMemo(()=>new Date().getTime(),[]),n=f.useRef(0),r=f.useRef([]),[i,o]=f.useState(new Map),a=Object.assign(ae(h=>{const p=n.current++,{id:g=`${t}_${p}`,duration:m,isDismissible:x=!0,...$}=h;return o(y=>{const w=new Map(y);return w.set(g,{id:g,isDismissible:x,duration:m??(x?5e3:null),...$}),w}),{id:g,remove:()=>c(g),update:y=>s(g,y)}}),{success:h=>a({type:"success",...h}),danger:h=>a({type:"danger",...h}),attention:h=>a({type:"attention",...h})}),s=ae((h,p)=>{o(g=>{const m=g.get(h);if(m){const x=new Map(g);return x.set(h,{...m,...p}),x}return g})}),c=ae(h=>{o(p=>{if(p.has(h)){const g=new Map(p);return g.delete(h),g}return p})}),l=ae(h=>{const p=i.get(h);p!=null&&p?.putNotificationInDropdownOnDismiss!==!1&&e?.current?.dispatchEvent(new CustomEvent(kr,{detail:p}))}),u=ae(h=>{const p=m=>h(m.detail),g=()=>e?.current?.removeEventListener(kr,p);return r.current.push(g),e?.current?.addEventListener(kr,p),g});return f.useEffect(()=>()=>r.current.forEach(h=>h()),[]),{api:f.useMemo(()=>({notify:a,update:s,remove:c}),[]),notifications:f.useMemo(()=>[...i.values()],[i]),onDismissNotification:l,addOnDismissListener:u}}/**
|
|
827
|
+
* @license MIT
|
|
828
|
+
* author: Cube Dev Team
|
|
829
|
+
* @cube-dev/ui-kit v0.33.2
|
|
830
|
+
* Released under the MIT license.
|
|
831
|
+
*/const vg=f.createContext(null);function mg(e){const{children:t,rootRef:n}=e,{notifications:r,api:i,addOnDismissListener:o,onDismissNotification:a}=pg(n),s=f.useMemo(()=>({api:i,addOnDismissListener:o}),[]);return v.jsxs(vg.Provider,{value:s,children:[v.jsx(En,{children:v.jsx(mi,{items:r,onRemoveNotification:i.remove,onDismissNotification:a,children:c=>v.jsx(mi.Item,{...c},c.id)})}),t]})}/**
|
|
832
|
+
* @license MIT
|
|
833
|
+
* author: Cube Dev Team
|
|
834
|
+
* @cube-dev/ui-kit v0.33.2
|
|
835
|
+
* Released under the MIT license.
|
|
836
|
+
*/const gg=k({qa:"Underlay",styles:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9,transitionDelay:"0ms",opacity:{"":0,open:.9999},pointerEvents:{"":"none",open:"auto"},fill:"#dark.30",overflow:"hidden",transition:"transform .25s ease-in-out, opacity .25s linear, visibility 0ms linear"}});function bg({isOpen:e,transitionState:t,...n},r){return v.jsx(gg,{ref:r,mods:{open:e},...n})}let yg=f.forwardRef(bg);/**
|
|
837
|
+
* @license MIT
|
|
838
|
+
* author: Cube Dev Team
|
|
839
|
+
* @cube-dev/ui-kit v0.33.2
|
|
840
|
+
* Released under the MIT license.
|
|
841
|
+
*/const xg={entering:!1,entered:!0},Ic=f.createContext(null);function wg(){return f.useContext(Ic)}function $g(e){return v.jsx(mc,{timeout:{enter:0,exit:350},...e,children:t=>v.jsx(Ic.Provider,{value:{transitionState:t},children:f.Children.map(e.children,n=>n&&f.cloneElement(n,{isOpen:!!xg[t],transitionState:t}))})})}/**
|
|
842
|
+
* @license MIT
|
|
843
|
+
* author: Cube Dev Team
|
|
844
|
+
* @cube-dev/ui-kit v0.33.2
|
|
845
|
+
* Released under the MIT license.
|
|
846
|
+
*/function Eg(e,t){let{children:n,isOpen:r,container:i=null,onEnter:o,onEntering:a,onEntered:s,onExit:c,onExiting:l,onExited:u,hideOnClose:d=!1}=e,[h,p]=f.useState(!r),{root:g}=Ye({}),m=f.useCallback(()=>{p(!1),s?.()},[s]),x=f.useCallback(()=>{p(!0),u?.()},[u]);if(!(r||!h)&&!d)return null;let y=v.jsx(Ni,{ref:t,children:v.jsx($g,{appear:!0,in:r,onExit:c,onExiting:l,onExited:x,onEnter:o,onEntering:a,onEntered:m,children:n})});return $i.createPortal(y,i||g||document.body)}let Sg=f.forwardRef(Eg);/**
|
|
847
|
+
* @license MIT
|
|
848
|
+
* author: Cube Dev Team
|
|
849
|
+
* @cube-dev/ui-kit v0.33.2
|
|
850
|
+
* Released under the MIT license.
|
|
851
|
+
*/const Pg={position:"fixed",display:"grid",left:0,top:0,placeItems:{"":"center",'[data-type="fullscreen"]':"center",'[data-type="fullscreenTakeover"] | [data-type="panel"]':"stretch"},boxSizing:"border-box",width:"100vw",height:"100dvh",pointerEvents:"none",zIndex:10,transition:{"":"visibility .5s steps(2, start)",open:"visibility 0s linear"}},Tg=k({qa:"ModalWrapper",styles:Pg}),Cg=k({styles:{display:{"":"none","entering | entered":"grid",exiting:"grid",exited:"none"},zIndex:10,height:{"":"max 90dvh",'[data-type="fullscreenTakeover"] | [data-type="panel"]':"100dvh 100dvh",'[data-type="fullscreen"]':"90dvh 90dvh",'[data-type="fullscreenTakeover"]':"100dvh 100dvh"},width:{width:"288px 90vw"},pointerEvents:"none",transition:"opacity .25s linear, transform .25s ease-in-out",transform:{"":"initial",'[data-type="modal"] & !open':"translate(0, -3x) scale(1, 1)",'[data-type^="fullscreen"] & !open':"translate(0, 0) scale(1.02, 1.02)"},opacity:{"":0,open:.9999}}});function Ig(e,t){let{qa:n,children:r,onClose:i,type:o,styles:a,...s}=e,c=yt(t),{overlayProps:l,underlayProps:u}=bp({...e},c);return v.jsxs(Sg,{...s,children:[o!=="fullscreenTakeover"&&v.jsx(yg,{...u}),v.jsx(Rg,{ref:c,qa:n,type:o,overlayProps:l,styles:a,onClose:i,children:r})]})}let Rg=f.forwardRef(function(t,n){let{qa:r,children:i,isOpen:o,type:a,placement:s,styles:c,overlayProps:l,transitionState:u,...d}=t;xp({isDisabled:u!=="entered"});let{modalProps:h}=Sp({isDisabled:u!=="entered"});return v.jsx(Tg,{"data-type":a,"data-placement":s,children:v.jsx(Cg,{qa:r||"Modal",styles:c,mods:{open:o,entering:u==="entering",exiting:u==="exiting",exited:u==="exited",entered:u==="entered"},"data-type":a,"data-placement":s,...re(d,l,h),ref:n,children:i})})}),Lg=f.forwardRef(Ig);/**
|
|
852
|
+
* @license MIT
|
|
853
|
+
* author: Cube Dev Team
|
|
854
|
+
* @cube-dev/ui-kit v0.33.2
|
|
855
|
+
* Released under the MIT license.
|
|
856
|
+
*/const Rc=f.createContext({});function Lc(){const e=f.useContext(Rc);return yc(e!==null),e}/**
|
|
857
|
+
* @license MIT
|
|
858
|
+
* author: Cube Dev Team
|
|
859
|
+
* @cube-dev/ui-kit v0.33.2
|
|
860
|
+
* Released under the MIT license.
|
|
861
|
+
*/function Ag(e){const{children:t,type:n="modal",onDismiss:r,isDismissable:i,isKeyboardDismissDisabled:o,isOpen:a}=e,s=f.Children.toArray(t);if(s.length>1)throw new Error("Only a single child can be passed to DialogContainer.");const c=f.useRef(),l=f.isValidElement(s[0])?s[0]:null;l&&(c.current=l);const u=typeof a!="boolean"?!!l:a,d={type:n,onClose:r,isDismissable:i};return v.jsx(Lg,{isOpen:u,type:n,isDismissable:i,isKeyboardDismissDisabled:o,onClose:i?r:void 0,children:v.jsx(Rc.Provider,{value:d,children:l})})}/**
|
|
862
|
+
* @license MIT
|
|
863
|
+
* author: Cube Dev Team
|
|
864
|
+
* @cube-dev/ui-kit v0.33.2
|
|
865
|
+
* Released under the MIT license.
|
|
866
|
+
*/function Mg(e){return Zi(e,["value","defaultValue"],"string",t=>String(t))}function Fg(e){return Zi(e,["value","defaultValue"],"object",t=>Array.isArray(t)?t:[])}function kg(e){return Zi(e,["isSelected","defaultSelected"],"boolean",t=>!!t)}function Zi(e,t,n,r){return e={...e},t.forEach(i=>{e[i]===null&&(e[i]=void 0),n&&r&&e[i]!=null&&typeof e[i]!=n&&(e[i]=r(e[i]),console.warn("Wrong value type in",e,"in keys",JSON.stringify(t)))}),e}/**
|
|
867
|
+
* @license MIT
|
|
868
|
+
* author: Cube Dev Team
|
|
869
|
+
* @cube-dev/ui-kit v0.33.2
|
|
870
|
+
* Released under the MIT license.
|
|
871
|
+
*/function Og(e){const[t,n]=f.useState(!1),{title:r,children:i,tooltipStyles:o,width:a,...s}=e;return f.useEffect(()=>{n(!0)},[]),t?v.jsxs(Uv,{...s,children:[i,v.jsx(Jv,{styles:o,...a?{width:a}:null,children:r})]}):v.jsx(v.Fragment,{children:i})}let Dg=Og;/**
|
|
872
|
+
* @license MIT
|
|
873
|
+
* author: Cube Dev Team
|
|
874
|
+
* @cube-dev/ui-kit v0.33.2
|
|
875
|
+
* Released under the MIT license.
|
|
876
|
+
*/const _g=k({styles:{display:"flex",flow:"row"}}),Bg=f.forwardRef(function(t,n){const r=G(t,ee);return v.jsx(_g,{...Y(t,{eventProps:!0}),ref:n,styles:r})});/**
|
|
877
|
+
* @license MIT
|
|
878
|
+
* author: Cube Dev Team
|
|
879
|
+
* @cube-dev/ui-kit v0.33.2
|
|
880
|
+
* Released under the MIT license.
|
|
881
|
+
*/const Hg=v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 125",style:{enableBackground:"new 0 0 100 100",width:".8em",height:".8em",transform:"rotate(-5deg)"},children:v.jsx("switch",{children:v.jsx("g",{children:v.jsx("polygon",{fill:"currentColor",points:"97.5,47.5 90.5,26.1 61.3,35.6 61.3,4.8 38.7,4.8 38.7,35.6 9.5,26.1 2.5,47.5 31.8,57 13.7,82 31.9,95.2 50,70.3 68.1,95.2 86.3,82 68.2,57"})})})}),Ng={"(required)":"(required)","(optional)":"(optional)"},qi={preset:"t3",color:{"":"#dark.85",invalid:"#danger-text"},whiteSpace:"nowrap"},Ac={display:"block",preset:"h6",color:{"":"#dark",invalid:"#danger-text"},whiteSpace:"nowrap",width:{"":"initial",side:"@(label-width, initial)"}},jg=k({as:"label",qa:"Label",styles:Ac});function Vg(e,t){e=Ye(e);let{as:n,qa:r,children:i,labelPosition:o="top",isRequired:a,necessityIndicator:s=a!=null?"icon":null,includeNecessityIndicatorInAccessibilityName:c=!1,htmlFor:l,isDisabled:u,validationState:d,for:h,onClick:p,...g}=e,m=yt(t);const x=G(g,ee);let $=T=>Ng[T],y=$(a?"(required)":"(optional)"),w=v.jsx("span",{"aria-label":c?$("(required)"):void 0,children:Hg});return v.jsx(jg,{...Y(g),ref:m,styles:x,htmlFor:h||l,mods:{side:o==="side",disabled:u,invalid:d==="invalid",valid:d==="valid"},onClick:p,children:typeof i!="string"?i:v.jsxs(v.Fragment,{children:[i,(s==="label"||s==="icon"&&a)&&" ",s==="label"&&v.jsx("span",{"aria-hidden":c?void 0:a,children:y}),s==="icon"&&a&&w]})})}let Kg=f.forwardRef(Vg);/**
|
|
882
|
+
* @license MIT
|
|
883
|
+
* author: Cube Dev Team
|
|
884
|
+
* @cube-dev/ui-kit v0.33.2
|
|
885
|
+
* Released under the MIT license.
|
|
886
|
+
*/const Ug=k({qa:"Field",styles:{display:"grid",gridColumns:{"":"minmax(0, 1fr)","has-sider":"@(full-label-width, auto) minmax(0, 1fr)"},gap:0,placeItems:"baseline stretch","@full-label-width":"(@label-width + 1x)",LabelArea:{display:"block",width:{"":"initial","has-sider":"@label-width"},margin:{"":"1x bottom","has-sider":"1x right",":empty":"0"}},InputArea:{display:"block",flow:"column",gridColumn:{"":"initial","has-sider":2}}}}),zg=k({qa:"Field_Message",styles:{preset:"t3",color:{"":"#dark.75",invalid:"#danger-text",valid:"#success-text",disabled:"#dark.40"},textAlign:"left",userSelect:"none"}}),Mc=f.forwardRef(function(t,n){const{as:r,labelPosition:i="top",label:o,extra:a,styles:s,isRequired:c,isDisabled:l,labelStyles:u,necessityIndicator:d,labelProps:h,fieldProps:p,message:g,messageStyles:m,description:x,Component:$,validationState:y,requiredMark:w=!0,tooltip:T,isHidden:C,labelSuffix:L,children:A}=t,b=o?v.jsx(Kg,{as:r==="label"?"div":"label",styles:u,labelPosition:i,isRequired:w?c:!1,isDisabled:l,necessityIndicator:d,validationState:y,"aria-label":o,...h,children:v.jsxs(Bg,{placeContent:"baseline space-between",width:"100%",children:[v.jsxs(pc,{placeItems:"center",gap:"0.25x",children:[v.jsx("div",{children:o}),T?v.jsx(Dg,{activeWrap:!0,title:T,width:"initial max-content 40x",children:v.jsx(Ru,{style:{color:"var(--purple-text-color)",margin:"0 4px"}})}):null,v.jsx("div",{children:L})]}),a&&v.jsx(Ii,{preset:"t3",children:a})]})}):null;let R=x?v.jsx("div",{"data-element":"Description",children:Jd(x,()=>v.jsx(Ri,{children:x}))}):null;const E={"has-sider":i==="side","has-description":!!x,invalid:y==="invalid",valid:y==="valid"};return v.jsxs(v.Fragment,{children:[v.jsxs(Ug,{ref:n,as:r??"div",mods:E,isHidden:C,styles:s,...p,children:[b||R?v.jsxs("div",{"data-element":"LabelArea",children:[b,R]}):null,v.jsxs("div",{"data-element":"InputArea",children:[$,g&&!l&&v.jsx(zg,{mods:E,styles:m,role:y==="invalid"?"alert":void 0,children:g})]})]}),A]})});/**
|
|
887
|
+
* @license MIT
|
|
888
|
+
* author: Cube Dev Team
|
|
889
|
+
* @cube-dev/ui-kit v0.33.2
|
|
890
|
+
* Released under the MIT license.
|
|
891
|
+
*/const He={};function Gg(e){if(!e)return;He[e]||(He[e]=[]);let t=0,n;do n=t?`${e}_${t}`:e,t++;while(He[e].includes(n));return He[e].push(n),n}function Wg(e,t){He[e]&&(He[e]=He[e].filter(n=>n!==t))}function Fc(e,t){e=xt(e);let{defaultValue:n,id:r,idPrefix:i,name:o,form:a,rules:s,message:c,validateTrigger:l=t.defaultValidationTrigger,validationState:u,validationDelay:d,showValid:h,shouldUpdate:p}=e;s&&s.length&&d&&s.unshift(hv(d));const g=!o,m=o??"",x=Yp();let[$,y]=f.useState(r||(i?`${i}_${m}`:m));f.useEffect(()=>{let A;return!r&&!g&&(A=Gg($),y(A)),()=>{r||Wg(i?`${i}_${m}`:m,A),m&&a&&a.removeField(m)}},[]);let w=a?.getFieldInstance(m);w&&(w.rules=s);let T=s&&!!s.find(A=>A.required);f.useEffect(()=>{a&&(w?a.forceReRender():a.createField(m))},[w]),a&&(x&&(w||(w=a.createField(m,!0)),w?.value==null&&n!=null&&(a.setFieldValue(m,n,!1,!0),a.updateInitialFieldsValue({[m]:n}),w=a?.getFieldInstance(m))),!w?.touched&&n!=null&&a.setFieldValue(m,n,!1,!0));const C=ae((A,b)=>{if(!a)return;const R=a.getFieldInstance(m);if(p){const E=a.getFieldsValue();if(typeof p=="boolean"?!p:!p(E,{...E,[m]:A}))return}a.setFieldValue(m,A,!b,!1,b),!b&&(l==="onChange"||R&&R.errors&&R.errors.length)&&a.validateField(m).catch(()=>{})}),L=ae(()=>{l==="onBlur"&&setTimeout(()=>{a?.validateField(m).catch(()=>{})})});return f.useMemo(()=>({id:$,name:m,value:w?.inputValue,validateTrigger:l,form:a,field:w,nonInput:g,validationState:u??(w?.errors?.length?"invalid":h&&w?.status==="valid"?"valid":void 0),...T&&{isRequired:T},message:c??(w?.status==="invalid"&&w?.errors?.[0]),onBlur:L,onChange:C}),[a,w,w?.errors?.length,w?.status,w?.inputValue,$,m,T,L,C,l,u,h,g])}/**
|
|
892
|
+
* @license MIT
|
|
893
|
+
* author: Cube Dev Team
|
|
894
|
+
* @cube-dev/ui-kit v0.33.2
|
|
895
|
+
* Released under the MIT license.
|
|
896
|
+
*/function sr(e,t={}){const n=f.useRef(t.unsafe__isDisabled??!1),{valuePropsMapper:r=({value:h,onChange:p})=>({value:h??null,onChange:p}),defaultValidationTrigger:i="onBlur"}=t,o=Xg();if(e.rules&&e.name,o||n.current===!0||e.name==null)return e;const a=Fc(e,{defaultValidationTrigger:t.defaultValidationTrigger}),s=a?.form==null;e.rules&&s&&ya(`The "rules" prop is not supported for fields that are not part of a form. The "${e.name}" field is placed outside the form.`);const c=wn(a?.onBlur,"onBlur"in e?e.onBlur:void 0),l=ae((h,p)=>a?.onChange?.(h,p,a?.validateTrigger??i)),u=s?{}:r({value:a.value,onChange:l});if(o&&!s){const h=s?[]:Object.keys(u).filter(p=>p.startsWith("on"));for(const p of h)p in e&&ya(`The "${p}" listener is not supported for input "${e.name}" that is linked to a form via a <Field> component. Remove the <Field> component and move its properties to the input itself.`)}const d=s?e:re(e,a,u,{validateTrigger:a.validateTrigger??i,onBlur:c});return d.id&&(d.labelProps||(d.labelProps={}),d.labelProps.for=d.id),d}/**
|
|
897
|
+
* @license MIT
|
|
898
|
+
* author: Cube Dev Team
|
|
899
|
+
* @cube-dev/ui-kit v0.33.2
|
|
900
|
+
* Released under the MIT license.
|
|
901
|
+
*/function Zg(e){return e=e||"",e==="Number"||e.includes("Text")?"onBlur":"onChange"}function Ta(e,t,n,r){return e=e||"",e==="Number"?{value:t??null,onChange:n}:e==="Text"?{value:typeof t=="string"||typeof t=="number"?String(t):"",onChange:n}:e==="Checkbox"?{isSelected:t??!1,isIndeterminate:!1,onChange:n}:e==="CheckboxGroup"?{value:t??[],onChange:n}:e==="RangeSlider"?{value:t??void 0,onChange:n}:e==="ComboBox"?{inputValue:t??"",onInputChange:i=>n(i,!r),onSelectionChange:n}:e==="Select"?{selectedKey:t??null,onSelectionChange:n}:{value:t??null,onChange:n}}function qg(e){const t=xt(e);let{children:n,form:r,label:i,extra:o,necessityLabel:a,necessityIndicator:s,description:c,tooltip:l,isHidden:u,isDisabled:d,isLoading:h,styles:p,labelProps:g,labelPosition:m="top",labelStyles:x,labelSuffix:$}=t;typeof n=="function"&&(n=n(r));let y=n==null?null:f.Children.only(n);const w=y?.type?.cubeInputType??"Text",T=Fc(t,{defaultValidationTrigger:Zg(w)}),{validationState:C,message:L,isRequired:A,name:b,id:R}=T;if(!y)return null;if(R&&(g||(g={}),g.for=R),T.nonInput)return v.jsx(Or,{children:v.jsx(Mc,{isHidden:u,isDisabled:d,validationState:T.validationState,necessityIndicator:s,necessityLabel:a,isRequired:A,label:i,labelProps:g,extra:o,tooltip:l,message:L,description:c,Component:y,styles:p,labelPosition:m,labelStyles:x,labelSuffix:$})});if(!r)return null;if(!T.field)return v.jsx(Or,{children:f.cloneElement(y,re(y.props,{...Ta(w),label:b,name:b,id:R}))});const E={id:R,name:b,onBlur:T.onBlur};s!=null&&(E.necessityIndicator=s),a&&(E.necessityLabel=a),C&&(E.validationState=C),A&&(E.isRequired=A),i&&(E.label=i),o&&(E.extra=o),l&&(E.tooltip=l),L&&(E.message=L),u!=null&&(E.isHidden=u),d!=null&&(E.isDisabled=d),h!=null&&(E.isLoading=h),Object.assign(E,Ta(w,T.field?.inputValue,T.onChange,y.props.allowsCustomValue));const{onChange:P,onSelectionChange:F,...S}=y.props;return v.jsx(Or,{children:f.cloneElement(y,re(S,E,P?{onChange:T.onChange}:{},F?{onSelectionChange:T.onChange}:{}))})}const kc=f.createContext({insideLegacyField:!1});function Or(e){const t=f.useMemo(()=>({insideLegacyField:!0}),[]);return v.jsx(kc.Provider,{value:t,children:e.children})}function Xg(){const{insideLegacyField:e=!1}=f.useContext(kc);return e}/**
|
|
902
|
+
* @license MIT
|
|
903
|
+
* author: Cube Dev Team
|
|
904
|
+
* @cube-dev/ui-kit v0.33.2
|
|
905
|
+
* Released under the MIT license.
|
|
906
|
+
*/const St={success:{fill:"#success-bg",color:"#success-text",border:"#success.40"},danger:{fill:"#danger-bg",color:"#danger-text",border:"#danger.40"},note:{fill:"#note-bg",color:"#note-text",border:"#note.40"},disabled:{fill:"#dark.10",color:"#dark.40",border:"#dark.20"}};/**
|
|
907
|
+
* @license MIT
|
|
908
|
+
* author: Cube Dev Team
|
|
909
|
+
* @cube-dev/ui-kit v0.33.2
|
|
910
|
+
* Released under the MIT license.
|
|
911
|
+
*/const Yg=[...ee,...be];function Jg(e){const{type:t,isDisabled:n=!1,theme:r}=e,i=G(e,Yg);return qp(typeof t>"u",{property:"type",name:"Alert",betterAlternative:"theme"}),{styles:i,theme:n?"disabled":r??t??"note",filteredProps:Y(e,{eventProps:!0})}}/**
|
|
912
|
+
* @license MIT
|
|
913
|
+
* author: Cube Dev Team
|
|
914
|
+
* @cube-dev/ui-kit v0.33.2
|
|
915
|
+
* Released under the MIT license.
|
|
916
|
+
*/const Qg=k({name:"Alert",role:"alert",qa:"Alert",styles:{display:"block",flow:"column",radius:"1r",padding:"1.5x",preset:"t3",color:{"":"#dark",'[data-type="disabled"]':St.disabled.color},fill:{"":"#clear",...Object.keys(St).reduce((e,t)=>(e[`[data-type="${t}"]`]=St[t].fill,e),{})},border:{"":"#clear",...Object.keys(St).reduce((e,t)=>(e[`[data-type="${t}"]`]=St[t].border,e),{})}}}),e1=f.forwardRef(function(t,n){const{styles:r,theme:i,filteredProps:o}=Jg(t);return v.jsx(Qg,{...o,ref:n,"data-type":i,styles:r})});/**
|
|
917
|
+
* @license MIT
|
|
918
|
+
* author: Cube Dev Team
|
|
919
|
+
* @cube-dev/ui-kit v0.33.2
|
|
920
|
+
* Released under the MIT license.
|
|
921
|
+
*/const t1=function(t){let{submitError:n}=f.useContext(Ut);return n?(!f.isValidElement(n)&&typeof n!="string"&&(n="Internal error"),v.jsx(e1,{theme:"danger",...t,children:n})):null};/**
|
|
922
|
+
* @license MIT
|
|
923
|
+
* author: Cube Dev Team
|
|
924
|
+
* @cube-dev/ui-kit v0.33.2
|
|
925
|
+
* Released under the MIT license.
|
|
926
|
+
*/const Ry=Object.assign(yv,{Item:qg,useForm:hc,SubmitError:t1});/**
|
|
927
|
+
* @license MIT
|
|
928
|
+
* author: Cube Dev Team
|
|
929
|
+
* @cube-dev/ui-kit v0.33.2
|
|
930
|
+
* Released under the MIT license.
|
|
931
|
+
*/function Xi(e,t,n){let{label:r,extra:i,labelPosition:o="top",labelStyles:a,isRequired:s,necessityIndicator:c,necessityLabel:l,validationState:u,message:d,description:h,isDisabled:p,labelProps:g,requiredMark:m=!0,tooltip:x,isHidden:$,labelSuffix:y,styles:w,children:T}=n;return v.jsx(Mc,{labelPosition:o,label:r,extra:i,styles:w,isRequired:s,labelStyles:a,necessityIndicator:c,necessityLabel:l,labelProps:g,isDisabled:p,validationState:u,message:d,description:h,requiredMark:m,tooltip:x,isHidden:$,labelSuffix:y,children:T,Component:e,ref:t})}/**
|
|
932
|
+
* @license MIT
|
|
933
|
+
* author: Cube Dev Team
|
|
934
|
+
* @cube-dev/ui-kit v0.33.2
|
|
935
|
+
* Released under the MIT license.
|
|
936
|
+
*/const n1=[...ee,...be],r1=k({qa:"Content",as:"section",styles:{gridArea:"content",preset:"p3",color:"#dark.75",display:"block",flow:"column",gap:"2x",overflow:"auto",styledScrollbar:!0}}),i1=f.forwardRef(function(t,n){t=Ze(t,"content");const r=G(t,n1);return v.jsx(r1,{...Y(t,{eventProps:!0}),ref:n,styles:r})});/**
|
|
937
|
+
* @license MIT
|
|
938
|
+
* author: Cube Dev Team
|
|
939
|
+
* @cube-dev/ui-kit v0.33.2
|
|
940
|
+
* Released under the MIT license.
|
|
941
|
+
*/const o1=[...ee,...be],a1=k({qa:"Header",as:"header",styles:{display:"block",gridArea:"header",flow:"column"}}),s1=f.forwardRef(function(t,n){t=Ze(t,"header");const r=G(t,o1);return v.jsx(a1,{...Y(t,{eventProps:!0}),ref:n,styles:r})});var gi="data-focus-lock",Oc="data-focus-lock-disabled",l1="data-no-focus-lock",c1="data-autofocus-inside",u1="data-no-autofocus";function Dr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d1(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Ca=new WeakMap;function f1(e,t){var n=d1(t||null,function(r){return e.forEach(function(i){return Dr(i,r)})});return f.useLayoutEffect(function(){var r=Ca.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||Dr(s,null)}),o.forEach(function(s){i.has(s)||Dr(s,a)})}Ca.set(n,e)},[e]),n}var _r={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Dc(e){return e}function _c(e,t){t===void 0&&(t=Dc);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return i}function Yi(e,t){return t===void 0&&(t=Dc),_c(e,t)}function h1(e){e===void 0&&(e={});var t=_c(null);return t.options=j({async:!0,ssr:!1},e),t}var Bc=Yi({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),Hc=Yi(),p1=Yi(),v1=h1({async:!0,ssr:typeof document<"u"}),m1=f.createContext(void 0),g1=[],Nc=f.forwardRef(function(t,n){var r,i=f.useState(),o=i[0],a=i[1],s=f.useRef(),c=f.useRef(!1),l=f.useRef(null),u=f.useState({}),d=u[1],h=t.children,p=t.disabled,g=p===void 0?!1:p,m=t.noFocusGuards,x=m===void 0?!1:m,$=t.persistentFocus,y=$===void 0?!1:$,w=t.crossFrame,T=w===void 0?!0:w,C=t.autoFocus,L=C===void 0?!0:C;t.allowTextSelection;var A=t.group,b=t.className,R=t.whiteList,E=t.hasPositiveIndices,P=t.shards,F=P===void 0?g1:P,S=t.as,I=S===void 0?"div":S,D=t.lockProps,Q=D===void 0?{}:D,M=t.sideCar,pe=t.returnFocus,ne=pe===void 0?!1:pe,O=t.focusOptions,de=t.onActivation,ge=t.onDeactivation,pu=f.useState({}),vu=pu[0],mu=f.useCallback(function(xe){var Je=xe.captureFocusRestore;if(!l.current){var Qe,Ae=(Qe=document)==null?void 0:Qe.activeElement;l.current=Ae,Ae!==document.body&&(l.current=Je(Ae))}s.current&&de&&de(s.current),c.current=!0,d()},[de]),gu=f.useCallback(function(){c.current=!1,ge&&ge(s.current),d()},[ge]),bu=f.useCallback(function(xe){var Je=l.current;if(Je){var Qe=(typeof Je=="function"?Je():Je)||document.body,Ae=typeof ne=="function"?ne(Qe):ne;if(Ae){var uo=typeof Ae=="object"?Ae:void 0;l.current=null,xe?Promise.resolve().then(function(){return Qe.focus(uo)}):Qe.focus(uo)}}},[ne]),yu=f.useCallback(function(xe){c.current&&Bc.useMedium(xe)},[]),xu=Hc.useMedium,wu=f.useCallback(function(xe){s.current!==xe&&(s.current=xe,a(xe))},[]),$u=Mt((r={},r[Oc]=g&&"disabled",r[gi]=A,r),Q),co=x!==!0,Eu=co&&x!=="tail",Su=f1([n,wu]),Pu=f.useMemo(function(){return{observed:s,shards:F,enabled:!g,active:c.current}},[g,c.current,F,o]);return f.createElement(f.Fragment,null,co&&[f.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:g?-1:0,style:_r}),E?f.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:g?-1:1,style:_r}):null],!g&&f.createElement(M,{id:vu,sideCar:v1,observed:o,disabled:g,persistentFocus:y,crossFrame:T,autoFocus:L,whiteList:R,shards:F,onActivation:mu,onDeactivation:gu,returnFocus:bu,focusOptions:O}),f.createElement(I,Mt({ref:Su},$u,{className:b,onBlur:xu,onFocus:yu}),f.createElement(m1.Provider,{value:Pu},h)),Eu&&f.createElement("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:_r}))});Nc.propTypes={};const jc=Nc;function b1(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(l){return l.props})),t(a)}var c=function(l){Xn(u,l);function u(){return l.apply(this,arguments)||this}u.peek=function(){return a};var d=u.prototype;return d.componentDidMount=function(){o.push(this),s()},d.componentDidUpdate=function(){s()},d.componentWillUnmount=function(){var p=o.indexOf(this);o.splice(p,1),s()},d.render=function(){return _.createElement(i,this.props)},u}(f.PureComponent);return Lu(c,"displayName","SideEffect("+n(i)+")"),c}}var ye=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},We=function(e){return Array.isArray(e)?e:[e]},Vc=function(e){return Array.isArray(e)?e[0]:e},y1=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},Kc=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},Uc=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},x1=function(e){return e.hasAttribute("inert")},w1=function(e,t){return!e||Uc(e)||!y1(e)&&!x1(e)&&t(Kc(e))},zc=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=w1(t,zc.bind(void 0,e));return e.set(t,r),r},$1=function(e,t){return e&&!Uc(e)?P1(e)?t(Kc(e)):!1:!0},Gc=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=$1(t,Gc.bind(void 0,e));return e.set(t,r),r},Wc=function(e){return e.dataset},E1=function(e){return e.tagName==="BUTTON"},Zc=function(e){return e.tagName==="INPUT"},qc=function(e){return Zc(e)&&e.type==="radio"},S1=function(e){return!((Zc(e)||E1(e))&&(e.type==="hidden"||e.disabled))},P1=function(e){var t=e.getAttribute(u1);return![!0,"true",""].includes(t)},Ji=function(e){var t;return!!(e&&(!((t=Wc(e))===null||t===void 0)&&t.focusGuard))},bi=function(e){return!Ji(e)},T1=function(e){return!!e},C1=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,o=e.index-t.index;if(i){if(!n)return 1;if(!r)return-1}return i||o},I1=function(e){return e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex},Qi=function(e,t,n){return ye(e).map(function(r,i){var o=I1(r);return{node:r,index:i,tabIndex:n&&o===-1?(r.dataset||{}).focusGuard?0:-1:o}}).filter(function(r){return!t||r.tabIndex>=0}).sort(C1)},R1=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],eo=R1.join(","),L1="".concat(eo,", [data-focus-guard]"),Xc=function(e,t){return ye((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?L1:eo)?[r]:[],Xc(r))},[])},A1=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?gt([e.contentDocument.body],t):[e]},gt=function(e,t){return e.reduce(function(n,r){var i,o=Xc(r,t),a=(i=[]).concat.apply(i,o.map(function(s){return A1(s,t)}));return n.concat(a,r.parentNode?ye(r.parentNode.querySelectorAll(eo)).filter(function(s){return s===r}):[])},[])},M1=function(e){var t=e.querySelectorAll("[".concat(c1,"]"));return ye(t).map(function(n){return gt([n])}).reduce(function(n,r){return n.concat(r)},[])},to=function(e,t){return ye(e).filter(function(n){return zc(t,n)}).filter(function(n){return S1(n)})},Ia=function(e,t){return t===void 0&&(t=new Map),ye(e).filter(function(n){return Gc(t,n)})},no=function(e,t,n){return Qi(to(gt(e,n),t),!0,n)},Sn=function(e,t){return Qi(to(gt(e),t),!1)},F1=function(e,t){return to(M1(e),t)},je=function(e,t){return e.shadowRoot?je(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:ye(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?je(i,t):!1}return je(n,t)})},k1=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},Yc=function(e){return e.parentNode?Yc(e.parentNode):e},ro=function(e){var t=We(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(gi);return n.push.apply(n,i?k1(ye(Yc(r).querySelectorAll("[".concat(gi,'="').concat(i,'"]:not([').concat(Oc,'="disabled"])')))):[r]),n},[])},O1=function(e){try{return e()}catch{return}},Ot=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Ot(t.shadowRoot):t instanceof HTMLIFrameElement&&O1(function(){return t.contentWindow.document})?Ot(t.contentWindow.document):t}},D1=function(e,t){return e===t},_1=function(e,t){return!!ye(e.querySelectorAll("iframe")).some(function(n){return D1(n,t)})},Jc=function(e,t){return t===void 0&&(t=Ot(Vc(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:ro(e).some(function(n){return je(n,t)||_1(n,t)})},B1=function(e){e===void 0&&(e=document);var t=Ot(e);return t?ye(e.querySelectorAll("[".concat(l1,"]"))).some(function(n){return je(n,t)}):!1},H1=function(e,t){return t.filter(qc).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},io=function(e,t){return qc(e)&&e.name?H1(e,t):e},N1=function(e){var t=new Set;return e.forEach(function(n){return t.add(io(n,e))}),e.filter(function(n){return t.has(n)})},Ra=function(e){return e[0]&&e.length>1?io(e[0],e):e[0]},La=function(e,t){return e.indexOf(io(t,e))},yi="NEW_FOCUS",j1=function(e,t,n,r,i){var o=e.length,a=e[0],s=e[o-1],c=Ji(r);if(!(r&&e.indexOf(r)>=0)){var l=r!==void 0?n.indexOf(r):-1,u=i?n.indexOf(i):l,d=i?e.indexOf(i):-1;if(l===-1)return d!==-1?d:yi;if(d===-1)return yi;var h=l-u,p=n.indexOf(a),g=n.indexOf(s),m=N1(n),x=r!==void 0?m.indexOf(r):-1,$=x-(i?m.indexOf(i):l);if(!h&&d>=0||t.length===0)return d;var y=La(e,t[0]),w=La(e,t[t.length-1]);if(l<=p&&c&&Math.abs(h)>1)return w;if(l>=g&&c&&Math.abs(h)>1)return y;if(h&&Math.abs($)>1)return d;if(l<=p)return w;if(l>g)return y;if(h)return Math.abs(h)>1?d:(o+d+h)%o}},V1=function(e){return function(t){var n,r=(n=Wc(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Aa=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=Ia(r.filter(V1(n)));return i&&i.length?Ra(i):Ra(Ia(t))},xi=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&xi(e.parentNode.host||e.parentNode,t),t},Br=function(e,t){for(var n=xi(e),r=xi(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},Qc=function(e,t,n){var r=We(e),i=We(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Br(a||s,s)||a,n.filter(Boolean).forEach(function(c){var l=Br(o,c);l&&(!a||je(l,a)?a=l:a=Br(l,a))})}),a},Ma=function(e,t){return e.reduce(function(n,r){return n.concat(F1(r,t))},[])},K1=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(T1)},U1=function(e,t){var n=Ot(We(e).length>0?document:Vc(e).ownerDocument),r=ro(e).filter(bi),i=Qc(n||e,e,r),o=new Map,a=Sn(r,o),s=a.filter(function(g){var m=g.node;return bi(m)});if(s[0]){var c=Sn([i],o).map(function(g){var m=g.node;return m}),l=K1(c,s),u=l.map(function(g){var m=g.node;return m}),d=l.filter(function(g){var m=g.tabIndex;return m>=0}).map(function(g){var m=g.node;return m}),h=j1(u,d,c,n,t);if(h===yi){var p=Aa(a,d,Ma(r,o))||Aa(a,u,Ma(r,o));if(p)return{node:p};console.warn("focus-lock: cannot find any node to move focus into");return}return h===void 0?h:l[h]}},z1=function(e){var t=ro(e).filter(bi),n=Qc(e,e,t),r=Qi(gt([n],!0),!0,!0),i=gt(t,!1);return r.map(function(o){var a=o.node,s=o.index;return{node:a,index:s,lockItem:i.indexOf(a)>=0,guard:Ji(a)}})},oo=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},Hr=0,Nr=!1,eu=function(e,t,n){n===void 0&&(n={});var r=U1(e,t);if(!Nr&&r){if(Hr>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Nr=!0,setTimeout(function(){Nr=!1},1);return}Hr++,oo(r.node,n.focusOptions),Hr--}};function Pt(e){if(!e)return null;var t=e?new WeakRef(e):null;return function(){return t?.deref()||null}}var G1=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:Pt(n),parent:Pt(n.parentElement),left:Pt(n.previousElementSibling),right:Pt(n.nextElementSibling)}),n=n.parentElement;return{element:Pt(e),stack:t,ownerDocument:e.ownerDocument}},W1=function(e){var t,n,r,i,o;if(e)for(var a=e.stack,s=e.ownerDocument,c=new Map,l=0,u=a;l<u.length;l++){var d=u[l],h=(t=d.parent)===null||t===void 0?void 0:t.call(d);if(h&&s.contains(h)){for(var p=(n=d.left)===null||n===void 0?void 0:n.call(d),g=d.current(),m=h.contains(g)?g:void 0,x=(r=d.right)===null||r===void 0?void 0:r.call(d),$=no([h],c),y=(o=(i=m??p?.nextElementSibling)!==null&&i!==void 0?i:x)!==null&&o!==void 0?o:p;y;){for(var w=0,T=$;w<T.length;w++){var C=T[w];if(y?.contains(C.node))return C.node}y=y.nextElementSibling}if($.length)return $[0].node}}},Z1=function(e){var t=G1(e);return function(){return W1(t)}},q1=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=We(t);if(r.every(function(a){return!je(a,e)}))return console.error("Active element is not contained in the scope"),{};var i=n?no(r,new Map):Sn(r,new Map),o=i.findIndex(function(a){var s=a.node;return s===e});if(o!==-1)return{prev:i[o-1],next:i[o+1],first:i[0],last:i[i.length-1]}},X1=function(e,t){var n=t?no(We(e),new Map):Sn(We(e),new Map);return{first:n[0],last:n[n.length-1]}},Y1=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},tu=function(e,t,n){t===void 0&&(t={});var r=Y1(t),i=q1(e,r.scope,r.onlyTabbable);if(i){var o=n(i,r.cycle);o&&oo(o.node,r.focusOptions)}},J1=function(e,t){t===void 0&&(t={}),tu(e,t,function(n,r){var i=n.next,o=n.first;return i||r&&o})},Q1=function(e,t){t===void 0&&(t={}),tu(e,t,function(n,r){var i=n.prev,o=n.last;return i||r&&o})},nu=function(e,t,n){var r,i=X1(e,(r=t.onlyTabbable)!==null&&r!==void 0?r:!0),o=i[n];o&&oo(o.node,t.focusOptions)},eb=function(e,t){t===void 0&&(t={}),nu(e,t,"first")},tb=function(e,t){t===void 0&&(t={}),nu(e,t,"last")};function ao(e){setTimeout(e,1)}var nb=function(t){return t&&"current"in t?t.current:t},rb=function(){return document&&document.activeElement===document.body},ib=function(){return rb()||B1()},ft=null,ut=null,ht=null,Dt=!1,ob=function(){return!0},ab=function(t){return(ft.whiteList||ob)(t)},sb=function(t,n){ht={observerNode:t,portaledElement:n}},lb=function(t){return ht&&ht.portaledElement===t};function Fa(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var cb=function(t){return t?!!Dt:Dt==="meanwhile"},ub=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},db=function(t,n){return n.some(function(r){return ub(t,r,r)})},Pn=function(){var t=!1;if(ft){var n=ft,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,c=n.focusOptions,l=r||ht&&ht.portaledElement,u=document&&document.activeElement;if(l){var d=[l].concat(a.map(nb).filter(Boolean));if((!u||ab(u))&&(i||cb(s)||!ib()||!ut&&o)&&(l&&!(Jc(d)||u&&db(u,d)||lb(u))&&(document&&!ut&&u&&!o?(u.blur&&u.blur(),document.body.focus()):(t=eu(d,ut,{focusOptions:c}),ht={})),Dt=!1,ut=document&&document.activeElement),document&&u!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var h=document&&document.activeElement,p=z1(d),g=p.map(function(m){var x=m.node;return x}).indexOf(h);g>-1&&(p.filter(function(m){var x=m.guard,$=m.node;return x&&$.dataset.focusAutoGuard}).forEach(function(m){var x=m.node;return x.removeAttribute("tabIndex")}),Fa(g,p.length,1,p),Fa(g,-1,-1,p))}}}return t},ru=function(t){Pn()&&t&&(t.stopPropagation(),t.preventDefault())},so=function(){return ao(Pn)},fb=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||sb(r,n)},hb=function(){return null},iu=function(){Dt="just",ao(function(){Dt="meanwhile"})},pb=function(){document.addEventListener("focusin",ru),document.addEventListener("focusout",so),window.addEventListener("blur",iu)},vb=function(){document.removeEventListener("focusin",ru),document.removeEventListener("focusout",so),window.removeEventListener("blur",iu)};function mb(e){return e.filter(function(t){var n=t.disabled;return!n})}var ou={moveFocusInside:eu,focusInside:Jc,focusNextElement:J1,focusPrevElement:Q1,focusFirstElement:eb,focusLastElement:tb,captureFocusRestore:Z1};function gb(e){var t=e.slice(-1)[0];t&&!ft&&pb();var n=ft,r=n&&t&&t.id===n.id;ft=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(ut=null,(!r||n.observed!==t.observed)&&t.onActivation(ou),Pn(),ao(Pn)):(vb(),ut=null)}Bc.assignSyncMedium(fb);Hc.assignMedium(so);p1.assignMedium(function(e){return e(ou)});const bb=b1(mb,gb)(hb);var au=f.forwardRef(function(t,n){return f.createElement(jc,Mt({sideCar:bb,ref:n},t))}),su=jc.propTypes||{};su.sideCar;Tn(su,["sideCar"]);au.propTypes={};const yb=au;/**
|
|
942
|
+
* @license MIT
|
|
943
|
+
* author: Cube Dev Team
|
|
944
|
+
* @cube-dev/ui-kit v0.33.2
|
|
945
|
+
* Released under the MIT license.
|
|
946
|
+
*/const xb=[...Re,...Ci,...Ht],wb=k({as:"section",styles:{pointerEvents:"auto",position:"relative",display:"flex",placeItems:"stretch",placeContent:"stretch",width:{"":"288px @dialog-size 90vw",'[data-type="fullscreen"]':"90vw 90vw",'[data-type="fullscreenTakeover"]':"100vw 100vw",'[data-type="panel"]':"100vw 100vw"},height:{"":"max 90vh",'[data-type="fullscreenTakeover"] | [data-type="panel"]':"max 100vh"},gap:0,flow:"column",radius:{"":"2r",'[data-type="tray"]':"2r top",'[data-type="fullscreenTakeover"] | [data-type="panel"]':"0r"},fill:"#white",shadow:{"":"0 20px 30px #shadow",'[data-type="popover"]':"0px 4px 16px #shadow"},top:{"":!1,'[data-type="modal"]':"((50vh - 50%) / -3)"},placeSelf:"stretch","@dialog-heading-padding-v":{"":"2x",'[data-type="popover"]':"1x"},"@dialog-content-padding-v":{"":"3x",'[data-type="popover"]':"2x"},"@dialog-padding-h":{"":"3x",'[data-type="popover"]':"2x"},"@dialog-footer-v":{"":"2x",'[data-type="popover"]':"1x"},"@dialog-content-gap":"3x"}}),$b=Bt(yb)`
|
|
947
|
+
display: contents;
|
|
948
|
+
`,Eb={display:"flex",position:"absolute",top:"1x",right:"1x",width:"5x",height:"5x",placeContent:"center"},Sb={S:"small",M:"medium",L:"large"},Pb={small:360,medium:479,large:798},Tb={"en-US":{dismiss:"Dismiss",alert:"Alert"}},Cb=f.forwardRef(function(t,n){const i=wg()?.transitionState==="entered";return v.jsx($b,{returnFocus:!0,disabled:!i,children:v.jsx(Ib,{...t,ref:n},"content")})}),Ib=f.forwardRef(function(t,n){let{type:r="modal",...i}=Lc(),{qa:o,children:a,size:s="S",isDismissable:c=i.isDismissable,onDismiss:l=i.onClose,closeIcon:u,closeButtonStyles:d,...h}=t;s=Sb[s.toUpperCase()]||s;const p=G(h,xb);let g=Z0(Tb),m=yt(n),{dialogProps:x,titleProps:$}=Op(re(i,t),m),y;(r==="popover"||r==="tray")&&(y=v.jsx(Pp,{onDismiss:l}));let w={heading:{level:2,preset:"h4",...$},content:{styles:{flexGrow:1,padding:"@dialog-content-padding-v @dialog-padding-h",gap:"@dialog-content-gap",height:{"":"max (100% - (2 * @dialog-content-padding-v))",":last-child":"max (100% - @dialog-content-padding-v)"}}},header:{ellipsis:!0,styles:{display:"flex",flow:"row",gap:"1x",placeItems:"baseline stretch",placeContent:"space-between",padding:`@dialog-heading-padding-v ${c?"(@dialog-padding-h + 4x)":"@dialog-padding-h"} @dialog-heading-padding-v @dialog-padding-h`,border:"bottom"}},footer:{styles:{display:"flex",gap:"1x",flow:"row",placeItems:"baseline stretch",placeContent:"space-between",padding:"@dialog-footer-v @dialog-padding-h"}}};return v.jsxs(wb,{ref:m,"data-id":"Dialog","data-qa":o||"Dialog",styles:p,as:"section",...x,mods:{dismissable:c},style:{"--dialog-size":`${Pb[s]||288}px`},"data-type":r,"data-size":s,children:[y,v.jsxs(qd,{slots:w,children:[c&&v.jsx(At,{qa:"ModalCloseButton",type:"neutral",styles:Eb,icon:u||v.jsx(wc,{}),label:g("dismiss"),onPress:()=>l&&l()}),a]})]})});/**
|
|
949
|
+
* @license MIT
|
|
950
|
+
* author: Cube Dev Team
|
|
951
|
+
* @cube-dev/ui-kit v0.33.2
|
|
952
|
+
* Released under the MIT license.
|
|
953
|
+
*/const Rb=k({styles:{display:"grid",flow:"row"}}),Lb={template:"gridTemplate",columns:"gridColumns",rows:"gridRows",areas:"gridAreas"},Ly=f.forwardRef(function(t,n){const r=G(t,ee,void 0,Lb);return v.jsx(Rb,{...Y(t,{eventProps:!0}),ref:n,styles:r})});/**
|
|
954
|
+
* @license MIT
|
|
955
|
+
* author: Cube Dev Team
|
|
956
|
+
* @cube-dev/ui-kit v0.33.2
|
|
957
|
+
* Released under the MIT license.
|
|
958
|
+
*/const Ab=k({styles:{display:"block",flow:"column"}}),Mb=ee,Ay=f.forwardRef(function(t,n){const r=G(t,Mb);return v.jsx(Ab,{...Y(t,{eventProps:!0}),ref:n,styles:r})});/**
|
|
959
|
+
* @license MIT
|
|
960
|
+
* author: Cube Dev Team
|
|
961
|
+
* @cube-dev/ui-kit v0.33.2
|
|
962
|
+
* Released under the MIT license.
|
|
963
|
+
*/const wi={pink:"255, 100, 146","pink-02":"255, 131, 168",purple:"122, 119, 255","purple-text":"102, 93, 232","purple-01":"122, 119, 255","purple-02":"149, 146, 255","purple-03":"175, 173, 255","purple-04":"202, 201, 255",text:"91, 92, 125",dark:"20, 20, 70","dark-01":"20, 20, 70","dark-02":"67, 67, 107","dark-03":"114, 114, 144","dark-04":"161, 161, 181","dark-05":"213, 213, 226","grey-light":"248, 248, 249",light:"246, 246, 248",white:"255, 255, 255",black:"0, 0, 0","danger-text":"227, 0, 42",danger:"255, 55, 73","light-grey":"248, 248, 249",success:"49, 195, 124","success-text":"48, 166, 102",note:"251, 188, 5",warning:"224, 86, 43"};function z(e,t=1){return`rgba(${wi[e]}, ${t})`}const _t={"font-size":"14px","line-height":"20px","input-font-size":"14px","input-line-height":"20px","input-letter-spacing":"0.02em","disabled-opacity":".4",gap:"8px","outline-width":"calc(1rem / 16 * 3)","border-width":"1px",radius:"4px","leaf-sharp-radius":"0px",transition:"80ms","clear-color":"transparent","border-color":z("dark",.1),"shadow-color":z("dark-03",.1),"draft-color":z("dark",.2),"minor-color":z("dark",.65),"success-bg-color":"rgba(41, 190, 110, .1)","note-bg-color":z("note",.1),"note-text-color":z("note",1),"danger-bg-color":z("danger",.05),"danger-bg-hover-color":z("danger",.1),"primary-1":z("purple",.9),"primary-2":z("purple",.8),"primary-3":z("purple",.7),"primary-4":z("purple",.6),"primary-5":z("purple",.5),"primary-6":z("purple",.4),"primary-7":z("purple",.3),"primary-8":z("purple",.2),"primary-9":z("purple",.1),"primary-10":z("purple",0),"dark-75-color":z("dark",.75),"primary-color":z("purple"),"pink-8-color":z("pink",.2),"pink-9-color":z("pink",.1),"disabled-color":z("dark-01",.25),"disabled-text-color":z("dark-01",.25),"disabled-bg":z("dark-05",.2),"disabled-bg-color":z("dark-05",.2),"max-content-width":"1440px","topbar-height":"48px","devmodebar-height":"54px","sidebar-width":"200px","border-radius-base":"4px","text-font-size":"14px","text-line-height":"20px","text-letter-spacing":"0","h1-font-size":"36px","h1-line-height":"44px","h1-letter-spacing":"-0.01em","h1-font-weight":"700","h2-font-size":"24px","h2-line-height":"36px","h2-letter-spacing":"0em","h2-font-weight":"700","h3-font-size":"20px","h3-line-height":"28px","h3-letter-spacing":"0em","h3-font-weight":"700","h4-font-size":"18px","h4-line-height":"24px","h4-letter-spacing":"0","h4-font-weight":"700","h5-font-size":"16px","h5-line-height":"22px","h5-letter-spacing":"0","h5-font-weight":"700","h5-icon-size":"18px","h6-font-size":"14px","h6-line-height":"20px","h6-letter-spacing":"0.01em","h6-font-weight":"600","h6-icon-size":"16px","t1-font-size":"18px","t1-line-height":"24px","t1-letter-spacing":"0","t1-font-weight":"400","t1-icon-size":"20px","t2-font-size":"16px","t2-line-height":"22px","t2-letter-spacing":"0","t2-font-weight":"400","t2-icon-size":"18px","t2m-font-size":"16px","t2m-line-height":"22px","t2m-letter-spacing":"0","t2m-font-weight":"500","t2m-icon-size":"18px","t3-font-size":"14px","t3-line-height":"20px","t3-letter-spacing":"0","t3-font-weight":"400","t3-icon-size":"16px","t3m-font-size":"14px","t3m-line-height":"20px","t3m-letter-spacing":"0","t3m-font-weight":"500","t3m-icon-size":"16px","t4-font-size":"12px","t4-line-height":"18px","t4-letter-spacing":"0","t4-font-weight":"500","t4-icon-size":"14px","t4m-font-size":"12px","t4m-line-height":"18px","t4m-letter-spacing":"0","t4m-font-weight":"600","t4m-icon-size":"14px","p1-font-size":"18px","p1-line-height":"28px","p1-letter-spacing":"0","p1-font-weight":"400","p1-icon-size":"20px","p2-font-size":"16px","p2-line-height":"24px","p2-letter-spacing":"0","p2-font-weight":"400","p2-icon-size":"18px","p3-font-size":"14px","p3-line-height":"22px","p3-letter-spacing":"0","p3-font-weight":"400","p3-icon-size":"16px","p4-font-size":"12px","p4-line-height":"20px","p4-letter-spacing":"0","p4-font-weight":"500","p4-icon-size":"14px","c1-font-size":"14px","c1-line-height":"20px","c1-letter-spacing":"0","c1-font-weight":"500","c1-text-transform":"uppercase","c1-icon-size":"16px","c2-font-size":"12px","c2-line-height":"18px","c2-letter-spacing":"0.01em","c2-font-weight":"500","c2-text-transform":"uppercase","c2-icon-size":"14px","tag-font-size":"12px","tag-line-height":"18px","tag-letter-spacing":"0.01em","tag-font-weight":"600","tag-icon-size":"14px","strong-font-size":"inherit","strong-line-height":"inherit","strong-letter-spacing":"inherit","strong-font-family":"inherit","strong-font-style":"inherit","strong-font-weight":"var(--bold-font-weight, var(--default-bold-font-weight, 700))","em-font-size":"inherit","em-line-height":"inherit","em-letter-spacing":"inherit","em-font-family":"inherit","em-font-style":"italic","em-font-weight":"inherit","default-font-size":"var(--t3-font-size)","default-line-height":"var(--t3-line-height)","default-letter-spacing":"var(--t3-letter-spacing)","default-font-weight":"var(--t3-font-weight)","default-bold-font-weight":"700","default-icon-size":"inherit","scrollbar-width":"1.5x","scrollbar-outline-width":"1ow","scrollbar-radius":"1.5r","scrollbar-thumb-color":"rgba(var(--text-color-rgb), .5)","scrollbar-outline-color":"var(--clear-color)","scrollbar-bg-color":"var(--grey-light-color)","scrollbar-corner-color":"var(--clear-color)"};Object.keys(wi).forEach(e=>{_t[`${e}-color`]=z(e),_t[`${e}-color-rgb`]=wi[e]});/**
|
|
964
|
+
* @license MIT
|
|
965
|
+
* author: Cube Dev Team
|
|
966
|
+
* @cube-dev/ui-kit v0.33.2
|
|
967
|
+
* Released under the MIT license.
|
|
968
|
+
*/const Fb={"overscroll-behavior-y":"none","background-color":"white !important","font-family":"var(--font)","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale",margin:"0",padding:"0",color:"rgba(20, 20, 70, .75)","font-size":"14px","line-height":"20px","letter-spacing":"0.02em","font-weight":"400"},kb=({publicUrl:e="",fontDisplay:t="swap"})=>`
|
|
969
|
+
@font-face {
|
|
970
|
+
font-family: 'Inter';
|
|
971
|
+
font-style: normal;
|
|
972
|
+
font-weight: 400;
|
|
973
|
+
font-display: ${t};
|
|
974
|
+
src: url(${e}/fonts/Inter-Regular.woff2) format('woff2'),
|
|
975
|
+
url(${e}/fonts/Inter-Regular.woff) format('woff');
|
|
976
|
+
}
|
|
977
|
+
@font-face {
|
|
978
|
+
font-family: 'Inter';
|
|
979
|
+
font-style: normal;
|
|
980
|
+
font-weight: 500;
|
|
981
|
+
font-display: ${t};
|
|
982
|
+
src: url(${e}/fonts/Inter-Medium.woff2) format('woff2'),
|
|
983
|
+
url(${e}/fonts/Inter-Medium.woff) format('woff');
|
|
984
|
+
}
|
|
985
|
+
@font-face {
|
|
986
|
+
font-family: 'Inter';
|
|
987
|
+
font-style: normal;
|
|
988
|
+
font-weight: 600;
|
|
989
|
+
font-display: ${t};
|
|
990
|
+
src: url(${e}/fonts/Inter-SemiBold.woff2) format('woff2'),
|
|
991
|
+
url(${e}/fonts/Inter-SemiBold.woff) format('woff');
|
|
992
|
+
}
|
|
993
|
+
@font-face {
|
|
994
|
+
font-family: 'Inter';
|
|
995
|
+
font-style: normal;
|
|
996
|
+
font-weight: 700;
|
|
997
|
+
font-display: ${t};
|
|
998
|
+
src: url(${e}/fonts/Inter-Bold.woff2) format('woff2'),
|
|
999
|
+
url(${e}/fonts/Inter-Bold.woff) format('woff');
|
|
1000
|
+
}
|
|
1001
|
+
@font-face {
|
|
1002
|
+
font-family: 'Source Code Pro';
|
|
1003
|
+
src: url('${e}/fonts/SourceCodePro-Regular.woff2') format('woff2'),
|
|
1004
|
+
url('${e}/fonts/SourceCodePro-Regular.woff') format('woff');
|
|
1005
|
+
font-weight: normal;
|
|
1006
|
+
font-style: normal;
|
|
1007
|
+
font-display: ${t};
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
@font-face {
|
|
1011
|
+
font-family: 'JetBrains Mono';
|
|
1012
|
+
font-style: normal;
|
|
1013
|
+
font-weight: 400;
|
|
1014
|
+
font-display: ${t};
|
|
1015
|
+
src: url(${e}/fonts/JetBrainsMono-Regular.woff2) format('woff2'),
|
|
1016
|
+
url(${e}/fonts/JetBrainsMono-Regular.woff) format('woff');
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
@font-face {
|
|
1020
|
+
font-family: 'JetBrains Mono';
|
|
1021
|
+
font-style: normal;
|
|
1022
|
+
font-weight: 700;
|
|
1023
|
+
font-display: ${t};
|
|
1024
|
+
src: url(${e}/fonts/JetBrainsMono-Bold.woff2) format('woff2'),
|
|
1025
|
+
url(${e}/fonts/JetBrainsMono-Bold.woff) format('woff');
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
@font-face {
|
|
1029
|
+
font-family: 'text-security-disc';
|
|
1030
|
+
src: url(${e}/fonts/text-security-disc.woff2) format('woff2'),
|
|
1031
|
+
url(${e}/fonts/text-security-disc.woff) format('woff');
|
|
1032
|
+
}
|
|
1033
|
+
`,Ob=_a`
|
|
1034
|
+
body {
|
|
1035
|
+
${({$applyLegacyTokens:e})=>e?Object.entries(_t).map(([t,n])=>(n==="inherit"&&(n=`var(--non-existent-${t}, inherit)`),`--${t}: ${n};`)).join(`
|
|
1036
|
+
`):""}
|
|
1037
|
+
${({$bodyStyles:e})=>Object.entries({...Fb,...e}).map(([t,n])=>`${t}: ${n};`).join(`
|
|
1038
|
+
`)}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
html {
|
|
1042
|
+
overscroll-behavior-y: none;
|
|
1043
|
+
--font: ${({$font:e})=>e||"Inter"}, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
1044
|
+
--monospace-font: ${({$monospaceFont:e})=>`${e?`${e}, `:""}Menlo, Monaco, Consolas, 'Courier New', monospace;`}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
kbd {
|
|
1048
|
+
font-family: var(--c2-font-family);
|
|
1049
|
+
font-weight: var(--c2-font-weight);
|
|
1050
|
+
font-size: var(--c2-font-size);
|
|
1051
|
+
border: var(--border-width) solid var(--dark-04-color);
|
|
1052
|
+
background-color: white;
|
|
1053
|
+
color: var(--dark-color);
|
|
1054
|
+
border-radius: var(--radius);
|
|
1055
|
+
padding: 0 var(--outline-width);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.cube-notification-container {
|
|
1059
|
+
min-width: 288px;
|
|
1060
|
+
max-width: 340px;
|
|
1061
|
+
width: calc(100vw - 32px);
|
|
1062
|
+
position: fixed;
|
|
1063
|
+
top: 32px;
|
|
1064
|
+
right: 16px;
|
|
1065
|
+
z-index: 999999;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.cube-notifications {
|
|
1069
|
+
display: grid;
|
|
1070
|
+
grid-auto-flow: row;
|
|
1071
|
+
grid-template-columns: 1fr;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.cube-notification-enter {
|
|
1075
|
+
opacity: 0;
|
|
1076
|
+
max-height: 0px;
|
|
1077
|
+
margin-bottom: 0px;
|
|
1078
|
+
transform: translate(100%, 0);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.cube-notification-enter-active {
|
|
1082
|
+
opacity: 1;
|
|
1083
|
+
max-height: 56px;
|
|
1084
|
+
margin-bottom: 8px;
|
|
1085
|
+
transform: translate(0, 0);
|
|
1086
|
+
transition: all 300ms ease-in;
|
|
1087
|
+
|
|
1088
|
+
& > * {
|
|
1089
|
+
margin-bottom: 0px;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.cube-notification-exit {
|
|
1094
|
+
opacity: 1;
|
|
1095
|
+
margin-bottom: 8px;
|
|
1096
|
+
max-height: 56px;
|
|
1097
|
+
transform: translate(0, 0);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.cube-notification-exit-active {
|
|
1101
|
+
opacity: 0;
|
|
1102
|
+
max-height: 0px;
|
|
1103
|
+
margin-bottom: 0px;
|
|
1104
|
+
transform: translate(100%, 0);
|
|
1105
|
+
transition: all 300ms ease-in;
|
|
1106
|
+
|
|
1107
|
+
& > * {
|
|
1108
|
+
margin-bottom: 0px;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
b, strong {
|
|
1113
|
+
font-weight: var(--bold-font-weight, 700);
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
[type=reset], [type=submit], button, html [type=button] {
|
|
1117
|
+
-webkit-appearance: none;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
code {
|
|
1121
|
+
font-family: var(--monospace-font);
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
${({$fonts:e,$publicUrl:t,$fontDisplay:n})=>e===!1?"":kb({publicUrl:t,...n?{fontDisplay:n}:{}})}
|
|
1125
|
+
// Prism Code
|
|
1126
|
+
code[class*="language-"],
|
|
1127
|
+
pre[class*="language-"] {
|
|
1128
|
+
color: var(--dark-color);
|
|
1129
|
+
background: none;
|
|
1130
|
+
font-family: "Source Code Pro", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
1131
|
+
text-align: left;
|
|
1132
|
+
font-weight: normal;
|
|
1133
|
+
font-size: 14px;
|
|
1134
|
+
line-height: 20px;
|
|
1135
|
+
white-space: pre;
|
|
1136
|
+
word-spacing: normal;
|
|
1137
|
+
word-break: normal;
|
|
1138
|
+
word-wrap: normal;
|
|
1139
|
+
border-radius: 4px;
|
|
1140
|
+
border: none;
|
|
1141
|
+
|
|
1142
|
+
-moz-tab-size: 4;
|
|
1143
|
+
-o-tab-size: 4;
|
|
1144
|
+
tab-size: 4;
|
|
1145
|
+
|
|
1146
|
+
-webkit-hyphens: none;
|
|
1147
|
+
-moz-hyphens: none;
|
|
1148
|
+
-ms-hyphens: none;
|
|
1149
|
+
hyphens: none;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
|
1153
|
+
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
|
1154
|
+
text-shadow: none;
|
|
1155
|
+
/*background: #b3d4fc;*/
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
|
1159
|
+
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
|
1160
|
+
text-shadow: none;
|
|
1161
|
+
/*background: #b3d4fc;*/
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
@media print {
|
|
1165
|
+
code[class*="language-"],
|
|
1166
|
+
pre[class*="language-"] {
|
|
1167
|
+
text-shadow: none;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/* Code blocks */
|
|
1172
|
+
pre[class*="language-"] {
|
|
1173
|
+
overflow: auto;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
:not(pre) > code[class*="language-"],
|
|
1177
|
+
pre[class*="language-"] {
|
|
1178
|
+
background: transparent;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/* Inline code */
|
|
1182
|
+
:not(pre) > code[class*="language-"] {
|
|
1183
|
+
border-radius: .3em;
|
|
1184
|
+
white-space: normal;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.token.comment,
|
|
1188
|
+
.token.prolog,
|
|
1189
|
+
.token.doctype,
|
|
1190
|
+
.token.cdata {
|
|
1191
|
+
color: var(--dark-04-color);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.token.keyword,
|
|
1195
|
+
.token.tag,
|
|
1196
|
+
.token.operator,
|
|
1197
|
+
.token.punctuation {
|
|
1198
|
+
color: #993388;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.namespace {
|
|
1202
|
+
opacity: .7;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.token.property,
|
|
1206
|
+
.token.boolean,
|
|
1207
|
+
.token.constant,
|
|
1208
|
+
.token.symbol,
|
|
1209
|
+
.token.deleted {
|
|
1210
|
+
color: var(--pink-color);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.token.entity,
|
|
1214
|
+
.token.number {
|
|
1215
|
+
color: #30A666;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.token.selector,
|
|
1219
|
+
.token.attr-name,
|
|
1220
|
+
.token.string,
|
|
1221
|
+
.token.char,
|
|
1222
|
+
.token.builtin,
|
|
1223
|
+
.token.inserted {
|
|
1224
|
+
color: var(--purple-text-color);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.token.url,
|
|
1228
|
+
.language-css .token.string,
|
|
1229
|
+
.style .token.string {
|
|
1230
|
+
color: var(--dark-color);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.token.atrule,
|
|
1234
|
+
.token.attr-value {
|
|
1235
|
+
color: var(--dark-color);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.token.atrule,
|
|
1239
|
+
.token.keyword {
|
|
1240
|
+
font-weight: 500;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.token.function,
|
|
1244
|
+
.token.class-name {
|
|
1245
|
+
color: var(--pink-color);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.token.regex,
|
|
1249
|
+
.token.important,
|
|
1250
|
+
.token.variable {
|
|
1251
|
+
color: var(--pink-color);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.token.important,
|
|
1255
|
+
.token.bold {
|
|
1256
|
+
font-weight: bold;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.token.italic {
|
|
1260
|
+
font-style: italic;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
.token.entity {
|
|
1264
|
+
cursor: help;
|
|
1265
|
+
}
|
|
1266
|
+
`,Db=e=>{const t={};return Object.entries(e).forEach(([n,r])=>{r!==void 0&&(t[`$${n}`]=r)}),v.jsx(Ob,{...t})};/**
|
|
1267
|
+
* @license MIT
|
|
1268
|
+
* author: Cube Dev Team
|
|
1269
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1270
|
+
* Released under the MIT license.
|
|
1271
|
+
*/const _b=[...ee,...be],Bb=k({qa:"Footer","data-id":"Footer",styles:{gridArea:"footer",display:"block",flow:"column"}}),Hb=f.forwardRef(function(t,n){t=Ze(t,"footer");const r=G(t,_b);return v.jsx(Bb,{...Y(t,{eventProps:!0}),ref:n,styles:r})});/**
|
|
1272
|
+
* @license MIT
|
|
1273
|
+
* author: Cube Dev Team
|
|
1274
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1275
|
+
* Released under the MIT license.
|
|
1276
|
+
*/const Nb={label:"Ok",type:"primary"},jb={label:"Cancel"};function Vb(e,t){const{onClose:n}=Lc(),{danger:r,actions:i,title:o,styles:a,noActions:s,content:c,...l}=e;let{confirm:u,secondary:d,cancel:h}=i??{};return u=u!==!1?{...Nb,...typeof u=="object"?u:null}:void 0,h=h?{...jb,...typeof h=="object"?h:null}:void 0,v.jsxs(Cb,{ref:t,role:"alertdialog",isDismissable:!1,...l,children:[o?v.jsx(s1,{children:v.jsx(Is,{children:o})}):null,c?v.jsx(i1,{children:typeof c=="string"?v.jsx(Ri,{children:c}):c}):null,s?null:v.jsx(Hb,{children:v.jsxs(ji,{align:"end",children:[v.jsx(At,{autoFocus:!0,theme:r?"danger":void 0,...u,onPress:p=>sn(u?.onPress?.(p),n?.("confirm"))}),d&&v.jsx(At,{...d,onPress:p=>sn(d?.onPress?.(p),n?.("secondary"))}),h&&v.jsx(At,{...h,onPress:p=>sn(h?.onPress?.(p),n?.("cancel"))})]})})]})}const Kb=f.forwardRef(Vb);/**
|
|
1277
|
+
* @license MIT
|
|
1278
|
+
* author: Cube Dev Team
|
|
1279
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1280
|
+
* Released under the MIT license.
|
|
1281
|
+
*/const ka="AlertDialogZone";function Ub(e){const{openedDialog:t}=e;if(t===null)return v.jsx(En,{},ka);const{type:n,isDismissable:r=!0,actions:i,onDismiss:o,content:a,...s}=t.props,{resolve:c,reject:l,isVisible:u,dialogType:d}=t.meta,h=(()=>{const p=(g,m)=>{if(typeof g>"u")return;if(typeof g=="boolean")return g?{onPress:()=>c(m)}:!1;const x=g.onPress;return{...g,onPress:$=>{x?.($),c(m)}}};return typeof i>"u"?{}:{confirm:p(i.confirm,"confirm"),secondary:p(i.secondary,"secondary"),cancel:p(i.cancel,"cancel")}})();return v.jsx(En,{children:v.jsx(Ag,{isOpen:u,isDismissable:r,type:n,onDismiss:o,children:v.jsx(Kb,{noActions:d==="form",actions:h,isHidden:!u,content:typeof a=="function"?a({resolve:c,reject:l}):a,...s})})},ka)}/**
|
|
1282
|
+
* @license MIT
|
|
1283
|
+
* author: Cube Dev Team
|
|
1284
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1285
|
+
* Released under the MIT license.
|
|
1286
|
+
*/const zb=f.createContext(null);function Gb(e){const[t,n]=f.useState(null),r=f.useRef(0),i=f.useMemo(()=>({open:(o,a={})=>{const{onDismiss:s,...c}=o,{cancelToken:l}=a,u=++r.current,d={props:null,meta:{id:u,isClosed:!1,isVisible:!0}},h=()=>{d.meta.isClosed||(d.meta.isClosed=!0,a.cancelToken?.removeEventListener("abort",h),n(p=>p?.meta.id!==u?p:{props:p.props,meta:{...p.meta,isVisible:!1}}),setTimeout(()=>n(p=>p?.meta.id!==u?p:null),300))};return l?.aborted?new Promise(()=>{}):(l?.addEventListener("abort",h,{once:!0}),d.meta.promise=new Promise((p,g)=>{d.meta.resolve=m=>{h(),p(m)},d.meta.reject=m=>{h(),g(m)}}),d.props={...c,onDismiss:p=>{s?.(p),d.meta.reject(void 0)}},n(p=>p!==null?(d.meta.reject(new Error("Another dialog is already opened. It's a bad practice to open more than one <AlertDialog /> at the same time")),p):d),d.meta.promise)}}),[]);return v.jsxs(zb.Provider,{value:i,children:[v.jsx(Ub,{openedDialog:t}),e.children]})}/**
|
|
1287
|
+
* @license MIT
|
|
1288
|
+
* author: Cube Dev Team
|
|
1289
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1290
|
+
* Released under the MIT license.
|
|
1291
|
+
*/const Wb=k({id:"cube-ui-kit-root",className:"root"}),Zb={display:"block",preset:"t3",...Object.keys(_t).reduce((e,t)=>(e[`@${t}`]=_t[t],e),{})},qb=[...Re,...Ht],jr=typeof CSS<"u"&&typeof CSS?.supports=="function"?CSS.supports("height: 100dvh"):!1;function My(e){let{children:t,bodyStyles:n,fontDisplay:r="swap",fonts:i,publicUrl:o,router:a,font:s,monospaceFont:c,applyLegacyTokens:l,tracking:u,...d}=e;const h=f.useRef(null),[p,g]=f.useState();let m=Qd({isDisabled:jr}),[x,$]=f.useState(jr?void 0:m.height),y=f.useRef();f.useEffect(()=>{jr&&typeof window<"u"||(y.current&&clearTimeout(y.current),m.height<(x||0)&&m.height<window.innerHeight?y.current=setTimeout(()=>{$(m.height)},500):$(m.height))},[x,m.height]),f.useEffect(()=>{p||g(h?.current)},[]);const w=G(d,qb,Zb);return v.jsx(Ni,{router:a,root:p,children:v.jsx(Wp,{event:u?.event,children:v.jsx(Cu,{children:v.jsxs(Wb,{ref:h,"data-font-display":r,...Y(d,{eventProps:!0}),styles:w,style:{"--cube-dynamic-viewport-height":x?x+"px":"100dvh"},children:[v.jsx(Db,{bodyStyles:n,applyLegacyTokens:l,publicUrl:o,fonts:i,font:s,monospaceFont:c,fontDisplay:r}),v.jsx(Ep,{children:v.jsx(_v,{value:h,children:v.jsx(mg,{rootRef:h,children:v.jsx(Gb,{children:t})})})})]})})})})}/**
|
|
1292
|
+
* @license MIT
|
|
1293
|
+
* author: Cube Dev Team
|
|
1294
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1295
|
+
* Released under the MIT license.
|
|
1296
|
+
*/const Xb=k({styles:{gridArea:"divider",display:{"":"block",text:"grid"},gridColumns:"1fr auto 1fr",placeItems:"center stretch",gap:"1x",preset:"c1",height:{"":"1bw 1bw",text:"auto"},fill:{"":"#border",text:"none"},border:"0",margin:"0",Line:{height:"1bw 1bw",fill:"#border"}},styleProps:[...Nt,...Re,...Bn]}),Fy=f.forwardRef(function(t,n){const{mods:r,children:i,styles:o,...a}=Ze(t,"divider");return v.jsx(Xb,{as:i?"div":"hr",role:i?"separator":void 0,mods:{text:!!i,...r},...Y(a,{eventProps:!0}),ref:n,styles:o,children:i&&v.jsxs(v.Fragment,{children:[v.jsx("div",{"data-element":"Line"}),v.jsx("div",{children:i}),v.jsx("div",{"data-element":"Line"})]})})}),Yb="modulepreload",Jb=function(e){return"/vizard/"+e},Oa={},ky=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link");i=Promise.all(n.map(a=>{if(a=Jb(a),a in Oa)return;Oa[a]=!0;const s=a.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(!!r)for(let d=o.length-1;d>=0;d--){const h=o[d];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":Yb,s||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),s)return new Promise((d,h)=>{u.addEventListener("load",d),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};/**
|
|
1297
|
+
* @license MIT
|
|
1298
|
+
* author: Cube Dev Team
|
|
1299
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1300
|
+
* Released under the MIT license.
|
|
1301
|
+
*/const lu=Bt.input`
|
|
1302
|
+
&&&&& {
|
|
1303
|
+
display: block;
|
|
1304
|
+
font-family: inherit;
|
|
1305
|
+
font-size: 100%;
|
|
1306
|
+
line-height: 1.15;
|
|
1307
|
+
margin: 0;
|
|
1308
|
+
overflow: visible;
|
|
1309
|
+
box-sizing: border-box;
|
|
1310
|
+
padding: 0;
|
|
1311
|
+
position: absolute;
|
|
1312
|
+
top: 0;
|
|
1313
|
+
right: 0;
|
|
1314
|
+
left: 0;
|
|
1315
|
+
bottom: 0;
|
|
1316
|
+
opacity: 0.0001;
|
|
1317
|
+
z-index: 1;
|
|
1318
|
+
width: 100%;
|
|
1319
|
+
height: 100%;
|
|
1320
|
+
cursor: ${({$isButton:e})=>e?"pointer":"default"};
|
|
1321
|
+
}
|
|
1322
|
+
`;/**
|
|
1323
|
+
* @license MIT
|
|
1324
|
+
* author: Cube Dev Team
|
|
1325
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1326
|
+
* Released under the MIT license.
|
|
1327
|
+
*/const cu=f.createContext(null);/**
|
|
1328
|
+
* @license MIT
|
|
1329
|
+
* author: Cube Dev Team
|
|
1330
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1331
|
+
* Released under the MIT license.
|
|
1332
|
+
*/const Qb=k({qa:"CheckboxGroup",styles:{display:"flex",placeItems:"start",placeContent:"start",flow:{"":"column",horizontal:"row wrap"},gap:{"":"1x",horizontal:"1x 2x"}}});function ey(e,t){e=Fg(e),e=Ye(e),e=xt(e),e=sr(e,{defaultValidationTrigger:"onChange",valuePropsMapper:({value:R,onChange:E})=>({value:R??[],onChange:E})});let{isDisabled:n,isRequired:r,necessityIndicator:i,necessityLabel:o,label:a,extra:s,validationState:c,children:l,orientation:u="vertical",message:d,description:h,labelStyles:p,tooltip:g,labelProps:m,labelSuffix:x,inputStyles:$,...y}=e,w=yt(t),T=G(y,ee),C=hf(e),{groupProps:L,labelProps:A}=tp(e,C),b=v.jsx(Qb,{styles:$,mods:{horizontal:u==="horizontal"},children:v.jsx(Ut.Provider,{value:{isDisabled:n,validationState:c},children:v.jsx(cu.Provider,{value:C,children:l})})});return Xi(b,w,{...e,children:null,fieldProps:L,labelProps:re(m,A),styles:T})}const uu=f.forwardRef(ey);uu.cubeInputType="CheckboxGroup";/**
|
|
1333
|
+
* @license MIT
|
|
1334
|
+
* author: Cube Dev Team
|
|
1335
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1336
|
+
* Released under the MIT license.
|
|
1337
|
+
*/function ty(){return v.jsx("svg",{width:"10",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M3.417 7.604l-.017.018-3.4-3.4 1.433-1.433 1.985 1.985L8.192 0l1.432 1.433-6.189 6.189-.018-.018z",fill:"currentColor"})})}function ny(){return v.jsx("svg",{width:"8",height:"2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M0 .044v2.001l.026.025h8.063V.044H0z",fill:"#fff"})})}const Da=k({as:"label",qa:"CheckboxWrapper",styles:{position:"relative",display:"flex",placeItems:"center start",placeContent:"baseline",gap:"1x",flow:"row",preset:"default",cursor:"pointer",width:"max max-content"}}),ry=k({qa:"Checkbox",styles:{display:"grid",placeItems:"center",radius:".5r",fill:{"":"#white","checked | indeterminate":"#purple-text","invalid & !checked":"#white","invalid & checked":"#danger-text",disabled:"#dark.12"},color:{"":"#white","disabled & !checked & !indeterminate":"#clear"},border:{"":"#dark.30",invalid:"#danger-text.50","disabled | ((indeterminate | checked) & !invalid)":"#clear"},width:"(2x - 2bw)",height:"(2x - 2bw)",outline:{"":"#purple-03.0",focused:"#purple-03"},transition:"theme"}});function iy(e,t){let n=f.useContext(cu);e=kg(e);let r=e;e=Ye(e),e=xt(e),e=sr(e,{defaultValidationTrigger:"onChange",valuePropsMapper:({value:I,onChange:D})=>({isSelected:I??!1,isIndeterminate:!1,onChange:D}),unsafe__isDisabled:!!n});let{qa:i,isIndeterminate:o=!1,isDisabled:a=!1,insideForm:s,isRequired:c,children:l,label:u,validationState:d,labelProps:h,labelStyles:p,labelPosition:g,inputStyles:m,isHidden:x,...$}=e,y=G(e,Nt);m=G(e,Ht,m),p=f.useMemo(()=>({...s?Ac:qi,...p}),[s,p]);let{isFocused:w,focusProps:T}=qn({isDisabled:a},!0),{hoverProps:C,isHovered:L}=Le({isDisabled:a}),A=f.useRef(null),b=Zn(t,A);const R=As(e);let{inputProps:E}=n?np({...e,value:e.value||"",isRequired:r.isRequired,validationState:r.validationState},n,A):wl({...e,...typeof u=="string"&&u.trim()?{"aria-label":u}:{}},R,A),P=o?v.jsx(ny,{}):v.jsx(ty,{});if(n){for(let I of["isSelected","defaultSelected","isEmphasized"])r[I]!=null&&console.warn(`CubeUIKit: ${I} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);e.value==null&&console.warn("CubeUIKit: A <Checkbox> element within a <CheckboxGroup> requires a `value` property.")}const F={checked:E.checked,indeterminate:o,invalid:d==="invalid",valid:d==="valid",disabled:a,hovered:L,focused:w,"side-label":g==="side","inside-form":s},S=v.jsxs(Da,{isHidden:x,mods:F,styles:{position:"relative"},children:[v.jsx(lu,{"data-qa":"HiddenInput",...re(E,T),ref:A}),v.jsx(ry,{qa:i||"Checkbox",mods:F,styles:m,children:P}),l&&v.jsx(Ii,{nowrap:!0,children:l})]});return s&&!n?Xi(S,b,{...e,children:null,labelStyles:p,inputStyles:m,styles:y}):v.jsxs(Da,{as:"label",styles:y,isHidden:x,...C,...Y($),ref:b,children:[S,u?v.jsx(ws,{styles:p,mods:{invalid:d==="invalid",valid:d==="valid",disabled:a},...Y(h),children:u}):null]})}let du=f.forwardRef(iy);du.cubeInputType="Checkbox";let Oy=Object.assign(du,{Group:uu});/**
|
|
1338
|
+
* @license MIT
|
|
1339
|
+
* author: Cube Dev Team
|
|
1340
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1341
|
+
* Released under the MIT license.
|
|
1342
|
+
*/const fu=f.createContext(null);function oy(){return f.useContext(fu)}/**
|
|
1343
|
+
* @license MIT
|
|
1344
|
+
* author: Cube Dev Team
|
|
1345
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1346
|
+
* Released under the MIT license.
|
|
1347
|
+
*/const ay=k({qa:"RadioGroup",styles:{display:"flex",placeItems:"start",placeContent:"start",flow:{"":"column",horizontal:"row wrap","horizontal & solid":"row"},gap:{"":"1x",solid:0},whiteSpace:"nowrap"}});function sy(e,t){e=Mg(e),e=Ye(e),e=xt(e),e=sr(e,{defaultValidationTrigger:"onChange"});let{isDisabled:n,isRequired:r,labelPosition:i="top",validationState:o,children:a,orientation:s,styles:c,groupStyles:l,insideForm:u,labelProps:d,isSolid:h,...p}=e,g=yt(t);c=G(p,Nt,c),l=G(p,Ht,l);let m=kf(e);s==null&&(s=h?"horizontal":"vertical");let{radioGroupProps:x,labelProps:$}=_p(e,m),y=v.jsx(ay,{styles:l,mods:{horizontal:s==="horizontal","inside-form":u,"side-label":i==="side",solid:!!h},children:v.jsx(Ut.Provider,{value:{isRequired:r,validationState:o,isDisabled:n},children:v.jsx(fu.Provider,{value:{state:m,name:e.name,isSolid:h},children:a})})});return Xi(y,g,{...e,children:null,fieldProps:x,labelProps:re(d,$),styles:c})}const lo=f.forwardRef(sy);lo.cubeInputType="RadioGroup";/**
|
|
1348
|
+
* @license MIT
|
|
1349
|
+
* author: Cube Dev Team
|
|
1350
|
+
* @cube-dev/ui-kit v0.33.2
|
|
1351
|
+
* Released under the MIT license.
|
|
1352
|
+
*/const ly=k({as:"label",qa:"RadioWrapper",styles:{position:"relative",display:"grid",placeItems:"center start",gap:"1x",flow:"column",preset:"default",width:"min-content",margin:{"":"1x right",'[data-type="button"]':"0"},zIndex:{"":"initial",checked:1},Input:{radius:{"":"round",button:!0,"button & solid":0,"button & solid & :first-child":"1r 0 0 1r","button & solid & :last-child":"0 1r 1r 0"},margin:{"":"initial","button & solid":"-1bw right","button & solid & :last-child":0}}}}),cy=k({styles:{fill:{"":"#white",hovered:"#purple-text.04",checked:"#white",disabled:"#dark.04"},color:{"":"#dark.85",invalid:"#danger-text",disabled:"#dark.40"},preset:"t3m",border:{"":"#dark-05",checked:"#purple-text","invalid & checked":"#danger-text","disabled & checked":"#dark.40",disabled:"#dark-05"},padding:"(.75x - 1bw) (1.5x - 1bw)",cursor:"pointer",opacity:{"":1,disabled:.5},outline:{"":"#purple-03.0",focused:"#purple-03"},transition:"theme"}}),uy=k({styles:{display:"grid",placeItems:"center",radius:"round",fill:{"":"#white",disabled:"#dark.04"},color:{checked:"#purple-text","invalid & checked":"#danger-text","disabled | !checked":"#clear","disabled & checked":"#dark.12"},border:{"":"#dark.30",checked:"#purple-text",invalid:"#danger-text.50",disabled:"#dark.12"},width:"2x",height:"2x",outline:{"":"#purple-03.0",focused:"#purple-03"},transition:"theme",RadioCircle:{display:"block",radius:"round",width:"1x",height:"1x",fill:"currentColor"}}}),dy=v.jsx("div",{"data-element":"RadioCircle"}),fy=k({qa:"RadioLabel",styles:qi});function hy(e,t){e=Ye(e),e=xt(e),e=sr(e,{defaultValidationTrigger:"onChange"});let{qa:n,isDisabled:r,validationState:i,children:o,label:a,autoFocus:s,labelStyles:c,labelProps:l,inputStyles:u,type:d="radio","aria-label":h,...p}=e,g=d==="button";a=a||o;let m=G(p,Nt);const x=g?cy:uy;c={...qi,...c};let $=oy(),y=$&&$.state,w=$&&$.name,T=$&&$.isSolid||!1;if(!y)throw new Error("CubeUI: The Radio button is used outside the RadioGroup.");let{isFocused:C,focusProps:L}=qn({isDisabled:r},!0),{hoverProps:A,isHovered:b}=Le({isDisabled:r}),R=f.useRef(null),E=Zn(t,R),{inputProps:P,isDisabled:F,isSelected:S}=Dp({name:w,...e,isDisabled:r},y,R);const I=f.useMemo(()=>({checked:S,invalid:i==="invalid",valid:i==="valid",disabled:F,hovered:b,button:g,focused:C,solid:T}),[S,i,F,b,g,C,T]);return v.jsxs(ly,{styles:m,...A,ref:E,mods:I,"data-type":d,children:[v.jsx(lu,{"data-qa":n||"Radio","aria-label":h,...re(P,L),ref:R,$isButton:g}),v.jsx(x,{"data-element":"Input",mods:I,"data-type":d,styles:u,children:g?o:dy}),a&&!g&&v.jsx(fy,{mods:I,styles:c,...Y(l),children:a})]})}function py(e,t){const n=hu;return v.jsx(n,{...e,ref:t,type:"button"})}const hu=f.forwardRef(hy),vy=f.forwardRef(py),my=k(lo,{isSolid:!0}),Dy=Object.assign(hu,{Group:lo,Button:vy,ButtonGroup:my});export{Ey as A,Sy as B,Py as D,Ay as F,Ly as G,Ty as L,Cy as P,My as R,pc as S,Iy as T,ky as _,$y as a,At as b,Dg as c,Hf as d,Ry as e,Dy as f,e1 as g,Fy as h,Oy as i,v as j,fo as k,k as t,hc as u};
|