From 0ecfeabd8e1fee7b9f2ccf4204c0e421efed1ba9 Mon Sep 17 00:00:00 2001 From: Tam Date: Wed, 9 Jul 2025 22:50:22 +0800 Subject: [PATCH 1/4] feat(datasouce): Add GaussDB data source connector (#2813) Co-authored-by: tanwei --- .../src/dbgpt_app/static/web/404.html | 2 +- .../src/dbgpt_app/static/web/404/index.html | 2 +- .../construct/prompt/add.json | 0 .../construct/prompt/edit.json | 0 .../1elVqBh6jYC7GI-_JPvPe/_buildManifest.js | 1 - ...9e5d10f721.js => 1791.77b11c03128065aa.js} | 4 +- ...d997956492.js => 2913-315ad705b1306902.js} | 0 ...abc1a231b3.js => 3768-973750300df397d1.js} | 0 ...0c798fc2d4.js => 3913-b9b23649107dc418.js} | 2 +- .../static/chunks/4744-a431699d60da1732.js | 2 +- ...214a9c9287.js => 5000.0b035da005129040.js} | 6 +- ...ced8168bb8.js => 5789-2039689e65be4b48.js} | 0 ...d8e4e3b488.js => 7249-9727b79352b76431.js} | 2 +- ...6bc6c264ea.js => 9473-b8a100a835f3f5f6.js} | 2 +- ...c0846084731.js => 952-f0723ae2739d3c95.js} | 0 ...f799b27b23.js => 9618.0e1c7737f2293b32.js} | 2 +- .../static/chunks/main-5909ee1afdc8664d.js | 1 + .../static/chunks/main-6c4c7f5b8c9b1320.js | 1 - ...dd978f3a24.js => _app-3d30aab9de4cf75b.js} | 2 +- ...a89f179c3c.js => chat-2f746da663d3ec3c.js} | 0 ...10f23.js => construct-e47b89f07020d0b7.js} | 0 ...fea172a3a.js => agent-704ad084d40573e0.js} | 0 ...438c6f10ca7.js => app-3ee2dfcf6bbac3d2.js} | 0 ...s => create-app-modal-02afbbafca993af1.js} | 0 ...63f5f34a9.js => extra-fd72c8f849a0f156.js} | 4 +- ...70a1.js => AwelLayout-a6c12fad474eed34.js} | 0 ...8cf4e.js => NativeApp-03a149ddbb0f7d24.js} | 4 +- ...=> RecommendQuestions-b3d0c606d586f3d7.js} | 0 ...213e8.js => auto-plan-0c879aadd652110e.js} | 4 +- ...a50.js => DetailsCard-293dfdf24ce240c2.js} | 4 +- ...1a.js => PromptSelect-073c7fd4c09042d9.js} | 4 +- ...25fa58.js => database-806c623a7778a342.js} | 0 ...419d6f00.js => dbgpts-e5f58b7183d5af6b.js} | 0 ...48a662501f.js => flow-79d352a51f518adc.js} | 0 ...85e62987.js => canvas-afba1fbc271778bc.js} | 0 ...88610.js => knowledge-da4a603fecb6cadb.js} | 4 +- ...57acf3e4b.js => chunk-aec6712b5adbcd50.js} | 4 +- ...3166ecb5.js => models-c6ee4e8b241a448c.js} | 0 ...b09885a0.js => prompt-9ad3c2be02a25acb.js} | 0 ...c0a3025b.js => [type]-e73e9ed9fa9aea3a.js} | 2 +- ...4539.js => evaluation-2b25e49b1c51c8b7.js} | 0 ...cad9a050f.js => index-d67a55cfb5734334.js} | 0 ...6a37793c9.js => graph-dc03691712d92640.js} | 0 ...16b5070d0c.js => chat-4f8cc18dafc2196d.js} | 0 ...e136.js => ChatDialog-9561b37f16886018.js} | 4 +- ...eb23177.js => Content-e03318f71d397059.js} | 4 +- ...b2cc57.js => Feedback-e59a4538cc5ac290.js} | 0 ...a55ea6e8.js => Header-cd629bdb96dba895.js} | 0 ....js => InputContainer-0787c747f98929e1.js} | 0 ...b.js => ModelSelector-3aefb01c875fbb71.js} | 0 ...fd6ffc.js => Resource-0441217625bc1d16.js} | 0 ...7bd.js => Thermometer-b2b75fa4a17e4c08.js} | 0 ...a8c6269.js => webpack-cb8abe9558bda3e0.js} | 2 +- ...f944f234eab85.css => 1a5e46871cabda8e.css} | 0 .../deGXl-QDK23A171EY2BQw/_buildManifest.js | 1 + .../_ssgManifest.js | 0 .../src/dbgpt_app/static/web/chat/index.html | 2 +- .../static/web/construct/agent/index.html | 2 +- .../components/create-app-modal/index.html | 2 +- .../extra/components/AwelLayout/index.html | 2 +- .../app/extra/components/NativeApp/index.html | 2 +- .../components/RecommendQuestions/index.html | 2 +- .../auto-plan/DetailsCard/index.html | 2 +- .../auto-plan/PromptSelect/index.html | 2 +- .../auto-plan/ResourceContent/index.html | 2 +- .../auto-plan/ResourceContentV2/index.html | 2 +- .../auto-plan/ResourcesCard/index.html | 2 +- .../auto-plan/ResourcesCardV2/index.html | 2 +- .../app/extra/components/auto-plan/index.html | 2 +- .../web/construct/app/extra/config/index.html | 2 +- .../static/web/construct/app/extra/index.html | 2 +- .../static/web/construct/app/index.html | 2 +- .../static/web/construct/database/index.html | 2 +- .../static/web/construct/dbgpts/index.html | 2 +- .../web/construct/flow/canvas/index.html | 2 +- .../static/web/construct/flow/index.html | 2 +- .../web/construct/flow/libro/index.html | 2 +- .../dbgpt_app/static/web/construct/index.html | 2 +- .../web/construct/knowledge/chunk/index.html | 2 +- .../static/web/construct/knowledge/index.html | 2 +- .../static/web/construct/models/index.html | 2 +- .../web/construct/prompt/add/index.html | 2 +- .../web/construct/prompt/edit/index.html | 2 +- .../static/web/construct/prompt/index.html | 2 +- .../static/web/evaluation/index.html | 2 +- .../dbgpt_app/static/web/icons/gaussdb.png | Bin 0 -> 13858 bytes .../src/dbgpt_app/static/web/index.html | 2 +- .../static/web/knowledge/graph/index.html | 2 +- .../chat/components/ChatDialog/index.html | 2 +- .../mobile/chat/components/Content/index.html | 2 +- .../chat/components/DislikeDrawer/index.html | 2 +- .../chat/components/Feedback/index.html | 2 +- .../mobile/chat/components/Header/index.html | 2 +- .../chat/components/InputContainer/index.html | 2 +- .../chat/components/ModelSelector/index.html | 2 +- .../chat/components/OptionIcon/index.html | 2 +- .../chat/components/Resource/index.html | 2 +- .../chat/components/Thermometer/index.html | 2 +- .../static/web/mobile/chat/index.html | 2 +- .../datasource/rdbms/conn_gaussdb.py | 344 ++++++++++++++++++ .../src/dbgpt_ext/datasource/schema.py | 1 + .../datasource/manages/connector_manager.py | 19 +- web/public/icons/gaussdb.png | Bin 0 -> 13858 bytes web/utils/constants.ts | 5 + 104 files changed, 445 insertions(+), 78 deletions(-) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/{1elVqBh6jYC7GI-_JPvPe => deGXl-QDK23A171EY2BQw}/construct/prompt/add.json (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/{1elVqBh6jYC7GI-_JPvPe => deGXl-QDK23A171EY2BQw}/construct/prompt/edit.json (100%) delete mode 100644 packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/1elVqBh6jYC7GI-_JPvPe/_buildManifest.js rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{4019.0099949e5d10f721.js => 1791.77b11c03128065aa.js} (82%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{2913-19ce7fd997956492.js => 2913-315ad705b1306902.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{3768-deadababc1a231b3.js => 3768-973750300df397d1.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{3913-50cdfc0c798fc2d4.js => 3913-b9b23649107dc418.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{5000.b4ac08214a9c9287.js => 5000.0b035da005129040.js} (88%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{5789-9438e4ced8168bb8.js => 5789-2039689e65be4b48.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{7249-0c6ffed8e4e3b488.js => 7249-9727b79352b76431.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{1154-5374436bc6c264ea.js => 9473-b8a100a835f3f5f6.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{952-cf4fcc0846084731.js => 952-f0723ae2739d3c95.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{9618.dfb7bdf799b27b23.js => 9618.0e1c7737f2293b32.js} (99%) create mode 100644 packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-5909ee1afdc8664d.js delete mode 100644 packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-6c4c7f5b8c9b1320.js rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/{_app-3af894dd978f3a24.js => _app-3d30aab9de4cf75b.js} (80%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/{chat-852494a89f179c3c.js => chat-2f746da663d3ec3c.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/{construct-f9c701adc0a10f23.js => construct-e47b89f07020d0b7.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{agent-03477bffea172a3a.js => agent-704ad084d40573e0.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{app-ccd4d438c6f10ca7.js => app-3ee2dfcf6bbac3d2.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/components/{create-app-modal-339aaef29519ae77.js => create-app-modal-02afbbafca993af1.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/{extra-98e111663f5f34a9.js => extra-fd72c8f849a0f156.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/{AwelLayout-1acc4adbea7270a1.js => AwelLayout-a6c12fad474eed34.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/{NativeApp-e8bed5f50d58cf4e.js => NativeApp-03a149ddbb0f7d24.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/{RecommendQuestions-18c7a0102678d26b.js => RecommendQuestions-b3d0c606d586f3d7.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/{auto-plan-79785f514dc213e8.js => auto-plan-0c879aadd652110e.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/auto-plan/{DetailsCard-babdba0e75a54a50.js => DetailsCard-293dfdf24ce240c2.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/app/extra/components/auto-plan/{PromptSelect-62bfc147d0bc771a.js => PromptSelect-073c7fd4c09042d9.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{database-1ad3edf31f25fa58.js => database-806c623a7778a342.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{dbgpts-c1905e21419d6f00.js => dbgpts-e5f58b7183d5af6b.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{flow-f32b1c48a662501f.js => flow-79d352a51f518adc.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/flow/{canvas-2f274b1c85e62987.js => canvas-afba1fbc271778bc.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{knowledge-1d8aafcd4cd88610.js => knowledge-da4a603fecb6cadb.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/knowledge/{chunk-88eaa7f57acf3e4b.js => chunk-aec6712b5adbcd50.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{models-6cb3354b3166ecb5.js => models-c6ee4e8b241a448c.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/{prompt-950fe986b09885a0.js => prompt-9ad3c2be02a25acb.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/construct/prompt/{[type]-695ee209c0a3025b.js => [type]-e73e9ed9fa9aea3a.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/{evaluation-eec97fe8ccee4539.js => evaluation-2b25e49b1c51c8b7.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/{index-c9af054cad9a050f.js => index-d67a55cfb5734334.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/knowledge/{graph-897c09e6a37793c9.js => graph-dc03691712d92640.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/{chat-7830cb16b5070d0c.js => chat-4f8cc18dafc2196d.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{ChatDialog-320d5aed9e0fe136.js => ChatDialog-9561b37f16886018.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{Content-b0855e4d7eb23177.js => Content-e03318f71d397059.js} (99%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{Feedback-c8ebb89feab2cc57.js => Feedback-e59a4538cc5ac290.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{Header-bd7c7988a55ea6e8.js => Header-cd629bdb96dba895.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{InputContainer-c5fb747e4c14e8cd.js => InputContainer-0787c747f98929e1.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{ModelSelector-1f1e727e1f64017b.js => ModelSelector-3aefb01c875fbb71.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{Resource-a1baba670afd6ffc.js => Resource-0441217625bc1d16.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/mobile/chat/components/{Thermometer-d8b1777045f777bd.js => Thermometer-b2b75fa4a17e4c08.js} (100%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/{webpack-65d7c4a30a8c6269.js => webpack-cb8abe9558bda3e0.js} (67%) rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/css/{7e8f944f234eab85.css => 1a5e46871cabda8e.css} (100%) create mode 100644 packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/deGXl-QDK23A171EY2BQw/_buildManifest.js rename packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/{1elVqBh6jYC7GI-_JPvPe => deGXl-QDK23A171EY2BQw}/_ssgManifest.js (100%) create mode 100644 packages/dbgpt-app/src/dbgpt_app/static/web/icons/gaussdb.png create mode 100644 packages/dbgpt-ext/src/dbgpt_ext/datasource/rdbms/conn_gaussdb.py create mode 100644 web/public/icons/gaussdb.png diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/404.html b/packages/dbgpt-app/src/dbgpt_app/static/web/404.html index b5d27d932..dcd3b4657 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/404.html +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/404.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/404/index.html b/packages/dbgpt-app/src/dbgpt_app/static/web/404/index.html index b5d27d932..dcd3b4657 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/404/index.html +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/404/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/1elVqBh6jYC7GI-_JPvPe/construct/prompt/add.json b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/deGXl-QDK23A171EY2BQw/construct/prompt/add.json similarity index 100% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/1elVqBh6jYC7GI-_JPvPe/construct/prompt/add.json rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/deGXl-QDK23A171EY2BQw/construct/prompt/add.json diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/1elVqBh6jYC7GI-_JPvPe/construct/prompt/edit.json b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/deGXl-QDK23A171EY2BQw/construct/prompt/edit.json similarity index 100% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/1elVqBh6jYC7GI-_JPvPe/construct/prompt/edit.json rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/data/deGXl-QDK23A171EY2BQw/construct/prompt/edit.json diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/1elVqBh6jYC7GI-_JPvPe/_buildManifest.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/1elVqBh6jYC7GI-_JPvPe/_buildManifest.js deleted file mode 100644 index 48dd89fa8..000000000 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/1elVqBh6jYC7GI-_JPvPe/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(c,t,s,a,e,n,o,p,u,r,i,b,h,d,f,m,k,l,j,g,x,C,w,R,_,D,I,v,A,S,F,y,L,M,N,T,V,B,P,E,H,O,Q,U,q,z,G,J,K,W,X){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,t,s,e,o,p,u,r,"static/chunks/8733-1e1fc970bff78378.js",D,"static/chunks/pages/index-c9af054cad9a050f.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/chat":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,D,"static/chunks/pages/chat-852494a89f179c3c.js"],"/construct":[t,o,k,G,"static/chunks/pages/construct-f9c701adc0a10f23.js"],"/construct/agent":[c,t,e,o,p,u,r,k,"static/chunks/4502-f021dad7539e7eb9.js",O,"static/chunks/pages/construct/agent-03477bffea172a3a.js"],"/construct/app":[c,t,s,a,e,n,o,p,u,r,b,k,J,"static/css/286e71c2657cb947.css","static/chunks/pages/construct/app-ccd4d438c6f10ca7.js"],"/construct/app/components/create-app-modal":[c,s,a,e,"static/css/71b2e674cdce283c.css","static/chunks/pages/construct/app/components/create-app-modal-339aaef29519ae77.js"],"/construct/app/extra":[h,x,v,A,S,F,y,L,M,N,U,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,Q,q,l,V,B,"static/css/41b18ca294c40cfe.css","static/chunks/pages/construct/app/extra-98e111663f5f34a9.js"],"/construct/app/extra/components/AwelLayout":[U,t,a,n,q,K,"static/chunks/pages/construct/app/extra/components/AwelLayout-1acc4adbea7270a1.js"],"/construct/app/extra/components/NativeApp":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,H,"static/chunks/pages/construct/app/extra/components/NativeApp-e8bed5f50d58cf4e.js"],"/construct/app/extra/components/RecommendQuestions":[c,s,a,"static/css/baa1b56aac6681e7.css","static/chunks/pages/construct/app/extra/components/RecommendQuestions-18c7a0102678d26b.js"],"/construct/app/extra/components/auto-plan":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,Q,l,V,B,H,"static/chunks/pages/construct/app/extra/components/auto-plan-79785f514dc213e8.js"],"/construct/app/extra/components/auto-plan/DetailsCard":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,Q,l,V,B,H,"static/chunks/pages/construct/app/extra/components/auto-plan/DetailsCard-babdba0e75a54a50.js"],"/construct/app/extra/components/auto-plan/PromptSelect":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,H,"static/chunks/pages/construct/app/extra/components/auto-plan/PromptSelect-62bfc147d0bc771a.js"],"/construct/app/extra/components/auto-plan/ResourceContent":[t,a,n,"static/chunks/pages/construct/app/extra/components/auto-plan/ResourceContent-8fd8a42175ce2ace.js"],"/construct/app/extra/components/auto-plan/ResourceContentV2":[c,t,s,a,e,n,i,j,W,"static/chunks/pages/construct/app/extra/components/auto-plan/ResourceContentV2-0e823f7541c2ade2.js"],"/construct/app/extra/components/auto-plan/ResourcesCard":[h,c,t,a,n,p,"static/chunks/89-79d1c113ca884cd7.js","static/chunks/pages/construct/app/extra/components/auto-plan/ResourcesCard-a836ce1adfc996a0.js"],"/construct/app/extra/components/auto-plan/ResourcesCardV2":[h,c,t,s,a,e,n,p,i,j,Q,W,"static/chunks/pages/construct/app/extra/components/auto-plan/ResourcesCardV2-a2000c2b51d895ee.js"],"/construct/app/extra/config":["static/chunks/pages/construct/app/extra/config-22c5ff4c03d2e790.js"],"/construct/database":[c,t,s,a,e,n,o,i,j,k,z,X,G,"static/chunks/pages/construct/database-1ad3edf31f25fa58.js"],"/construct/dbgpts":[c,t,s,e,o,p,u,r,k,"static/chunks/9277-9764c7339ee3770d.js",O,"static/chunks/pages/construct/dbgpts-c1905e21419d6f00.js"],"/construct/flow":[c,t,s,a,e,n,o,p,u,b,j,k,"static/chunks/620-7c1f4bb0be4b55f5.js",O,"static/chunks/pages/construct/flow-f32b1c48a662501f.js"],"/construct/flow/canvas":[h,U,c,t,s,a,e,n,o,p,u,i,b,j,d,m,f,g,R,"static/chunks/3764-90db3ed836a41b68.js",q,J,"static/chunks/2177-0d4df10c931f5488.js",K,"static/chunks/pages/construct/flow/canvas-2f274b1c85e62987.js"],"/construct/flow/libro":["static/chunks/pages/construct/flow/libro-ef0a3eabd6a60a7c.js"],"/construct/knowledge":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,"static/css/5ae63a08f2d107d5.css","static/chunks/pages/construct/knowledge-1d8aafcd4cd88610.js"],"/construct/knowledge/chunk":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,H,"static/chunks/pages/construct/knowledge/chunk-88eaa7f57acf3e4b.js"],"/construct/models":[c,t,s,a,n,o,p,u,i,j,k,w,"static/chunks/7782-79ec85b605b052fb.js",O,"static/chunks/pages/construct/models-6cb3354b3166ecb5.js"],"/construct/prompt":[c,t,s,e,n,o,p,u,r,b,j,k,g,"static/css/6f3f201b5cbc2e30.css","static/chunks/pages/construct/prompt-950fe986b09885a0.js"],"/construct/prompt/[type]":[c,t,s,a,n,o,i,k,f,_,I,X,"static/chunks/5396-52bf019cbb5ec9e6.js","static/css/279c58a83be8d59c.css","static/chunks/pages/construct/prompt/[type]-695ee209c0a3025b.js"],"/evaluation":[c,t,s,a,e,n,o,u,r,b,j,d,g,"static/chunks/5653-6a30e52c900d4cd6.js","static/chunks/pages/evaluation-eec97fe8ccee4539.js"],"/knowledge/graph":[h,x,e,C,"static/chunks/2973-fdc1592501026593.js","static/chunks/4744-a431699d60da1732.js","static/chunks/5558-d22696c0a03f8006.js","static/chunks/pages/knowledge/graph-897c09e6a37793c9.js"],"/mobile/chat":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat-7830cb16b5070d0c.js"],"/mobile/chat/components/ChatDialog":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,H,"static/chunks/pages/mobile/chat/components/ChatDialog-320d5aed9e0fe136.js"],"/mobile/chat/components/Content":[h,x,v,A,S,F,y,L,M,N,c,t,s,a,e,n,o,p,u,r,i,b,j,k,d,m,f,g,C,T,w,R,_,l,V,B,"static/css/94378cd0c1325bdb.css","static/chunks/pages/mobile/chat/components/Content-b0855e4d7eb23177.js"],"/mobile/chat/components/DislikeDrawer":[c,s,z,"static/chunks/pages/mobile/chat/components/DislikeDrawer-18118969af8b8707.js"],"/mobile/chat/components/Feedback":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,z,l,E,D,"static/chunks/pages/mobile/chat/components/Feedback-c8ebb89feab2cc57.js"],"/mobile/chat/components/Header":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat/components/Header-bd7c7988a55ea6e8.js"],"/mobile/chat/components/InputContainer":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat/components/InputContainer-c5fb747e4c14e8cd.js"],"/mobile/chat/components/ModelSelector":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat/components/ModelSelector-1f1e727e1f64017b.js"],"/mobile/chat/components/OptionIcon":["static/chunks/pages/mobile/chat/components/OptionIcon-9b7b2b198d5ee1f1.js"],"/mobile/chat/components/Resource":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat/components/Resource-a1baba670afd6ffc.js"],"/mobile/chat/components/Thermometer":[h,c,t,s,a,e,n,o,p,u,r,i,b,d,m,f,I,P,l,E,D,"static/chunks/pages/mobile/chat/components/Thermometer-d8b1777045f777bd.js"],sortedPages:["/","/_app","/_error","/chat","/construct","/construct/agent","/construct/app","/construct/app/components/create-app-modal","/construct/app/extra","/construct/app/extra/components/AwelLayout","/construct/app/extra/components/NativeApp","/construct/app/extra/components/RecommendQuestions","/construct/app/extra/components/auto-plan","/construct/app/extra/components/auto-plan/DetailsCard","/construct/app/extra/components/auto-plan/PromptSelect","/construct/app/extra/components/auto-plan/ResourceContent","/construct/app/extra/components/auto-plan/ResourceContentV2","/construct/app/extra/components/auto-plan/ResourcesCard","/construct/app/extra/components/auto-plan/ResourcesCardV2","/construct/app/extra/config","/construct/database","/construct/dbgpts","/construct/flow","/construct/flow/canvas","/construct/flow/libro","/construct/knowledge","/construct/knowledge/chunk","/construct/models","/construct/prompt","/construct/prompt/[type]","/evaluation","/knowledge/graph","/mobile/chat","/mobile/chat/components/ChatDialog","/mobile/chat/components/Content","/mobile/chat/components/DislikeDrawer","/mobile/chat/components/Feedback","/mobile/chat/components/Header","/mobile/chat/components/InputContainer","/mobile/chat/components/ModelSelector","/mobile/chat/components/OptionIcon","/mobile/chat/components/Resource","/mobile/chat/components/Thermometer"]}}("static/chunks/2913-19ce7fd997956492.js","static/chunks/3791-58df908ca3784958.js","static/chunks/5278-36ac2f07bcb92504.js","static/chunks/9859-79e78d1b97925e42.js","static/chunks/4330-a1b5cee9f3b8b8f7.js","static/chunks/4041-985e07af1b9eb211.js","static/chunks/8791-d36492edb39795c5.js","static/chunks/5030-1a77b99f39c3e196.js","static/chunks/5418-965d05b21b0e9810.js","static/chunks/2783-67b811a852a75cad.js","static/chunks/3457-105f31ebfbb8ea1c.js","static/chunks/1300-d15ca5298cec4f7e.js","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2480-b84761c3aa36adc4.js","static/chunks/7124-9f5b0f08bb4ccef6.js","static/chunks/7410-e37e2e071aa3033c.js","static/chunks/2398-80f576e59bf84b54.js","static/chunks/7249-0c6ffed8e4e3b488.js","static/chunks/4567-e13d92805b9a662c.js","static/chunks/9773-86b490ff77c63875.js","static/chunks/355a6ca7-1d76aad7c3cbc660.js","static/chunks/4035-f1c8101dadd76def.js","static/chunks/2510-1865c74d99b0a6bb.js","static/chunks/3345-871b8ac9248e514c.js","static/chunks/9202-a18f5e3aa6a290da.js","static/css/9b601b4de5d78ac2.css","static/chunks/6231-082aa9c179c552ae.js","static/chunks/d9005de1-b2c9f7745c9220a9.js","static/chunks/f9a75a99-8b7c2d960a804903.js","static/chunks/33a1eaa4-04202844a5e2fbdc.js","static/chunks/008713dc-ea223c6e7bc47bf6.js","static/chunks/554c6155-cc8f8ba4718a108c.js","static/chunks/4d857c35-0fb8bfbaea5d41f5.js","static/chunks/175675d1-b7090d0f154e7546.js","static/chunks/83cd118e-4096a239f8273fef.js","static/chunks/1154-5374436bc6c264ea.js","static/chunks/3768-deadababc1a231b3.js","static/chunks/5789-9438e4ced8168bb8.js","static/chunks/8424-b850b868a3630873.js","static/chunks/3913-50cdfc0c798fc2d4.js","static/css/f200b79bd2662f8a.css","static/css/f50ad89cce84a0a9.css","static/chunks/1585-283274605767a82b.js","static/chunks/971df74e-c3b3cf72e9eca476.js","static/chunks/2516-5736bbf87e0c2bd7.js","static/chunks/5265-b1f6bb85fc44ad09.js","static/css/8ff116f2992cd086.css","static/chunks/9046-a15321922377a5f1.js","static/css/a275cc2b185e04f8.css","static/chunks/952-cf4fcc0846084731.js","static/chunks/4393-bd13a27cd00a20d6.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4019.0099949e5d10f721.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1791.77b11c03128065aa.js similarity index 82% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4019.0099949e5d10f721.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1791.77b11c03128065aa.js index e716baa7c..31b4d1ace 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4019.0099949e5d10f721.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1791.77b11c03128065aa.js @@ -1,4 +1,4 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4019],{96991:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zM464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16z"}}]},name:"appstore",theme:"filled"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},89035:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},50228:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},49591:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h360c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H184V184h656v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32zM653.3 599.4l52.2-52.2a8.01 8.01 0 00-4.7-13.6l-179.4-21c-5.1-.6-9.5 3.7-8.9 8.9l21 179.4c.8 6.6 8.9 9.4 13.6 4.7l52.4-52.4 256.2 256.2c3.1 3.1 8.2 3.1 11.3 0l42.4-42.4c3.1-3.1 3.1-8.2 0-11.3L653.3 599.4z"}}]},name:"select",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},27496:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},94668:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},88484:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},87547:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},72868:function(e,t,r){r.d(t,{L:function(){return c}});var n=r(67294),o=r(85241),a=r(78031),i=r(51633);function l(e,t){switch(t.type){case i.Q.blur:case i.Q.escapeKeyDown:return{open:!1};case i.Q.toggle:return{open:!e.open};case i.Q.open:return{open:!0};case i.Q.close:return{open:!1};default:throw Error("Unhandled action")}}var s=r(85893);function c(e){let{children:t,open:r,defaultOpen:c,onOpenChange:u}=e,{contextValue:d}=function(e={}){let{defaultOpen:t,onOpenChange:r,open:o}=e,[s,c]=n.useState(""),[u,d]=n.useState(null),f=n.useRef(null),v=n.useCallback((e,t,n,o)=>{"open"===t&&(null==r||r(e,n)),f.current=o},[r]),p=n.useMemo(()=>void 0!==o?{open:o}:{},[o]),[m,g]=(0,a.r)({controlledProps:p,initialState:t?{open:!0}:{open:!1},onStateChange:v,reducer:l});return n.useEffect(()=>{m.open||null===f.current||f.current===i.Q.blur||null==u||u.focus()},[m.open,u]),{contextValue:{state:m,dispatch:g,popupId:s,registerPopup:c,registerTrigger:d,triggerElement:u},open:m.open}}({defaultOpen:c,onOpenChange:u,open:r});return(0,s.jsx)(o.D.Provider,{value:d,children:t})}},53406:function(e,t,r){r.d(t,{r:function(){return eD}});var n,o,a,i,l,s=r(87462),c=r(63366),u=r(67294),d=r(22760),f=r(54895),v=r(36425);function p(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){var t=p(e).Element;return e instanceof t||e instanceof Element}function g(e){var t=p(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function h(e){if("undefined"==typeof ShadowRoot)return!1;var t=p(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var b=Math.max,x=Math.min,y=Math.round;function S(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Z(){return!/^((?!chrome|android).)*safari/i.test(S())}function k(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&g(e)&&(o=e.offsetWidth>0&&y(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&y(n.height)/e.offsetHeight||1);var i=(m(e)?p(e):window).visualViewport,l=!Z()&&r,s=(n.left+(l&&i?i.offsetLeft:0))/o,c=(n.top+(l&&i?i.offsetTop:0))/a,u=n.width/o,d=n.height/a;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function z(e){var t=p(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function w(e){return e?(e.nodeName||"").toLowerCase():null}function C(e){return((m(e)?e.ownerDocument:e.document)||window.document).documentElement}function I(e){return k(C(e)).left+z(e).scrollLeft}function R(e){return p(e).getComputedStyle(e)}function P(e){var t=R(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function L(e){var t=k(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function D(e){return"html"===w(e)?e:e.assignedSlot||e.parentNode||(h(e)?e.host:null)||C(e)}function T(e,t){void 0===t&&(t=[]);var r,n=function e(t){return["html","body","#document"].indexOf(w(t))>=0?t.ownerDocument.body:g(t)&&P(t)?t:e(D(t))}(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=p(n),i=o?[a].concat(a.visualViewport||[],P(n)?n:[]):n,l=t.concat(i);return o?l:l.concat(T(D(i)))}function B(e){return g(e)&&"fixed"!==R(e).position?e.offsetParent:null}function M(e){for(var t=p(e),r=B(e);r&&["table","td","th"].indexOf(w(r))>=0&&"static"===R(r).position;)r=B(r);return r&&("html"===w(r)||"body"===w(r)&&"static"===R(r).position)?t:r||function(e){var t=/firefox/i.test(S());if(/Trident/i.test(S())&&g(e)&&"fixed"===R(e).position)return null;var r=D(e);for(h(r)&&(r=r.host);g(r)&&0>["html","body"].indexOf(w(r));){var n=R(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var O="bottom",E="right",$="left",j="auto",H=["top",O,E,$],V="start",N="viewport",W="popper",A=H.reduce(function(e,t){return e.concat([t+"-"+V,t+"-end"])},[]),_=[].concat(H,[j]).reduce(function(e,t){return e.concat([t,t+"-"+V,t+"-end"])},[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],J={placement:"bottom",modifiers:[],strategy:"absolute"};function q(){for(var e=arguments.length,t=Array(e),r=0;r=0?"x":"y"}function Y(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?X(o):null,i=o?G(o):null,l=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case"top":t={x:l,y:r.y-n.height};break;case O:t={x:l,y:r.y+r.height};break;case E:t={x:r.x+r.width,y:s};break;case $:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?K(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case V:t[c]=t[c]-(r[u]/2-n[u]/2);break;case"end":t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ee(e){var t,r,n,o,a,i,l,s=e.popper,c=e.popperRect,u=e.placement,d=e.variation,f=e.offsets,v=e.position,m=e.gpuAcceleration,g=e.adaptive,h=e.roundOffsets,b=e.isFixed,x=f.x,S=void 0===x?0:x,Z=f.y,k=void 0===Z?0:Z,z="function"==typeof h?h({x:S,y:k}):{x:S,y:k};S=z.x,k=z.y;var w=f.hasOwnProperty("x"),I=f.hasOwnProperty("y"),P=$,L="top",D=window;if(g){var T=M(s),B="clientHeight",j="clientWidth";T===p(s)&&"static"!==R(T=C(s)).position&&"absolute"===v&&(B="scrollHeight",j="scrollWidth"),("top"===u||(u===$||u===E)&&"end"===d)&&(L=O,k-=(b&&T===D&&D.visualViewport?D.visualViewport.height:T[B])-c.height,k*=m?1:-1),(u===$||("top"===u||u===O)&&"end"===d)&&(P=E,S-=(b&&T===D&&D.visualViewport?D.visualViewport.width:T[j])-c.width,S*=m?1:-1)}var H=Object.assign({position:v},g&&Q),V=!0===h?(t={x:S,y:k},r=p(s),n=t.x,o=t.y,{x:y(n*(a=r.devicePixelRatio||1))/a||0,y:y(o*a)/a||0}):{x:S,y:k};return(S=V.x,k=V.y,m)?Object.assign({},H,((l={})[L]=I?"0":"",l[P]=w?"0":"",l.transform=1>=(D.devicePixelRatio||1)?"translate("+S+"px, "+k+"px)":"translate3d("+S+"px, "+k+"px, 0)",l)):Object.assign({},H,((i={})[L]=I?k+"px":"",i[P]=w?S+"px":"",i.transform="",i))}var et={left:"right",right:"left",bottom:"top",top:"bottom"};function er(e){return e.replace(/left|right|bottom|top/g,function(e){return et[e]})}var en={start:"end",end:"start"};function eo(e){return e.replace(/start|end/g,function(e){return en[e]})}function ea(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&h(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ei(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function el(e,t,r){var n,o,a,i,l,s,c,u,d,f;return t===N?ei(function(e,t){var r=p(e),n=C(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var c=Z();(c||!c&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+I(e),y:s}}(e,r)):m(t)?((n=k(t,!1,"fixed"===r)).top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n):ei((o=C(e),i=C(o),l=z(o),s=null==(a=o.ownerDocument)?void 0:a.body,c=b(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=b(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),d=-l.scrollLeft+I(o),f=-l.scrollTop,"rtl"===R(s||i).direction&&(d+=b(i.clientWidth,s?s.clientWidth:0)-c),{width:c,height:u,x:d,y:f}))}function es(){return{top:0,right:0,bottom:0,left:0}}function ec(e){return Object.assign({},es(),e)}function eu(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function ed(e,t){void 0===t&&(t={});var r,n,o,a,i,l,s,c=t,u=c.placement,d=void 0===u?e.placement:u,f=c.strategy,v=void 0===f?e.strategy:f,p=c.boundary,h=c.rootBoundary,y=c.elementContext,S=void 0===y?W:y,Z=c.altBoundary,z=c.padding,I=void 0===z?0:z,P=ec("number"!=typeof I?I:eu(I,H)),L=e.rects.popper,B=e.elements[void 0!==Z&&Z?S===W?"reference":W:S],$=(r=m(B)?B:B.contextElement||C(e.elements.popper),l=(i=[].concat("clippingParents"===(n=void 0===p?"clippingParents":p)?(o=T(D(r)),m(a=["absolute","fixed"].indexOf(R(r).position)>=0&&g(r)?M(r):r)?o.filter(function(e){return m(e)&&ea(e,a)&&"body"!==w(e)}):[]):[].concat(n),[void 0===h?N:h]))[0],(s=i.reduce(function(e,t){var n=el(r,t,v);return e.top=b(n.top,e.top),e.right=x(n.right,e.right),e.bottom=x(n.bottom,e.bottom),e.left=b(n.left,e.left),e},el(r,l,v))).width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s),j=k(e.elements.reference),V=Y({reference:j,element:L,strategy:"absolute",placement:d}),A=ei(Object.assign({},L,V)),_=S===W?A:j,F={top:$.top-_.top+P.top,bottom:_.bottom-$.bottom+P.bottom,left:$.left-_.left+P.left,right:_.right-$.right+P.right},J=e.modifiersData.offset;if(S===W&&J){var q=J[d];Object.keys(F).forEach(function(e){var t=[E,O].indexOf(e)>=0?1:-1,r=["top",O].indexOf(e)>=0?"y":"x";F[e]+=q[r]*t})}return F}function ef(e,t,r){return b(e,x(t,r))}function ev(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ep(e){return["top",E,O,$].some(function(t){return e[t]>=0})}var em=(a=void 0===(o=(n={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,l=void 0===i||i,s=p(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,U)}),l&&s.addEventListener("resize",r.update,U),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,U)}),l&&s.removeEventListener("resize",r.update,U)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=r.adaptive,a=r.roundOffsets,i=void 0===a||a,l={placement:X(t.placement),variation:G(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===n||n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ee(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===o||o,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ee(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];g(o)&&w(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});g(n)&&w(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=_.reduce(function(e,r){var n,o,i,l,s,c;return e[r]=(n=t.rects,i=[$,"top"].indexOf(o=X(r))>=0?-1:1,s=(l="function"==typeof a?a(Object.assign({},n,{placement:r})):a)[0],c=l[1],s=s||0,c=(c||0)*i,[$,E].indexOf(o)>=0?{x:c,y:s}:{x:s,y:c}),e},{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0===i||i,s=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,v=r.flipVariations,p=void 0===v||v,m=r.allowedAutoPlacements,g=t.options.placement,h=X(g)===g,b=s||(h||!p?[er(g)]:function(e){if(X(e)===j)return[];var t=er(e);return[eo(e),t,eo(t)]}(g)),x=[g].concat(b).reduce(function(e,r){var n,o,a,i,l,s,f,v,g,h,b,x;return e.concat(X(r)===j?(o=(n={placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}).placement,a=n.boundary,i=n.rootBoundary,l=n.padding,s=n.flipVariations,v=void 0===(f=n.allowedAutoPlacements)?_:f,0===(b=(h=(g=G(o))?s?A:A.filter(function(e){return G(e)===g}):H).filter(function(e){return v.indexOf(e)>=0})).length&&(b=h),Object.keys(x=b.reduce(function(e,r){return e[r]=ed(t,{placement:r,boundary:a,rootBoundary:i,padding:l})[X(r)],e},{})).sort(function(e,t){return x[e]-x[t]})):r)},[]),y=t.rects.reference,S=t.rects.popper,Z=new Map,k=!0,z=x[0],w=0;w=0,L=P?"width":"height",D=ed(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),T=P?R?E:$:R?O:"top";y[L]>S[L]&&(T=er(T));var B=er(T),M=[];if(a&&M.push(D[I]<=0),l&&M.push(D[T]<=0,D[B]<=0),M.every(function(e){return e})){z=C,k=!1;break}Z.set(C,M)}if(k)for(var N=p?3:1,W=function(e){var t=x.find(function(t){var r=Z.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return z=t,"break"},F=N;F>0&&"break"!==W(F);F--);t.placement!==z&&(t.modifiersData[n]._skip=!0,t.placement=z,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=r.altAxis,i=r.boundary,l=r.rootBoundary,s=r.altBoundary,c=r.padding,u=r.tether,d=void 0===u||u,f=r.tetherOffset,v=void 0===f?0:f,p=ed(t,{boundary:i,rootBoundary:l,padding:c,altBoundary:s}),m=X(t.placement),g=G(t.placement),h=!g,y=K(m),S="x"===y?"y":"x",Z=t.modifiersData.popperOffsets,k=t.rects.reference,z=t.rects.popper,w="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"==typeof w?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(Z){if(void 0===o||o){var P,D="y"===y?"top":$,T="y"===y?O:E,B="y"===y?"height":"width",j=Z[y],H=j+p[D],N=j-p[T],W=d?-z[B]/2:0,A=g===V?k[B]:z[B],_=g===V?-z[B]:-k[B],F=t.elements.arrow,J=d&&F?L(F):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:es(),U=q[D],Y=q[T],Q=ef(0,k[B],J[B]),ee=h?k[B]/2-W-Q-U-C.mainAxis:A-Q-U-C.mainAxis,et=h?-k[B]/2+W+Q+Y+C.mainAxis:_+Q+Y+C.mainAxis,er=t.elements.arrow&&M(t.elements.arrow),en=er?"y"===y?er.clientTop||0:er.clientLeft||0:0,eo=null!=(P=null==I?void 0:I[y])?P:0,ea=j+ee-eo-en,ei=j+et-eo,el=ef(d?x(H,ea):H,j,d?b(N,ei):N);Z[y]=el,R[y]=el-j}if(void 0!==a&&a){var ec,eu,ev="x"===y?"top":$,ep="x"===y?O:E,em=Z[S],eg="y"===S?"height":"width",eh=em+p[ev],eb=em-p[ep],ex=-1!==["top",$].indexOf(m),ey=null!=(eu=null==I?void 0:I[S])?eu:0,eS=ex?eh:em-k[eg]-z[eg]-ey+C.altAxis,eZ=ex?em+k[eg]+z[eg]-ey-C.altAxis:eb,ek=d&&ex?(ec=ef(eS,em,eZ))>eZ?eZ:ec:ef(d?eS:eh,em,d?eZ:eb);Z[S]=ek,R[S]=ek-em}t.modifiersData[n]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r,n=e.state,o=e.name,a=e.options,i=n.elements.arrow,l=n.modifiersData.popperOffsets,s=X(n.placement),c=K(s),u=[$,E].indexOf(s)>=0?"height":"width";if(i&&l){var d=ec("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:eu(t,H)),f=L(i),v="y"===c?"top":$,p="y"===c?O:E,m=n.rects.reference[u]+n.rects.reference[c]-l[c]-n.rects.popper[u],g=l[c]-n.rects.reference[c],h=M(i),b=h?"y"===c?h.clientHeight||0:h.clientWidth||0:0,x=d[v],y=b-f[u]-d[p],S=b/2-f[u]/2+(m/2-g/2),Z=ef(x,S,y);n.modifiersData[o]=((r={})[c]=Z,r.centerOffset=Z-S,r)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&ea(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=ed(t,{elementContext:"reference"}),l=ed(t,{altBoundary:!0}),s=ev(i,n),c=ev(l,o,a),u=ep(s),d=ep(c);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:o,l=void 0===(i=n.defaultOptions)?J:i,function(e,t,r){void 0===r&&(r=l);var n,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},J,l),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},i=[],s=!1,c={state:o,setOptions:function(r){var n,s,d,f,v,p="function"==typeof r?r(o.options):r;u(),o.options=Object.assign({},l,o.options,p),o.scrollParents={reference:m(e)?T(e):e.contextElement?T(e.contextElement):[],popper:T(t)};var g=(s=Object.keys(n=[].concat(a,o.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),d=new Map,f=new Set,v=[],s.forEach(function(e){d.set(e.name,e)}),s.forEach(function(e){f.has(e.name)||function e(t){f.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!f.has(t)){var r=d.get(t);r&&e(r)}}),v.push(t)}(e)}),F.reduce(function(e,t){return e.concat(v.filter(function(e){return e.phase===t}))},[]));return o.orderedModifiers=g.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var a=n({state:o,name:t,instance:c,options:void 0===r?{}:r});i.push(a||function(){})}}),c.update()},forceUpdate:function(){if(!s){var e,t,r,n,a,i,l,u,d,f,v,m,h=o.elements,b=h.reference,x=h.popper;if(q(b,x)){o.rects={reference:(t=M(x),r="fixed"===o.options.strategy,n=g(t),u=g(t)&&(i=y((a=t.getBoundingClientRect()).width)/t.offsetWidth||1,l=y(a.height)/t.offsetHeight||1,1!==i||1!==l),d=C(t),f=k(b,u,r),v={scrollLeft:0,scrollTop:0},m={x:0,y:0},(n||!n&&!r)&&(("body"!==w(t)||P(d))&&(v=(e=t)!==p(e)&&g(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:z(e)),g(t)?(m=k(t,!0),m.x+=t.clientLeft,m.y+=t.clientTop):d&&(m.x=I(d))),{x:f.left+v.scrollLeft-m.x,y:f.top+v.scrollTop-m.y,width:f.width,height:f.height}),popper:L(x)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var S=0;S{!o&&i(("function"==typeof n?n():n)||document.body)},[n,o]),(0,f.Z)(()=>{if(a&&!o)return(0,eb.Z)(t,a),()=>{(0,eb.Z)(t,null)}},[t,a,o]),o)?u.isValidElement(r)?u.cloneElement(r,{ref:l}):(0,ex.jsx)(u.Fragment,{children:r}):(0,ex.jsx)(u.Fragment,{children:a?eh.createPortal(r,a):a})});var eS=r(8027);function eZ(e){return(0,eS.ZP)("MuiPopper",e)}(0,r(1977).Z)("MuiPopper",["root"]);var ek=r(7293);let ez=u.createContext({disableDefaultClasses:!1}),ew=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],eC=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function eI(e){return"function"==typeof e?e():e}let eR=()=>(0,eg.Z)({root:["root"]},function(e){let{disableDefaultClasses:t}=u.useContext(ez);return r=>t?"":e(r)}(eZ)),eP={},eL=u.forwardRef(function(e,t){var r;let{anchorEl:n,children:o,direction:a,disablePortal:i,modifiers:l,open:v,placement:p,popperOptions:m,popperRef:g,slotProps:h={},slots:b={},TransitionProps:x}=e,y=(0,c.Z)(e,ew),S=u.useRef(null),Z=(0,d.Z)(S,t),k=u.useRef(null),z=(0,d.Z)(k,g),w=u.useRef(z);(0,f.Z)(()=>{w.current=z},[z]),u.useImperativeHandle(g,()=>k.current,[]);let C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p,a),[I,R]=u.useState(C),[P,L]=u.useState(eI(n));u.useEffect(()=>{k.current&&k.current.forceUpdate()}),u.useEffect(()=>{n&&L(eI(n))},[n]),(0,f.Z)(()=>{if(!P||!v)return;let e=e=>{R(e.placement)},t=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:t})=>{e(t)}}];null!=l&&(t=t.concat(l)),m&&null!=m.modifiers&&(t=t.concat(m.modifiers));let r=em(P,S.current,(0,s.Z)({placement:C},m,{modifiers:t}));return w.current(r),()=>{r.destroy(),w.current(null)}},[P,i,l,v,m,C]);let D={placement:I};null!==x&&(D.TransitionProps=x);let T=eR(),B=null!=(r=b.root)?r:"div",M=(0,ek.y)({elementType:B,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:Z},ownerState:e,className:T.root});return(0,ex.jsx)(B,(0,s.Z)({},M,{children:"function"==typeof o?o(D):o}))}),eD=u.forwardRef(function(e,t){let r;let{anchorEl:n,children:o,container:a,direction:i="ltr",disablePortal:l=!1,keepMounted:d=!1,modifiers:f,open:p,placement:m="bottom",popperOptions:g=eP,popperRef:h,style:b,transition:x=!1,slotProps:y={},slots:S={}}=e,Z=(0,c.Z)(e,eC),[k,z]=u.useState(!0);if(!d&&!p&&(!x||k))return null;if(a)r=a;else if(n){let e=eI(n);r=e&&void 0!==e.nodeType?(0,v.Z)(e).body:(0,v.Z)(null).body}let w=!p&&d&&(!x||k)?"none":void 0;return(0,ex.jsx)(ey,{disablePortal:l,container:r,children:(0,ex.jsx)(eL,(0,s.Z)({anchorEl:n,direction:i,disablePortal:l,modifiers:f,ref:t,open:x?!k:p,placement:m,popperOptions:g,popperRef:h,slotProps:y,slots:S},Z,{style:(0,s.Z)({position:"fixed",top:0,left:0,display:w},b),TransitionProps:x?{in:p,onEnter:()=>{z(!1)},onExited:()=>{z(!0)}}:void 0,children:o}))})})},70758:function(e,t,r){r.d(t,{U:function(){return s}});var n=r(87462),o=r(67294),a=r(11136),i=r(22760),l=r(30437);function s(e={}){let{disabled:t=!1,focusableWhenDisabled:r,href:s,rootRef:c,tabIndex:u,to:d,type:f}=e,v=o.useRef(),[p,m]=o.useState(!1),{isFocusVisibleRef:g,onFocus:h,onBlur:b,ref:x}=(0,a.Z)(),[y,S]=o.useState(!1);t&&!r&&y&&S(!1),o.useEffect(()=>{g.current=y},[y,g]);let[Z,k]=o.useState(""),z=e=>t=>{var r;y&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},w=e=>t=>{var r;b(t),!1===g.current&&S(!1),null==(r=e.onBlur)||r.call(e,t)},C=e=>t=>{var r,n;v.current||(v.current=t.currentTarget),h(t),!0===g.current&&(S(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},I=()=>{let e=v.current;return"BUTTON"===Z||"INPUT"===Z&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===Z&&(null==e?void 0:e.href)},R=e=>r=>{if(!t){var n;null==(n=e.onClick)||n.call(e,r)}},P=e=>r=>{var n;t||(m(!0),document.addEventListener("mouseup",()=>{m(!1)},{once:!0})),null==(n=e.onMouseDown)||n.call(e,r)},L=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),!r.defaultMuiPrevented&&(r.target!==r.currentTarget||I()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||m(!0),r.target!==r.currentTarget||I()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},D=e=>r=>{var n,o;r.target===r.currentTarget&&m(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||I()||t||" "!==r.key||r.defaultMuiPrevented||null==(o=e.onClick)||o.call(e,r)},T=o.useCallback(e=>{var t;k(null!=(t=null==e?void 0:e.tagName)?t:"")},[]),B=(0,i.Z)(T,c,x,v),M={};return void 0!==u&&(M.tabIndex=u),"BUTTON"===Z?(M.type=null!=f?f:"button",r?M["aria-disabled"]=t:M.disabled=t):""!==Z&&(s||d||(M.role="button",M.tabIndex=null!=u?u:0),t&&(M["aria-disabled"]=t,M.tabIndex=r?null!=u?u:0:-1)),{getRootProps:(t={})=>{let r=(0,n.Z)({},(0,l._)(e),(0,l._)(t)),o=(0,n.Z)({type:f},r,M,t,{onBlur:w(r),onClick:R(r),onFocus:C(r),onKeyDown:L(r),onKeyUp:D(r),onMouseDown:P(r),onMouseLeave:z(r),ref:B});return delete o.onFocusVisible,o},focusVisible:y,setFocusVisible:S,active:p,rootRef:B}}},85241:function(e,t,r){r.d(t,{D:function(){return o}});var n=r(67294);let o=n.createContext(null)},51633:function(e,t,r){r.d(t,{Q:function(){return n}});let n={blur:"dropdown:blur",escapeKeyDown:"dropdown:escapeKeyDown",toggle:"dropdown:toggle",open:"dropdown:open",close:"dropdown:close"}},26558:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(67294);let o=n.createContext(null)},22644:function(e,t,r){r.d(t,{F:function(){return n}});let n={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",textNavigation:"list:textNavigation"}},7333:function(e,t,r){r.d(t,{R$:function(){return l},Rl:function(){return a}});var n=r(87462),o=r(22644);function a(e,t,r){var n;let o,a;let{items:i,isItemDisabled:l,disableListWrap:s,disabledItemsFocusable:c,itemComparer:u,focusManagement:d}=r,f=i.length-1,v=null==e?-1:i.findIndex(t=>u(t,e)),p=!s;switch(t){case"reset":if(-1==("DOM"===d?0:-1))return null;o=0,a="next",p=!1;break;case"start":o=0,a="next",p=!1;break;case"end":o=f,a="previous",p=!1;break;default:{let e=v+t;e<0?!p&&-1!==v||Math.abs(t)>1?(o=0,a="next"):(o=f,a="previous"):e>f?!p||Math.abs(t)>1?(o=f,a="previous"):(o=0,a="next"):(o=e,a=t>=0?"next":"previous")}}let m=function(e,t,r,n,o,a){if(0===r.length||!n&&r.every((e,t)=>o(e,t)))return -1;let i=e;for(;;){if(!a&&"next"===t&&i===r.length||!a&&"previous"===t&&-1===i)return -1;let e=!n&&o(r[i],i);if(!e)return i;i+="next"===t?1:-1,a&&(i=(i+r.length)%r.length)}}(o,a,i,c,l,p);return -1!==m||null===e||l(e,v)?null!=(n=i[m])?n:null:e}function i(e,t,r){let{itemComparer:o,isItemDisabled:a,selectionMode:i,items:l}=r,{selectedValues:s}=t,c=l.findIndex(t=>o(e,t));if(a(e,c))return t;let u="none"===i?[]:"single"===i?o(s[0],e)?s:[e]:s.some(t=>o(t,e))?s.filter(t=>!o(t,e)):[...s,e];return(0,n.Z)({},t,{selectedValues:u,highlightedValue:e})}function l(e,t){let{type:r,context:l}=t;switch(r){case o.F.keyDown:return function(e,t,r){let o=t.highlightedValue,{orientation:l,pageSize:s}=r;switch(e){case"Home":return(0,n.Z)({},t,{highlightedValue:a(o,"start",r)});case"End":return(0,n.Z)({},t,{highlightedValue:a(o,"end",r)});case"PageUp":return(0,n.Z)({},t,{highlightedValue:a(o,-s,r)});case"PageDown":return(0,n.Z)({},t,{highlightedValue:a(o,s,r)});case"ArrowUp":if("vertical"!==l)break;return(0,n.Z)({},t,{highlightedValue:a(o,-1,r)});case"ArrowDown":if("vertical"!==l)break;return(0,n.Z)({},t,{highlightedValue:a(o,1,r)});case"ArrowLeft":if("vertical"===l)break;return(0,n.Z)({},t,{highlightedValue:a(o,"horizontal-ltr"===l?-1:1,r)});case"ArrowRight":if("vertical"===l)break;return(0,n.Z)({},t,{highlightedValue:a(o,"horizontal-ltr"===l?1:-1,r)});case"Enter":case" ":if(null===t.highlightedValue)break;return i(t.highlightedValue,t,r)}return t}(t.key,e,l);case o.F.itemClick:return i(t.item,e,l);case o.F.blur:return"DOM"===l.focusManagement?e:(0,n.Z)({},e,{highlightedValue:null});case o.F.textNavigation:return function(e,t,r){let{items:o,isItemDisabled:i,disabledItemsFocusable:l,getItemAsString:s}=r,c=t.length>1,u=c?e.highlightedValue:a(e.highlightedValue,1,r);for(let d=0;ds(e,r.highlightedValue)))?l:null:"DOM"===c&&0===t.length&&(u=a(null,"reset",o));let d=null!=(i=r.selectedValues)?i:[],f=d.filter(t=>e.some(e=>s(e,t)));return(0,n.Z)({},r,{highlightedValue:u,selectedValues:f})}(t.items,t.previousItems,e,l);case o.F.resetHighlight:return(0,n.Z)({},e,{highlightedValue:a(null,"reset",l)});default:return e}}},96592:function(e,t,r){r.d(t,{s:function(){return x}});var n=r(87462),o=r(67294),a=r(22760),i=r(22644),l=r(7333);let s="select:change-selection",c="select:change-highlight";var u=r(78031),d=r(6414);function f(e,t){let r=o.useRef(e);return o.useEffect(()=>{r.current=e},null!=t?t:[e]),r}let v={},p=()=>{},m=(e,t)=>e===t,g=()=>!1,h=e=>"string"==typeof e?e:String(e),b=()=>({highlightedValue:null,selectedValues:[]});function x(e){let{controlledProps:t=v,disabledItemsFocusable:r=!1,disableListWrap:x=!1,focusManagement:y="activeDescendant",getInitialState:S=b,getItemDomElement:Z,getItemId:k,isItemDisabled:z=g,rootRef:w,onStateChange:C=p,items:I,itemComparer:R=m,getItemAsString:P=h,onChange:L,onHighlightChange:D,onItemsChange:T,orientation:B="vertical",pageSize:M=5,reducerActionContext:O=v,selectionMode:E="single",stateReducer:$}=e,j=o.useRef(null),H=(0,a.Z)(w,j),V=o.useCallback((e,t,r)=>{if(null==D||D(e,t,r),"DOM"===y&&null!=t&&(r===i.F.itemClick||r===i.F.keyDown||r===i.F.textNavigation)){var n;null==Z||null==(n=Z(t))||n.focus()}},[Z,D,y]),N=o.useMemo(()=>({highlightedValue:R,selectedValues:(e,t)=>(0,d.H)(e,t,R)}),[R]),W=o.useCallback((e,t,r,n,o)=>{switch(null==C||C(e,t,r,n,o),t){case"highlightedValue":V(e,r,n);break;case"selectedValues":null==L||L(e,r,n)}},[V,L,C]),A=o.useMemo(()=>({disabledItemsFocusable:r,disableListWrap:x,focusManagement:y,isItemDisabled:z,itemComparer:R,items:I,getItemAsString:P,onHighlightChange:V,orientation:B,pageSize:M,selectionMode:E,stateComparers:N}),[r,x,y,z,R,I,P,V,B,M,E,N]),_=S(),F=null!=$?$:l.R$,J=o.useMemo(()=>(0,n.Z)({},O,A),[O,A]),[q,U]=(0,u.r)({reducer:F,actionContext:J,initialState:_,controlledProps:t,stateComparers:N,onStateChange:W}),{highlightedValue:X,selectedValues:G}=q,K=function(e){let t=o.useRef({searchString:"",lastTime:null});return o.useCallback(r=>{if(1===r.key.length&&" "!==r.key){let n=t.current,o=r.key.toLowerCase(),a=performance.now();n.searchString.length>0&&n.lastTime&&a-n.lastTime>500?n.searchString=o:(1!==n.searchString.length||o!==n.searchString)&&(n.searchString+=o),n.lastTime=a,e(n.searchString,r)}},[e])}((e,t)=>U({type:i.F.textNavigation,event:t,searchString:e})),Y=f(G),Q=f(X),ee=o.useRef([]);o.useEffect(()=>{(0,d.H)(ee.current,I,R)||(U({type:i.F.itemsChange,event:null,items:I,previousItems:ee.current}),ee.current=I,null==T||T(I))},[I,R,U,T]);let{notifySelectionChanged:et,notifyHighlightChanged:er,registerHighlightChangeHandler:en,registerSelectionChangeHandler:eo}=function(){let e=function(){let e=o.useRef();return e.current||(e.current=function(){let e=new Map;return{subscribe:function(t,r){let n=e.get(t);return n?n.add(r):(n=new Set([r]),e.set(t,n)),()=>{n.delete(r),0===n.size&&e.delete(t)}},publish:function(t,...r){let n=e.get(t);n&&n.forEach(e=>e(...r))}}}()),e.current}(),t=o.useCallback(t=>{e.publish(s,t)},[e]),r=o.useCallback(t=>{e.publish(c,t)},[e]),n=o.useCallback(t=>e.subscribe(s,t),[e]),a=o.useCallback(t=>e.subscribe(c,t),[e]);return{notifySelectionChanged:t,notifyHighlightChanged:r,registerSelectionChangeHandler:n,registerHighlightChangeHandler:a}}();o.useEffect(()=>{et(G)},[G,et]),o.useEffect(()=>{er(X)},[X,er]);let ea=e=>t=>{var r;if(null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented)return;let n=["Home","End","PageUp","PageDown"];"vertical"===B?n.push("ArrowUp","ArrowDown"):n.push("ArrowLeft","ArrowRight"),"activeDescendant"===y&&n.push(" ","Enter"),n.includes(t.key)&&t.preventDefault(),U({type:i.F.keyDown,key:t.key,event:t}),K(t)},ei=e=>t=>{var r,n;null==(r=e.onBlur)||r.call(e,t),t.defaultMuiPrevented||null!=(n=j.current)&&n.contains(t.relatedTarget)||U({type:i.F.blur,event:t})},el=o.useCallback(e=>{var t;let r=I.findIndex(t=>R(t,e)),n=(null!=(t=Y.current)?t:[]).some(t=>null!=t&&R(e,t)),o=z(e,r),a=null!=Q.current&&R(e,Q.current),i="DOM"===y;return{disabled:o,focusable:i,highlighted:a,index:r,selected:n}},[I,z,R,Y,Q,y]),es=o.useMemo(()=>({dispatch:U,getItemState:el,registerHighlightChangeHandler:en,registerSelectionChangeHandler:eo}),[U,el,en,eo]);return o.useDebugValue({state:q}),{contextValue:es,dispatch:U,getRootProps:(e={})=>(0,n.Z)({},e,{"aria-activedescendant":"activeDescendant"===y&&null!=X?k(X):void 0,onBlur:ei(e),onKeyDown:ea(e),tabIndex:"DOM"===y?-1:0,ref:H}),rootRef:H,state:q}}},43069:function(e,t,r){r.d(t,{J:function(){return c}});var n=r(87462),o=r(67294),a=r(22760),i=r(54895),l=r(22644),s=r(26558);function c(e){let t;let{handlePointerOverEvents:r=!1,item:c,rootRef:u}=e,d=o.useRef(null),f=(0,a.Z)(d,u),v=o.useContext(s.Z);if(!v)throw Error("useListItem must be used within a ListProvider");let{dispatch:p,getItemState:m,registerHighlightChangeHandler:g,registerSelectionChangeHandler:h}=v,{highlighted:b,selected:x,focusable:y}=m(c),S=function(){let[,e]=o.useState({});return o.useCallback(()=>{e({})},[])}();(0,i.Z)(()=>g(function(e){e!==c||b?e!==c&&b&&S():S()})),(0,i.Z)(()=>h(function(e){x?e.includes(c)||S():e.includes(c)&&S()}),[h,S,x,c]);let Z=o.useCallback(e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultPrevented||p({type:l.F.itemClick,item:c,event:t})},[p,c]),k=o.useCallback(e=>t=>{var r;null==(r=e.onMouseOver)||r.call(e,t),t.defaultPrevented||p({type:l.F.itemHover,item:c,event:t})},[p,c]);return y&&(t=b?0:-1),{getRootProps:(e={})=>(0,n.Z)({},e,{onClick:Z(e),onPointerOver:r?k(e):void 0,ref:f,tabIndex:t}),highlighted:b,rootRef:f,selected:x}}},6414:function(e,t,r){r.d(t,{H:function(){return n}});function n(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}},2900:function(e,t,r){r.d(t,{f:function(){return o}});var n=r(87462);function o(e,t){return function(r={}){let o=(0,n.Z)({},r,e(r)),a=(0,n.Z)({},o,t(o));return a}}},12247:function(e,t,r){r.d(t,{Y:function(){return a},s:function(){return o}});var n=r(67294);let o=n.createContext(null);function a(){let[e,t]=n.useState(new Map),r=n.useRef(new Set),o=n.useCallback(function(e){r.current.delete(e),t(t=>{let r=new Map(t);return r.delete(e),r})},[]),a=n.useCallback(function(e,n){let a;return a="function"==typeof e?e(r.current):e,r.current.add(a),t(e=>{let t=new Map(e);return t.set(a,n),t}),{id:a,deregister:()=>o(a)}},[o]),i=n.useMemo(()=>(function(e){let t=Array.from(e.keys()).map(t=>{let r=e.get(t);return{key:t,subitem:r}});return t.sort((e,t)=>{let r=e.subitem.ref.current,n=t.subitem.ref.current;return null===r||null===n||r===n?0:r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(e=>[e.key,e.subitem]))})(e),[e]),l=n.useCallback(function(e){return Array.from(i.keys()).indexOf(e)},[i]),s=n.useMemo(()=>({getItemIndex:l,registerItem:a,totalSubitemCount:e.size}),[l,a,e.size]);return{contextValue:s,subitems:i}}o.displayName="CompoundComponentContext"},14072:function(e,t,r){r.d(t,{B:function(){return i}});var n=r(67294),o=r(54895),a=r(12247);function i(e,t){let r=n.useContext(a.s);if(null===r)throw Error("useCompoundItem must be used within a useCompoundParent");let{registerItem:i}=r,[l,s]=n.useState("function"==typeof e?void 0:e);return(0,o.Z)(()=>{let{id:r,deregister:n}=i(e,t);return s(r),n},[i,t,e]),{id:l,index:void 0!==l?r.getItemIndex(l):-1,totalItemCount:r.totalSubitemCount}}},78031:function(e,t,r){r.d(t,{r:function(){return c}});var n=r(87462),o=r(67294);function a(e,t){return e===t}let i={},l=()=>{};function s(e,t){let r=(0,n.Z)({},e);return Object.keys(t).forEach(e=>{void 0!==t[e]&&(r[e]=t[e])}),r}function c(e){let t=o.useRef(null),{reducer:r,initialState:c,controlledProps:u=i,stateComparers:d=i,onStateChange:f=l,actionContext:v}=e,p=o.useCallback((e,n)=>{t.current=n;let o=s(e,u),a=r(o,n);return a},[u,r]),[m,g]=o.useReducer(p,c),h=o.useCallback(e=>{g((0,n.Z)({},e,{context:v}))},[v]);return!function(e){let{nextState:t,initialState:r,stateComparers:n,onStateChange:i,controlledProps:l,lastActionRef:c}=e,u=o.useRef(r);o.useEffect(()=>{if(null===c.current)return;let e=s(u.current,l);Object.keys(t).forEach(r=>{var o,l,s;let u=null!=(o=n[r])?o:a,d=t[r],f=e[r];(null!=f||null==d)&&(null==f||null!=d)&&(null==f||null==d||u(d,f))||null==i||i(null!=(l=c.current.event)?l:null,r,d,null!=(s=c.current.type)?s:"",t)}),u.current=t,c.current=null},[u,t,c,i,n,l])}({nextState:m,initialState:c,stateComparers:null!=d?d:i,onStateChange:null!=f?f:l,controlledProps:u,lastActionRef:t}),[s(m,u),h]}},7293:function(e,t,r){r.d(t,{y:function(){return u}});var n=r(87462),o=r(63366),a=r(22760),i=r(10238),l=r(24407),s=r(71276);let c=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function u(e){var t;let{elementType:r,externalSlotProps:u,ownerState:d,skipResolvingSlotProps:f=!1}=e,v=(0,o.Z)(e,c),p=f?{}:(0,s.x)(u,d),{props:m,internalRef:g}=(0,l.L)((0,n.Z)({},v,{externalSlotProps:p})),h=(0,a.Z)(g,null==p?void 0:p.ref,null==(t=e.additionalProps)?void 0:t.ref),b=(0,i.$)(r,(0,n.Z)({},m,{ref:h}),d);return b}},41132:function(e,t,r){var n=r(28549),o=r(85893);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded")},59301:function(e,t,r){var n=r(28549),o=r(85893);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz")},48665:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(23534),s=r(86523),c=r(39707),u=r(79718),d=r(85893);let f=["className","component"];var v=r(31983),p=r(67299),m=r(2548);let g=function(e={}){let{themeId:t,defaultTheme:r,defaultClassName:v="MuiBox-root",generateClassName:p}=e,m=(0,l.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.Z),g=a.forwardRef(function(e,a){let l=(0,u.Z)(r),s=(0,c.Z)(e),{className:g,component:h="div"}=s,b=(0,o.Z)(s,f);return(0,d.jsx)(m,(0,n.Z)({as:h,ref:a,className:(0,i.Z)(g,p?p(v):v),theme:t&&l[t]||l},b))});return g}({themeId:m.Z,defaultTheme:p.Z,defaultClassName:"MuiBox-root",generateClassName:v.Z.generate});var h=g},66478:function(e,t,r){r.d(t,{Z:function(){return R},f:function(){return w}});var n=r(63366),o=r(87462),a=r(67294),i=r(70758),l=r(58510),s=r(62908),c=r(22760),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(48699),m=r(26821);function g(e){return(0,m.d6)("MuiButton",e)}let h=(0,m.sI)("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]);var b=r(89996),x=r(85893);let y=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],S=e=>{let{color:t,disabled:r,focusVisible:n,focusVisibleClassName:o,fullWidth:a,size:i,variant:c,loading:u}=e,d={root:["root",r&&"disabled",n&&"focusVisible",a&&"fullWidth",c&&`variant${(0,s.Z)(c)}`,t&&`color${(0,s.Z)(t)}`,i&&`size${(0,s.Z)(i)}`,u&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=(0,l.Z)(d,g,{});return n&&o&&(f.root+=` ${o}`),f},Z=(0,u.Z)("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),k=(0,u.Z)("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),z=(0,u.Z)("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var r,n;return(0,o.Z)({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:null==(r=e.variants[t.variant])||null==(r=r[t.color])?void 0:r.color},t.disabled&&{color:null==(n=e.variants[`${t.variant}Disabled`])||null==(n=n[t.color])?void 0:n.color})}),w=({theme:e,ownerState:t})=>{var r,n,a,i;return[(0,o.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon},"sm"===t.size&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"2px",paddingInline:"0.75rem"},"md"===t.size&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"24px","--CircularProgress-thickness":"3px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.5rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"0.25rem",paddingInline:"1rem"},"lg"===t.size&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 3rem)",fontSize:e.vars.fontSize.md,paddingBlock:"0.375rem",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:1},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),(0,o.Z)({},null==(r=e.variants[t.variant])?void 0:r[t.color],{"&:hover":{"@media (hover: hover)":null==(n=e.variants[`${t.variant}Hover`])?void 0:n[t.color]},'&:active, &[aria-pressed="true"]':null==(a=e.variants[`${t.variant}Active`])?void 0:a[t.color],"&:disabled":null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]},"center"===t.loadingPosition&&{[`&.${h.loading}`]:{color:"transparent"}})]},C=(0,u.Z)("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(w),I=a.forwardRef(function(e,t){var r;let l=(0,d.Z)({props:e,name:"JoyButton"}),{children:s,action:u,color:m="primary",variant:g="solid",size:h="md",fullWidth:w=!1,startDecorator:I,endDecorator:R,loading:P=!1,loadingPosition:L="center",loadingIndicator:D,disabled:T,component:B,slots:M={},slotProps:O={}}=l,E=(0,n.Z)(l,y),$=a.useContext(b.Z),j=e.variant||$.variant||g,H=e.size||$.size||h,{getColor:V}=(0,f.VT)(j),N=V(e.color,$.color||m),W=null!=(r=e.disabled||e.loading)?r:$.disabled||T||P,A=a.useRef(null),_=(0,c.Z)(A,t),{focusVisible:F,setFocusVisible:J,getRootProps:q}=(0,i.U)((0,o.Z)({},l,{disabled:W,rootRef:_})),U=null!=D?D:(0,x.jsx)(p.Z,(0,o.Z)({},"context"!==N&&{color:N},{thickness:{sm:2,md:3,lg:4}[H]||3}));a.useImperativeHandle(u,()=>({focusVisible:()=>{var e;J(!0),null==(e=A.current)||e.focus()}}),[J]);let X=(0,o.Z)({},l,{color:N,fullWidth:w,variant:j,size:H,focusVisible:F,loading:P,loadingPosition:L,disabled:W}),G=S(X),K=(0,o.Z)({},E,{component:B,slots:M,slotProps:O}),[Y,Q]=(0,v.Z)("root",{ref:t,className:G.root,elementType:C,externalForwardedProps:K,getSlotProps:q,ownerState:X}),[ee,et]=(0,v.Z)("startDecorator",{className:G.startDecorator,elementType:Z,externalForwardedProps:K,ownerState:X}),[er,en]=(0,v.Z)("endDecorator",{className:G.endDecorator,elementType:k,externalForwardedProps:K,ownerState:X}),[eo,ea]=(0,v.Z)("loadingIndicatorCenter",{className:G.loadingIndicatorCenter,elementType:z,externalForwardedProps:K,ownerState:X});return(0,x.jsxs)(Y,(0,o.Z)({},Q,{children:[(I||P&&"start"===L)&&(0,x.jsx)(ee,(0,o.Z)({},et,{children:P&&"start"===L?U:I})),s,P&&"center"===L&&(0,x.jsx)(eo,(0,o.Z)({},ea,{children:U})),(R||P&&"end"===L)&&(0,x.jsx)(er,(0,o.Z)({},en,{children:P&&"end"===L?U:R}))]}))});I.muiName="Button";var R=I},89996:function(e,t,r){var n=r(67294);let o=n.createContext({});t.Z=o},48699:function(e,t,r){r.d(t,{Z:function(){return P}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(62908),s=r(58510),c=r(70917),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(26821);function m(e){return(0,p.d6)("MuiCircularProgress",e)}(0,p.sI)("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var g=r(85893);let h=e=>e,b,x=["color","backgroundColor"],y=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],S=(0,c.F4)({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),Z=e=>{let{determinate:t,color:r,variant:n,size:o}=e,a={root:["root",t&&"determinate",r&&`color${(0,l.Z)(r)}`,n&&`variant${(0,l.Z)(n)}`,o&&`size${(0,l.Z)(o)}`],svg:["svg"],track:["track"],progress:["progress"]};return(0,s.Z)(a,m,{})};function k(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}let z=(0,u.Z)("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var r;let a=(null==(r=t.variants[e.variant])?void 0:r[e.color])||{},{color:i,backgroundColor:l}=a,s=(0,o.Z)(a,x);return(0,n.Z)({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":i,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},"sm"===e.size&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":k("track","3px"),"--_progress-thickness":k("progress","3px")},"sm"===e.instanceSize&&{"--CircularProgress-size":"24px"},"md"===e.size&&{"--_track-thickness":k("track","6px"),"--_progress-thickness":k("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},"md"===e.instanceSize&&{"--CircularProgress-size":"40px"},"lg"===e.size&&{"--_track-thickness":k("track","8px"),"--_progress-thickness":k("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},"lg"===e.instanceSize&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:i},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},s,"outlined"===e.variant&&{"&:before":(0,n.Z)({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},s)})}),w=(0,u.Z)("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),C=(0,u.Z)("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),I=(0,u.Z)("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&(0,c.iv)(b||(b=h` +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1791],{96991:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zM464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16z"}}]},name:"appstore",theme:"filled"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},89035:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},50228:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},49591:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h360c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H184V184h656v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32zM653.3 599.4l52.2-52.2a8.01 8.01 0 00-4.7-13.6l-179.4-21c-5.1-.6-9.5 3.7-8.9 8.9l21 179.4c.8 6.6 8.9 9.4 13.6 4.7l52.4-52.4 256.2 256.2c3.1 3.1 8.2 3.1 11.3 0l42.4-42.4c3.1-3.1 3.1-8.2 0-11.3L653.3 599.4z"}}]},name:"select",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},27496:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},94668:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},88484:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},87547:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(87462),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},i=r(13401),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},72868:function(e,t,r){r.d(t,{L:function(){return c}});var n=r(67294),o=r(85241),a=r(78031),i=r(51633);function l(e,t){switch(t.type){case i.Q.blur:case i.Q.escapeKeyDown:return{open:!1};case i.Q.toggle:return{open:!e.open};case i.Q.open:return{open:!0};case i.Q.close:return{open:!1};default:throw Error("Unhandled action")}}var s=r(85893);function c(e){let{children:t,open:r,defaultOpen:c,onOpenChange:u}=e,{contextValue:d}=function(e={}){let{defaultOpen:t,onOpenChange:r,open:o}=e,[s,c]=n.useState(""),[u,d]=n.useState(null),f=n.useRef(null),v=n.useCallback((e,t,n,o)=>{"open"===t&&(null==r||r(e,n)),f.current=o},[r]),p=n.useMemo(()=>void 0!==o?{open:o}:{},[o]),[m,g]=(0,a.r)({controlledProps:p,initialState:t?{open:!0}:{open:!1},onStateChange:v,reducer:l});return n.useEffect(()=>{m.open||null===f.current||f.current===i.Q.blur||null==u||u.focus()},[m.open,u]),{contextValue:{state:m,dispatch:g,popupId:s,registerPopup:c,registerTrigger:d,triggerElement:u},open:m.open}}({defaultOpen:c,onOpenChange:u,open:r});return(0,s.jsx)(o.D.Provider,{value:d,children:t})}},53406:function(e,t,r){r.d(t,{r:function(){return eD}});var n,o,a,i,l,s=r(87462),c=r(63366),u=r(67294),d=r(22760),f=r(54895),v=r(36425);function p(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){var t=p(e).Element;return e instanceof t||e instanceof Element}function g(e){var t=p(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function h(e){if("undefined"==typeof ShadowRoot)return!1;var t=p(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var b=Math.max,x=Math.min,y=Math.round;function S(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Z(){return!/^((?!chrome|android).)*safari/i.test(S())}function k(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&g(e)&&(o=e.offsetWidth>0&&y(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&y(n.height)/e.offsetHeight||1);var i=(m(e)?p(e):window).visualViewport,l=!Z()&&r,s=(n.left+(l&&i?i.offsetLeft:0))/o,c=(n.top+(l&&i?i.offsetTop:0))/a,u=n.width/o,d=n.height/a;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function z(e){var t=p(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function w(e){return e?(e.nodeName||"").toLowerCase():null}function C(e){return((m(e)?e.ownerDocument:e.document)||window.document).documentElement}function I(e){return k(C(e)).left+z(e).scrollLeft}function R(e){return p(e).getComputedStyle(e)}function P(e){var t=R(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function L(e){var t=k(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function D(e){return"html"===w(e)?e:e.assignedSlot||e.parentNode||(h(e)?e.host:null)||C(e)}function T(e,t){void 0===t&&(t=[]);var r,n=function e(t){return["html","body","#document"].indexOf(w(t))>=0?t.ownerDocument.body:g(t)&&P(t)?t:e(D(t))}(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=p(n),i=o?[a].concat(a.visualViewport||[],P(n)?n:[]):n,l=t.concat(i);return o?l:l.concat(T(D(i)))}function B(e){return g(e)&&"fixed"!==R(e).position?e.offsetParent:null}function M(e){for(var t=p(e),r=B(e);r&&["table","td","th"].indexOf(w(r))>=0&&"static"===R(r).position;)r=B(r);return r&&("html"===w(r)||"body"===w(r)&&"static"===R(r).position)?t:r||function(e){var t=/firefox/i.test(S());if(/Trident/i.test(S())&&g(e)&&"fixed"===R(e).position)return null;var r=D(e);for(h(r)&&(r=r.host);g(r)&&0>["html","body"].indexOf(w(r));){var n=R(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var O="bottom",E="right",$="left",j="auto",H=["top",O,E,$],V="start",N="viewport",W="popper",A=H.reduce(function(e,t){return e.concat([t+"-"+V,t+"-end"])},[]),_=[].concat(H,[j]).reduce(function(e,t){return e.concat([t,t+"-"+V,t+"-end"])},[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],J={placement:"bottom",modifiers:[],strategy:"absolute"};function q(){for(var e=arguments.length,t=Array(e),r=0;r=0?"x":"y"}function Y(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?X(o):null,i=o?G(o):null,l=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case"top":t={x:l,y:r.y-n.height};break;case O:t={x:l,y:r.y+r.height};break;case E:t={x:r.x+r.width,y:s};break;case $:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?K(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case V:t[c]=t[c]-(r[u]/2-n[u]/2);break;case"end":t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ee(e){var t,r,n,o,a,i,l,s=e.popper,c=e.popperRect,u=e.placement,d=e.variation,f=e.offsets,v=e.position,m=e.gpuAcceleration,g=e.adaptive,h=e.roundOffsets,b=e.isFixed,x=f.x,S=void 0===x?0:x,Z=f.y,k=void 0===Z?0:Z,z="function"==typeof h?h({x:S,y:k}):{x:S,y:k};S=z.x,k=z.y;var w=f.hasOwnProperty("x"),I=f.hasOwnProperty("y"),P=$,L="top",D=window;if(g){var T=M(s),B="clientHeight",j="clientWidth";T===p(s)&&"static"!==R(T=C(s)).position&&"absolute"===v&&(B="scrollHeight",j="scrollWidth"),("top"===u||(u===$||u===E)&&"end"===d)&&(L=O,k-=(b&&T===D&&D.visualViewport?D.visualViewport.height:T[B])-c.height,k*=m?1:-1),(u===$||("top"===u||u===O)&&"end"===d)&&(P=E,S-=(b&&T===D&&D.visualViewport?D.visualViewport.width:T[j])-c.width,S*=m?1:-1)}var H=Object.assign({position:v},g&&Q),V=!0===h?(t={x:S,y:k},r=p(s),n=t.x,o=t.y,{x:y(n*(a=r.devicePixelRatio||1))/a||0,y:y(o*a)/a||0}):{x:S,y:k};return(S=V.x,k=V.y,m)?Object.assign({},H,((l={})[L]=I?"0":"",l[P]=w?"0":"",l.transform=1>=(D.devicePixelRatio||1)?"translate("+S+"px, "+k+"px)":"translate3d("+S+"px, "+k+"px, 0)",l)):Object.assign({},H,((i={})[L]=I?k+"px":"",i[P]=w?S+"px":"",i.transform="",i))}var et={left:"right",right:"left",bottom:"top",top:"bottom"};function er(e){return e.replace(/left|right|bottom|top/g,function(e){return et[e]})}var en={start:"end",end:"start"};function eo(e){return e.replace(/start|end/g,function(e){return en[e]})}function ea(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&h(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ei(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function el(e,t,r){var n,o,a,i,l,s,c,u,d,f;return t===N?ei(function(e,t){var r=p(e),n=C(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var c=Z();(c||!c&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+I(e),y:s}}(e,r)):m(t)?((n=k(t,!1,"fixed"===r)).top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n):ei((o=C(e),i=C(o),l=z(o),s=null==(a=o.ownerDocument)?void 0:a.body,c=b(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=b(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),d=-l.scrollLeft+I(o),f=-l.scrollTop,"rtl"===R(s||i).direction&&(d+=b(i.clientWidth,s?s.clientWidth:0)-c),{width:c,height:u,x:d,y:f}))}function es(){return{top:0,right:0,bottom:0,left:0}}function ec(e){return Object.assign({},es(),e)}function eu(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function ed(e,t){void 0===t&&(t={});var r,n,o,a,i,l,s,c=t,u=c.placement,d=void 0===u?e.placement:u,f=c.strategy,v=void 0===f?e.strategy:f,p=c.boundary,h=c.rootBoundary,y=c.elementContext,S=void 0===y?W:y,Z=c.altBoundary,z=c.padding,I=void 0===z?0:z,P=ec("number"!=typeof I?I:eu(I,H)),L=e.rects.popper,B=e.elements[void 0!==Z&&Z?S===W?"reference":W:S],$=(r=m(B)?B:B.contextElement||C(e.elements.popper),l=(i=[].concat("clippingParents"===(n=void 0===p?"clippingParents":p)?(o=T(D(r)),m(a=["absolute","fixed"].indexOf(R(r).position)>=0&&g(r)?M(r):r)?o.filter(function(e){return m(e)&&ea(e,a)&&"body"!==w(e)}):[]):[].concat(n),[void 0===h?N:h]))[0],(s=i.reduce(function(e,t){var n=el(r,t,v);return e.top=b(n.top,e.top),e.right=x(n.right,e.right),e.bottom=x(n.bottom,e.bottom),e.left=b(n.left,e.left),e},el(r,l,v))).width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s),j=k(e.elements.reference),V=Y({reference:j,element:L,strategy:"absolute",placement:d}),A=ei(Object.assign({},L,V)),_=S===W?A:j,F={top:$.top-_.top+P.top,bottom:_.bottom-$.bottom+P.bottom,left:$.left-_.left+P.left,right:_.right-$.right+P.right},J=e.modifiersData.offset;if(S===W&&J){var q=J[d];Object.keys(F).forEach(function(e){var t=[E,O].indexOf(e)>=0?1:-1,r=["top",O].indexOf(e)>=0?"y":"x";F[e]+=q[r]*t})}return F}function ef(e,t,r){return b(e,x(t,r))}function ev(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ep(e){return["top",E,O,$].some(function(t){return e[t]>=0})}var em=(a=void 0===(o=(n={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,l=void 0===i||i,s=p(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,U)}),l&&s.addEventListener("resize",r.update,U),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,U)}),l&&s.removeEventListener("resize",r.update,U)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Y({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=r.adaptive,a=r.roundOffsets,i=void 0===a||a,l={placement:X(t.placement),variation:G(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===n||n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ee(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===o||o,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ee(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];g(o)&&w(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});g(n)&&w(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=_.reduce(function(e,r){var n,o,i,l,s,c;return e[r]=(n=t.rects,i=[$,"top"].indexOf(o=X(r))>=0?-1:1,s=(l="function"==typeof a?a(Object.assign({},n,{placement:r})):a)[0],c=l[1],s=s||0,c=(c||0)*i,[$,E].indexOf(o)>=0?{x:c,y:s}:{x:s,y:c}),e},{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0===i||i,s=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,v=r.flipVariations,p=void 0===v||v,m=r.allowedAutoPlacements,g=t.options.placement,h=X(g)===g,b=s||(h||!p?[er(g)]:function(e){if(X(e)===j)return[];var t=er(e);return[eo(e),t,eo(t)]}(g)),x=[g].concat(b).reduce(function(e,r){var n,o,a,i,l,s,f,v,g,h,b,x;return e.concat(X(r)===j?(o=(n={placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}).placement,a=n.boundary,i=n.rootBoundary,l=n.padding,s=n.flipVariations,v=void 0===(f=n.allowedAutoPlacements)?_:f,0===(b=(h=(g=G(o))?s?A:A.filter(function(e){return G(e)===g}):H).filter(function(e){return v.indexOf(e)>=0})).length&&(b=h),Object.keys(x=b.reduce(function(e,r){return e[r]=ed(t,{placement:r,boundary:a,rootBoundary:i,padding:l})[X(r)],e},{})).sort(function(e,t){return x[e]-x[t]})):r)},[]),y=t.rects.reference,S=t.rects.popper,Z=new Map,k=!0,z=x[0],w=0;w=0,L=P?"width":"height",D=ed(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),T=P?R?E:$:R?O:"top";y[L]>S[L]&&(T=er(T));var B=er(T),M=[];if(a&&M.push(D[I]<=0),l&&M.push(D[T]<=0,D[B]<=0),M.every(function(e){return e})){z=C,k=!1;break}Z.set(C,M)}if(k)for(var N=p?3:1,W=function(e){var t=x.find(function(t){var r=Z.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return z=t,"break"},F=N;F>0&&"break"!==W(F);F--);t.placement!==z&&(t.modifiersData[n]._skip=!0,t.placement=z,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=r.altAxis,i=r.boundary,l=r.rootBoundary,s=r.altBoundary,c=r.padding,u=r.tether,d=void 0===u||u,f=r.tetherOffset,v=void 0===f?0:f,p=ed(t,{boundary:i,rootBoundary:l,padding:c,altBoundary:s}),m=X(t.placement),g=G(t.placement),h=!g,y=K(m),S="x"===y?"y":"x",Z=t.modifiersData.popperOffsets,k=t.rects.reference,z=t.rects.popper,w="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"==typeof w?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(Z){if(void 0===o||o){var P,D="y"===y?"top":$,T="y"===y?O:E,B="y"===y?"height":"width",j=Z[y],H=j+p[D],N=j-p[T],W=d?-z[B]/2:0,A=g===V?k[B]:z[B],_=g===V?-z[B]:-k[B],F=t.elements.arrow,J=d&&F?L(F):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:es(),U=q[D],Y=q[T],Q=ef(0,k[B],J[B]),ee=h?k[B]/2-W-Q-U-C.mainAxis:A-Q-U-C.mainAxis,et=h?-k[B]/2+W+Q+Y+C.mainAxis:_+Q+Y+C.mainAxis,er=t.elements.arrow&&M(t.elements.arrow),en=er?"y"===y?er.clientTop||0:er.clientLeft||0:0,eo=null!=(P=null==I?void 0:I[y])?P:0,ea=j+ee-eo-en,ei=j+et-eo,el=ef(d?x(H,ea):H,j,d?b(N,ei):N);Z[y]=el,R[y]=el-j}if(void 0!==a&&a){var ec,eu,ev="x"===y?"top":$,ep="x"===y?O:E,em=Z[S],eg="y"===S?"height":"width",eh=em+p[ev],eb=em-p[ep],ex=-1!==["top",$].indexOf(m),ey=null!=(eu=null==I?void 0:I[S])?eu:0,eS=ex?eh:em-k[eg]-z[eg]-ey+C.altAxis,eZ=ex?em+k[eg]+z[eg]-ey-C.altAxis:eb,ek=d&&ex?(ec=ef(eS,em,eZ))>eZ?eZ:ec:ef(d?eS:eh,em,d?eZ:eb);Z[S]=ek,R[S]=ek-em}t.modifiersData[n]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r,n=e.state,o=e.name,a=e.options,i=n.elements.arrow,l=n.modifiersData.popperOffsets,s=X(n.placement),c=K(s),u=[$,E].indexOf(s)>=0?"height":"width";if(i&&l){var d=ec("number"!=typeof(t="function"==typeof(t=a.padding)?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:eu(t,H)),f=L(i),v="y"===c?"top":$,p="y"===c?O:E,m=n.rects.reference[u]+n.rects.reference[c]-l[c]-n.rects.popper[u],g=l[c]-n.rects.reference[c],h=M(i),b=h?"y"===c?h.clientHeight||0:h.clientWidth||0:0,x=d[v],y=b-f[u]-d[p],S=b/2-f[u]/2+(m/2-g/2),Z=ef(x,S,y);n.modifiersData[o]=((r={})[c]=Z,r.centerOffset=Z-S,r)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&ea(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=ed(t,{elementContext:"reference"}),l=ed(t,{altBoundary:!0}),s=ev(i,n),c=ev(l,o,a),u=ep(s),d=ep(c);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:o,l=void 0===(i=n.defaultOptions)?J:i,function(e,t,r){void 0===r&&(r=l);var n,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},J,l),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},i=[],s=!1,c={state:o,setOptions:function(r){var n,s,d,f,v,p="function"==typeof r?r(o.options):r;u(),o.options=Object.assign({},l,o.options,p),o.scrollParents={reference:m(e)?T(e):e.contextElement?T(e.contextElement):[],popper:T(t)};var g=(s=Object.keys(n=[].concat(a,o.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),d=new Map,f=new Set,v=[],s.forEach(function(e){d.set(e.name,e)}),s.forEach(function(e){f.has(e.name)||function e(t){f.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!f.has(t)){var r=d.get(t);r&&e(r)}}),v.push(t)}(e)}),F.reduce(function(e,t){return e.concat(v.filter(function(e){return e.phase===t}))},[]));return o.orderedModifiers=g.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var a=n({state:o,name:t,instance:c,options:void 0===r?{}:r});i.push(a||function(){})}}),c.update()},forceUpdate:function(){if(!s){var e,t,r,n,a,i,l,u,d,f,v,m,h=o.elements,b=h.reference,x=h.popper;if(q(b,x)){o.rects={reference:(t=M(x),r="fixed"===o.options.strategy,n=g(t),u=g(t)&&(i=y((a=t.getBoundingClientRect()).width)/t.offsetWidth||1,l=y(a.height)/t.offsetHeight||1,1!==i||1!==l),d=C(t),f=k(b,u,r),v={scrollLeft:0,scrollTop:0},m={x:0,y:0},(n||!n&&!r)&&(("body"!==w(t)||P(d))&&(v=(e=t)!==p(e)&&g(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:z(e)),g(t)?(m=k(t,!0),m.x+=t.clientLeft,m.y+=t.clientTop):d&&(m.x=I(d))),{x:f.left+v.scrollLeft-m.x,y:f.top+v.scrollTop-m.y,width:f.width,height:f.height}),popper:L(x)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var S=0;S{!o&&i(("function"==typeof n?n():n)||document.body)},[n,o]),(0,f.Z)(()=>{if(a&&!o)return(0,eb.Z)(t,a),()=>{(0,eb.Z)(t,null)}},[t,a,o]),o)?u.isValidElement(r)?u.cloneElement(r,{ref:l}):(0,ex.jsx)(u.Fragment,{children:r}):(0,ex.jsx)(u.Fragment,{children:a?eh.createPortal(r,a):a})});var eS=r(8027);function eZ(e){return(0,eS.ZP)("MuiPopper",e)}(0,r(1977).Z)("MuiPopper",["root"]);var ek=r(7293);let ez=u.createContext({disableDefaultClasses:!1}),ew=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],eC=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function eI(e){return"function"==typeof e?e():e}let eR=()=>(0,eg.Z)({root:["root"]},function(e){let{disableDefaultClasses:t}=u.useContext(ez);return r=>t?"":e(r)}(eZ)),eP={},eL=u.forwardRef(function(e,t){var r;let{anchorEl:n,children:o,direction:a,disablePortal:i,modifiers:l,open:v,placement:p,popperOptions:m,popperRef:g,slotProps:h={},slots:b={},TransitionProps:x}=e,y=(0,c.Z)(e,ew),S=u.useRef(null),Z=(0,d.Z)(S,t),k=u.useRef(null),z=(0,d.Z)(k,g),w=u.useRef(z);(0,f.Z)(()=>{w.current=z},[z]),u.useImperativeHandle(g,()=>k.current,[]);let C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p,a),[I,R]=u.useState(C),[P,L]=u.useState(eI(n));u.useEffect(()=>{k.current&&k.current.forceUpdate()}),u.useEffect(()=>{n&&L(eI(n))},[n]),(0,f.Z)(()=>{if(!P||!v)return;let e=e=>{R(e.placement)},t=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:t})=>{e(t)}}];null!=l&&(t=t.concat(l)),m&&null!=m.modifiers&&(t=t.concat(m.modifiers));let r=em(P,S.current,(0,s.Z)({placement:C},m,{modifiers:t}));return w.current(r),()=>{r.destroy(),w.current(null)}},[P,i,l,v,m,C]);let D={placement:I};null!==x&&(D.TransitionProps=x);let T=eR(),B=null!=(r=b.root)?r:"div",M=(0,ek.y)({elementType:B,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:Z},ownerState:e,className:T.root});return(0,ex.jsx)(B,(0,s.Z)({},M,{children:"function"==typeof o?o(D):o}))}),eD=u.forwardRef(function(e,t){let r;let{anchorEl:n,children:o,container:a,direction:i="ltr",disablePortal:l=!1,keepMounted:d=!1,modifiers:f,open:p,placement:m="bottom",popperOptions:g=eP,popperRef:h,style:b,transition:x=!1,slotProps:y={},slots:S={}}=e,Z=(0,c.Z)(e,eC),[k,z]=u.useState(!0);if(!d&&!p&&(!x||k))return null;if(a)r=a;else if(n){let e=eI(n);r=e&&void 0!==e.nodeType?(0,v.Z)(e).body:(0,v.Z)(null).body}let w=!p&&d&&(!x||k)?"none":void 0;return(0,ex.jsx)(ey,{disablePortal:l,container:r,children:(0,ex.jsx)(eL,(0,s.Z)({anchorEl:n,direction:i,disablePortal:l,modifiers:f,ref:t,open:x?!k:p,placement:m,popperOptions:g,popperRef:h,slotProps:y,slots:S},Z,{style:(0,s.Z)({position:"fixed",top:0,left:0,display:w},b),TransitionProps:x?{in:p,onEnter:()=>{z(!1)},onExited:()=>{z(!0)}}:void 0,children:o}))})})},70758:function(e,t,r){r.d(t,{U:function(){return s}});var n=r(87462),o=r(67294),a=r(11136),i=r(22760),l=r(30437);function s(e={}){let{disabled:t=!1,focusableWhenDisabled:r,href:s,rootRef:c,tabIndex:u,to:d,type:f}=e,v=o.useRef(),[p,m]=o.useState(!1),{isFocusVisibleRef:g,onFocus:h,onBlur:b,ref:x}=(0,a.Z)(),[y,S]=o.useState(!1);t&&!r&&y&&S(!1),o.useEffect(()=>{g.current=y},[y,g]);let[Z,k]=o.useState(""),z=e=>t=>{var r;y&&t.preventDefault(),null==(r=e.onMouseLeave)||r.call(e,t)},w=e=>t=>{var r;b(t),!1===g.current&&S(!1),null==(r=e.onBlur)||r.call(e,t)},C=e=>t=>{var r,n;v.current||(v.current=t.currentTarget),h(t),!0===g.current&&(S(!0),null==(n=e.onFocusVisible)||n.call(e,t)),null==(r=e.onFocus)||r.call(e,t)},I=()=>{let e=v.current;return"BUTTON"===Z||"INPUT"===Z&&["button","submit","reset"].includes(null==e?void 0:e.type)||"A"===Z&&(null==e?void 0:e.href)},R=e=>r=>{if(!t){var n;null==(n=e.onClick)||n.call(e,r)}},P=e=>r=>{var n;t||(m(!0),document.addEventListener("mouseup",()=>{m(!1)},{once:!0})),null==(n=e.onMouseDown)||n.call(e,r)},L=e=>r=>{var n,o;null==(n=e.onKeyDown)||n.call(e,r),!r.defaultMuiPrevented&&(r.target!==r.currentTarget||I()||" "!==r.key||r.preventDefault(),r.target!==r.currentTarget||" "!==r.key||t||m(!0),r.target!==r.currentTarget||I()||"Enter"!==r.key||t||(null==(o=e.onClick)||o.call(e,r),r.preventDefault()))},D=e=>r=>{var n,o;r.target===r.currentTarget&&m(!1),null==(n=e.onKeyUp)||n.call(e,r),r.target!==r.currentTarget||I()||t||" "!==r.key||r.defaultMuiPrevented||null==(o=e.onClick)||o.call(e,r)},T=o.useCallback(e=>{var t;k(null!=(t=null==e?void 0:e.tagName)?t:"")},[]),B=(0,i.Z)(T,c,x,v),M={};return void 0!==u&&(M.tabIndex=u),"BUTTON"===Z?(M.type=null!=f?f:"button",r?M["aria-disabled"]=t:M.disabled=t):""!==Z&&(s||d||(M.role="button",M.tabIndex=null!=u?u:0),t&&(M["aria-disabled"]=t,M.tabIndex=r?null!=u?u:0:-1)),{getRootProps:(t={})=>{let r=(0,n.Z)({},(0,l._)(e),(0,l._)(t)),o=(0,n.Z)({type:f},r,M,t,{onBlur:w(r),onClick:R(r),onFocus:C(r),onKeyDown:L(r),onKeyUp:D(r),onMouseDown:P(r),onMouseLeave:z(r),ref:B});return delete o.onFocusVisible,o},focusVisible:y,setFocusVisible:S,active:p,rootRef:B}}},85241:function(e,t,r){r.d(t,{D:function(){return o}});var n=r(67294);let o=n.createContext(null)},51633:function(e,t,r){r.d(t,{Q:function(){return n}});let n={blur:"dropdown:blur",escapeKeyDown:"dropdown:escapeKeyDown",toggle:"dropdown:toggle",open:"dropdown:open",close:"dropdown:close"}},26558:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(67294);let o=n.createContext(null)},22644:function(e,t,r){r.d(t,{F:function(){return n}});let n={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",textNavigation:"list:textNavigation"}},7333:function(e,t,r){r.d(t,{R$:function(){return l},Rl:function(){return a}});var n=r(87462),o=r(22644);function a(e,t,r){var n;let o,a;let{items:i,isItemDisabled:l,disableListWrap:s,disabledItemsFocusable:c,itemComparer:u,focusManagement:d}=r,f=i.length-1,v=null==e?-1:i.findIndex(t=>u(t,e)),p=!s;switch(t){case"reset":if(-1==("DOM"===d?0:-1))return null;o=0,a="next",p=!1;break;case"start":o=0,a="next",p=!1;break;case"end":o=f,a="previous",p=!1;break;default:{let e=v+t;e<0?!p&&-1!==v||Math.abs(t)>1?(o=0,a="next"):(o=f,a="previous"):e>f?!p||Math.abs(t)>1?(o=f,a="previous"):(o=0,a="next"):(o=e,a=t>=0?"next":"previous")}}let m=function(e,t,r,n,o,a){if(0===r.length||!n&&r.every((e,t)=>o(e,t)))return -1;let i=e;for(;;){if(!a&&"next"===t&&i===r.length||!a&&"previous"===t&&-1===i)return -1;let e=!n&&o(r[i],i);if(!e)return i;i+="next"===t?1:-1,a&&(i=(i+r.length)%r.length)}}(o,a,i,c,l,p);return -1!==m||null===e||l(e,v)?null!=(n=i[m])?n:null:e}function i(e,t,r){let{itemComparer:o,isItemDisabled:a,selectionMode:i,items:l}=r,{selectedValues:s}=t,c=l.findIndex(t=>o(e,t));if(a(e,c))return t;let u="none"===i?[]:"single"===i?o(s[0],e)?s:[e]:s.some(t=>o(t,e))?s.filter(t=>!o(t,e)):[...s,e];return(0,n.Z)({},t,{selectedValues:u,highlightedValue:e})}function l(e,t){let{type:r,context:l}=t;switch(r){case o.F.keyDown:return function(e,t,r){let o=t.highlightedValue,{orientation:l,pageSize:s}=r;switch(e){case"Home":return(0,n.Z)({},t,{highlightedValue:a(o,"start",r)});case"End":return(0,n.Z)({},t,{highlightedValue:a(o,"end",r)});case"PageUp":return(0,n.Z)({},t,{highlightedValue:a(o,-s,r)});case"PageDown":return(0,n.Z)({},t,{highlightedValue:a(o,s,r)});case"ArrowUp":if("vertical"!==l)break;return(0,n.Z)({},t,{highlightedValue:a(o,-1,r)});case"ArrowDown":if("vertical"!==l)break;return(0,n.Z)({},t,{highlightedValue:a(o,1,r)});case"ArrowLeft":if("vertical"===l)break;return(0,n.Z)({},t,{highlightedValue:a(o,"horizontal-ltr"===l?-1:1,r)});case"ArrowRight":if("vertical"===l)break;return(0,n.Z)({},t,{highlightedValue:a(o,"horizontal-ltr"===l?1:-1,r)});case"Enter":case" ":if(null===t.highlightedValue)break;return i(t.highlightedValue,t,r)}return t}(t.key,e,l);case o.F.itemClick:return i(t.item,e,l);case o.F.blur:return"DOM"===l.focusManagement?e:(0,n.Z)({},e,{highlightedValue:null});case o.F.textNavigation:return function(e,t,r){let{items:o,isItemDisabled:i,disabledItemsFocusable:l,getItemAsString:s}=r,c=t.length>1,u=c?e.highlightedValue:a(e.highlightedValue,1,r);for(let d=0;ds(e,r.highlightedValue)))?l:null:"DOM"===c&&0===t.length&&(u=a(null,"reset",o));let d=null!=(i=r.selectedValues)?i:[],f=d.filter(t=>e.some(e=>s(e,t)));return(0,n.Z)({},r,{highlightedValue:u,selectedValues:f})}(t.items,t.previousItems,e,l);case o.F.resetHighlight:return(0,n.Z)({},e,{highlightedValue:a(null,"reset",l)});default:return e}}},96592:function(e,t,r){r.d(t,{s:function(){return x}});var n=r(87462),o=r(67294),a=r(22760),i=r(22644),l=r(7333);let s="select:change-selection",c="select:change-highlight";var u=r(78031),d=r(6414);function f(e,t){let r=o.useRef(e);return o.useEffect(()=>{r.current=e},null!=t?t:[e]),r}let v={},p=()=>{},m=(e,t)=>e===t,g=()=>!1,h=e=>"string"==typeof e?e:String(e),b=()=>({highlightedValue:null,selectedValues:[]});function x(e){let{controlledProps:t=v,disabledItemsFocusable:r=!1,disableListWrap:x=!1,focusManagement:y="activeDescendant",getInitialState:S=b,getItemDomElement:Z,getItemId:k,isItemDisabled:z=g,rootRef:w,onStateChange:C=p,items:I,itemComparer:R=m,getItemAsString:P=h,onChange:L,onHighlightChange:D,onItemsChange:T,orientation:B="vertical",pageSize:M=5,reducerActionContext:O=v,selectionMode:E="single",stateReducer:$}=e,j=o.useRef(null),H=(0,a.Z)(w,j),V=o.useCallback((e,t,r)=>{if(null==D||D(e,t,r),"DOM"===y&&null!=t&&(r===i.F.itemClick||r===i.F.keyDown||r===i.F.textNavigation)){var n;null==Z||null==(n=Z(t))||n.focus()}},[Z,D,y]),N=o.useMemo(()=>({highlightedValue:R,selectedValues:(e,t)=>(0,d.H)(e,t,R)}),[R]),W=o.useCallback((e,t,r,n,o)=>{switch(null==C||C(e,t,r,n,o),t){case"highlightedValue":V(e,r,n);break;case"selectedValues":null==L||L(e,r,n)}},[V,L,C]),A=o.useMemo(()=>({disabledItemsFocusable:r,disableListWrap:x,focusManagement:y,isItemDisabled:z,itemComparer:R,items:I,getItemAsString:P,onHighlightChange:V,orientation:B,pageSize:M,selectionMode:E,stateComparers:N}),[r,x,y,z,R,I,P,V,B,M,E,N]),_=S(),F=null!=$?$:l.R$,J=o.useMemo(()=>(0,n.Z)({},O,A),[O,A]),[q,U]=(0,u.r)({reducer:F,actionContext:J,initialState:_,controlledProps:t,stateComparers:N,onStateChange:W}),{highlightedValue:X,selectedValues:G}=q,K=function(e){let t=o.useRef({searchString:"",lastTime:null});return o.useCallback(r=>{if(1===r.key.length&&" "!==r.key){let n=t.current,o=r.key.toLowerCase(),a=performance.now();n.searchString.length>0&&n.lastTime&&a-n.lastTime>500?n.searchString=o:(1!==n.searchString.length||o!==n.searchString)&&(n.searchString+=o),n.lastTime=a,e(n.searchString,r)}},[e])}((e,t)=>U({type:i.F.textNavigation,event:t,searchString:e})),Y=f(G),Q=f(X),ee=o.useRef([]);o.useEffect(()=>{(0,d.H)(ee.current,I,R)||(U({type:i.F.itemsChange,event:null,items:I,previousItems:ee.current}),ee.current=I,null==T||T(I))},[I,R,U,T]);let{notifySelectionChanged:et,notifyHighlightChanged:er,registerHighlightChangeHandler:en,registerSelectionChangeHandler:eo}=function(){let e=function(){let e=o.useRef();return e.current||(e.current=function(){let e=new Map;return{subscribe:function(t,r){let n=e.get(t);return n?n.add(r):(n=new Set([r]),e.set(t,n)),()=>{n.delete(r),0===n.size&&e.delete(t)}},publish:function(t,...r){let n=e.get(t);n&&n.forEach(e=>e(...r))}}}()),e.current}(),t=o.useCallback(t=>{e.publish(s,t)},[e]),r=o.useCallback(t=>{e.publish(c,t)},[e]),n=o.useCallback(t=>e.subscribe(s,t),[e]),a=o.useCallback(t=>e.subscribe(c,t),[e]);return{notifySelectionChanged:t,notifyHighlightChanged:r,registerSelectionChangeHandler:n,registerHighlightChangeHandler:a}}();o.useEffect(()=>{et(G)},[G,et]),o.useEffect(()=>{er(X)},[X,er]);let ea=e=>t=>{var r;if(null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented)return;let n=["Home","End","PageUp","PageDown"];"vertical"===B?n.push("ArrowUp","ArrowDown"):n.push("ArrowLeft","ArrowRight"),"activeDescendant"===y&&n.push(" ","Enter"),n.includes(t.key)&&t.preventDefault(),U({type:i.F.keyDown,key:t.key,event:t}),K(t)},ei=e=>t=>{var r,n;null==(r=e.onBlur)||r.call(e,t),t.defaultMuiPrevented||null!=(n=j.current)&&n.contains(t.relatedTarget)||U({type:i.F.blur,event:t})},el=o.useCallback(e=>{var t;let r=I.findIndex(t=>R(t,e)),n=(null!=(t=Y.current)?t:[]).some(t=>null!=t&&R(e,t)),o=z(e,r),a=null!=Q.current&&R(e,Q.current),i="DOM"===y;return{disabled:o,focusable:i,highlighted:a,index:r,selected:n}},[I,z,R,Y,Q,y]),es=o.useMemo(()=>({dispatch:U,getItemState:el,registerHighlightChangeHandler:en,registerSelectionChangeHandler:eo}),[U,el,en,eo]);return o.useDebugValue({state:q}),{contextValue:es,dispatch:U,getRootProps:(e={})=>(0,n.Z)({},e,{"aria-activedescendant":"activeDescendant"===y&&null!=X?k(X):void 0,onBlur:ei(e),onKeyDown:ea(e),tabIndex:"DOM"===y?-1:0,ref:H}),rootRef:H,state:q}}},43069:function(e,t,r){r.d(t,{J:function(){return c}});var n=r(87462),o=r(67294),a=r(22760),i=r(54895),l=r(22644),s=r(26558);function c(e){let t;let{handlePointerOverEvents:r=!1,item:c,rootRef:u}=e,d=o.useRef(null),f=(0,a.Z)(d,u),v=o.useContext(s.Z);if(!v)throw Error("useListItem must be used within a ListProvider");let{dispatch:p,getItemState:m,registerHighlightChangeHandler:g,registerSelectionChangeHandler:h}=v,{highlighted:b,selected:x,focusable:y}=m(c),S=function(){let[,e]=o.useState({});return o.useCallback(()=>{e({})},[])}();(0,i.Z)(()=>g(function(e){e!==c||b?e!==c&&b&&S():S()})),(0,i.Z)(()=>h(function(e){x?e.includes(c)||S():e.includes(c)&&S()}),[h,S,x,c]);let Z=o.useCallback(e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultPrevented||p({type:l.F.itemClick,item:c,event:t})},[p,c]),k=o.useCallback(e=>t=>{var r;null==(r=e.onMouseOver)||r.call(e,t),t.defaultPrevented||p({type:l.F.itemHover,item:c,event:t})},[p,c]);return y&&(t=b?0:-1),{getRootProps:(e={})=>(0,n.Z)({},e,{onClick:Z(e),onPointerOver:r?k(e):void 0,ref:f,tabIndex:t}),highlighted:b,rootRef:f,selected:x}}},6414:function(e,t,r){r.d(t,{H:function(){return n}});function n(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}},2900:function(e,t,r){r.d(t,{f:function(){return o}});var n=r(87462);function o(e,t){return function(r={}){let o=(0,n.Z)({},r,e(r)),a=(0,n.Z)({},o,t(o));return a}}},12247:function(e,t,r){r.d(t,{Y:function(){return a},s:function(){return o}});var n=r(67294);let o=n.createContext(null);function a(){let[e,t]=n.useState(new Map),r=n.useRef(new Set),o=n.useCallback(function(e){r.current.delete(e),t(t=>{let r=new Map(t);return r.delete(e),r})},[]),a=n.useCallback(function(e,n){let a;return a="function"==typeof e?e(r.current):e,r.current.add(a),t(e=>{let t=new Map(e);return t.set(a,n),t}),{id:a,deregister:()=>o(a)}},[o]),i=n.useMemo(()=>(function(e){let t=Array.from(e.keys()).map(t=>{let r=e.get(t);return{key:t,subitem:r}});return t.sort((e,t)=>{let r=e.subitem.ref.current,n=t.subitem.ref.current;return null===r||null===n||r===n?0:r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(e=>[e.key,e.subitem]))})(e),[e]),l=n.useCallback(function(e){return Array.from(i.keys()).indexOf(e)},[i]),s=n.useMemo(()=>({getItemIndex:l,registerItem:a,totalSubitemCount:e.size}),[l,a,e.size]);return{contextValue:s,subitems:i}}o.displayName="CompoundComponentContext"},14072:function(e,t,r){r.d(t,{B:function(){return i}});var n=r(67294),o=r(54895),a=r(12247);function i(e,t){let r=n.useContext(a.s);if(null===r)throw Error("useCompoundItem must be used within a useCompoundParent");let{registerItem:i}=r,[l,s]=n.useState("function"==typeof e?void 0:e);return(0,o.Z)(()=>{let{id:r,deregister:n}=i(e,t);return s(r),n},[i,t,e]),{id:l,index:void 0!==l?r.getItemIndex(l):-1,totalItemCount:r.totalSubitemCount}}},78031:function(e,t,r){r.d(t,{r:function(){return c}});var n=r(87462),o=r(67294);function a(e,t){return e===t}let i={},l=()=>{};function s(e,t){let r=(0,n.Z)({},e);return Object.keys(t).forEach(e=>{void 0!==t[e]&&(r[e]=t[e])}),r}function c(e){let t=o.useRef(null),{reducer:r,initialState:c,controlledProps:u=i,stateComparers:d=i,onStateChange:f=l,actionContext:v}=e,p=o.useCallback((e,n)=>{t.current=n;let o=s(e,u),a=r(o,n);return a},[u,r]),[m,g]=o.useReducer(p,c),h=o.useCallback(e=>{g((0,n.Z)({},e,{context:v}))},[v]);return!function(e){let{nextState:t,initialState:r,stateComparers:n,onStateChange:i,controlledProps:l,lastActionRef:c}=e,u=o.useRef(r);o.useEffect(()=>{if(null===c.current)return;let e=s(u.current,l);Object.keys(t).forEach(r=>{var o,l,s;let u=null!=(o=n[r])?o:a,d=t[r],f=e[r];(null!=f||null==d)&&(null==f||null!=d)&&(null==f||null==d||u(d,f))||null==i||i(null!=(l=c.current.event)?l:null,r,d,null!=(s=c.current.type)?s:"",t)}),u.current=t,c.current=null},[u,t,c,i,n,l])}({nextState:m,initialState:c,stateComparers:null!=d?d:i,onStateChange:null!=f?f:l,controlledProps:u,lastActionRef:t}),[s(m,u),h]}},7293:function(e,t,r){r.d(t,{y:function(){return u}});var n=r(87462),o=r(63366),a=r(22760),i=r(10238),l=r(24407),s=r(71276);let c=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function u(e){var t;let{elementType:r,externalSlotProps:u,ownerState:d,skipResolvingSlotProps:f=!1}=e,v=(0,o.Z)(e,c),p=f?{}:(0,s.x)(u,d),{props:m,internalRef:g}=(0,l.L)((0,n.Z)({},v,{externalSlotProps:p})),h=(0,a.Z)(g,null==p?void 0:p.ref,null==(t=e.additionalProps)?void 0:t.ref),b=(0,i.$)(r,(0,n.Z)({},m,{ref:h}),d);return b}},41132:function(e,t,r){var n=r(28549),o=r(85893);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded")},59301:function(e,t,r){var n=r(28549),o=r(85893);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz")},48665:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(23534),s=r(86523),c=r(39707),u=r(79718),d=r(85893);let f=["className","component"];var v=r(31983),p=r(67299),m=r(2548);let g=function(e={}){let{themeId:t,defaultTheme:r,defaultClassName:v="MuiBox-root",generateClassName:p}=e,m=(0,l.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.Z),g=a.forwardRef(function(e,a){let l=(0,u.Z)(r),s=(0,c.Z)(e),{className:g,component:h="div"}=s,b=(0,o.Z)(s,f);return(0,d.jsx)(m,(0,n.Z)({as:h,ref:a,className:(0,i.Z)(g,p?p(v):v),theme:t&&l[t]||l},b))});return g}({themeId:m.Z,defaultTheme:p.Z,defaultClassName:"MuiBox-root",generateClassName:v.Z.generate});var h=g},89996:function(e,t,r){var n=r(67294);let o=n.createContext({});t.Z=o},66478:function(e,t,r){r.d(t,{Z:function(){return R},f:function(){return w}});var n=r(63366),o=r(87462),a=r(67294),i=r(70758),l=r(58510),s=r(62908),c=r(22760),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(48699),m=r(26821);function g(e){return(0,m.d6)("MuiButton",e)}let h=(0,m.sI)("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]);var b=r(89996),x=r(85893);let y=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],S=e=>{let{color:t,disabled:r,focusVisible:n,focusVisibleClassName:o,fullWidth:a,size:i,variant:c,loading:u}=e,d={root:["root",r&&"disabled",n&&"focusVisible",a&&"fullWidth",c&&`variant${(0,s.Z)(c)}`,t&&`color${(0,s.Z)(t)}`,i&&`size${(0,s.Z)(i)}`,u&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=(0,l.Z)(d,g,{});return n&&o&&(f.root+=` ${o}`),f},Z=(0,u.Z)("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),k=(0,u.Z)("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),z=(0,u.Z)("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var r,n;return(0,o.Z)({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:null==(r=e.variants[t.variant])||null==(r=r[t.color])?void 0:r.color},t.disabled&&{color:null==(n=e.variants[`${t.variant}Disabled`])||null==(n=n[t.color])?void 0:n.color})}),w=({theme:e,ownerState:t})=>{var r,n,a,i;return[(0,o.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon},"sm"===t.size&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"2px",paddingInline:"0.75rem"},"md"===t.size&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"24px","--CircularProgress-thickness":"3px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.5rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"0.25rem",paddingInline:"1rem"},"lg"===t.size&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 3rem)",fontSize:e.vars.fontSize.md,paddingBlock:"0.375rem",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:1},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),(0,o.Z)({},null==(r=e.variants[t.variant])?void 0:r[t.color],{"&:hover":{"@media (hover: hover)":null==(n=e.variants[`${t.variant}Hover`])?void 0:n[t.color]},'&:active, &[aria-pressed="true"]':null==(a=e.variants[`${t.variant}Active`])?void 0:a[t.color],"&:disabled":null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]},"center"===t.loadingPosition&&{[`&.${h.loading}`]:{color:"transparent"}})]},C=(0,u.Z)("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(w),I=a.forwardRef(function(e,t){var r;let l=(0,d.Z)({props:e,name:"JoyButton"}),{children:s,action:u,color:m="primary",variant:g="solid",size:h="md",fullWidth:w=!1,startDecorator:I,endDecorator:R,loading:P=!1,loadingPosition:L="center",loadingIndicator:D,disabled:T,component:B,slots:M={},slotProps:O={}}=l,E=(0,n.Z)(l,y),$=a.useContext(b.Z),j=e.variant||$.variant||g,H=e.size||$.size||h,{getColor:V}=(0,f.VT)(j),N=V(e.color,$.color||m),W=null!=(r=e.disabled||e.loading)?r:$.disabled||T||P,A=a.useRef(null),_=(0,c.Z)(A,t),{focusVisible:F,setFocusVisible:J,getRootProps:q}=(0,i.U)((0,o.Z)({},l,{disabled:W,rootRef:_})),U=null!=D?D:(0,x.jsx)(p.Z,(0,o.Z)({},"context"!==N&&{color:N},{thickness:{sm:2,md:3,lg:4}[H]||3}));a.useImperativeHandle(u,()=>({focusVisible:()=>{var e;J(!0),null==(e=A.current)||e.focus()}}),[J]);let X=(0,o.Z)({},l,{color:N,fullWidth:w,variant:j,size:H,focusVisible:F,loading:P,loadingPosition:L,disabled:W}),G=S(X),K=(0,o.Z)({},E,{component:B,slots:M,slotProps:O}),[Y,Q]=(0,v.Z)("root",{ref:t,className:G.root,elementType:C,externalForwardedProps:K,getSlotProps:q,ownerState:X}),[ee,et]=(0,v.Z)("startDecorator",{className:G.startDecorator,elementType:Z,externalForwardedProps:K,ownerState:X}),[er,en]=(0,v.Z)("endDecorator",{className:G.endDecorator,elementType:k,externalForwardedProps:K,ownerState:X}),[eo,ea]=(0,v.Z)("loadingIndicatorCenter",{className:G.loadingIndicatorCenter,elementType:z,externalForwardedProps:K,ownerState:X});return(0,x.jsxs)(Y,(0,o.Z)({},Q,{children:[(I||P&&"start"===L)&&(0,x.jsx)(ee,(0,o.Z)({},et,{children:P&&"start"===L?U:I})),s,P&&"center"===L&&(0,x.jsx)(eo,(0,o.Z)({},ea,{children:U})),(R||P&&"end"===L)&&(0,x.jsx)(er,(0,o.Z)({},en,{children:P&&"end"===L?U:R}))]}))});I.muiName="Button";var R=I},48699:function(e,t,r){r.d(t,{Z:function(){return P}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(62908),s=r(58510),c=r(70917),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(26821);function m(e){return(0,p.d6)("MuiCircularProgress",e)}(0,p.sI)("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var g=r(85893);let h=e=>e,b,x=["color","backgroundColor"],y=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],S=(0,c.F4)({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),Z=e=>{let{determinate:t,color:r,variant:n,size:o}=e,a={root:["root",t&&"determinate",r&&`color${(0,l.Z)(r)}`,n&&`variant${(0,l.Z)(n)}`,o&&`size${(0,l.Z)(o)}`],svg:["svg"],track:["track"],progress:["progress"]};return(0,s.Z)(a,m,{})};function k(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}let z=(0,u.Z)("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var r;let a=(null==(r=t.variants[e.variant])?void 0:r[e.color])||{},{color:i,backgroundColor:l}=a,s=(0,o.Z)(a,x);return(0,n.Z)({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":i,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},"sm"===e.size&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":k("track","3px"),"--_progress-thickness":k("progress","3px")},"sm"===e.instanceSize&&{"--CircularProgress-size":"24px"},"md"===e.size&&{"--_track-thickness":k("track","6px"),"--_progress-thickness":k("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},"md"===e.instanceSize&&{"--CircularProgress-size":"40px"},"lg"===e.size&&{"--_track-thickness":k("track","8px"),"--_progress-thickness":k("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},"lg"===e.instanceSize&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:i},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},s,"outlined"===e.variant&&{"&:before":(0,n.Z)({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},s)})}),w=(0,u.Z)("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),C=(0,u.Z)("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),I=(0,u.Z)("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&(0,c.iv)(b||(b=h` animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running) ${0}; - `),S)),R=a.forwardRef(function(e,t){let r=(0,d.Z)({props:e,name:"JoyCircularProgress"}),{children:a,className:l,color:s="primary",size:c="md",variant:u="soft",thickness:p,determinate:m=!1,value:h=m?0:25,component:b,slots:x={},slotProps:S={}}=r,k=(0,o.Z)(r,y),{getColor:R}=(0,f.VT)(u),P=R(e.color,s),L=(0,n.Z)({},r,{color:P,size:c,variant:u,thickness:p,value:h,determinate:m,instanceSize:e.size}),D=Z(L),T=(0,n.Z)({},k,{component:b,slots:x,slotProps:S}),[B,M]=(0,v.Z)("root",{ref:t,className:(0,i.Z)(D.root,l),elementType:z,externalForwardedProps:T,ownerState:L,additionalProps:(0,n.Z)({role:"progressbar",style:{"--CircularProgress-percent":h}},h&&m&&{"aria-valuenow":"number"==typeof h?Math.round(h):Math.round(Number(h||0))})}),[O,E]=(0,v.Z)("svg",{className:D.svg,elementType:w,externalForwardedProps:T,ownerState:L}),[$,j]=(0,v.Z)("track",{className:D.track,elementType:C,externalForwardedProps:T,ownerState:L}),[H,V]=(0,v.Z)("progress",{className:D.progress,elementType:I,externalForwardedProps:T,ownerState:L});return(0,g.jsxs)(B,(0,n.Z)({},M,{children:[(0,g.jsxs)(O,(0,n.Z)({},E,{children:[(0,g.jsx)($,(0,n.Z)({},j)),(0,g.jsx)(H,(0,n.Z)({},V))]})),a]}))});var P=R},76043:function(e,t,r){var n=r(67294);let o=n.createContext(void 0);t.Z=o},26047:function(e,t,r){r.d(t,{Z:function(){return N}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(16485),s=r(8027),c=r(58510),u=r(86154);let d=(0,u.ZP)();var f=r(44065),v=r(79718),p=r(39707),m=r(88647);let g=(e,t)=>e.filter(e=>t.includes(e)),h=(e,t,r)=>{let n=e.keys[0];if(Array.isArray(t))t.forEach((t,n)=>{r((t,r)=>{n<=e.keys.length-1&&(0===n?Object.assign(t,r):t[e.up(e.keys[n])]=r)},t)});else if(t&&"object"==typeof t){let o=Object.keys(t).length>e.keys.length?e.keys:g(e.keys,Object.keys(t));o.forEach(o=>{if(-1!==e.keys.indexOf(o)){let a=t[o];void 0!==a&&r((t,r)=>{n===o?Object.assign(t,r):t[e.up(o)]=r},a)}})}else("number"==typeof t||"string"==typeof t)&&r((e,t)=>{Object.assign(e,t)},t)};function b(e){return e?`Level${e}`:""}function x(e){return e.unstable_level>0&&e.container}function y(e){return function(t){return`var(--Grid-${t}Spacing${b(e.unstable_level)})`}}function S(e){return function(t){return 0===e.unstable_level?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${b(e.unstable_level-1)})`}}function Z(e){return 0===e.unstable_level?"var(--Grid-columns)":`var(--Grid-columns${b(e.unstable_level-1)})`}let k=({theme:e,ownerState:t})=>{let r=y(t),n={};return h(e.breakpoints,t.gridSize,(e,o)=>{let a={};!0===o&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===o&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof o&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / ${Z(t)}${x(t)?` + ${r("column")}`:""})`}),e(n,a)}),n},z=({theme:e,ownerState:t})=>{let r={};return h(e.breakpoints,t.gridOffset,(e,n)=>{let o={};"auto"===n&&(o={marginLeft:"auto"}),"number"==typeof n&&(o={marginLeft:0===n?"0px":`calc(100% * ${n} / ${Z(t)})`}),e(r,o)}),r},w=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=x(t)?{[`--Grid-columns${b(t.unstable_level)}`]:Z(t)}:{"--Grid-columns":12};return h(e.breakpoints,t.columns,(e,n)=>{e(r,{[`--Grid-columns${b(t.unstable_level)}`]:n})}),r},C=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=S(t),n=x(t)?{[`--Grid-rowSpacing${b(t.unstable_level)}`]:r("row")}:{};return h(e.breakpoints,t.rowSpacing,(r,o)=>{var a;r(n,{[`--Grid-rowSpacing${b(t.unstable_level)}`]:"string"==typeof o?o:null==(a=e.spacing)?void 0:a.call(e,o)})}),n},I=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=S(t),n=x(t)?{[`--Grid-columnSpacing${b(t.unstable_level)}`]:r("column")}:{};return h(e.breakpoints,t.columnSpacing,(r,o)=>{var a;r(n,{[`--Grid-columnSpacing${b(t.unstable_level)}`]:"string"==typeof o?o:null==(a=e.spacing)?void 0:a.call(e,o)})}),n},R=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={};return h(e.breakpoints,t.direction,(e,t)=>{e(r,{flexDirection:t})}),r},P=({ownerState:e})=>{let t=y(e),r=S(e);return(0,n.Z)({minWidth:0,boxSizing:"border-box"},e.container&&(0,n.Z)({display:"flex",flexWrap:"wrap"},e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||x(e))&&(0,n.Z)({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},L=e=>{let t=[];return Object.entries(e).forEach(([e,r])=>{!1!==r&&void 0!==r&&t.push(`grid-${e}-${String(r)}`)}),t},D=(e,t="xs")=>{function r(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(r(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,n])=>{r(n)&&t.push(`spacing-${e}-${String(n)}`)}),t}return[]},T=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`];var B=r(85893);let M=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],O=(0,m.Z)(),E=d("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function $(e){return(0,f.Z)({props:e,name:"MuiGrid",defaultTheme:O})}var j=r(74312),H=r(20407);let V=function(e={}){let{createStyledComponent:t=E,useThemeProps:r=$,componentName:u="MuiGrid"}=e,d=a.createContext(void 0),f=(e,t)=>{let{container:r,direction:n,spacing:o,wrap:a,gridSize:i}=e,l={root:["root",r&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...T(n),...L(i),...r?D(o,t.breakpoints.keys[0]):[]]};return(0,c.Z)(l,e=>(0,s.ZP)(u,e),{})},m=t(w,I,C,k,R,P,z),g=a.forwardRef(function(e,t){var s,c,u,g,h,b,x,y;let S=(0,v.Z)(),Z=r(e),k=(0,p.Z)(Z),z=a.useContext(d),{className:w,children:C,columns:I=12,container:R=!1,component:P="div",direction:L="row",wrap:D="wrap",spacing:T=0,rowSpacing:O=T,columnSpacing:E=T,disableEqualOverflow:$,unstable_level:j=0}=k,H=(0,o.Z)(k,M),V=$;j&&void 0!==$&&(V=e.disableEqualOverflow);let N={},W={},A={};Object.entries(H).forEach(([e,t])=>{void 0!==S.breakpoints.values[e]?N[e]=t:void 0!==S.breakpoints.values[e.replace("Offset","")]?W[e.replace("Offset","")]=t:A[e]=t});let _=null!=(s=e.columns)?s:j?void 0:I,F=null!=(c=e.spacing)?c:j?void 0:T,J=null!=(u=null!=(g=e.rowSpacing)?g:e.spacing)?u:j?void 0:O,q=null!=(h=null!=(b=e.columnSpacing)?b:e.spacing)?h:j?void 0:E,U=(0,n.Z)({},k,{level:j,columns:_,container:R,direction:L,wrap:D,spacing:F,rowSpacing:J,columnSpacing:q,gridSize:N,gridOffset:W,disableEqualOverflow:null!=(x=null!=(y=V)?y:z)&&x,parentDisableEqualOverflow:z}),X=f(U,S),G=(0,B.jsx)(m,(0,n.Z)({ref:t,as:P,ownerState:U,className:(0,i.Z)(X.root,w)},A,{children:a.Children.map(C,e=>{if(a.isValidElement(e)&&(0,l.Z)(e,["Grid"])){var t;return a.cloneElement(e,{unstable_level:null!=(t=e.props.unstable_level)?t:j+1})}return e})}));return void 0!==V&&V!==(null!=z&&z)&&(G=(0,B.jsx)(d.Provider,{value:V,children:G})),G});return g.muiName="Grid",g}({createStyledComponent:(0,j.Z)("div",{name:"JoyGrid",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,H.Z)({props:e,name:"JoyGrid"})});var N=V},14553:function(e,t,r){r.d(t,{ZP:function(){return k}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(22760),s=r(70758),c=r(58510),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(26821);function m(e){return(0,p.d6)("MuiIconButton",e)}(0,p.sI)("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg"]);var g=r(89996),h=r(85893);let b=["children","action","component","color","disabled","variant","size","slots","slotProps"],x=e=>{let{color:t,disabled:r,focusVisible:n,focusVisibleClassName:o,size:a,variant:l}=e,s={root:["root",r&&"disabled",n&&"focusVisible",l&&`variant${(0,i.Z)(l)}`,t&&`color${(0,i.Z)(t)}`,a&&`size${(0,i.Z)(a)}`]},u=(0,c.Z)(s,m,{});return n&&o&&(u.root+=` ${o}`),u},y=(0,u.Z)("button")(({theme:e,ownerState:t})=>{var r,n,a,i;return[(0,o.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":({sm:"2rem",md:"2.5rem",lg:"3rem"})[t.instanceSize]},"sm"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},"md"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.5rem) / 1.667)","--CircularProgress-size":"24px","--CircularProgress-thickness":"3px",minWidth:"var(--IconButton-size, 2.5rem)",minHeight:"var(--IconButton-size, 2.5rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},"lg"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 3rem) / 1.714)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 3rem)",minHeight:"var(--IconButton-size, 3rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:(0,o.Z)({"--Icon-color":"currentColor"},e.focus.default)}),(0,o.Z)({},null==(r=e.variants[t.variant])?void 0:r[t.color],{"&:hover":{"@media (hover: hover)":(0,o.Z)({"--Icon-color":"currentColor"},null==(n=e.variants[`${t.variant}Hover`])?void 0:n[t.color])},'&:active, &[aria-pressed="true"]':(0,o.Z)({"--Icon-color":"currentColor"},null==(a=e.variants[`${t.variant}Active`])?void 0:a[t.color]),"&:disabled":null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]})]}),S=(0,u.Z)(y,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z=a.forwardRef(function(e,t){var r;let i=(0,d.Z)({props:e,name:"JoyIconButton"}),{children:c,action:u,component:p="button",color:m="neutral",disabled:y,variant:Z="plain",size:k="md",slots:z={},slotProps:w={}}=i,C=(0,n.Z)(i,b),I=a.useContext(g.Z),R=e.variant||I.variant||Z,P=e.size||I.size||k,{getColor:L}=(0,f.VT)(R),D=L(e.color,I.color||m),T=null!=(r=e.disabled)?r:I.disabled||y,B=a.useRef(null),M=(0,l.Z)(B,t),{focusVisible:O,setFocusVisible:E,getRootProps:$}=(0,s.U)((0,o.Z)({},i,{disabled:T,rootRef:M}));a.useImperativeHandle(u,()=>({focusVisible:()=>{var e;E(!0),null==(e=B.current)||e.focus()}}),[E]);let j=(0,o.Z)({},i,{component:p,color:D,disabled:T,variant:R,size:P,focusVisible:O,instanceSize:e.size}),H=x(j),V=(0,o.Z)({},C,{component:p,slots:z,slotProps:w}),[N,W]=(0,v.Z)("root",{ref:t,className:H.root,elementType:S,getSlotProps:$,externalForwardedProps:V,ownerState:j});return(0,h.jsx)(N,(0,o.Z)({},W,{children:c}))});Z.muiName="IconButton";var k=Z},43614:function(e,t,r){var n=r(67294);let o=n.createContext(void 0);t.Z=o},50984:function(e,t,r){r.d(t,{C:function(){return i}});var n=r(87462);r(67294);var o=r(74312),a=r(58859);r(85893);let i=(0,o.Z)("ul")(({theme:e,ownerState:t})=>{var r;let{p:o,padding:i,borderRadius:l}=(0,a.V)({theme:e,ownerState:t},["p","padding","borderRadius"]);function s(r){return"sm"===r?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":"0.5rem","--ListItemDecorator-size":"horizontal"===t.orientation?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:"md"===r?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.5rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":"0.75rem","--ListItemDecorator-size":"horizontal"===t.orientation?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:"lg"===r?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"3rem","--ListItem-paddingY":"0.5rem","--ListItem-paddingX":"1rem","--ListItemDecorator-size":"horizontal"===t.orientation?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&(0,n.Z)({},s(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0,marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&(0,n.Z)({},s(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)","--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],"horizontal"===t.orientation?(0,n.Z)({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"}),(0,n.Z)({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:"horizontal"===t.orientation?"row":"column"},t.wrap&&{flexWrap:"wrap"},{flexGrow:1,position:"relative"},null==(r=e.variants[t.variant])?void 0:r[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},void 0!==l&&{"--List-radius":l},void 0!==o&&{"--List-padding":o},void 0!==i&&{"--List-padding":i})]});(0,o.Z)(i,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({})},3419:function(e,t,r){r.d(t,{Z:function(){return u},M:function(){return c}});var n=r(87462),o=r(67294),a=r(40780);let i=o.createContext(!1),l=o.createContext(!1);var s=r(85893);let c={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};var u=function(e){let{children:t,nested:r,row:c=!1,wrap:u=!1}=e,d=(0,s.jsx)(a.Z.Provider,{value:c,children:(0,s.jsx)(i.Provider,{value:u,children:o.Children.map(t,(e,r)=>o.isValidElement(e)?o.cloneElement(e,(0,n.Z)({},0===r&&{"data-first-child":""},r===o.Children.count(t)-1&&{"data-last-child":""})):e)})});return void 0===r?d:(0,s.jsx)(l.Provider,{value:r,children:d})}},40780:function(e,t,r){var n=r(67294);let o=n.createContext(!1);t.Z=o},39984:function(e,t,r){r.d(t,{r:function(){return s}});var n=r(87462);r(67294);var o=r(74312),a=r(26821);let i=(0,a.sI)("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),l=(0,a.sI)("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]);r(85893);let s=(0,o.Z)("div")(({theme:e,ownerState:t})=>{var r,o,a,s,c;return(0,n.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch"},"vertical"===t.orientation&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},void 0===t["data-first-child"]&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:(0,n.Z)({},e.focus.default,{zIndex:1})},null==(r=e.variants[t.variant])?void 0:r[t.color],{[`.${i.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${l.selected}`]:(0,n.Z)({},null==(o=e.variants[`${t.variant}Active`])?void 0:o[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${l.selected}, [aria-selected="true"])`]:{"&:hover":null==(a=e.variants[`${t.variant}Hover`])?void 0:a[t.color],"&:active":null==(s=e.variants[`${t.variant}Active`])?void 0:s[t.color]},[`&.${l.disabled}`]:(0,n.Z)({},null==(c=e.variants[`${t.variant}Disabled`])?void 0:c[t.color])})});(0,o.Z)(s,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>(0,n.Z)({},!e.row&&{[`&.${l.selected}`]:{fontWeight:t.vars.fontWeight.md}}))},25359:function(e,t,r){r.d(t,{Z:function(){return j}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(58510),s=r(22760),c=r(89326),u=r(54895),d=r(22644),f=r(7333);function v(e,t){if(t.type===d.F.itemHover)return e;let r=(0,f.R$)(e,t);if(null===r.highlightedValue&&t.context.items.length>0)return(0,o.Z)({},r,{highlightedValue:t.context.items[0]});if(t.type===d.F.keyDown&&"Escape"===t.event.key)return(0,o.Z)({},r,{open:!1});if(t.type===d.F.blur){var n,a,i;if(!(null!=(n=t.context.listboxRef.current)&&n.contains(t.event.relatedTarget))){let e=null==(a=t.context.listboxRef.current)?void 0:a.getAttribute("id"),n=null==(i=t.event.relatedTarget)?void 0:i.getAttribute("aria-controls");return e&&n&&e===n?r:(0,o.Z)({},r,{open:!1,highlightedValue:t.context.items[0]})}}return r}var p=r(85241),m=r(96592),g=r(51633),h=r(12247),b=r(2900);let x={dispatch:()=>{},popupId:"",registerPopup:()=>{},registerTrigger:()=>{},state:{open:!0},triggerElement:null};var y=r(26558),S=r(85893);function Z(e){let{value:t,children:r}=e,{dispatch:n,getItemIndex:o,getItemState:i,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s,registerItem:c,totalSubitemCount:u}=t,d=a.useMemo(()=>({dispatch:n,getItemState:i,getItemIndex:o,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s}),[n,o,i,l,s]),f=a.useMemo(()=>({getItemIndex:o,registerItem:c,totalSubitemCount:u}),[c,o,u]);return(0,S.jsx)(h.s.Provider,{value:f,children:(0,S.jsx)(y.Z.Provider,{value:d,children:r})})}var k=r(53406),z=r(7293),w=r(50984),C=r(3419),I=r(43614),R=r(74312),P=r(20407),L=r(55907),D=r(2226),T=r(26821);function B(e){return(0,T.d6)("MuiMenu",e)}(0,T.sI)("MuiMenu",["root","listbox","expanded","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);let M=["actions","children","color","component","disablePortal","keepMounted","id","invertedColors","onItemsChange","modifiers","variant","size","slots","slotProps"],O=e=>{let{open:t,variant:r,color:n,size:o}=e,a={root:["root",t&&"expanded",r&&`variant${(0,i.Z)(r)}`,n&&`color${(0,i.Z)(n)}`,o&&`size${(0,i.Z)(o)}`],listbox:["listbox"]};return(0,l.Z)(a,B,{})},E=(0,R.Z)(w.C,{name:"JoyMenu",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n;let a=null==(r=e.variants[t.variant])?void 0:r[t.color];return[(0,o.Z)({"--focus-outline-offset":`calc(${e.vars.focus.thickness} * -1)`,"--ListItem-stickyBackground":(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background)||e.vars.palette.background.popup,"--ListItem-stickyTop":"calc(var(--List-padding, var(--ListDivider-gap)) * -1)"},C.M,{borderRadius:`var(--List-radius, ${e.vars.radius.sm})`,boxShadow:e.shadow.md,overflow:"auto",zIndex:`var(--unstable_popup-zIndex, ${e.vars.zIndex.popup})`},!(null!=a&&a.backgroundColor)&&{backgroundColor:e.vars.palette.background.popup}),"context"!==t.color&&t.invertedColors&&(null==(n=e.colorInversion[t.variant])?void 0:n[t.color])]}),$=a.forwardRef(function(e,t){var r;let i=(0,P.Z)({props:e,name:"JoyMenu"}),{actions:l,children:f,color:y="neutral",component:w,disablePortal:R=!1,keepMounted:T=!1,id:B,invertedColors:$=!1,onItemsChange:j,modifiers:H,variant:V="outlined",size:N="md",slots:W={},slotProps:A={}}=i,_=(0,n.Z)(i,M),{getColor:F}=(0,D.VT)(V),J=R?F(e.color,y):y,{contextValue:q,getListboxProps:U,dispatch:X,open:G,triggerElement:K}=function(e={}){var t,r;let{listboxRef:n,onItemsChange:i,id:l}=e,d=a.useRef(null),f=(0,s.Z)(d,n),y=null!=(t=(0,c.Z)(l))?t:"",{state:{open:S},dispatch:Z,triggerElement:k,registerPopup:z}=null!=(r=a.useContext(p.D))?r:x,w=a.useRef(S),{subitems:C,contextValue:I}=(0,h.Y)(),R=a.useMemo(()=>Array.from(C.keys()),[C]),P=a.useCallback(e=>{var t,r;return null==e?null:null!=(t=null==(r=C.get(e))?void 0:r.ref.current)?t:null},[C]),{dispatch:L,getRootProps:D,contextValue:T,state:{highlightedValue:B},rootRef:M}=(0,m.s)({disabledItemsFocusable:!0,focusManagement:"DOM",getItemDomElement:P,getInitialState:()=>({selectedValues:[],highlightedValue:null}),isItemDisabled:e=>{var t;return(null==C||null==(t=C.get(e))?void 0:t.disabled)||!1},items:R,getItemAsString:e=>{var t,r;return(null==(t=C.get(e))?void 0:t.label)||(null==(r=C.get(e))||null==(r=r.ref.current)?void 0:r.innerText)},rootRef:f,onItemsChange:i,reducerActionContext:{listboxRef:d},selectionMode:"none",stateReducer:v});(0,u.Z)(()=>{z(y)},[y,z]),a.useEffect(()=>{if(S&&B===R[0]&&!w.current){var e;null==(e=C.get(R[0]))||null==(e=e.ref)||null==(e=e.current)||e.focus()}},[S,B,C,R]),a.useEffect(()=>{var e,t;null!=(e=d.current)&&e.contains(document.activeElement)&&null!==B&&(null==C||null==(t=C.get(B))||null==(t=t.ref.current)||t.focus())},[B,C]);let O=e=>t=>{var r,n;null==(r=e.onBlur)||r.call(e,t),t.defaultMuiPrevented||null!=(n=d.current)&&n.contains(t.relatedTarget)||t.relatedTarget===k||Z({type:g.Q.blur,event:t})},E=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented||"Escape"!==t.key||Z({type:g.Q.escapeKeyDown,event:t})},$=(e={})=>({onBlur:O(e),onKeyDown:E(e)});return a.useDebugValue({subitems:C,highlightedValue:B}),{contextValue:(0,o.Z)({},I,T),dispatch:L,getListboxProps:(e={})=>{let t=(0,b.f)($,D);return(0,o.Z)({},t(e),{id:y,role:"menu"})},highlightedValue:B,listboxRef:M,menuItems:C,open:S,triggerElement:k}}({onItemsChange:j,id:B,listboxRef:t});a.useImperativeHandle(l,()=>({dispatch:X,resetHighlight:()=>X({type:d.F.resetHighlight,event:null})}),[X]);let Y=(0,o.Z)({},i,{disablePortal:R,invertedColors:$,color:J,variant:V,size:N,open:G,nesting:!1,row:!1}),Q=O(Y),ee=(0,o.Z)({},_,{component:w,slots:W,slotProps:A}),et=a.useMemo(()=>[{name:"offset",options:{offset:[0,4]}},...H||[]],[H]),er=(0,z.y)({elementType:E,getSlotProps:U,externalForwardedProps:ee,externalSlotProps:{},ownerState:Y,additionalProps:{anchorEl:K,open:G&&null!==K,disablePortal:R,keepMounted:T,modifiers:et},className:Q.root}),en=(0,S.jsx)(Z,{value:q,children:(0,S.jsx)(L.Yb,{variant:$?void 0:V,color:y,children:(0,S.jsx)(I.Z.Provider,{value:"menu",children:(0,S.jsx)(C.Z,{nested:!0,children:f})})})});return $&&(en=(0,S.jsx)(D.do,{variant:V,children:en})),en=(0,S.jsx)(E,(0,o.Z)({},er,!(null!=(r=i.slots)&&r.root)&&{as:k.r,slots:{root:w||"ul"}},{children:en})),R?en:(0,S.jsx)(D.ZP.Provider,{value:void 0,children:en})});var j=$},59562:function(e,t,r){r.d(t,{Z:function(){return L}});var n=r(63366),o=r(87462),a=r(67294),i=r(22760),l=r(85241),s=r(51633),c=r(70758),u=r(2900),d=r(58510),f=r(62908),v=r(26821);function p(e){return(0,v.d6)("MuiMenuButton",e)}(0,v.sI)("MuiMenuButton",["root","colorPrimary","colorNeutral","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]);var m=r(20407),g=r(30220),h=r(48699),b=r(66478),x=r(74312),y=r(2226),S=r(89996),Z=r(85893);let k=["children","color","component","disabled","endDecorator","loading","loadingPosition","loadingIndicator","size","slotProps","slots","startDecorator","variant"],z=e=>{let{color:t,disabled:r,fullWidth:n,size:o,variant:a,loading:i}=e,l={root:["root",r&&"disabled",n&&"fullWidth",a&&`variant${(0,f.Z)(a)}`,t&&`color${(0,f.Z)(t)}`,o&&`size${(0,f.Z)(o)}`,i&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]};return(0,d.Z)(l,p,{})},w=(0,x.Z)("button",{name:"JoyMenuButton",slot:"Root",overridesResolver:(e,t)=>t.root})(b.f),C=(0,x.Z)("span",{name:"JoyMenuButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),I=(0,x.Z)("span",{name:"JoyMenuButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),R=(0,x.Z)("span",{name:"JoyMenuButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var r,n;return(0,o.Z)({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:null==(r=e.variants[t.variant])||null==(r=r[t.color])?void 0:r.color},t.disabled&&{color:null==(n=e.variants[`${t.variant}Disabled`])||null==(n=n[t.color])?void 0:n.color})}),P=a.forwardRef(function(e,t){var r;let d=(0,m.Z)({props:e,name:"JoyMenuButton"}),{children:f,color:v="neutral",component:p,disabled:b=!1,endDecorator:x,loading:P=!1,loadingPosition:L="center",loadingIndicator:D,size:T="md",slotProps:B={},slots:M={},startDecorator:O,variant:E="outlined"}=d,$=(0,n.Z)(d,k),j=a.useContext(S.Z),H=e.variant||j.variant||E,V=e.size||j.size||T,{getColor:N}=(0,y.VT)(H),W=N(e.color,j.color||v),A=null!=(r=e.disabled)?r:j.disabled||b||P,{getRootProps:_,open:F,active:J}=function(e={}){let{disabled:t=!1,focusableWhenDisabled:r,rootRef:n}=e,d=a.useContext(l.D);if(null===d)throw Error("useMenuButton: no menu context available.");let{state:f,dispatch:v,registerTrigger:p,popupId:m}=d,{getRootProps:g,rootRef:h,active:b}=(0,c.U)({disabled:t,focusableWhenDisabled:r,rootRef:n}),x=(0,i.Z)(h,p),y=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultMuiPrevented||v({type:s.Q.toggle,event:t})},S=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented||"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),v({type:s.Q.open,event:t}))},Z=(e={})=>({onClick:y(e),onKeyDown:S(e)});return{active:b,getRootProps:(e={})=>{let t=(0,u.f)(g,Z);return(0,o.Z)({},t(e),{"aria-haspopup":"menu","aria-expanded":f.open,"aria-controls":m,ref:x})},open:f.open,rootRef:x}}({rootRef:t,disabled:A}),q=null!=D?D:(0,Z.jsx)(h.Z,(0,o.Z)({},"context"!==W&&{color:W},{thickness:{sm:2,md:3,lg:4}[V]||3})),U=(0,o.Z)({},d,{active:J,color:W,disabled:A,open:F,size:V,variant:H}),X=z(U),G=(0,o.Z)({},$,{component:p,slots:M,slotProps:B}),[K,Y]=(0,g.Z)("root",{elementType:w,getSlotProps:_,externalForwardedProps:G,ref:t,ownerState:U,className:X.root}),[Q,ee]=(0,g.Z)("startDecorator",{className:X.startDecorator,elementType:C,externalForwardedProps:G,ownerState:U}),[et,er]=(0,g.Z)("endDecorator",{className:X.endDecorator,elementType:I,externalForwardedProps:G,ownerState:U}),[en,eo]=(0,g.Z)("loadingIndicatorCenter",{className:X.loadingIndicatorCenter,elementType:R,externalForwardedProps:G,ownerState:U});return(0,Z.jsxs)(K,(0,o.Z)({},Y,{children:[(O||P&&"start"===L)&&(0,Z.jsx)(Q,(0,o.Z)({},ee,{children:P&&"start"===L?q:O})),f,P&&"center"===L&&(0,Z.jsx)(en,(0,o.Z)({},eo,{children:q})),(x||P&&"end"===L)&&(0,Z.jsx)(et,(0,o.Z)({},er,{children:P&&"end"===L?q:x}))]}))});var L=P},7203:function(e,t,r){r.d(t,{Z:function(){return B}});var n=r(87462),o=r(63366),a=r(67294),i=r(62908),l=r(58510),s=r(89326),c=r(22760),u=r(70758),d=r(43069),f=r(51633),v=r(85241),p=r(2900),m=r(14072);function g(e){return`menu-item-${e.size}`}let h={dispatch:()=>{},popupId:"",registerPopup:()=>{},registerTrigger:()=>{},state:{open:!0},triggerElement:null};var b=r(39984),x=r(74312),y=r(20407),S=r(2226),Z=r(55907),k=r(26821);function z(e){return(0,k.d6)("MuiMenuItem",e)}(0,k.sI)("MuiMenuItem",["root","focusVisible","disabled","selected","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]);var w=r(40780);let C=a.createContext("horizontal");var I=r(30220),R=r(85893);let P=["children","disabled","component","selected","color","orientation","variant","slots","slotProps"],L=e=>{let{focusVisible:t,disabled:r,selected:n,color:o,variant:a}=e,s={root:["root",t&&"focusVisible",r&&"disabled",n&&"selected",o&&`color${(0,i.Z)(o)}`,a&&`variant${(0,i.Z)(a)}`]},c=(0,l.Z)(s,z,{});return c},D=(0,x.Z)(b.r,{name:"JoyMenuItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),T=a.forwardRef(function(e,t){let r=(0,y.Z)({props:e,name:"JoyMenuItem"}),i=a.useContext(w.Z),{children:l,disabled:b=!1,component:x="li",selected:k=!1,color:z="neutral",orientation:T="horizontal",variant:B="plain",slots:M={},slotProps:O={}}=r,E=(0,o.Z)(r,P),{variant:$=B,color:j=z}=(0,Z.yP)(e.variant,e.color),{getColor:H}=(0,S.VT)($),V=H(e.color,j),{getRootProps:N,disabled:W,focusVisible:A}=function(e){var t;let{disabled:r=!1,id:o,rootRef:i,label:l}=e,b=(0,s.Z)(o),x=a.useRef(null),y=a.useMemo(()=>({disabled:r,id:null!=b?b:"",label:l,ref:x}),[r,b,l]),{dispatch:S}=null!=(t=a.useContext(v.D))?t:h,{getRootProps:Z,highlighted:k,rootRef:z}=(0,d.J)({item:b}),{index:w,totalItemCount:C}=(0,m.B)(null!=b?b:g,y),{getRootProps:I,focusVisible:R,rootRef:P}=(0,u.U)({disabled:r,focusableWhenDisabled:!0}),L=(0,c.Z)(z,P,i,x);a.useDebugValue({id:b,highlighted:k,disabled:r,label:l});let D=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultMuiPrevented||S({type:f.Q.close,event:t})},T=(e={})=>(0,n.Z)({},e,{onClick:D(e)});function B(e={}){let t=(0,p.f)(T,(0,p.f)(I,Z));return(0,n.Z)({},t(e),{ref:L,role:"menuitem"})}return void 0===b?{getRootProps:B,disabled:!1,focusVisible:R,highlighted:!1,index:-1,totalItemCount:0,rootRef:L}:{getRootProps:B,disabled:r,focusVisible:R,highlighted:k,index:w,totalItemCount:C,rootRef:L}}({disabled:b,rootRef:t}),_=(0,n.Z)({},r,{component:x,color:V,disabled:W,focusVisible:A,orientation:T,selected:k,row:i,variant:$}),F=L(_),J=(0,n.Z)({},E,{component:x,slots:M,slotProps:O}),[q,U]=(0,I.Z)("root",{ref:t,elementType:D,getSlotProps:N,externalForwardedProps:J,className:F.root,ownerState:_});return(0,R.jsx)(C.Provider,{value:T,children:(0,R.jsx)(q,(0,n.Z)({},U,{children:l}))})});var B=T},57814:function(e,t,r){r.d(t,{Z:function(){return C}});var n=r(87462),o=r(63366),a=r(67294),i=r(58510),l=r(89326),s=r(22760),c=r(43069),u=r(14072),d=r(30220),f=r(39984),v=r(74312),p=r(20407),m=r(2226),g=r(55907),h=r(26821);function b(e){return(0,h.d6)("MuiOption",e)}let x=(0,h.sI)("MuiOption",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","highlighted","variantPlain","variantSoft","variantOutlined","variantSolid"]);var y=r(40780),S=r(85893);let Z=["component","children","disabled","value","label","variant","color","slots","slotProps"],k=e=>{let{disabled:t,highlighted:r,selected:n}=e;return(0,i.Z)({root:["root",t&&"disabled",r&&"highlighted",n&&"selected"]},b,{})},z=(0,v.Z)(f.r,{name:"JoyOption",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;let n=null==(r=e.variants[`${t.variant}Hover`])?void 0:r[t.color];return{[`&.${x.highlighted}:not([aria-selected="true"])`]:{backgroundColor:null==n?void 0:n.backgroundColor}}}),w=a.forwardRef(function(e,t){var r;let i=(0,p.Z)({props:e,name:"JoyOption"}),{component:f="li",children:v,disabled:h=!1,value:b,label:x,variant:w="plain",color:C="neutral",slots:I={},slotProps:R={}}=i,P=(0,o.Z)(i,Z),L=a.useContext(y.Z),{variant:D=w,color:T=C}=(0,g.yP)(e.variant,e.color),B=a.useRef(null),M=(0,s.Z)(B,t),O=null!=x?x:"string"==typeof v?v:null==(r=B.current)?void 0:r.innerText,{getRootProps:E,selected:$,highlighted:j,index:H}=function(e){let{value:t,label:r,disabled:o,rootRef:i,id:d}=e,{getRootProps:f,rootRef:v,highlighted:p,selected:m}=(0,c.J)({item:t}),g=(0,l.Z)(d),h=a.useRef(null),b=a.useMemo(()=>({disabled:o,label:r,value:t,ref:h,id:g}),[o,r,t,g]),{index:x}=(0,u.B)(t,b),y=(0,s.Z)(i,h,v);return{getRootProps:(e={})=>(0,n.Z)({},e,f(e),{id:g,ref:y,role:"option","aria-selected":m}),highlighted:p,index:x,selected:m,rootRef:y}}({disabled:h,label:O,value:b,rootRef:M}),{getColor:V}=(0,m.VT)(D),N=V(e.color,T),W=(0,n.Z)({},i,{disabled:h,selected:$,highlighted:j,index:H,component:f,variant:D,color:N,row:L}),A=k(W),_=(0,n.Z)({},P,{component:f,slots:I,slotProps:R}),[F,J]=(0,d.Z)("root",{ref:t,getSlotProps:E,elementType:z,externalForwardedProps:_,className:A.root,ownerState:W});return(0,S.jsx)(F,(0,n.Z)({},J,{children:v}))});var C=w},99056:function(e,t,r){r.d(t,{Z:function(){return el}});var n,o=r(63366),a=r(87462),i=r(67294),l=r(90512),s=r(62908),c=r(22760),u=r(53406),d=r(89326),f=r(54895),v=r(70758);let p={buttonClick:"buttonClick"};var m=r(96592);let g=e=>{let{label:t,value:r}=e;return"string"==typeof t?t:"string"==typeof r?r:String(e)};var h=r(12247),b=r(7333),x=r(22644);function y(e,t){var r,n,o;let{open:i}=e,{context:{selectionMode:l}}=t;if(t.type===p.buttonClick){let n=null!=(r=e.selectedValues[0])?r:(0,b.Rl)(null,"start",t.context);return(0,a.Z)({},e,{open:!i,highlightedValue:i?null:n})}let s=(0,b.R$)(e,t);switch(t.type){case x.F.keyDown:if(e.open){if("Escape"===t.event.key||"single"===l&&("Enter"===t.event.key||" "===t.event.key))return(0,a.Z)({},s,{open:!1})}else{if("Enter"===t.event.key||" "===t.event.key||"ArrowDown"===t.event.key)return(0,a.Z)({},e,{open:!0,highlightedValue:null!=(n=e.selectedValues[0])?n:(0,b.Rl)(null,"start",t.context)});if("ArrowUp"===t.event.key)return(0,a.Z)({},e,{open:!0,highlightedValue:null!=(o=e.selectedValues[0])?o:(0,b.Rl)(null,"end",t.context)})}break;case x.F.itemClick:if("single"===l)return(0,a.Z)({},s,{open:!1});break;case x.F.blur:return(0,a.Z)({},s,{open:!1})}return s}var S=r(2900);let Z={clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",height:"1px",width:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",left:"50%",bottom:0},k=()=>{};function z(e){return Array.isArray(e)?0===e.length?"":JSON.stringify(e.map(e=>e.value)):(null==e?void 0:e.value)==null?"":"string"==typeof e.value||"number"==typeof e.value?e.value:JSON.stringify(e.value)}function w(e){e.preventDefault()}var C=r(26558),I=r(85893);function R(e){let{value:t,children:r}=e,{dispatch:n,getItemIndex:o,getItemState:a,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s,registerItem:c,totalSubitemCount:u}=t,d=i.useMemo(()=>({dispatch:n,getItemState:a,getItemIndex:o,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s}),[n,o,a,l,s]),f=i.useMemo(()=>({getItemIndex:o,registerItem:c,totalSubitemCount:u}),[c,o,u]);return(0,I.jsx)(h.s.Provider,{value:f,children:(0,I.jsx)(C.Z.Provider,{value:d,children:r})})}var P=r(58510),L=r(50984),D=r(3419),T=r(43614),B=r(74312),M=r(20407),O=r(30220),E=r(26821);function $(e){return(0,E.d6)("MuiSvgIcon",e)}(0,E.sI)("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);let j=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],H=e=>{let{color:t,size:r,fontSize:n}=e,o={root:["root",t&&"inherit"!==t&&`color${(0,s.Z)(t)}`,r&&`size${(0,s.Z)(r)}`,n&&`fontSize${(0,s.Z)(n)}`]};return(0,P.Z)(o,$,{})},V={sm:"xl",md:"xl2",lg:"xl3"},N=(0,B.Z)("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;return(0,a.Z)({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[V[t.instanceSize]]},t.instanceFontSize&&"inherit"!==t.instanceFontSize&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[V[t.size]]||"unset"})`},t.fontSize&&"inherit"!==t.fontSize&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&(0,a.Z)({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"context"!==t.color&&e.vars.palette[t.color]&&{color:`rgba(${null==(r=e.vars.palette[t.color])?void 0:r.mainChannel} / 1)`}))}),W=i.forwardRef(function(e,t){let r=(0,M.Z)({props:e,name:"JoySvgIcon"}),{children:n,className:s,color:c,component:u="svg",fontSize:d,htmlColor:f,inheritViewBox:v=!1,titleAccess:p,viewBox:m="0 0 24 24",size:g="md",slots:h={},slotProps:b={}}=r,x=(0,o.Z)(r,j),y=i.isValidElement(n)&&"svg"===n.type,S=(0,a.Z)({},r,{color:c,component:u,size:g,instanceSize:e.size,fontSize:d,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:m,hasSvgAsChild:y}),Z=H(S),k=(0,a.Z)({},x,{component:u,slots:h,slotProps:b}),[z,w]=(0,O.Z)("root",{ref:t,className:(0,l.Z)(Z.root,s),elementType:N,externalForwardedProps:k,ownerState:S,additionalProps:(0,a.Z)({color:f,focusable:!1},p&&{role:"img"},!p&&{"aria-hidden":!0},!v&&{viewBox:m},y&&n.props)});return(0,I.jsxs)(z,(0,a.Z)({},w,{children:[y?n.props.children:n,p?(0,I.jsx)("title",{children:p}):null]}))});var A=function(e,t){function r(r,n){return(0,I.jsx)(W,(0,a.Z)({"data-testid":`${t}Icon`,ref:n},r,{children:e}))}return r.muiName=W.muiName,i.memo(i.forwardRef(r))}((0,I.jsx)("path",{d:"m12 5.83 2.46 2.46c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 3.7a.9959.9959 0 0 0-1.41 0L8.12 6.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 5.83zm0 12.34-2.46-2.46a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l3.17 3.18c.39.39 1.02.39 1.41 0l3.17-3.17c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L12 18.17z"}),"Unfold"),_=r(2226),F=r(58859);function J(e){return(0,E.d6)("MuiSelect",e)}let q=(0,E.sI)("MuiSelect",["root","button","indicator","startDecorator","endDecorator","popper","listbox","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","focusVisible","disabled","expanded"]);var U=r(76043),X=r(55907);let G=["action","autoFocus","children","defaultValue","defaultListboxOpen","disabled","getSerializedValue","placeholder","listboxId","listboxOpen","onChange","onListboxOpenChange","onClose","renderValue","required","value","size","variant","color","startDecorator","endDecorator","indicator","aria-describedby","aria-label","aria-labelledby","id","name","slots","slotProps"];function K(e){var t;return null!=(t=null==e?void 0:e.label)?t:""}let Y=[{name:"offset",options:{offset:[0,4]}},{name:"equalWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`}}],Q=e=>{let{color:t,disabled:r,focusVisible:n,size:o,variant:a,open:i}=e,l={root:["root",r&&"disabled",n&&"focusVisible",i&&"expanded",a&&`variant${(0,s.Z)(a)}`,t&&`color${(0,s.Z)(t)}`,o&&`size${(0,s.Z)(o)}`],button:["button"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],indicator:["indicator",i&&"expanded"],listbox:["listbox",i&&"expanded",r&&"disabled"]};return(0,P.Z)(l,J,{})},ee=(0,B.Z)("div",{name:"JoySelect",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n,o,i;let l=null==(r=e.variants[`${t.variant}`])?void 0:r[t.color],{borderRadius:s}=(0,F.V)({theme:e,ownerState:t},["borderRadius"]);return[(0,a.Z)({"--Select-radius":e.vars.radius.sm,"--Select-gap":"0.5rem","--Select-placeholderOpacity":.64,"--Select-decoratorColor":e.vars.palette.text.icon,"--Select-focusedThickness":e.vars.focus.thickness},"context"===t.color?{"--Select-focusedHighlight":e.vars.palette.focusVisible}:{"--Select-focusedHighlight":null==(n=e.vars.palette["neutral"===t.color?"primary":t.color])?void 0:n[500]},{"--Select-indicatorColor":null!=l&&l.backgroundColor?null==l?void 0:l.color:e.vars.palette.text.tertiary},"sm"===t.size&&{"--Select-minHeight":"2rem","--Select-paddingInline":"0.5rem","--Select-decoratorChildHeight":"min(1.5rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},"md"===t.size&&{"--Select-minHeight":"2.5rem","--Select-paddingInline":"0.75rem","--Select-decoratorChildHeight":"min(2rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},"lg"===t.size&&{"--Select-minHeight":"3rem","--Select-paddingInline":"1rem","--Select-decoratorChildHeight":"min(2.375rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Select-decoratorChildOffset":"min(calc(var(--Select-paddingInline) - (var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2), var(--Select-paddingInline))","--_Select-paddingBlock":"max((var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2, 0px)","--Select-decoratorChildRadius":"max(var(--Select-radius) - var(--variant-borderWidth, 0px) - var(--_Select-paddingBlock), min(var(--_Select-paddingBlock) + var(--variant-borderWidth, 0px), var(--Select-radius) / 2))","--Button-minHeight":"var(--Select-decoratorChildHeight)","--IconButton-size":"var(--Select-decoratorChildHeight)","--Button-radius":"var(--Select-decoratorChildRadius)","--IconButton-radius":"var(--Select-decoratorChildRadius)",boxSizing:"border-box"},"plain"!==t.variant&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Select-minHeight)",position:"relative",display:"flex",alignItems:"center",borderRadius:"var(--Select-radius)",cursor:"pointer"},!(null!=l&&l.backgroundColor)&&{backgroundColor:e.vars.palette.background.surface},t.size&&{paddingBlock:({sm:2,md:3,lg:4})[t.size]},{paddingInline:"var(--Select-paddingInline)"},e.typography[`body-${t.size}`],l,{"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)"},[`&.${q.focusVisible}`]:{"--Select-indicatorColor":null==l?void 0:l.color,"&::before":{boxShadow:"inset 0 0 0 var(--Select-focusedThickness) var(--Select-focusedHighlight)"}},[`&.${q.disabled}`]:{"--Select-indicatorColor":"inherit"}}),{"&:hover":null==(o=e.variants[`${t.variant}Hover`])?void 0:o[t.color],[`&.${q.disabled}`]:null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]},void 0!==s&&{"--Select-radius":s}]}),et=(0,B.Z)("button",{name:"JoySelect",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>(0,a.Z)({border:0,outline:0,background:"none",padding:0,fontSize:"inherit",color:"inherit",alignSelf:"stretch",display:"flex",alignItems:"center",flex:1,fontFamily:"inherit",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden"},(null===e.value||void 0===e.value)&&{opacity:"var(--Select-placeholderOpacity)"},{"&::before":{content:'""',display:"block",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",borderRadius:"var(--Select-radius)"}})),er=(0,B.Z)(L.C,{name:"JoySelect",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e,ownerState:t})=>{var r;let n="context"===t.color?void 0:null==(r=e.variants[t.variant])?void 0:r[t.color];return(0,a.Z)({"--focus-outline-offset":`calc(${e.vars.focus.thickness} * -1)`,"--ListItem-stickyBackground":(null==n?void 0:n.backgroundColor)||(null==n?void 0:n.background)||e.vars.palette.background.popup,"--ListItem-stickyTop":"calc(var(--List-padding, var(--ListDivider-gap)) * -1)"},D.M,{minWidth:"max-content",maxHeight:"44vh",overflow:"auto",outline:0,boxShadow:e.shadow.md,borderRadius:`var(--List-radius, ${e.vars.radius.sm})`,zIndex:`var(--unstable_popup-zIndex, ${e.vars.zIndex.popup})`},!(null!=n&&n.backgroundColor)&&{backgroundColor:e.vars.palette.background.popup})}),en=(0,B.Z)("span",{name:"JoySelect",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Button-margin":"0 0 0 calc(var(--Select-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Select-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Select-paddingInline) / -4)",display:"inherit",alignItems:"center",color:"var(--Select-decoratorColor)",marginInlineEnd:"var(--Select-gap)"}),eo=(0,B.Z)("span",{name:"JoySelect",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Button-margin":"0 calc(var(--Select-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Select-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Select-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",color:"var(--Select-decoratorColor)",marginInlineStart:"var(--Select-gap)"}),ea=(0,B.Z)("span",{name:"JoySelect",slot:"Indicator"})(({ownerState:e,theme:t})=>(0,a.Z)({},"sm"===e.size&&{"--Icon-fontSize":t.vars.fontSize.lg},"md"===e.size&&{"--Icon-fontSize":t.vars.fontSize.xl},"lg"===e.size&&{"--Icon-fontSize":t.vars.fontSize.xl2},{"--Icon-color":"neutral"!==e.color||"solid"===e.variant?"currentColor":t.vars.palette.text.icon,display:"inherit",alignItems:"center",marginInlineStart:"var(--Select-gap)",marginInlineEnd:"calc(var(--Select-paddingInline) / -4)",[`.${q.endDecorator} + &`]:{marginInlineStart:"calc(var(--Select-gap) / 2)"},[`&.${q.expanded}, .${q.disabled} > &`]:{"--Icon-color":"currentColor"}})),ei=i.forwardRef(function(e,t){var r,s,b,x,C,P,L;let B=(0,M.Z)({props:e,name:"JoySelect"}),{action:E,autoFocus:$,children:j,defaultValue:H,defaultListboxOpen:V=!1,disabled:N,getSerializedValue:W,placeholder:F,listboxId:J,listboxOpen:ei,onChange:el,onListboxOpenChange:es,onClose:ec,renderValue:eu,required:ed=!1,value:ef,size:ev="md",variant:ep="outlined",color:em="neutral",startDecorator:eg,endDecorator:eh,indicator:eb=n||(n=(0,I.jsx)(A,{})),"aria-describedby":ex,"aria-label":ey,"aria-labelledby":eS,id:eZ,name:ek,slots:ez={},slotProps:ew={}}=B,eC=(0,o.Z)(B,G),eI=i.useContext(U.Z),eR=null!=(r=null!=(s=e.disabled)?s:null==eI?void 0:eI.disabled)?r:N,eP=null!=(b=null!=(x=e.size)?x:null==eI?void 0:eI.size)?b:ev,{getColor:eL}=(0,_.VT)(ep),eD=eL(e.color,null!=eI&&eI.error?"danger":null!=(C=null==eI?void 0:eI.color)?C:em),eT=null!=eu?eu:K,[eB,eM]=i.useState(null),eO=i.useRef(null),eE=i.useRef(null),e$=i.useRef(null),ej=(0,c.Z)(t,eO);i.useImperativeHandle(E,()=>({focusVisible:()=>{var e;null==(e=eE.current)||e.focus()}}),[]),i.useEffect(()=>{eM(eO.current)},[]),i.useEffect(()=>{$&&eE.current.focus()},[$]);let eH=i.useCallback(e=>{null==es||es(e),e||null==ec||ec()},[ec,es]),{buttonActive:eV,buttonFocusVisible:eN,contextValue:eW,disabled:eA,getButtonProps:e_,getListboxProps:eF,getHiddenInputProps:eJ,getOptionMetadata:eq,open:eU,value:eX}=function(e){let t,r,n;let{areOptionsEqual:o,buttonRef:l,defaultOpen:s=!1,defaultValue:u,disabled:b=!1,listboxId:x,listboxRef:C,multiple:I=!1,name:R,required:P,onChange:L,onHighlightChange:D,onOpenChange:T,open:B,options:M,getOptionAsString:O=g,getSerializedValue:E=z,value:$}=e,j=i.useRef(null),H=(0,c.Z)(l,j),V=i.useRef(null),N=(0,d.Z)(x);void 0===$&&void 0===u?t=[]:void 0!==u&&(t=I?u:null==u?[]:[u]);let W=i.useMemo(()=>{if(void 0!==$)return I?$:null==$?[]:[$]},[$,I]),{subitems:A,contextValue:_}=(0,h.Y)(),F=i.useMemo(()=>null!=M?new Map(M.map((e,t)=>[e.value,{value:e.value,label:e.label,disabled:e.disabled,ref:i.createRef(),id:`${N}_${t}`}])):A,[M,A,N]),J=(0,c.Z)(C,V),{getRootProps:q,active:U,focusVisible:X,rootRef:G}=(0,v.U)({disabled:b,rootRef:H}),K=i.useMemo(()=>Array.from(F.keys()),[F]),Y=i.useCallback(e=>{if(void 0!==o){let t=K.find(t=>o(t,e));return F.get(t)}return F.get(e)},[F,o,K]),Q=i.useCallback(e=>{var t;let r=Y(e);return null!=(t=null==r?void 0:r.disabled)&&t},[Y]),ee=i.useCallback(e=>{let t=Y(e);return t?O(t):""},[Y,O]),et=i.useMemo(()=>({selectedValues:W,open:B}),[W,B]),er=i.useCallback(e=>{var t;return null==(t=F.get(e))?void 0:t.id},[F]),en=i.useCallback((e,t)=>{if(I)null==L||L(e,t);else{var r;null==L||L(e,null!=(r=t[0])?r:null)}},[I,L]),eo=i.useCallback((e,t)=>{null==D||D(e,null!=t?t:null)},[D]),ea=i.useCallback((e,t,r)=>{if("open"===t&&(null==T||T(r),!1===r&&(null==e?void 0:e.type)!=="blur")){var n;null==(n=j.current)||n.focus()}},[T]),ei={getInitialState:()=>{var e;return{highlightedValue:null,selectedValues:null!=(e=t)?e:[],open:s}},getItemId:er,controlledProps:et,itemComparer:o,isItemDisabled:Q,rootRef:G,onChange:en,onHighlightChange:eo,onStateChange:ea,reducerActionContext:i.useMemo(()=>({multiple:I}),[I]),items:K,getItemAsString:ee,selectionMode:I?"multiple":"single",stateReducer:y},{dispatch:el,getRootProps:es,contextValue:ec,state:{open:eu,highlightedValue:ed,selectedValues:ef},rootRef:ev}=(0,m.s)(ei),ep=e=>t=>{var r;if(null==e||null==(r=e.onMouseDown)||r.call(e,t),!t.defaultMuiPrevented){let e={type:p.buttonClick,event:t};el(e)}};(0,f.Z)(()=>{if(null!=ed){var e;let t=null==(e=Y(ed))?void 0:e.ref;if(!V.current||!(null!=t&&t.current))return;let r=V.current.getBoundingClientRect(),n=t.current.getBoundingClientRect();n.topr.bottom&&(V.current.scrollTop+=n.bottom-r.bottom)}},[ed,Y]);let em=i.useCallback(e=>Y(e),[Y]),eg=(e={})=>(0,a.Z)({},e,{onMouseDown:ep(e),ref:ev,role:"combobox","aria-expanded":eu,"aria-controls":N});i.useDebugValue({selectedOptions:ef,highlightedOption:ed,open:eu});let eh=i.useMemo(()=>(0,a.Z)({},ec,_),[ec,_]);if(r=e.multiple?ef:ef.length>0?ef[0]:null,I)n=r.map(e=>em(e)).filter(e=>void 0!==e);else{var eb;n=null!=(eb=em(r))?eb:null}return{buttonActive:U,buttonFocusVisible:X,buttonRef:G,contextValue:eh,disabled:b,dispatch:el,getButtonProps:(e={})=>{let t=(0,S.f)(q,es),r=(0,S.f)(t,eg);return r(e)},getHiddenInputProps:(e={})=>(0,a.Z)({name:R,tabIndex:-1,"aria-hidden":!0,required:!!P||void 0,value:E(n),onChange:k,style:Z},e),getListboxProps:(e={})=>(0,a.Z)({},e,{id:N,role:"listbox","aria-multiselectable":I?"true":void 0,ref:J,onMouseDown:w}),getOptionMetadata:em,listboxRef:ev,open:eu,options:K,value:r,highlightedOption:ed}}({buttonRef:eE,defaultOpen:V,defaultValue:H,disabled:eR,getSerializedValue:W,listboxId:J,multiple:!1,name:ek,required:ed,onChange:el,onOpenChange:eH,open:ei,value:ef}),eG=(0,a.Z)({},B,{active:eV,defaultListboxOpen:V,disabled:eA,focusVisible:eN,open:eU,renderValue:eT,value:eX,size:eP,variant:ep,color:eD}),eK=Q(eG),eY=(0,a.Z)({},eC,{slots:ez,slotProps:ew}),eQ=i.useMemo(()=>{var e;return null!=(e=eq(eX))?e:null},[eq,eX]),[e0,e1]=(0,O.Z)("root",{ref:ej,className:eK.root,elementType:ee,externalForwardedProps:eY,ownerState:eG}),[e2,e6]=(0,O.Z)("button",{additionalProps:{"aria-describedby":null!=ex?ex:null==eI?void 0:eI["aria-describedby"],"aria-label":ey,"aria-labelledby":null!=eS?eS:null==eI?void 0:eI.labelId,"aria-required":ed?"true":void 0,id:null!=eZ?eZ:null==eI?void 0:eI.htmlFor,name:ek},className:eK.button,elementType:et,externalForwardedProps:eY,getSlotProps:e_,ownerState:eG}),[e4,e3]=(0,O.Z)("listbox",{additionalProps:{ref:e$,anchorEl:eB,open:eU,placement:"bottom",keepMounted:!0},className:eK.listbox,elementType:er,externalForwardedProps:eY,getSlotProps:eF,ownerState:(0,a.Z)({},eG,{nesting:!1,row:!1,wrap:!1}),getSlotOwnerState:e=>({size:e.size||eP,variant:e.variant||ep,color:e.color||(e.disablePortal?eD:em),disableColorInversion:!e.disablePortal})}),[e8,e5]=(0,O.Z)("startDecorator",{className:eK.startDecorator,elementType:en,externalForwardedProps:eY,ownerState:eG}),[e9,e7]=(0,O.Z)("endDecorator",{className:eK.endDecorator,elementType:eo,externalForwardedProps:eY,ownerState:eG}),[te,tt]=(0,O.Z)("indicator",{className:eK.indicator,elementType:ea,externalForwardedProps:eY,ownerState:eG}),tr=i.useMemo(()=>[...Y,...e3.modifiers||[]],[e3.modifiers]),tn=null;return eB&&(tn=(0,I.jsx)(e4,(0,a.Z)({},e3,{className:(0,l.Z)(e3.className,(null==(P=e3.ownerState)?void 0:P.color)==="context"&&q.colorContext),modifiers:tr},!(null!=(L=B.slots)&&L.listbox)&&{as:u.r,slots:{root:e3.as||"ul"}},{children:(0,I.jsx)(R,{value:eW,children:(0,I.jsx)(X.Yb,{variant:ep,color:em,children:(0,I.jsx)(T.Z.Provider,{value:"select",children:(0,I.jsx)(D.Z,{nested:!0,children:j})})})})})),e3.disablePortal||(tn=(0,I.jsx)(_.ZP.Provider,{value:void 0,children:tn}))),(0,I.jsxs)(i.Fragment,{children:[(0,I.jsxs)(e0,(0,a.Z)({},e1,{children:[eg&&(0,I.jsx)(e8,(0,a.Z)({},e5,{children:eg})),(0,I.jsx)(e2,(0,a.Z)({},e6,{children:eQ?eT(eQ):F})),eh&&(0,I.jsx)(e9,(0,a.Z)({},e7,{children:eh})),eb&&(0,I.jsx)(te,(0,a.Z)({},tt,{children:eb})),(0,I.jsx)("input",(0,a.Z)({},eJ()))]})),tn]})});var el=ei},3414:function(e,t,r){r.d(t,{Z:function(){return Z}});var n=r(63366),o=r(87462),a=r(67294),i=r(90512),l=r(58510),s=r(62908),c=r(54844),u=r(20407),d=r(74312),f=r(58859),v=r(26821);function p(e){return(0,v.d6)("MuiSheet",e)}(0,v.sI)("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=r(2226),g=r(30220),h=r(85893);let b=["className","color","component","variant","invertedColors","slots","slotProps"],x=e=>{let{variant:t,color:r}=e,n={root:["root",t&&`variant${(0,s.Z)(t)}`,r&&`color${(0,s.Z)(r)}`]};return(0,l.Z)(n,p,{})},y=(0,d.Z)("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n;let a=null==(r=e.variants[t.variant])?void 0:r[t.color],{borderRadius:i,bgcolor:l,backgroundColor:s,background:u}=(0,f.V)({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),d=(0,c.DW)(e,`palette.${l}`)||l||(0,c.DW)(e,`palette.${s}`)||s||u||(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background)||e.vars.palette.background.surface;return[(0,o.Z)({"--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":"transparent"===d?"initial":d,"--Sheet-background":"transparent"===d?"initial":d},void 0!==i&&{"--List-radius":`calc(${i} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${i} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),(0,o.Z)({},e.typography["body-md"],a),"context"!==t.color&&t.invertedColors&&(null==(n=e.colorInversion[t.variant])?void 0:n[t.color])]}),S=a.forwardRef(function(e,t){let r=(0,u.Z)({props:e,name:"JoySheet"}),{className:a,color:l="neutral",component:s="div",variant:c="plain",invertedColors:d=!1,slots:f={},slotProps:v={}}=r,p=(0,n.Z)(r,b),{getColor:S}=(0,m.VT)(c),Z=S(e.color,l),k=(0,o.Z)({},r,{color:Z,component:s,invertedColors:d,variant:c}),z=x(k),w=(0,o.Z)({},p,{component:s,slots:f,slotProps:v}),[C,I]=(0,g.Z)("root",{ref:t,className:(0,i.Z)(z.root,a),elementType:y,externalForwardedProps:w,ownerState:k}),R=(0,h.jsx)(C,(0,o.Z)({},I));return d?(0,h.jsx)(m.do,{variant:c,children:R}):R});var Z=S},64415:function(e,t,r){let n;r.d(t,{Z:function(){return X}});var o=r(63366),a=r(87462),i=r(67294),l=r(90512),s=r(62908),c=r(58510),u=r(36425),d=r(11136),f=r(22760),v=r(54895),p=function(e){let t=i.useRef(e);return(0,v.Z)(()=>{t.current=e}),i.useRef((...e)=>(0,t.current)(...e)).current},m={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},g=r(6414);function h(e,t){return e-t}function b(e,t,r){return null==e?t:Math.min(Math.max(t,e),r)}function x(e,t){var r;let{index:n}=null!=(r=e.reduce((e,r,n)=>{let o=Math.abs(t-r);return null===e||o({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},w=e=>e;function C(){return void 0===n&&(n="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),n}var I=r(28442),R=r(74312),P=r(20407),L=r(2226),D=r(30220),T=r(26821);function B(e){return(0,T.d6)("MuiSlider",e)}let M=(0,T.sI)("MuiSlider",["root","disabled","dragging","focusVisible","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","thumb","thumbStart","thumbEnd","valueLabel","valueLabelOpen","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","disabled","sizeSm","sizeMd","sizeLg","input"]);var O=r(85893);let E=["aria-label","aria-valuetext","className","classes","disableSwap","disabled","defaultValue","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","tabIndex","track","value","valueLabelDisplay","valueLabelFormat","isRtl","color","size","variant","component","slots","slotProps"];function $(e){return e}let j=e=>{let{disabled:t,dragging:r,marked:n,orientation:o,track:a,variant:i,color:l,size:u}=e,d={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===o&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",i&&`variant${(0,s.Z)(i)}`,l&&`color${(0,s.Z)(l)}`,u&&`size${(0,s.Z)(u)}`],rail:["rail"],track:["track"],thumb:["thumb",t&&"disabled"],input:["input"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],valueLabelOpen:["valueLabelOpen"],active:["active"],focusVisible:["focusVisible"]};return(0,c.Z)(d,B,{})},H=({theme:e,ownerState:t})=>(r={})=>{var n,o;let i=(null==(n=e.variants[`${t.variant}${r.state||""}`])?void 0:n[t.color])||{};return(0,a.Z)({},!r.state&&{"--variant-borderWidth":null!=(o=i["--variant-borderWidth"])?o:"0px"},{"--Slider-trackColor":i.color,"--Slider-thumbBackground":i.color,"--Slider-thumbColor":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBackground":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBorderColor":i.borderColor,"--Slider-railBackground":e.vars.palette.background.level2})},V=(0,R.Z)("span",{name:"JoySlider",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let r=H({theme:e,ownerState:t});return[(0,a.Z)({"--Slider-size":"max(42px, max(var(--Slider-thumbSize), var(--Slider-trackSize)))","--Slider-trackRadius":"var(--Slider-size)","--Slider-markBackground":e.vars.palette.text.tertiary,[`& .${M.markActive}`]:{"--Slider-markBackground":"var(--Slider-trackColor)"}},"sm"===t.size&&{"--Slider-markSize":"2px","--Slider-trackSize":"4px","--Slider-thumbSize":"14px","--Slider-valueLabelArrowSize":"6px"},"md"===t.size&&{"--Slider-markSize":"2px","--Slider-trackSize":"6px","--Slider-thumbSize":"18px","--Slider-valueLabelArrowSize":"8px"},"lg"===t.size&&{"--Slider-markSize":"3px","--Slider-trackSize":"8px","--Slider-thumbSize":"24px","--Slider-valueLabelArrowSize":"10px"},{"--Slider-thumbRadius":"calc(var(--Slider-thumbSize) / 2)","--Slider-thumbWidth":"var(--Slider-thumbSize)"},r(),{"&:hover":(0,a.Z)({},r({state:"Hover"})),"&:active":(0,a.Z)({},r({state:"Active"})),[`&.${M.disabled}`]:(0,a.Z)({pointerEvents:"none",color:e.vars.palette.text.tertiary},r({state:"Disabled"})),boxSizing:"border-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent"},"horizontal"===t.orientation&&{padding:"calc(var(--Slider-size) / 2) 0",width:"100%"},"vertical"===t.orientation&&{padding:"0 calc(var(--Slider-size) / 2)",height:"100%"},{"@media print":{colorAdjust:"exact"}})]}),N=(0,R.Z)("span",{name:"JoySlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>[(0,a.Z)({display:"block",position:"absolute",backgroundColor:"inverted"===e.track?"var(--Slider-trackBackground)":"var(--Slider-railBackground)",border:"inverted"===e.track?"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)":"initial",borderRadius:"var(--Slider-trackRadius)"},"horizontal"===e.orientation&&{height:"var(--Slider-trackSize)",top:"50%",left:0,right:0,transform:"translateY(-50%)"},"vertical"===e.orientation&&{width:"var(--Slider-trackSize)",top:0,bottom:0,left:"50%",transform:"translateX(-50%)"},"inverted"===e.track&&{opacity:1})]),W=(0,R.Z)("span",{name:"JoySlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({ownerState:e})=>[(0,a.Z)({display:"block",position:"absolute",color:"var(--Slider-trackColor)",border:"inverted"===e.track?"initial":"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",backgroundColor:"inverted"===e.track?"var(--Slider-railBackground)":"var(--Slider-trackBackground)"},"horizontal"===e.orientation&&{height:"var(--Slider-trackSize)",top:"50%",transform:"translateY(-50%)",borderRadius:"var(--Slider-trackRadius) 0 0 var(--Slider-trackRadius)"},"vertical"===e.orientation&&{width:"var(--Slider-trackSize)",left:"50%",transform:"translateX(-50%)",borderRadius:"0 0 var(--Slider-trackRadius) var(--Slider-trackRadius)"},!1===e.track&&{display:"none"})]),A=(0,R.Z)("span",{name:"JoySlider",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({ownerState:e,theme:t})=>{var r;return(0,a.Z)({position:"absolute",boxSizing:"border-box",outline:0,display:"flex",alignItems:"center",justifyContent:"center",width:"var(--Slider-thumbWidth)",height:"var(--Slider-thumbSize)",border:"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",borderRadius:"var(--Slider-thumbRadius)",boxShadow:"var(--Slider-thumbShadow)",color:"var(--Slider-thumbColor)",backgroundColor:"var(--Slider-thumbBackground)",[t.focus.selector]:(0,a.Z)({},t.focus.default,{outlineOffset:0,outlineWidth:"max(4px, var(--Slider-thumbSize) / 3.6)"},"context"!==e.color&&{outlineColor:`rgba(${null==(r=t.vars.palette)||null==(r=r[e.color])?void 0:r.mainChannel} / 0.32)`})},"horizontal"===e.orientation&&{top:"50%",transform:"translate(-50%, -50%)"},"vertical"===e.orientation&&{left:"50%",transform:"translate(-50%, 50%)"},{"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",background:"transparent",top:0,left:0,width:"100%",height:"100%",border:"2px solid",borderColor:"var(--Slider-thumbColor)",borderRadius:"inherit"}})}),_=(0,R.Z)("span",{name:"JoySlider",slot:"Mark",overridesResolver:(e,t)=>t.mark})(({ownerState:e})=>(0,a.Z)({position:"absolute",width:"var(--Slider-markSize)",height:"var(--Slider-markSize)",borderRadius:"var(--Slider-markSize)",backgroundColor:"var(--Slider-markBackground)"},"horizontal"===e.orientation&&(0,a.Z)({top:"50%",transform:"translate(calc(var(--Slider-markSize) / -2), -50%)"},0===e.percent&&{transform:"translate(min(var(--Slider-markSize), 3px), -50%)"},100===e.percent&&{transform:"translate(calc(var(--Slider-markSize) * -1 - min(var(--Slider-markSize), 3px)), -50%)"}),"vertical"===e.orientation&&(0,a.Z)({left:"50%",transform:"translate(-50%, calc(var(--Slider-markSize) / 2))"},0===e.percent&&{transform:"translate(-50%, calc(min(var(--Slider-markSize), 3px) * -1))"},100===e.percent&&{transform:"translate(-50%, calc(var(--Slider-markSize) * 1 + min(var(--Slider-markSize), 3px)))"}))),F=(0,R.Z)("span",{name:"JoySlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>(0,a.Z)({},"sm"===t.size&&{fontSize:e.fontSize.xs,lineHeight:e.lineHeight.md,paddingInline:"0.25rem",minWidth:"20px"},"md"===t.size&&{fontSize:e.fontSize.sm,lineHeight:e.lineHeight.md,paddingInline:"0.375rem",minWidth:"24px"},"lg"===t.size&&{fontSize:e.fontSize.md,lineHeight:e.lineHeight.md,paddingInline:"0.5rem",minWidth:"28px"},{zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,bottom:0,transformOrigin:"bottom center",transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(0)",position:"absolute",backgroundColor:e.vars.palette.background.tooltip,boxShadow:e.shadow.sm,borderRadius:e.vars.radius.xs,color:"#fff","&::before":{display:"var(--Slider-valueLabelArrowDisplay)",position:"absolute",content:'""',color:e.vars.palette.background.tooltip,bottom:0,border:"calc(var(--Slider-valueLabelArrowSize) / 2) solid",borderColor:"currentColor",borderRightColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",left:"50%",transform:"translate(-50%, 100%)",backgroundColor:"transparent"},[`&.${M.valueLabelOpen}`]:{transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(1)"}})),J=(0,R.Z)("span",{name:"JoySlider",slot:"MarkLabel",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t})=>(0,a.Z)({fontFamily:e.vars.fontFamily.body},"sm"===t.size&&{fontSize:e.vars.fontSize.xs},"md"===t.size&&{fontSize:e.vars.fontSize.sm},"lg"===t.size&&{fontSize:e.vars.fontSize.md},{color:e.palette.text.tertiary,position:"absolute",whiteSpace:"nowrap"},"horizontal"===t.orientation&&{top:"calc(50% + 4px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateX(-50%)"},"vertical"===t.orientation&&{left:"calc(50% + 8px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateY(50%)"})),q=(0,R.Z)("input",{name:"JoySlider",slot:"Input",overridesResolver:(e,t)=>t.input})({}),U=i.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"JoySlider"}),{"aria-label":n,"aria-valuetext":s,className:c,classes:g,disableSwap:R=!1,disabled:T=!1,defaultValue:B,getAriaLabel:M,getAriaValueText:H,marks:U=!1,max:X=100,min:G=0,orientation:K="horizontal",scale:Y=$,step:Q=1,track:ee="normal",valueLabelDisplay:et="off",valueLabelFormat:er=$,isRtl:en=!1,color:eo="primary",size:ea="md",variant:ei="solid",component:el,slots:es={},slotProps:ec={}}=r,eu=(0,o.Z)(r,E),{getColor:ed}=(0,L.VT)("solid"),ef=ed(e.color,eo),ev=(0,a.Z)({},r,{marks:U,classes:g,disabled:T,defaultValue:B,disableSwap:R,isRtl:en,max:X,min:G,orientation:K,scale:Y,step:Q,track:ee,valueLabelDisplay:et,valueLabelFormat:er,color:ef,size:ea,variant:ei}),{axisProps:ep,getRootProps:em,getHiddenInputProps:eg,getThumbProps:eh,open:eb,active:ex,axis:ey,focusedThumbIndex:eS,range:eZ,dragging:ek,marks:ez,values:ew,trackOffset:eC,trackLeap:eI,getThumbStyle:eR}=function(e){let{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:l=!1,marks:s=!1,max:c=100,min:g=0,name:I,onChange:R,onChangeCommitted:P,orientation:L="horizontal",rootRef:D,scale:T=w,step:B=1,tabIndex:M,value:O}=e,E=i.useRef(),[$,j]=i.useState(-1),[H,V]=i.useState(-1),[N,W]=i.useState(!1),A=i.useRef(0),[_,F]=function({controlled:e,default:t,name:r,state:n="value"}){let{current:o}=i.useRef(void 0!==e),[a,l]=i.useState(t),s=o?e:a,c=i.useCallback(e=>{o||l(e)},[]);return[s,c]}({controlled:O,default:null!=r?r:g,name:"Slider"}),J=R&&((e,t,r)=>{let n=e.nativeEvent||e,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:I}}),R(o,t,r)}),q=Array.isArray(_),U=q?_.slice().sort(h):[_];U=U.map(e=>b(e,g,c));let X=!0===s&&null!==B?[...Array(Math.floor((c-g)/B)+1)].map((e,t)=>({value:g+B*t})):s||[],G=X.map(e=>e.value),{isFocusVisibleRef:K,onBlur:Y,onFocus:Q,ref:ee}=(0,d.Z)(),[et,er]=i.useState(-1),en=i.useRef(),eo=(0,f.Z)(ee,en),ea=(0,f.Z)(D,eo),ei=e=>t=>{var r;let n=Number(t.currentTarget.getAttribute("data-index"));Q(t),!0===K.current&&er(n),V(n),null==e||null==(r=e.onFocus)||r.call(e,t)},el=e=>t=>{var r;Y(t),!1===K.current&&er(-1),V(-1),null==e||null==(r=e.onBlur)||r.call(e,t)};(0,v.Z)(()=>{if(n&&en.current.contains(document.activeElement)){var e;null==(e=document.activeElement)||e.blur()}},[n]),n&&-1!==$&&j(-1),n&&-1!==et&&er(-1);let es=e=>t=>{var r;null==(r=e.onChange)||r.call(e,t);let n=Number(t.currentTarget.getAttribute("data-index")),a=U[n],i=G.indexOf(a),l=t.target.valueAsNumber;if(X&&null==B){let e=G[G.length-1];l=l>e?e:l{let r,n;let{current:a}=en,{width:i,height:l,bottom:s,left:u}=a.getBoundingClientRect();if(r=0===eu.indexOf("vertical")?(s-e.y)/l:(e.x-u)/i,-1!==eu.indexOf("-reverse")&&(r=1-r),n=(c-g)*r+g,B)n=function(e,t,r){let n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(t)))}(n,B,g);else{let e=x(G,n);n=G[e]}n=b(n,g,c);let d=0;if(q){d=t?ec.current:x(U,n),o&&(n=b(n,U[d-1]||-1/0,U[d+1]||1/0));let e=n;n=S({values:U,newValue:n,index:d}),o&&t||(d=n.indexOf(e),ec.current=d)}return{newValue:n,activeIndex:d}},ef=p(e=>{let t=y(e,E);if(!t)return;if(A.current+=1,"mousemove"===e.type&&0===e.buttons){ev(e);return}let{newValue:r,activeIndex:n}=ed({finger:t,move:!0});Z({sliderRef:en,activeIndex:n,setActive:j}),F(r),!N&&A.current>2&&W(!0),J&&!k(r,_)&&J(e,r,n)}),ev=p(e=>{let t=y(e,E);if(W(!1),!t)return;let{newValue:r}=ed({finger:t,move:!0});j(-1),"touchend"===e.type&&V(-1),P&&P(e,r),E.current=void 0,em()}),ep=p(e=>{if(n)return;C()||e.preventDefault();let t=e.changedTouches[0];null!=t&&(E.current=t.identifier);let r=y(e,E);if(!1!==r){let{newValue:t,activeIndex:n}=ed({finger:r});Z({sliderRef:en,activeIndex:n,setActive:j}),F(t),J&&!k(t,_)&&J(e,t,n)}A.current=0;let o=(0,u.Z)(en.current);o.addEventListener("touchmove",ef),o.addEventListener("touchend",ev)}),em=i.useCallback(()=>{let e=(0,u.Z)(en.current);e.removeEventListener("mousemove",ef),e.removeEventListener("mouseup",ev),e.removeEventListener("touchmove",ef),e.removeEventListener("touchend",ev)},[ev,ef]);i.useEffect(()=>{let{current:e}=en;return e.addEventListener("touchstart",ep,{passive:C()}),()=>{e.removeEventListener("touchstart",ep,{passive:C()}),em()}},[em,ep]),i.useEffect(()=>{n&&em()},[n,em]);let eg=e=>t=>{var r;if(null==(r=e.onMouseDown)||r.call(e,t),n||t.defaultPrevented||0!==t.button)return;t.preventDefault();let o=y(t,E);if(!1!==o){let{newValue:e,activeIndex:r}=ed({finger:o});Z({sliderRef:en,activeIndex:r,setActive:j}),F(e),J&&!k(e,_)&&J(t,e,r)}A.current=0;let a=(0,u.Z)(en.current);a.addEventListener("mousemove",ef),a.addEventListener("mouseup",ev)},eh=((q?U[0]:g)-g)*100/(c-g),eb=(U[U.length-1]-g)*100/(c-g)-eh,ex=e=>t=>{var r;null==(r=e.onMouseOver)||r.call(e,t);let n=Number(t.currentTarget.getAttribute("data-index"));V(n)},ey=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),V(-1)};return{active:$,axis:eu,axisProps:z,dragging:N,focusedThumbIndex:et,getHiddenInputProps:(r={})=>{var o;let i={onChange:es(r||{}),onFocus:ei(r||{}),onBlur:el(r||{})},s=(0,a.Z)({},r,i);return(0,a.Z)({tabIndex:M,"aria-labelledby":t,"aria-orientation":L,"aria-valuemax":T(c),"aria-valuemin":T(g),name:I,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(o=e.step)?o:void 0,disabled:n},s,{style:(0,a.Z)({},m,{direction:l?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{let t={onMouseDown:eg(e||{})},r=(0,a.Z)({},e,t);return(0,a.Z)({ref:ea},r)},getThumbProps:(e={})=>{let t={onMouseOver:ex(e||{}),onMouseLeave:ey(e||{})};return(0,a.Z)({},e,t)},marks:X,open:H,range:q,rootRef:ea,trackLeap:eb,trackOffset:eh,values:U,getThumbStyle:e=>({pointerEvents:-1!==$&&$!==e?"none":void 0})}}((0,a.Z)({},ev,{rootRef:t}));ev.marked=ez.length>0&&ez.some(e=>e.label),ev.dragging=ek;let eP=(0,a.Z)({},ep[ey].offset(eC),ep[ey].leap(eI)),eL=j(ev),eD=(0,a.Z)({},eu,{component:el,slots:es,slotProps:ec}),[eT,eB]=(0,D.Z)("root",{ref:t,className:(0,l.Z)(eL.root,c),elementType:V,externalForwardedProps:eD,getSlotProps:em,ownerState:ev}),[eM,eO]=(0,D.Z)("rail",{className:eL.rail,elementType:N,externalForwardedProps:eD,ownerState:ev}),[eE,e$]=(0,D.Z)("track",{additionalProps:{style:eP},className:eL.track,elementType:W,externalForwardedProps:eD,ownerState:ev}),[ej,eH]=(0,D.Z)("mark",{className:eL.mark,elementType:_,externalForwardedProps:eD,ownerState:ev}),[eV,eN]=(0,D.Z)("markLabel",{className:eL.markLabel,elementType:J,externalForwardedProps:eD,ownerState:ev,additionalProps:{"aria-hidden":!0}}),[eW,eA]=(0,D.Z)("thumb",{className:eL.thumb,elementType:A,externalForwardedProps:eD,getSlotProps:eh,ownerState:ev}),[e_,eF]=(0,D.Z)("input",{className:eL.input,elementType:q,externalForwardedProps:eD,getSlotProps:eg,ownerState:ev}),[eJ,eq]=(0,D.Z)("valueLabel",{className:eL.valueLabel,elementType:F,externalForwardedProps:eD,ownerState:ev});return(0,O.jsxs)(eT,(0,a.Z)({},eB,{children:[(0,O.jsx)(eM,(0,a.Z)({},eO)),(0,O.jsx)(eE,(0,a.Z)({},e$)),ez.filter(e=>e.value>=G&&e.value<=X).map((e,t)=>{let r;let n=(e.value-G)*100/(X-G),o=ep[ey].offset(n);return r=!1===ee?-1!==ew.indexOf(e.value):"normal"===ee&&(eZ?e.value>=ew[0]&&e.value<=ew[ew.length-1]:e.value<=ew[0])||"inverted"===ee&&(eZ?e.value<=ew[0]||e.value>=ew[ew.length-1]:e.value>=ew[0]),(0,O.jsxs)(i.Fragment,{children:[(0,O.jsx)(ej,(0,a.Z)({"data-index":t},eH,!(0,I.X)(ej)&&{ownerState:(0,a.Z)({},eH.ownerState,{percent:n})},{style:(0,a.Z)({},o,eH.style),className:(0,l.Z)(eH.className,r&&eL.markActive)})),null!=e.label?(0,O.jsx)(eV,(0,a.Z)({"data-index":t},eN,{style:(0,a.Z)({},o,eN.style),className:(0,l.Z)(eL.markLabel,eN.className,r&&eL.markLabelActive),children:e.label})):null]},e.value)}),ew.map((e,t)=>{let r=(e-G)*100/(X-G),o=ep[ey].offset(r);return(0,O.jsxs)(eW,(0,a.Z)({"data-index":t},eA,{className:(0,l.Z)(eA.className,ex===t&&eL.active,eS===t&&eL.focusVisible),style:(0,a.Z)({},o,eR(t),eA.style),children:[(0,O.jsx)(e_,(0,a.Z)({"data-index":t,"aria-label":M?M(t):n,"aria-valuenow":Y(e),"aria-valuetext":H?H(Y(e),t):s,value:ew[t]},eF)),"off"!==et?(0,O.jsx)(eJ,(0,a.Z)({},eq,{className:(0,l.Z)(eq.className,(eb===t||ex===t||"on"===et)&&eL.valueLabelOpen),children:"function"==typeof er?er(Y(e),t):er})):null]}),t)})]}))});var X=U},21694:function(e,t,r){r.d(t,{Z:function(){return j}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(58510),s=r(73935),c=r(22760),u=r(36425);function d(e){let t=(0,u.Z)(e);return t.defaultView||window}var f=r(54895),v=r(85893);let p=["onChange","maxRows","minRows","style","value"];function m(e){return parseInt(e,10)||0}let g={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function h(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}let b=a.forwardRef(function(e,t){let{onChange:r,maxRows:i,minRows:l=1,style:u,value:b}=e,x=(0,n.Z)(e,p),{current:y}=a.useRef(null!=b),S=a.useRef(null),Z=(0,c.Z)(t,S),k=a.useRef(null),z=a.useRef(0),[w,C]=a.useState({outerHeightStyle:0}),I=a.useCallback(()=>{let t=S.current,r=d(t),n=r.getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0};let o=k.current;o.style.width=n.width,o.value=t.value||e.placeholder||"x","\n"===o.value.slice(-1)&&(o.value+=" ");let a=n.boxSizing,s=m(n.paddingBottom)+m(n.paddingTop),c=m(n.borderBottomWidth)+m(n.borderTopWidth),u=o.scrollHeight;o.value="x";let f=o.scrollHeight,v=u;l&&(v=Math.max(Number(l)*f,v)),i&&(v=Math.min(Number(i)*f,v)),v=Math.max(v,f);let p=v+("border-box"===a?s+c:0),g=1>=Math.abs(v-u);return{outerHeightStyle:p,overflow:g}},[i,l,e.placeholder]),R=(e,t)=>{let{outerHeightStyle:r,overflow:n}=t;return z.current<20&&(r>0&&Math.abs((e.outerHeightStyle||0)-r)>1||e.overflow!==n)?(z.current+=1,{overflow:n,outerHeightStyle:r}):e},P=a.useCallback(()=>{let e=I();h(e)||C(t=>R(t,e))},[I]),L=()=>{let e=I();h(e)||s.flushSync(()=>{C(t=>R(t,e))})};return a.useEffect(()=>{let e;let t=function(e,t=166){let r;function n(...o){clearTimeout(r),r=setTimeout(()=>{e.apply(this,o)},t)}return n.clear=()=>{clearTimeout(r)},n}(()=>{z.current=0,S.current&&L()}),r=S.current,n=d(r);return n.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(()=>{z.current=0,S.current&&L()})).observe(r),()=>{t.clear(),n.removeEventListener("resize",t),e&&e.disconnect()}}),(0,f.Z)(()=>{P()}),a.useEffect(()=>{z.current=0},[b]),(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)("textarea",(0,o.Z)({value:b,onChange:e=>{z.current=0,y||P(),r&&r(e)},ref:Z,rows:l,style:(0,o.Z)({height:w.outerHeightStyle,overflow:w.overflow?"hidden":void 0},u)},x)),(0,v.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:k,tabIndex:-1,style:(0,o.Z)({},g.shadow,u,{paddingTop:0,paddingBottom:0})})]})});var x=r(74312),y=r(20407),S=r(2226),Z=r(30220),k=r(26821);function z(e){return(0,k.d6)("MuiTextarea",e)}let w=(0,k.sI)("MuiTextarea",["root","textarea","startDecorator","endDecorator","formControl","disabled","error","focused","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft"]);var C=r(78758);let I=a.createContext(void 0);var R=r(30437),P=r(76043);let L=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"],D=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","size","color","variant","startDecorator","endDecorator","minRows","maxRows","component","slots","slotProps"],T=e=>{let{disabled:t,variant:r,color:n,size:o}=e,a={root:["root",t&&"disabled",r&&`variant${(0,i.Z)(r)}`,n&&`color${(0,i.Z)(n)}`,o&&`size${(0,i.Z)(o)}`],textarea:["textarea"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.Z)(a,z,{})},B=(0,x.Z)("div",{name:"JoyTextarea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n,a,i,l;let s=null==(r=e.variants[`${t.variant}`])?void 0:r[t.color];return[(0,o.Z)({"--Textarea-radius":e.vars.radius.sm,"--Textarea-gap":"0.5rem","--Textarea-placeholderColor":"inherit","--Textarea-placeholderOpacity":.64,"--Textarea-decoratorColor":e.vars.palette.text.icon,"--Textarea-focused":"0","--Textarea-focusedThickness":e.vars.focus.thickness},"context"===t.color?{"--Textarea-focusedHighlight":e.vars.palette.focusVisible}:{"--Textarea-focusedHighlight":null==(n=e.vars.palette["neutral"===t.color?"primary":t.color])?void 0:n[500]},"sm"===t.size&&{"--Textarea-minHeight":"2rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.5rem","--Textarea-decoratorChildHeight":"min(1.5rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},"md"===t.size&&{"--Textarea-minHeight":"2.5rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.75rem","--Textarea-decoratorChildHeight":"min(2rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},"lg"===t.size&&{"--Textarea-minHeight":"3rem","--Textarea-paddingBlock":"calc(0.75rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"1rem","--Textarea-gap":"0.75rem","--Textarea-decoratorChildHeight":"min(2.375rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--_Textarea-paddingBlock":"max((var(--Textarea-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Textarea-decoratorChildHeight)) / 2, 0px)","--Textarea-decoratorChildRadius":"max(var(--Textarea-radius) - var(--variant-borderWidth, 0px) - var(--_Textarea-paddingBlock), min(var(--_Textarea-paddingBlock) + var(--variant-borderWidth, 0px), var(--Textarea-radius) / 2))","--Button-minHeight":"var(--Textarea-decoratorChildHeight)","--IconButton-size":"var(--Textarea-decoratorChildHeight)","--Button-radius":"var(--Textarea-decoratorChildRadius)","--IconButton-radius":"var(--Textarea-decoratorChildRadius)",boxSizing:"border-box"},"plain"!==t.variant&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Textarea-minHeight)",cursor:"text",position:"relative",display:"flex",flexDirection:"column",paddingInlineStart:"var(--Textarea-paddingInline)",paddingBlock:"var(--Textarea-paddingBlock)",borderRadius:"var(--Textarea-radius)"},e.typography[`body-${t.size}`],s,{backgroundColor:null!=(a=null==s?void 0:s.backgroundColor)?a:e.vars.palette.background.surface,"&:before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Textarea-focusedInset, inset) 0 0 0 calc(var(--Textarea-focused) * var(--Textarea-focusedThickness)) var(--Textarea-focusedHighlight)"}}),{"&:hover":(0,o.Z)({},null==(i=e.variants[`${t.variant}Hover`])?void 0:i[t.color],{backgroundColor:null,cursor:"text"}),[`&.${w.disabled}`]:null==(l=e.variants[`${t.variant}Disabled`])?void 0:l[t.color],"&:focus-within::before":{"--Textarea-focused":"1"}}]}),M=(0,x.Z)(b,{name:"JoyTextarea",slot:"Textarea",overridesResolver:(e,t)=>t.textarea})({resize:"none",border:"none",minWidth:0,outline:0,padding:0,paddingInlineEnd:"var(--Textarea-paddingInline)",flex:"auto",alignSelf:"stretch",color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit","&::-webkit-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"}}),O=(0,x.Z)("div",{name:"JoyTextarea",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockEnd:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),E=(0,x.Z)("div",{name:"JoyTextarea",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockStart:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),$=a.forwardRef(function(e,t){var r,i,l,s,u,d,f;let p=(0,y.Z)({props:e,name:"JoyTextarea"}),m=function(e,t){let r=a.useContext(P.Z),{"aria-describedby":i,"aria-label":l,"aria-labelledby":s,autoComplete:u,autoFocus:d,className:f,defaultValue:v,disabled:p,error:m,id:g,name:h,onClick:b,onChange:x,onKeyDown:y,onKeyUp:S,onFocus:Z,onBlur:k,placeholder:z,readOnly:w,required:D,type:T,value:B}=e,M=(0,n.Z)(e,L),{getRootProps:O,getInputProps:E,focused:$,error:j,disabled:H}=function(e){let t,r,n,i,l;let{defaultValue:s,disabled:u=!1,error:d=!1,onBlur:f,onChange:v,onFocus:p,required:m=!1,value:g,inputRef:h}=e,b=a.useContext(I);if(b){var x,y,S;t=void 0,r=null!=(x=b.disabled)&&x,n=null!=(y=b.error)&&y,i=null!=(S=b.required)&&S,l=b.value}else t=s,r=u,n=d,i=m,l=g;let{current:Z}=a.useRef(null!=l),k=a.useCallback(e=>{},[]),z=a.useRef(null),w=(0,c.Z)(z,h,k),[P,L]=a.useState(!1);a.useEffect(()=>{!b&&r&&P&&(L(!1),null==f||f())},[b,r,P,f]);let D=e=>t=>{var r,n;if(null!=b&&b.disabled){t.stopPropagation();return}null==(r=e.onFocus)||r.call(e,t),b&&b.onFocus?null==b||null==(n=b.onFocus)||n.call(b):L(!0)},T=e=>t=>{var r;null==(r=e.onBlur)||r.call(e,t),b&&b.onBlur?b.onBlur():L(!1)},B=e=>(t,...r)=>{var n,o;if(!Z){let e=t.target||z.current;if(null==e)throw Error((0,C.Z)(17))}null==b||null==(n=b.onChange)||n.call(b,t),null==(o=e.onChange)||o.call(e,t,...r)},M=e=>t=>{var r;z.current&&t.currentTarget===t.target&&z.current.focus(),null==(r=e.onClick)||r.call(e,t)};return{disabled:r,error:n,focused:P,formControlContext:b,getInputProps:(e={})=>{let a=(0,o.Z)({},{onBlur:f,onChange:v,onFocus:p},(0,R._)(e)),s=(0,o.Z)({},e,a,{onBlur:T(a),onChange:B(a),onFocus:D(a)});return(0,o.Z)({},s,{"aria-invalid":n||void 0,defaultValue:t,ref:w,value:l,required:i,disabled:r})},getRootProps:(t={})=>{let r=(0,R._)(e,["onBlur","onChange","onFocus"]),n=(0,o.Z)({},r,(0,R._)(t));return(0,o.Z)({},t,n,{onClick:M(n)})},inputRef:w,required:i,value:l}}({disabled:null!=p?p:null==r?void 0:r.disabled,defaultValue:v,error:m,onBlur:k,onClick:b,onChange:x,onFocus:Z,required:null!=D?D:null==r?void 0:r.required,value:B}),V={[t.disabled]:H,[t.error]:j,[t.focused]:$,[t.formControl]:!!r,[f]:f},N={[t.disabled]:H};return(0,o.Z)({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":l,"aria-labelledby":s,autoComplete:u,autoFocus:d,disabled:H,id:g,onKeyDown:y,onKeyUp:S,name:h,placeholder:z,readOnly:w,type:T},rootStateClasses:V,inputStateClasses:N,getRootProps:O,getInputProps:E,focused:$,error:j,disabled:H},M)}(p,w),{propsToForward:g,rootStateClasses:h,inputStateClasses:b,getRootProps:x,getInputProps:k,formControl:z,focused:$,error:j=!1,disabled:H=!1,size:V="md",color:N="neutral",variant:W="outlined",startDecorator:A,endDecorator:_,minRows:F,maxRows:J,component:q,slots:U={},slotProps:X={}}=m,G=(0,n.Z)(m,D),K=null!=(r=null!=(i=e.disabled)?i:null==z?void 0:z.disabled)?r:H,Y=null!=(l=null!=(s=e.error)?s:null==z?void 0:z.error)?l:j,Q=null!=(u=null!=(d=e.size)?d:null==z?void 0:z.size)?u:V,{getColor:ee}=(0,S.VT)(W),et=ee(e.color,Y?"danger":null!=(f=null==z?void 0:z.color)?f:N),er=(0,o.Z)({},p,{color:et,disabled:K,error:Y,focused:$,size:Q,variant:W}),en=T(er),eo=(0,o.Z)({},G,{component:q,slots:U,slotProps:X}),[ea,ei]=(0,Z.Z)("root",{ref:t,className:[en.root,h],elementType:B,externalForwardedProps:eo,getSlotProps:x,ownerState:er}),[el,es]=(0,Z.Z)("textarea",{additionalProps:{id:null==z?void 0:z.htmlFor,"aria-describedby":null==z?void 0:z["aria-describedby"]},className:[en.textarea,b],elementType:M,internalForwardedProps:(0,o.Z)({},g,{minRows:F,maxRows:J}),externalForwardedProps:eo,getSlotProps:k,ownerState:er}),[ec,eu]=(0,Z.Z)("startDecorator",{className:en.startDecorator,elementType:O,externalForwardedProps:eo,ownerState:er}),[ed,ef]=(0,Z.Z)("endDecorator",{className:en.endDecorator,elementType:E,externalForwardedProps:eo,ownerState:er});return(0,v.jsxs)(ea,(0,o.Z)({},ei,{children:[A&&(0,v.jsx)(ec,(0,o.Z)({},eu,{children:A})),(0,v.jsx)(el,(0,o.Z)({},es)),_&&(0,v.jsx)(ed,(0,o.Z)({},ef,{children:_}))]}))});var j=$},55907:function(e,t,r){r.d(t,{Yb:function(){return l},yP:function(){return i}});var n=r(67294),o=r(85893);let a=n.createContext(void 0);function i(e,t){var r;let o,i;let l=n.useContext(a),[s,c]="string"==typeof l?l.split(":"):[],u=(r=s||void 0,o=c||void 0,i=r,"outlined"===r&&(o="neutral",i="plain"),"plain"===r&&(o="neutral"),{variant:i,color:o});return u.variant=e||u.variant,u.color=t||u.color,u}function l({children:e,color:t,variant:r}){return(0,o.jsx)(a.Provider,{value:`${r||""}:${t||""}`,children:e})}},36425:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){return e&&e.ownerDocument||document}},54895:function(e,t,r){var n=r(67294);let o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;t.Z=o},89326:function(e,t,r){r.d(t,{Z:function(){return l}});var n,o=r(67294);let a=0,i=(n||(n=r.t(o,2)))["useId".toString()];function l(e){if(void 0!==i){let t=i();return null!=e?e:t}return function(e){let[t,r]=o.useState(e),n=e||t;return o.useEffect(()=>{null==t&&r(`mui-${a+=1}`)},[t]),n}(e)}},11136:function(e,t,r){r.d(t,{Z:function(){return f}});var n=r(67294);class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}let a=!0,i=!1,l=new o,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function u(){a=!1}function d(){"hidden"===this.visibilityState&&i&&(a=!0)}function f(){let e=n.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0)}},[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return a||function(e){let{type:t,tagName:r}=e;return"INPUT"===r&&!!s[t]&&!e.readOnly||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(i=!0,l.start(100,()=>{i=!1}),t.current=!1,!0)},ref:e}}}}]); \ No newline at end of file + `),S)),R=a.forwardRef(function(e,t){let r=(0,d.Z)({props:e,name:"JoyCircularProgress"}),{children:a,className:l,color:s="primary",size:c="md",variant:u="soft",thickness:p,determinate:m=!1,value:h=m?0:25,component:b,slots:x={},slotProps:S={}}=r,k=(0,o.Z)(r,y),{getColor:R}=(0,f.VT)(u),P=R(e.color,s),L=(0,n.Z)({},r,{color:P,size:c,variant:u,thickness:p,value:h,determinate:m,instanceSize:e.size}),D=Z(L),T=(0,n.Z)({},k,{component:b,slots:x,slotProps:S}),[B,M]=(0,v.Z)("root",{ref:t,className:(0,i.Z)(D.root,l),elementType:z,externalForwardedProps:T,ownerState:L,additionalProps:(0,n.Z)({role:"progressbar",style:{"--CircularProgress-percent":h}},h&&m&&{"aria-valuenow":"number"==typeof h?Math.round(h):Math.round(Number(h||0))})}),[O,E]=(0,v.Z)("svg",{className:D.svg,elementType:w,externalForwardedProps:T,ownerState:L}),[$,j]=(0,v.Z)("track",{className:D.track,elementType:C,externalForwardedProps:T,ownerState:L}),[H,V]=(0,v.Z)("progress",{className:D.progress,elementType:I,externalForwardedProps:T,ownerState:L});return(0,g.jsxs)(B,(0,n.Z)({},M,{children:[(0,g.jsxs)(O,(0,n.Z)({},E,{children:[(0,g.jsx)($,(0,n.Z)({},j)),(0,g.jsx)(H,(0,n.Z)({},V))]})),a]}))});var P=R},76043:function(e,t,r){var n=r(67294);let o=n.createContext(void 0);t.Z=o},26047:function(e,t,r){r.d(t,{Z:function(){return N}});var n=r(87462),o=r(63366),a=r(67294),i=r(90512),l=r(16485),s=r(8027),c=r(58510),u=r(86154);let d=(0,u.ZP)();var f=r(44065),v=r(79718),p=r(39707),m=r(88647);let g=(e,t)=>e.filter(e=>t.includes(e)),h=(e,t,r)=>{let n=e.keys[0];if(Array.isArray(t))t.forEach((t,n)=>{r((t,r)=>{n<=e.keys.length-1&&(0===n?Object.assign(t,r):t[e.up(e.keys[n])]=r)},t)});else if(t&&"object"==typeof t){let o=Object.keys(t).length>e.keys.length?e.keys:g(e.keys,Object.keys(t));o.forEach(o=>{if(-1!==e.keys.indexOf(o)){let a=t[o];void 0!==a&&r((t,r)=>{n===o?Object.assign(t,r):t[e.up(o)]=r},a)}})}else("number"==typeof t||"string"==typeof t)&&r((e,t)=>{Object.assign(e,t)},t)};function b(e){return e?`Level${e}`:""}function x(e){return e.unstable_level>0&&e.container}function y(e){return function(t){return`var(--Grid-${t}Spacing${b(e.unstable_level)})`}}function S(e){return function(t){return 0===e.unstable_level?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${b(e.unstable_level-1)})`}}function Z(e){return 0===e.unstable_level?"var(--Grid-columns)":`var(--Grid-columns${b(e.unstable_level-1)})`}let k=({theme:e,ownerState:t})=>{let r=y(t),n={};return h(e.breakpoints,t.gridSize,(e,o)=>{let a={};!0===o&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===o&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof o&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / ${Z(t)}${x(t)?` + ${r("column")}`:""})`}),e(n,a)}),n},z=({theme:e,ownerState:t})=>{let r={};return h(e.breakpoints,t.gridOffset,(e,n)=>{let o={};"auto"===n&&(o={marginLeft:"auto"}),"number"==typeof n&&(o={marginLeft:0===n?"0px":`calc(100% * ${n} / ${Z(t)})`}),e(r,o)}),r},w=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=x(t)?{[`--Grid-columns${b(t.unstable_level)}`]:Z(t)}:{"--Grid-columns":12};return h(e.breakpoints,t.columns,(e,n)=>{e(r,{[`--Grid-columns${b(t.unstable_level)}`]:n})}),r},C=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=S(t),n=x(t)?{[`--Grid-rowSpacing${b(t.unstable_level)}`]:r("row")}:{};return h(e.breakpoints,t.rowSpacing,(r,o)=>{var a;r(n,{[`--Grid-rowSpacing${b(t.unstable_level)}`]:"string"==typeof o?o:null==(a=e.spacing)?void 0:a.call(e,o)})}),n},I=({theme:e,ownerState:t})=>{if(!t.container)return{};let r=S(t),n=x(t)?{[`--Grid-columnSpacing${b(t.unstable_level)}`]:r("column")}:{};return h(e.breakpoints,t.columnSpacing,(r,o)=>{var a;r(n,{[`--Grid-columnSpacing${b(t.unstable_level)}`]:"string"==typeof o?o:null==(a=e.spacing)?void 0:a.call(e,o)})}),n},R=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={};return h(e.breakpoints,t.direction,(e,t)=>{e(r,{flexDirection:t})}),r},P=({ownerState:e})=>{let t=y(e),r=S(e);return(0,n.Z)({minWidth:0,boxSizing:"border-box"},e.container&&(0,n.Z)({display:"flex",flexWrap:"wrap"},e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||x(e))&&(0,n.Z)({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},L=e=>{let t=[];return Object.entries(e).forEach(([e,r])=>{!1!==r&&void 0!==r&&t.push(`grid-${e}-${String(r)}`)}),t},D=(e,t="xs")=>{function r(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(r(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,n])=>{r(n)&&t.push(`spacing-${e}-${String(n)}`)}),t}return[]},T=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`];var B=r(85893);let M=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],O=(0,m.Z)(),E=d("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function $(e){return(0,f.Z)({props:e,name:"MuiGrid",defaultTheme:O})}var j=r(74312),H=r(20407);let V=function(e={}){let{createStyledComponent:t=E,useThemeProps:r=$,componentName:u="MuiGrid"}=e,d=a.createContext(void 0),f=(e,t)=>{let{container:r,direction:n,spacing:o,wrap:a,gridSize:i}=e,l={root:["root",r&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...T(n),...L(i),...r?D(o,t.breakpoints.keys[0]):[]]};return(0,c.Z)(l,e=>(0,s.ZP)(u,e),{})},m=t(w,I,C,k,R,P,z),g=a.forwardRef(function(e,t){var s,c,u,g,h,b,x,y;let S=(0,v.Z)(),Z=r(e),k=(0,p.Z)(Z),z=a.useContext(d),{className:w,children:C,columns:I=12,container:R=!1,component:P="div",direction:L="row",wrap:D="wrap",spacing:T=0,rowSpacing:O=T,columnSpacing:E=T,disableEqualOverflow:$,unstable_level:j=0}=k,H=(0,o.Z)(k,M),V=$;j&&void 0!==$&&(V=e.disableEqualOverflow);let N={},W={},A={};Object.entries(H).forEach(([e,t])=>{void 0!==S.breakpoints.values[e]?N[e]=t:void 0!==S.breakpoints.values[e.replace("Offset","")]?W[e.replace("Offset","")]=t:A[e]=t});let _=null!=(s=e.columns)?s:j?void 0:I,F=null!=(c=e.spacing)?c:j?void 0:T,J=null!=(u=null!=(g=e.rowSpacing)?g:e.spacing)?u:j?void 0:O,q=null!=(h=null!=(b=e.columnSpacing)?b:e.spacing)?h:j?void 0:E,U=(0,n.Z)({},k,{level:j,columns:_,container:R,direction:L,wrap:D,spacing:F,rowSpacing:J,columnSpacing:q,gridSize:N,gridOffset:W,disableEqualOverflow:null!=(x=null!=(y=V)?y:z)&&x,parentDisableEqualOverflow:z}),X=f(U,S),G=(0,B.jsx)(m,(0,n.Z)({ref:t,as:P,ownerState:U,className:(0,i.Z)(X.root,w)},A,{children:a.Children.map(C,e=>{if(a.isValidElement(e)&&(0,l.Z)(e,["Grid"])){var t;return a.cloneElement(e,{unstable_level:null!=(t=e.props.unstable_level)?t:j+1})}return e})}));return void 0!==V&&V!==(null!=z&&z)&&(G=(0,B.jsx)(d.Provider,{value:V,children:G})),G});return g.muiName="Grid",g}({createStyledComponent:(0,j.Z)("div",{name:"JoyGrid",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,H.Z)({props:e,name:"JoyGrid"})});var N=V},14553:function(e,t,r){r.d(t,{ZP:function(){return k}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(22760),s=r(70758),c=r(58510),u=r(74312),d=r(20407),f=r(2226),v=r(30220),p=r(26821);function m(e){return(0,p.d6)("MuiIconButton",e)}(0,p.sI)("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg"]);var g=r(89996),h=r(85893);let b=["children","action","component","color","disabled","variant","size","slots","slotProps"],x=e=>{let{color:t,disabled:r,focusVisible:n,focusVisibleClassName:o,size:a,variant:l}=e,s={root:["root",r&&"disabled",n&&"focusVisible",l&&`variant${(0,i.Z)(l)}`,t&&`color${(0,i.Z)(t)}`,a&&`size${(0,i.Z)(a)}`]},u=(0,c.Z)(s,m,{});return n&&o&&(u.root+=` ${o}`),u},y=(0,u.Z)("button")(({theme:e,ownerState:t})=>{var r,n,a,i;return[(0,o.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":({sm:"2rem",md:"2.5rem",lg:"3rem"})[t.instanceSize]},"sm"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},"md"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.5rem) / 1.667)","--CircularProgress-size":"24px","--CircularProgress-thickness":"3px",minWidth:"var(--IconButton-size, 2.5rem)",minHeight:"var(--IconButton-size, 2.5rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},"lg"===t.size&&{"--Icon-fontSize":"calc(var(--IconButton-size, 3rem) / 1.714)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 3rem)",minHeight:"var(--IconButton-size, 3rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:(0,o.Z)({"--Icon-color":"currentColor"},e.focus.default)}),(0,o.Z)({},null==(r=e.variants[t.variant])?void 0:r[t.color],{"&:hover":{"@media (hover: hover)":(0,o.Z)({"--Icon-color":"currentColor"},null==(n=e.variants[`${t.variant}Hover`])?void 0:n[t.color])},'&:active, &[aria-pressed="true"]':(0,o.Z)({"--Icon-color":"currentColor"},null==(a=e.variants[`${t.variant}Active`])?void 0:a[t.color]),"&:disabled":null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]})]}),S=(0,u.Z)(y,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z=a.forwardRef(function(e,t){var r;let i=(0,d.Z)({props:e,name:"JoyIconButton"}),{children:c,action:u,component:p="button",color:m="neutral",disabled:y,variant:Z="plain",size:k="md",slots:z={},slotProps:w={}}=i,C=(0,n.Z)(i,b),I=a.useContext(g.Z),R=e.variant||I.variant||Z,P=e.size||I.size||k,{getColor:L}=(0,f.VT)(R),D=L(e.color,I.color||m),T=null!=(r=e.disabled)?r:I.disabled||y,B=a.useRef(null),M=(0,l.Z)(B,t),{focusVisible:O,setFocusVisible:E,getRootProps:$}=(0,s.U)((0,o.Z)({},i,{disabled:T,rootRef:M}));a.useImperativeHandle(u,()=>({focusVisible:()=>{var e;E(!0),null==(e=B.current)||e.focus()}}),[E]);let j=(0,o.Z)({},i,{component:p,color:D,disabled:T,variant:R,size:P,focusVisible:O,instanceSize:e.size}),H=x(j),V=(0,o.Z)({},C,{component:p,slots:z,slotProps:w}),[N,W]=(0,v.Z)("root",{ref:t,className:H.root,elementType:S,getSlotProps:$,externalForwardedProps:V,ownerState:j});return(0,h.jsx)(N,(0,o.Z)({},W,{children:c}))});Z.muiName="IconButton";var k=Z},39984:function(e,t,r){r.d(t,{r:function(){return s}});var n=r(87462);r(67294);var o=r(74312),a=r(26821);let i=(0,a.sI)("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),l=(0,a.sI)("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]);r(85893);let s=(0,o.Z)("div")(({theme:e,ownerState:t})=>{var r,o,a,s,c;return(0,n.Z)({"--Icon-margin":"initial","--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch"},"vertical"===t.orientation&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},void 0===t["data-first-child"]&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:(0,n.Z)({},e.focus.default,{zIndex:1})},null==(r=e.variants[t.variant])?void 0:r[t.color],{[`.${i.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${l.selected}`]:(0,n.Z)({},null==(o=e.variants[`${t.variant}Active`])?void 0:o[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${l.selected}, [aria-selected="true"])`]:{"&:hover":null==(a=e.variants[`${t.variant}Hover`])?void 0:a[t.color],"&:active":null==(s=e.variants[`${t.variant}Active`])?void 0:s[t.color]},[`&.${l.disabled}`]:(0,n.Z)({},null==(c=e.variants[`${t.variant}Disabled`])?void 0:c[t.color])})});(0,o.Z)(s,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>(0,n.Z)({},!e.row&&{[`&.${l.selected}`]:{fontWeight:t.vars.fontWeight.md}}))},43614:function(e,t,r){var n=r(67294);let o=n.createContext(void 0);t.Z=o},50984:function(e,t,r){r.d(t,{C:function(){return i}});var n=r(87462);r(67294);var o=r(74312),a=r(58859);r(85893);let i=(0,o.Z)("ul")(({theme:e,ownerState:t})=>{var r;let{p:o,padding:i,borderRadius:l}=(0,a.V)({theme:e,ownerState:t},["p","padding","borderRadius"]);function s(r){return"sm"===r?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":"0.5rem","--ListItemDecorator-size":"horizontal"===t.orientation?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:"md"===r?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.5rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":"0.75rem","--ListItemDecorator-size":"horizontal"===t.orientation?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:"lg"===r?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"3rem","--ListItem-paddingY":"0.5rem","--ListItem-paddingX":"1rem","--ListItemDecorator-size":"horizontal"===t.orientation?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&(0,n.Z)({},s(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0,marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&(0,n.Z)({},s(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)","--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],"horizontal"===t.orientation?(0,n.Z)({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"}),(0,n.Z)({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:"horizontal"===t.orientation?"row":"column"},t.wrap&&{flexWrap:"wrap"},{flexGrow:1,position:"relative"},null==(r=e.variants[t.variant])?void 0:r[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},void 0!==l&&{"--List-radius":l},void 0!==o&&{"--List-padding":o},void 0!==i&&{"--List-padding":i})]});(0,o.Z)(i,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({})},3419:function(e,t,r){r.d(t,{Z:function(){return u},M:function(){return c}});var n=r(87462),o=r(67294),a=r(40780);let i=o.createContext(!1),l=o.createContext(!1);var s=r(85893);let c={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};var u=function(e){let{children:t,nested:r,row:c=!1,wrap:u=!1}=e,d=(0,s.jsx)(a.Z.Provider,{value:c,children:(0,s.jsx)(i.Provider,{value:u,children:o.Children.map(t,(e,r)=>o.isValidElement(e)?o.cloneElement(e,(0,n.Z)({},0===r&&{"data-first-child":""},r===o.Children.count(t)-1&&{"data-last-child":""})):e)})});return void 0===r?d:(0,s.jsx)(l.Provider,{value:r,children:d})}},40780:function(e,t,r){var n=r(67294);let o=n.createContext(!1);t.Z=o},59562:function(e,t,r){r.d(t,{Z:function(){return L}});var n=r(63366),o=r(87462),a=r(67294),i=r(22760),l=r(85241),s=r(51633),c=r(70758),u=r(2900),d=r(58510),f=r(62908),v=r(26821);function p(e){return(0,v.d6)("MuiMenuButton",e)}(0,v.sI)("MuiMenuButton",["root","colorPrimary","colorNeutral","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]);var m=r(20407),g=r(30220),h=r(48699),b=r(66478),x=r(74312),y=r(2226),S=r(89996),Z=r(85893);let k=["children","color","component","disabled","endDecorator","loading","loadingPosition","loadingIndicator","size","slotProps","slots","startDecorator","variant"],z=e=>{let{color:t,disabled:r,fullWidth:n,size:o,variant:a,loading:i}=e,l={root:["root",r&&"disabled",n&&"fullWidth",a&&`variant${(0,f.Z)(a)}`,t&&`color${(0,f.Z)(t)}`,o&&`size${(0,f.Z)(o)}`,i&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]};return(0,d.Z)(l,p,{})},w=(0,x.Z)("button",{name:"JoyMenuButton",slot:"Root",overridesResolver:(e,t)=>t.root})(b.f),C=(0,x.Z)("span",{name:"JoyMenuButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),I=(0,x.Z)("span",{name:"JoyMenuButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),R=(0,x.Z)("span",{name:"JoyMenuButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var r,n;return(0,o.Z)({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:null==(r=e.variants[t.variant])||null==(r=r[t.color])?void 0:r.color},t.disabled&&{color:null==(n=e.variants[`${t.variant}Disabled`])||null==(n=n[t.color])?void 0:n.color})}),P=a.forwardRef(function(e,t){var r;let d=(0,m.Z)({props:e,name:"JoyMenuButton"}),{children:f,color:v="neutral",component:p,disabled:b=!1,endDecorator:x,loading:P=!1,loadingPosition:L="center",loadingIndicator:D,size:T="md",slotProps:B={},slots:M={},startDecorator:O,variant:E="outlined"}=d,$=(0,n.Z)(d,k),j=a.useContext(S.Z),H=e.variant||j.variant||E,V=e.size||j.size||T,{getColor:N}=(0,y.VT)(H),W=N(e.color,j.color||v),A=null!=(r=e.disabled)?r:j.disabled||b||P,{getRootProps:_,open:F,active:J}=function(e={}){let{disabled:t=!1,focusableWhenDisabled:r,rootRef:n}=e,d=a.useContext(l.D);if(null===d)throw Error("useMenuButton: no menu context available.");let{state:f,dispatch:v,registerTrigger:p,popupId:m}=d,{getRootProps:g,rootRef:h,active:b}=(0,c.U)({disabled:t,focusableWhenDisabled:r,rootRef:n}),x=(0,i.Z)(h,p),y=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultMuiPrevented||v({type:s.Q.toggle,event:t})},S=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented||"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),v({type:s.Q.open,event:t}))},Z=(e={})=>({onClick:y(e),onKeyDown:S(e)});return{active:b,getRootProps:(e={})=>{let t=(0,u.f)(g,Z);return(0,o.Z)({},t(e),{"aria-haspopup":"menu","aria-expanded":f.open,"aria-controls":m,ref:x})},open:f.open,rootRef:x}}({rootRef:t,disabled:A}),q=null!=D?D:(0,Z.jsx)(h.Z,(0,o.Z)({},"context"!==W&&{color:W},{thickness:{sm:2,md:3,lg:4}[V]||3})),U=(0,o.Z)({},d,{active:J,color:W,disabled:A,open:F,size:V,variant:H}),X=z(U),G=(0,o.Z)({},$,{component:p,slots:M,slotProps:B}),[K,Y]=(0,g.Z)("root",{elementType:w,getSlotProps:_,externalForwardedProps:G,ref:t,ownerState:U,className:X.root}),[Q,ee]=(0,g.Z)("startDecorator",{className:X.startDecorator,elementType:C,externalForwardedProps:G,ownerState:U}),[et,er]=(0,g.Z)("endDecorator",{className:X.endDecorator,elementType:I,externalForwardedProps:G,ownerState:U}),[en,eo]=(0,g.Z)("loadingIndicatorCenter",{className:X.loadingIndicatorCenter,elementType:R,externalForwardedProps:G,ownerState:U});return(0,Z.jsxs)(K,(0,o.Z)({},Y,{children:[(O||P&&"start"===L)&&(0,Z.jsx)(Q,(0,o.Z)({},ee,{children:P&&"start"===L?q:O})),f,P&&"center"===L&&(0,Z.jsx)(en,(0,o.Z)({},eo,{children:q})),(x||P&&"end"===L)&&(0,Z.jsx)(et,(0,o.Z)({},er,{children:P&&"end"===L?q:x}))]}))});var L=P},7203:function(e,t,r){r.d(t,{Z:function(){return B}});var n=r(87462),o=r(63366),a=r(67294),i=r(62908),l=r(58510),s=r(89326),c=r(22760),u=r(70758),d=r(43069),f=r(51633),v=r(85241),p=r(2900),m=r(14072);function g(e){return`menu-item-${e.size}`}let h={dispatch:()=>{},popupId:"",registerPopup:()=>{},registerTrigger:()=>{},state:{open:!0},triggerElement:null};var b=r(39984),x=r(74312),y=r(20407),S=r(2226),Z=r(55907),k=r(26821);function z(e){return(0,k.d6)("MuiMenuItem",e)}(0,k.sI)("MuiMenuItem",["root","focusVisible","disabled","selected","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]);var w=r(40780);let C=a.createContext("horizontal");var I=r(30220),R=r(85893);let P=["children","disabled","component","selected","color","orientation","variant","slots","slotProps"],L=e=>{let{focusVisible:t,disabled:r,selected:n,color:o,variant:a}=e,s={root:["root",t&&"focusVisible",r&&"disabled",n&&"selected",o&&`color${(0,i.Z)(o)}`,a&&`variant${(0,i.Z)(a)}`]},c=(0,l.Z)(s,z,{});return c},D=(0,x.Z)(b.r,{name:"JoyMenuItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),T=a.forwardRef(function(e,t){let r=(0,y.Z)({props:e,name:"JoyMenuItem"}),i=a.useContext(w.Z),{children:l,disabled:b=!1,component:x="li",selected:k=!1,color:z="neutral",orientation:T="horizontal",variant:B="plain",slots:M={},slotProps:O={}}=r,E=(0,o.Z)(r,P),{variant:$=B,color:j=z}=(0,Z.yP)(e.variant,e.color),{getColor:H}=(0,S.VT)($),V=H(e.color,j),{getRootProps:N,disabled:W,focusVisible:A}=function(e){var t;let{disabled:r=!1,id:o,rootRef:i,label:l}=e,b=(0,s.Z)(o),x=a.useRef(null),y=a.useMemo(()=>({disabled:r,id:null!=b?b:"",label:l,ref:x}),[r,b,l]),{dispatch:S}=null!=(t=a.useContext(v.D))?t:h,{getRootProps:Z,highlighted:k,rootRef:z}=(0,d.J)({item:b}),{index:w,totalItemCount:C}=(0,m.B)(null!=b?b:g,y),{getRootProps:I,focusVisible:R,rootRef:P}=(0,u.U)({disabled:r,focusableWhenDisabled:!0}),L=(0,c.Z)(z,P,i,x);a.useDebugValue({id:b,highlighted:k,disabled:r,label:l});let D=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.defaultMuiPrevented||S({type:f.Q.close,event:t})},T=(e={})=>(0,n.Z)({},e,{onClick:D(e)});function B(e={}){let t=(0,p.f)(T,(0,p.f)(I,Z));return(0,n.Z)({},t(e),{ref:L,role:"menuitem"})}return void 0===b?{getRootProps:B,disabled:!1,focusVisible:R,highlighted:!1,index:-1,totalItemCount:0,rootRef:L}:{getRootProps:B,disabled:r,focusVisible:R,highlighted:k,index:w,totalItemCount:C,rootRef:L}}({disabled:b,rootRef:t}),_=(0,n.Z)({},r,{component:x,color:V,disabled:W,focusVisible:A,orientation:T,selected:k,row:i,variant:$}),F=L(_),J=(0,n.Z)({},E,{component:x,slots:M,slotProps:O}),[q,U]=(0,I.Z)("root",{ref:t,elementType:D,getSlotProps:N,externalForwardedProps:J,className:F.root,ownerState:_});return(0,R.jsx)(C.Provider,{value:T,children:(0,R.jsx)(q,(0,n.Z)({},U,{children:l}))})});var B=T},25359:function(e,t,r){r.d(t,{Z:function(){return j}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(58510),s=r(22760),c=r(89326),u=r(54895),d=r(22644),f=r(7333);function v(e,t){if(t.type===d.F.itemHover)return e;let r=(0,f.R$)(e,t);if(null===r.highlightedValue&&t.context.items.length>0)return(0,o.Z)({},r,{highlightedValue:t.context.items[0]});if(t.type===d.F.keyDown&&"Escape"===t.event.key)return(0,o.Z)({},r,{open:!1});if(t.type===d.F.blur){var n,a,i;if(!(null!=(n=t.context.listboxRef.current)&&n.contains(t.event.relatedTarget))){let e=null==(a=t.context.listboxRef.current)?void 0:a.getAttribute("id"),n=null==(i=t.event.relatedTarget)?void 0:i.getAttribute("aria-controls");return e&&n&&e===n?r:(0,o.Z)({},r,{open:!1,highlightedValue:t.context.items[0]})}}return r}var p=r(85241),m=r(96592),g=r(51633),h=r(12247),b=r(2900);let x={dispatch:()=>{},popupId:"",registerPopup:()=>{},registerTrigger:()=>{},state:{open:!0},triggerElement:null};var y=r(26558),S=r(85893);function Z(e){let{value:t,children:r}=e,{dispatch:n,getItemIndex:o,getItemState:i,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s,registerItem:c,totalSubitemCount:u}=t,d=a.useMemo(()=>({dispatch:n,getItemState:i,getItemIndex:o,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s}),[n,o,i,l,s]),f=a.useMemo(()=>({getItemIndex:o,registerItem:c,totalSubitemCount:u}),[c,o,u]);return(0,S.jsx)(h.s.Provider,{value:f,children:(0,S.jsx)(y.Z.Provider,{value:d,children:r})})}var k=r(53406),z=r(7293),w=r(50984),C=r(3419),I=r(43614),R=r(74312),P=r(20407),L=r(55907),D=r(2226),T=r(26821);function B(e){return(0,T.d6)("MuiMenu",e)}(0,T.sI)("MuiMenu",["root","listbox","expanded","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);let M=["actions","children","color","component","disablePortal","keepMounted","id","invertedColors","onItemsChange","modifiers","variant","size","slots","slotProps"],O=e=>{let{open:t,variant:r,color:n,size:o}=e,a={root:["root",t&&"expanded",r&&`variant${(0,i.Z)(r)}`,n&&`color${(0,i.Z)(n)}`,o&&`size${(0,i.Z)(o)}`],listbox:["listbox"]};return(0,l.Z)(a,B,{})},E=(0,R.Z)(w.C,{name:"JoyMenu",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n;let a=null==(r=e.variants[t.variant])?void 0:r[t.color];return[(0,o.Z)({"--focus-outline-offset":`calc(${e.vars.focus.thickness} * -1)`,"--ListItem-stickyBackground":(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background)||e.vars.palette.background.popup,"--ListItem-stickyTop":"calc(var(--List-padding, var(--ListDivider-gap)) * -1)"},C.M,{borderRadius:`var(--List-radius, ${e.vars.radius.sm})`,boxShadow:e.shadow.md,overflow:"auto",zIndex:`var(--unstable_popup-zIndex, ${e.vars.zIndex.popup})`},!(null!=a&&a.backgroundColor)&&{backgroundColor:e.vars.palette.background.popup}),"context"!==t.color&&t.invertedColors&&(null==(n=e.colorInversion[t.variant])?void 0:n[t.color])]}),$=a.forwardRef(function(e,t){var r;let i=(0,P.Z)({props:e,name:"JoyMenu"}),{actions:l,children:f,color:y="neutral",component:w,disablePortal:R=!1,keepMounted:T=!1,id:B,invertedColors:$=!1,onItemsChange:j,modifiers:H,variant:V="outlined",size:N="md",slots:W={},slotProps:A={}}=i,_=(0,n.Z)(i,M),{getColor:F}=(0,D.VT)(V),J=R?F(e.color,y):y,{contextValue:q,getListboxProps:U,dispatch:X,open:G,triggerElement:K}=function(e={}){var t,r;let{listboxRef:n,onItemsChange:i,id:l}=e,d=a.useRef(null),f=(0,s.Z)(d,n),y=null!=(t=(0,c.Z)(l))?t:"",{state:{open:S},dispatch:Z,triggerElement:k,registerPopup:z}=null!=(r=a.useContext(p.D))?r:x,w=a.useRef(S),{subitems:C,contextValue:I}=(0,h.Y)(),R=a.useMemo(()=>Array.from(C.keys()),[C]),P=a.useCallback(e=>{var t,r;return null==e?null:null!=(t=null==(r=C.get(e))?void 0:r.ref.current)?t:null},[C]),{dispatch:L,getRootProps:D,contextValue:T,state:{highlightedValue:B},rootRef:M}=(0,m.s)({disabledItemsFocusable:!0,focusManagement:"DOM",getItemDomElement:P,getInitialState:()=>({selectedValues:[],highlightedValue:null}),isItemDisabled:e=>{var t;return(null==C||null==(t=C.get(e))?void 0:t.disabled)||!1},items:R,getItemAsString:e=>{var t,r;return(null==(t=C.get(e))?void 0:t.label)||(null==(r=C.get(e))||null==(r=r.ref.current)?void 0:r.innerText)},rootRef:f,onItemsChange:i,reducerActionContext:{listboxRef:d},selectionMode:"none",stateReducer:v});(0,u.Z)(()=>{z(y)},[y,z]),a.useEffect(()=>{if(S&&B===R[0]&&!w.current){var e;null==(e=C.get(R[0]))||null==(e=e.ref)||null==(e=e.current)||e.focus()}},[S,B,C,R]),a.useEffect(()=>{var e,t;null!=(e=d.current)&&e.contains(document.activeElement)&&null!==B&&(null==C||null==(t=C.get(B))||null==(t=t.ref.current)||t.focus())},[B,C]);let O=e=>t=>{var r,n;null==(r=e.onBlur)||r.call(e,t),t.defaultMuiPrevented||null!=(n=d.current)&&n.contains(t.relatedTarget)||t.relatedTarget===k||Z({type:g.Q.blur,event:t})},E=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),t.defaultMuiPrevented||"Escape"!==t.key||Z({type:g.Q.escapeKeyDown,event:t})},$=(e={})=>({onBlur:O(e),onKeyDown:E(e)});return a.useDebugValue({subitems:C,highlightedValue:B}),{contextValue:(0,o.Z)({},I,T),dispatch:L,getListboxProps:(e={})=>{let t=(0,b.f)($,D);return(0,o.Z)({},t(e),{id:y,role:"menu"})},highlightedValue:B,listboxRef:M,menuItems:C,open:S,triggerElement:k}}({onItemsChange:j,id:B,listboxRef:t});a.useImperativeHandle(l,()=>({dispatch:X,resetHighlight:()=>X({type:d.F.resetHighlight,event:null})}),[X]);let Y=(0,o.Z)({},i,{disablePortal:R,invertedColors:$,color:J,variant:V,size:N,open:G,nesting:!1,row:!1}),Q=O(Y),ee=(0,o.Z)({},_,{component:w,slots:W,slotProps:A}),et=a.useMemo(()=>[{name:"offset",options:{offset:[0,4]}},...H||[]],[H]),er=(0,z.y)({elementType:E,getSlotProps:U,externalForwardedProps:ee,externalSlotProps:{},ownerState:Y,additionalProps:{anchorEl:K,open:G&&null!==K,disablePortal:R,keepMounted:T,modifiers:et},className:Q.root}),en=(0,S.jsx)(Z,{value:q,children:(0,S.jsx)(L.Yb,{variant:$?void 0:V,color:y,children:(0,S.jsx)(I.Z.Provider,{value:"menu",children:(0,S.jsx)(C.Z,{nested:!0,children:f})})})});return $&&(en=(0,S.jsx)(D.do,{variant:V,children:en})),en=(0,S.jsx)(E,(0,o.Z)({},er,!(null!=(r=i.slots)&&r.root)&&{as:k.r,slots:{root:w||"ul"}},{children:en})),R?en:(0,S.jsx)(D.ZP.Provider,{value:void 0,children:en})});var j=$},57814:function(e,t,r){r.d(t,{Z:function(){return C}});var n=r(87462),o=r(63366),a=r(67294),i=r(58510),l=r(89326),s=r(22760),c=r(43069),u=r(14072),d=r(30220),f=r(39984),v=r(74312),p=r(20407),m=r(2226),g=r(55907),h=r(26821);function b(e){return(0,h.d6)("MuiOption",e)}let x=(0,h.sI)("MuiOption",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","highlighted","variantPlain","variantSoft","variantOutlined","variantSolid"]);var y=r(40780),S=r(85893);let Z=["component","children","disabled","value","label","variant","color","slots","slotProps"],k=e=>{let{disabled:t,highlighted:r,selected:n}=e;return(0,i.Z)({root:["root",t&&"disabled",r&&"highlighted",n&&"selected"]},b,{})},z=(0,v.Z)(f.r,{name:"JoyOption",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;let n=null==(r=e.variants[`${t.variant}Hover`])?void 0:r[t.color];return{[`&.${x.highlighted}:not([aria-selected="true"])`]:{backgroundColor:null==n?void 0:n.backgroundColor}}}),w=a.forwardRef(function(e,t){var r;let i=(0,p.Z)({props:e,name:"JoyOption"}),{component:f="li",children:v,disabled:h=!1,value:b,label:x,variant:w="plain",color:C="neutral",slots:I={},slotProps:R={}}=i,P=(0,o.Z)(i,Z),L=a.useContext(y.Z),{variant:D=w,color:T=C}=(0,g.yP)(e.variant,e.color),B=a.useRef(null),M=(0,s.Z)(B,t),O=null!=x?x:"string"==typeof v?v:null==(r=B.current)?void 0:r.innerText,{getRootProps:E,selected:$,highlighted:j,index:H}=function(e){let{value:t,label:r,disabled:o,rootRef:i,id:d}=e,{getRootProps:f,rootRef:v,highlighted:p,selected:m}=(0,c.J)({item:t}),g=(0,l.Z)(d),h=a.useRef(null),b=a.useMemo(()=>({disabled:o,label:r,value:t,ref:h,id:g}),[o,r,t,g]),{index:x}=(0,u.B)(t,b),y=(0,s.Z)(i,h,v);return{getRootProps:(e={})=>(0,n.Z)({},e,f(e),{id:g,ref:y,role:"option","aria-selected":m}),highlighted:p,index:x,selected:m,rootRef:y}}({disabled:h,label:O,value:b,rootRef:M}),{getColor:V}=(0,m.VT)(D),N=V(e.color,T),W=(0,n.Z)({},i,{disabled:h,selected:$,highlighted:j,index:H,component:f,variant:D,color:N,row:L}),A=k(W),_=(0,n.Z)({},P,{component:f,slots:I,slotProps:R}),[F,J]=(0,d.Z)("root",{ref:t,getSlotProps:E,elementType:z,externalForwardedProps:_,className:A.root,ownerState:W});return(0,S.jsx)(F,(0,n.Z)({},J,{children:v}))});var C=w},99056:function(e,t,r){r.d(t,{Z:function(){return el}});var n,o=r(63366),a=r(87462),i=r(67294),l=r(90512),s=r(62908),c=r(22760),u=r(53406),d=r(89326),f=r(54895),v=r(70758);let p={buttonClick:"buttonClick"};var m=r(96592);let g=e=>{let{label:t,value:r}=e;return"string"==typeof t?t:"string"==typeof r?r:String(e)};var h=r(12247),b=r(7333),x=r(22644);function y(e,t){var r,n,o;let{open:i}=e,{context:{selectionMode:l}}=t;if(t.type===p.buttonClick){let n=null!=(r=e.selectedValues[0])?r:(0,b.Rl)(null,"start",t.context);return(0,a.Z)({},e,{open:!i,highlightedValue:i?null:n})}let s=(0,b.R$)(e,t);switch(t.type){case x.F.keyDown:if(e.open){if("Escape"===t.event.key||"single"===l&&("Enter"===t.event.key||" "===t.event.key))return(0,a.Z)({},s,{open:!1})}else{if("Enter"===t.event.key||" "===t.event.key||"ArrowDown"===t.event.key)return(0,a.Z)({},e,{open:!0,highlightedValue:null!=(n=e.selectedValues[0])?n:(0,b.Rl)(null,"start",t.context)});if("ArrowUp"===t.event.key)return(0,a.Z)({},e,{open:!0,highlightedValue:null!=(o=e.selectedValues[0])?o:(0,b.Rl)(null,"end",t.context)})}break;case x.F.itemClick:if("single"===l)return(0,a.Z)({},s,{open:!1});break;case x.F.blur:return(0,a.Z)({},s,{open:!1})}return s}var S=r(2900);let Z={clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",height:"1px",width:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",left:"50%",bottom:0},k=()=>{};function z(e){return Array.isArray(e)?0===e.length?"":JSON.stringify(e.map(e=>e.value)):(null==e?void 0:e.value)==null?"":"string"==typeof e.value||"number"==typeof e.value?e.value:JSON.stringify(e.value)}function w(e){e.preventDefault()}var C=r(26558),I=r(85893);function R(e){let{value:t,children:r}=e,{dispatch:n,getItemIndex:o,getItemState:a,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s,registerItem:c,totalSubitemCount:u}=t,d=i.useMemo(()=>({dispatch:n,getItemState:a,getItemIndex:o,registerHighlightChangeHandler:l,registerSelectionChangeHandler:s}),[n,o,a,l,s]),f=i.useMemo(()=>({getItemIndex:o,registerItem:c,totalSubitemCount:u}),[c,o,u]);return(0,I.jsx)(h.s.Provider,{value:f,children:(0,I.jsx)(C.Z.Provider,{value:d,children:r})})}var P=r(58510),L=r(50984),D=r(3419),T=r(43614),B=r(74312),M=r(20407),O=r(30220),E=r(26821);function $(e){return(0,E.d6)("MuiSvgIcon",e)}(0,E.sI)("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);let j=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],H=e=>{let{color:t,size:r,fontSize:n}=e,o={root:["root",t&&"inherit"!==t&&`color${(0,s.Z)(t)}`,r&&`size${(0,s.Z)(r)}`,n&&`fontSize${(0,s.Z)(n)}`]};return(0,P.Z)(o,$,{})},V={sm:"xl",md:"xl2",lg:"xl3"},N=(0,B.Z)("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;return(0,a.Z)({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[V[t.instanceSize]]},t.instanceFontSize&&"inherit"!==t.instanceFontSize&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[V[t.size]]||"unset"})`},t.fontSize&&"inherit"!==t.fontSize&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&(0,a.Z)({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"context"!==t.color&&e.vars.palette[t.color]&&{color:`rgba(${null==(r=e.vars.palette[t.color])?void 0:r.mainChannel} / 1)`}))}),W=i.forwardRef(function(e,t){let r=(0,M.Z)({props:e,name:"JoySvgIcon"}),{children:n,className:s,color:c,component:u="svg",fontSize:d,htmlColor:f,inheritViewBox:v=!1,titleAccess:p,viewBox:m="0 0 24 24",size:g="md",slots:h={},slotProps:b={}}=r,x=(0,o.Z)(r,j),y=i.isValidElement(n)&&"svg"===n.type,S=(0,a.Z)({},r,{color:c,component:u,size:g,instanceSize:e.size,fontSize:d,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:m,hasSvgAsChild:y}),Z=H(S),k=(0,a.Z)({},x,{component:u,slots:h,slotProps:b}),[z,w]=(0,O.Z)("root",{ref:t,className:(0,l.Z)(Z.root,s),elementType:N,externalForwardedProps:k,ownerState:S,additionalProps:(0,a.Z)({color:f,focusable:!1},p&&{role:"img"},!p&&{"aria-hidden":!0},!v&&{viewBox:m},y&&n.props)});return(0,I.jsxs)(z,(0,a.Z)({},w,{children:[y?n.props.children:n,p?(0,I.jsx)("title",{children:p}):null]}))});var A=function(e,t){function r(r,n){return(0,I.jsx)(W,(0,a.Z)({"data-testid":`${t}Icon`,ref:n},r,{children:e}))}return r.muiName=W.muiName,i.memo(i.forwardRef(r))}((0,I.jsx)("path",{d:"m12 5.83 2.46 2.46c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 3.7a.9959.9959 0 0 0-1.41 0L8.12 6.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 5.83zm0 12.34-2.46-2.46a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l3.17 3.18c.39.39 1.02.39 1.41 0l3.17-3.17c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L12 18.17z"}),"Unfold"),_=r(2226),F=r(58859);function J(e){return(0,E.d6)("MuiSelect",e)}let q=(0,E.sI)("MuiSelect",["root","button","indicator","startDecorator","endDecorator","popper","listbox","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","focusVisible","disabled","expanded"]);var U=r(76043),X=r(55907);let G=["action","autoFocus","children","defaultValue","defaultListboxOpen","disabled","getSerializedValue","placeholder","listboxId","listboxOpen","onChange","onListboxOpenChange","onClose","renderValue","required","value","size","variant","color","startDecorator","endDecorator","indicator","aria-describedby","aria-label","aria-labelledby","id","name","slots","slotProps"];function K(e){var t;return null!=(t=null==e?void 0:e.label)?t:""}let Y=[{name:"offset",options:{offset:[0,4]}},{name:"equalWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`}}],Q=e=>{let{color:t,disabled:r,focusVisible:n,size:o,variant:a,open:i}=e,l={root:["root",r&&"disabled",n&&"focusVisible",i&&"expanded",a&&`variant${(0,s.Z)(a)}`,t&&`color${(0,s.Z)(t)}`,o&&`size${(0,s.Z)(o)}`],button:["button"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],indicator:["indicator",i&&"expanded"],listbox:["listbox",i&&"expanded",r&&"disabled"]};return(0,P.Z)(l,J,{})},ee=(0,B.Z)("div",{name:"JoySelect",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n,o,i;let l=null==(r=e.variants[`${t.variant}`])?void 0:r[t.color],{borderRadius:s}=(0,F.V)({theme:e,ownerState:t},["borderRadius"]);return[(0,a.Z)({"--Select-radius":e.vars.radius.sm,"--Select-gap":"0.5rem","--Select-placeholderOpacity":.64,"--Select-decoratorColor":e.vars.palette.text.icon,"--Select-focusedThickness":e.vars.focus.thickness},"context"===t.color?{"--Select-focusedHighlight":e.vars.palette.focusVisible}:{"--Select-focusedHighlight":null==(n=e.vars.palette["neutral"===t.color?"primary":t.color])?void 0:n[500]},{"--Select-indicatorColor":null!=l&&l.backgroundColor?null==l?void 0:l.color:e.vars.palette.text.tertiary},"sm"===t.size&&{"--Select-minHeight":"2rem","--Select-paddingInline":"0.5rem","--Select-decoratorChildHeight":"min(1.5rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},"md"===t.size&&{"--Select-minHeight":"2.5rem","--Select-paddingInline":"0.75rem","--Select-decoratorChildHeight":"min(2rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},"lg"===t.size&&{"--Select-minHeight":"3rem","--Select-paddingInline":"1rem","--Select-decoratorChildHeight":"min(2.375rem, var(--Select-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Select-decoratorChildOffset":"min(calc(var(--Select-paddingInline) - (var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2), var(--Select-paddingInline))","--_Select-paddingBlock":"max((var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2, 0px)","--Select-decoratorChildRadius":"max(var(--Select-radius) - var(--variant-borderWidth, 0px) - var(--_Select-paddingBlock), min(var(--_Select-paddingBlock) + var(--variant-borderWidth, 0px), var(--Select-radius) / 2))","--Button-minHeight":"var(--Select-decoratorChildHeight)","--IconButton-size":"var(--Select-decoratorChildHeight)","--Button-radius":"var(--Select-decoratorChildRadius)","--IconButton-radius":"var(--Select-decoratorChildRadius)",boxSizing:"border-box"},"plain"!==t.variant&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Select-minHeight)",position:"relative",display:"flex",alignItems:"center",borderRadius:"var(--Select-radius)",cursor:"pointer"},!(null!=l&&l.backgroundColor)&&{backgroundColor:e.vars.palette.background.surface},t.size&&{paddingBlock:({sm:2,md:3,lg:4})[t.size]},{paddingInline:"var(--Select-paddingInline)"},e.typography[`body-${t.size}`],l,{"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)"},[`&.${q.focusVisible}`]:{"--Select-indicatorColor":null==l?void 0:l.color,"&::before":{boxShadow:"inset 0 0 0 var(--Select-focusedThickness) var(--Select-focusedHighlight)"}},[`&.${q.disabled}`]:{"--Select-indicatorColor":"inherit"}}),{"&:hover":null==(o=e.variants[`${t.variant}Hover`])?void 0:o[t.color],[`&.${q.disabled}`]:null==(i=e.variants[`${t.variant}Disabled`])?void 0:i[t.color]},void 0!==s&&{"--Select-radius":s}]}),et=(0,B.Z)("button",{name:"JoySelect",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>(0,a.Z)({border:0,outline:0,background:"none",padding:0,fontSize:"inherit",color:"inherit",alignSelf:"stretch",display:"flex",alignItems:"center",flex:1,fontFamily:"inherit",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden"},(null===e.value||void 0===e.value)&&{opacity:"var(--Select-placeholderOpacity)"},{"&::before":{content:'""',display:"block",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",borderRadius:"var(--Select-radius)"}})),er=(0,B.Z)(L.C,{name:"JoySelect",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e,ownerState:t})=>{var r;let n="context"===t.color?void 0:null==(r=e.variants[t.variant])?void 0:r[t.color];return(0,a.Z)({"--focus-outline-offset":`calc(${e.vars.focus.thickness} * -1)`,"--ListItem-stickyBackground":(null==n?void 0:n.backgroundColor)||(null==n?void 0:n.background)||e.vars.palette.background.popup,"--ListItem-stickyTop":"calc(var(--List-padding, var(--ListDivider-gap)) * -1)"},D.M,{minWidth:"max-content",maxHeight:"44vh",overflow:"auto",outline:0,boxShadow:e.shadow.md,borderRadius:`var(--List-radius, ${e.vars.radius.sm})`,zIndex:`var(--unstable_popup-zIndex, ${e.vars.zIndex.popup})`},!(null!=n&&n.backgroundColor)&&{backgroundColor:e.vars.palette.background.popup})}),en=(0,B.Z)("span",{name:"JoySelect",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Button-margin":"0 0 0 calc(var(--Select-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Select-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Select-paddingInline) / -4)",display:"inherit",alignItems:"center",color:"var(--Select-decoratorColor)",marginInlineEnd:"var(--Select-gap)"}),eo=(0,B.Z)("span",{name:"JoySelect",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Button-margin":"0 calc(var(--Select-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Select-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Select-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",color:"var(--Select-decoratorColor)",marginInlineStart:"var(--Select-gap)"}),ea=(0,B.Z)("span",{name:"JoySelect",slot:"Indicator"})(({ownerState:e,theme:t})=>(0,a.Z)({},"sm"===e.size&&{"--Icon-fontSize":t.vars.fontSize.lg},"md"===e.size&&{"--Icon-fontSize":t.vars.fontSize.xl},"lg"===e.size&&{"--Icon-fontSize":t.vars.fontSize.xl2},{"--Icon-color":"neutral"!==e.color||"solid"===e.variant?"currentColor":t.vars.palette.text.icon,display:"inherit",alignItems:"center",marginInlineStart:"var(--Select-gap)",marginInlineEnd:"calc(var(--Select-paddingInline) / -4)",[`.${q.endDecorator} + &`]:{marginInlineStart:"calc(var(--Select-gap) / 2)"},[`&.${q.expanded}, .${q.disabled} > &`]:{"--Icon-color":"currentColor"}})),ei=i.forwardRef(function(e,t){var r,s,b,x,C,P,L;let B=(0,M.Z)({props:e,name:"JoySelect"}),{action:E,autoFocus:$,children:j,defaultValue:H,defaultListboxOpen:V=!1,disabled:N,getSerializedValue:W,placeholder:F,listboxId:J,listboxOpen:ei,onChange:el,onListboxOpenChange:es,onClose:ec,renderValue:eu,required:ed=!1,value:ef,size:ev="md",variant:ep="outlined",color:em="neutral",startDecorator:eg,endDecorator:eh,indicator:eb=n||(n=(0,I.jsx)(A,{})),"aria-describedby":ex,"aria-label":ey,"aria-labelledby":eS,id:eZ,name:ek,slots:ez={},slotProps:ew={}}=B,eC=(0,o.Z)(B,G),eI=i.useContext(U.Z),eR=null!=(r=null!=(s=e.disabled)?s:null==eI?void 0:eI.disabled)?r:N,eP=null!=(b=null!=(x=e.size)?x:null==eI?void 0:eI.size)?b:ev,{getColor:eL}=(0,_.VT)(ep),eD=eL(e.color,null!=eI&&eI.error?"danger":null!=(C=null==eI?void 0:eI.color)?C:em),eT=null!=eu?eu:K,[eB,eM]=i.useState(null),eO=i.useRef(null),eE=i.useRef(null),e$=i.useRef(null),ej=(0,c.Z)(t,eO);i.useImperativeHandle(E,()=>({focusVisible:()=>{var e;null==(e=eE.current)||e.focus()}}),[]),i.useEffect(()=>{eM(eO.current)},[]),i.useEffect(()=>{$&&eE.current.focus()},[$]);let eH=i.useCallback(e=>{null==es||es(e),e||null==ec||ec()},[ec,es]),{buttonActive:eV,buttonFocusVisible:eN,contextValue:eW,disabled:eA,getButtonProps:e_,getListboxProps:eF,getHiddenInputProps:eJ,getOptionMetadata:eq,open:eU,value:eX}=function(e){let t,r,n;let{areOptionsEqual:o,buttonRef:l,defaultOpen:s=!1,defaultValue:u,disabled:b=!1,listboxId:x,listboxRef:C,multiple:I=!1,name:R,required:P,onChange:L,onHighlightChange:D,onOpenChange:T,open:B,options:M,getOptionAsString:O=g,getSerializedValue:E=z,value:$}=e,j=i.useRef(null),H=(0,c.Z)(l,j),V=i.useRef(null),N=(0,d.Z)(x);void 0===$&&void 0===u?t=[]:void 0!==u&&(t=I?u:null==u?[]:[u]);let W=i.useMemo(()=>{if(void 0!==$)return I?$:null==$?[]:[$]},[$,I]),{subitems:A,contextValue:_}=(0,h.Y)(),F=i.useMemo(()=>null!=M?new Map(M.map((e,t)=>[e.value,{value:e.value,label:e.label,disabled:e.disabled,ref:i.createRef(),id:`${N}_${t}`}])):A,[M,A,N]),J=(0,c.Z)(C,V),{getRootProps:q,active:U,focusVisible:X,rootRef:G}=(0,v.U)({disabled:b,rootRef:H}),K=i.useMemo(()=>Array.from(F.keys()),[F]),Y=i.useCallback(e=>{if(void 0!==o){let t=K.find(t=>o(t,e));return F.get(t)}return F.get(e)},[F,o,K]),Q=i.useCallback(e=>{var t;let r=Y(e);return null!=(t=null==r?void 0:r.disabled)&&t},[Y]),ee=i.useCallback(e=>{let t=Y(e);return t?O(t):""},[Y,O]),et=i.useMemo(()=>({selectedValues:W,open:B}),[W,B]),er=i.useCallback(e=>{var t;return null==(t=F.get(e))?void 0:t.id},[F]),en=i.useCallback((e,t)=>{if(I)null==L||L(e,t);else{var r;null==L||L(e,null!=(r=t[0])?r:null)}},[I,L]),eo=i.useCallback((e,t)=>{null==D||D(e,null!=t?t:null)},[D]),ea=i.useCallback((e,t,r)=>{if("open"===t&&(null==T||T(r),!1===r&&(null==e?void 0:e.type)!=="blur")){var n;null==(n=j.current)||n.focus()}},[T]),ei={getInitialState:()=>{var e;return{highlightedValue:null,selectedValues:null!=(e=t)?e:[],open:s}},getItemId:er,controlledProps:et,itemComparer:o,isItemDisabled:Q,rootRef:G,onChange:en,onHighlightChange:eo,onStateChange:ea,reducerActionContext:i.useMemo(()=>({multiple:I}),[I]),items:K,getItemAsString:ee,selectionMode:I?"multiple":"single",stateReducer:y},{dispatch:el,getRootProps:es,contextValue:ec,state:{open:eu,highlightedValue:ed,selectedValues:ef},rootRef:ev}=(0,m.s)(ei),ep=e=>t=>{var r;if(null==e||null==(r=e.onMouseDown)||r.call(e,t),!t.defaultMuiPrevented){let e={type:p.buttonClick,event:t};el(e)}};(0,f.Z)(()=>{if(null!=ed){var e;let t=null==(e=Y(ed))?void 0:e.ref;if(!V.current||!(null!=t&&t.current))return;let r=V.current.getBoundingClientRect(),n=t.current.getBoundingClientRect();n.topr.bottom&&(V.current.scrollTop+=n.bottom-r.bottom)}},[ed,Y]);let em=i.useCallback(e=>Y(e),[Y]),eg=(e={})=>(0,a.Z)({},e,{onMouseDown:ep(e),ref:ev,role:"combobox","aria-expanded":eu,"aria-controls":N});i.useDebugValue({selectedOptions:ef,highlightedOption:ed,open:eu});let eh=i.useMemo(()=>(0,a.Z)({},ec,_),[ec,_]);if(r=e.multiple?ef:ef.length>0?ef[0]:null,I)n=r.map(e=>em(e)).filter(e=>void 0!==e);else{var eb;n=null!=(eb=em(r))?eb:null}return{buttonActive:U,buttonFocusVisible:X,buttonRef:G,contextValue:eh,disabled:b,dispatch:el,getButtonProps:(e={})=>{let t=(0,S.f)(q,es),r=(0,S.f)(t,eg);return r(e)},getHiddenInputProps:(e={})=>(0,a.Z)({name:R,tabIndex:-1,"aria-hidden":!0,required:!!P||void 0,value:E(n),onChange:k,style:Z},e),getListboxProps:(e={})=>(0,a.Z)({},e,{id:N,role:"listbox","aria-multiselectable":I?"true":void 0,ref:J,onMouseDown:w}),getOptionMetadata:em,listboxRef:ev,open:eu,options:K,value:r,highlightedOption:ed}}({buttonRef:eE,defaultOpen:V,defaultValue:H,disabled:eR,getSerializedValue:W,listboxId:J,multiple:!1,name:ek,required:ed,onChange:el,onOpenChange:eH,open:ei,value:ef}),eG=(0,a.Z)({},B,{active:eV,defaultListboxOpen:V,disabled:eA,focusVisible:eN,open:eU,renderValue:eT,value:eX,size:eP,variant:ep,color:eD}),eK=Q(eG),eY=(0,a.Z)({},eC,{slots:ez,slotProps:ew}),eQ=i.useMemo(()=>{var e;return null!=(e=eq(eX))?e:null},[eq,eX]),[e0,e1]=(0,O.Z)("root",{ref:ej,className:eK.root,elementType:ee,externalForwardedProps:eY,ownerState:eG}),[e2,e6]=(0,O.Z)("button",{additionalProps:{"aria-describedby":null!=ex?ex:null==eI?void 0:eI["aria-describedby"],"aria-label":ey,"aria-labelledby":null!=eS?eS:null==eI?void 0:eI.labelId,"aria-required":ed?"true":void 0,id:null!=eZ?eZ:null==eI?void 0:eI.htmlFor,name:ek},className:eK.button,elementType:et,externalForwardedProps:eY,getSlotProps:e_,ownerState:eG}),[e4,e3]=(0,O.Z)("listbox",{additionalProps:{ref:e$,anchorEl:eB,open:eU,placement:"bottom",keepMounted:!0},className:eK.listbox,elementType:er,externalForwardedProps:eY,getSlotProps:eF,ownerState:(0,a.Z)({},eG,{nesting:!1,row:!1,wrap:!1}),getSlotOwnerState:e=>({size:e.size||eP,variant:e.variant||ep,color:e.color||(e.disablePortal?eD:em),disableColorInversion:!e.disablePortal})}),[e8,e5]=(0,O.Z)("startDecorator",{className:eK.startDecorator,elementType:en,externalForwardedProps:eY,ownerState:eG}),[e9,e7]=(0,O.Z)("endDecorator",{className:eK.endDecorator,elementType:eo,externalForwardedProps:eY,ownerState:eG}),[te,tt]=(0,O.Z)("indicator",{className:eK.indicator,elementType:ea,externalForwardedProps:eY,ownerState:eG}),tr=i.useMemo(()=>[...Y,...e3.modifiers||[]],[e3.modifiers]),tn=null;return eB&&(tn=(0,I.jsx)(e4,(0,a.Z)({},e3,{className:(0,l.Z)(e3.className,(null==(P=e3.ownerState)?void 0:P.color)==="context"&&q.colorContext),modifiers:tr},!(null!=(L=B.slots)&&L.listbox)&&{as:u.r,slots:{root:e3.as||"ul"}},{children:(0,I.jsx)(R,{value:eW,children:(0,I.jsx)(X.Yb,{variant:ep,color:em,children:(0,I.jsx)(T.Z.Provider,{value:"select",children:(0,I.jsx)(D.Z,{nested:!0,children:j})})})})})),e3.disablePortal||(tn=(0,I.jsx)(_.ZP.Provider,{value:void 0,children:tn}))),(0,I.jsxs)(i.Fragment,{children:[(0,I.jsxs)(e0,(0,a.Z)({},e1,{children:[eg&&(0,I.jsx)(e8,(0,a.Z)({},e5,{children:eg})),(0,I.jsx)(e2,(0,a.Z)({},e6,{children:eQ?eT(eQ):F})),eh&&(0,I.jsx)(e9,(0,a.Z)({},e7,{children:eh})),eb&&(0,I.jsx)(te,(0,a.Z)({},tt,{children:eb})),(0,I.jsx)("input",(0,a.Z)({},eJ()))]})),tn]})});var el=ei},3414:function(e,t,r){r.d(t,{Z:function(){return Z}});var n=r(63366),o=r(87462),a=r(67294),i=r(90512),l=r(58510),s=r(62908),c=r(54844),u=r(20407),d=r(74312),f=r(58859),v=r(26821);function p(e){return(0,v.d6)("MuiSheet",e)}(0,v.sI)("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=r(2226),g=r(30220),h=r(85893);let b=["className","color","component","variant","invertedColors","slots","slotProps"],x=e=>{let{variant:t,color:r}=e,n={root:["root",t&&`variant${(0,s.Z)(t)}`,r&&`color${(0,s.Z)(r)}`]};return(0,l.Z)(n,p,{})},y=(0,d.Z)("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n;let a=null==(r=e.variants[t.variant])?void 0:r[t.color],{borderRadius:i,bgcolor:l,backgroundColor:s,background:u}=(0,f.V)({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),d=(0,c.DW)(e,`palette.${l}`)||l||(0,c.DW)(e,`palette.${s}`)||s||u||(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background)||e.vars.palette.background.surface;return[(0,o.Z)({"--Icon-color":"neutral"!==t.color||"solid"===t.variant?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":"transparent"===d?"initial":d,"--Sheet-background":"transparent"===d?"initial":d},void 0!==i&&{"--List-radius":`calc(${i} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${i} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),(0,o.Z)({},e.typography["body-md"],a),"context"!==t.color&&t.invertedColors&&(null==(n=e.colorInversion[t.variant])?void 0:n[t.color])]}),S=a.forwardRef(function(e,t){let r=(0,u.Z)({props:e,name:"JoySheet"}),{className:a,color:l="neutral",component:s="div",variant:c="plain",invertedColors:d=!1,slots:f={},slotProps:v={}}=r,p=(0,n.Z)(r,b),{getColor:S}=(0,m.VT)(c),Z=S(e.color,l),k=(0,o.Z)({},r,{color:Z,component:s,invertedColors:d,variant:c}),z=x(k),w=(0,o.Z)({},p,{component:s,slots:f,slotProps:v}),[C,I]=(0,g.Z)("root",{ref:t,className:(0,i.Z)(z.root,a),elementType:y,externalForwardedProps:w,ownerState:k}),R=(0,h.jsx)(C,(0,o.Z)({},I));return d?(0,h.jsx)(m.do,{variant:c,children:R}):R});var Z=S},64415:function(e,t,r){let n;r.d(t,{Z:function(){return X}});var o=r(63366),a=r(87462),i=r(67294),l=r(90512),s=r(62908),c=r(58510),u=r(36425),d=r(11136),f=r(22760),v=r(54895),p=function(e){let t=i.useRef(e);return(0,v.Z)(()=>{t.current=e}),i.useRef((...e)=>(0,t.current)(...e)).current},m={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},g=r(6414);function h(e,t){return e-t}function b(e,t,r){return null==e?t:Math.min(Math.max(t,e),r)}function x(e,t){var r;let{index:n}=null!=(r=e.reduce((e,r,n)=>{let o=Math.abs(t-r);return null===e||o({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},w=e=>e;function C(){return void 0===n&&(n="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),n}var I=r(28442),R=r(74312),P=r(20407),L=r(2226),D=r(30220),T=r(26821);function B(e){return(0,T.d6)("MuiSlider",e)}let M=(0,T.sI)("MuiSlider",["root","disabled","dragging","focusVisible","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","thumb","thumbStart","thumbEnd","valueLabel","valueLabelOpen","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","disabled","sizeSm","sizeMd","sizeLg","input"]);var O=r(85893);let E=["aria-label","aria-valuetext","className","classes","disableSwap","disabled","defaultValue","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","tabIndex","track","value","valueLabelDisplay","valueLabelFormat","isRtl","color","size","variant","component","slots","slotProps"];function $(e){return e}let j=e=>{let{disabled:t,dragging:r,marked:n,orientation:o,track:a,variant:i,color:l,size:u}=e,d={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===o&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",i&&`variant${(0,s.Z)(i)}`,l&&`color${(0,s.Z)(l)}`,u&&`size${(0,s.Z)(u)}`],rail:["rail"],track:["track"],thumb:["thumb",t&&"disabled"],input:["input"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],valueLabelOpen:["valueLabelOpen"],active:["active"],focusVisible:["focusVisible"]};return(0,c.Z)(d,B,{})},H=({theme:e,ownerState:t})=>(r={})=>{var n,o;let i=(null==(n=e.variants[`${t.variant}${r.state||""}`])?void 0:n[t.color])||{};return(0,a.Z)({},!r.state&&{"--variant-borderWidth":null!=(o=i["--variant-borderWidth"])?o:"0px"},{"--Slider-trackColor":i.color,"--Slider-thumbBackground":i.color,"--Slider-thumbColor":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBackground":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBorderColor":i.borderColor,"--Slider-railBackground":e.vars.palette.background.level2})},V=(0,R.Z)("span",{name:"JoySlider",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let r=H({theme:e,ownerState:t});return[(0,a.Z)({"--Slider-size":"max(42px, max(var(--Slider-thumbSize), var(--Slider-trackSize)))","--Slider-trackRadius":"var(--Slider-size)","--Slider-markBackground":e.vars.palette.text.tertiary,[`& .${M.markActive}`]:{"--Slider-markBackground":"var(--Slider-trackColor)"}},"sm"===t.size&&{"--Slider-markSize":"2px","--Slider-trackSize":"4px","--Slider-thumbSize":"14px","--Slider-valueLabelArrowSize":"6px"},"md"===t.size&&{"--Slider-markSize":"2px","--Slider-trackSize":"6px","--Slider-thumbSize":"18px","--Slider-valueLabelArrowSize":"8px"},"lg"===t.size&&{"--Slider-markSize":"3px","--Slider-trackSize":"8px","--Slider-thumbSize":"24px","--Slider-valueLabelArrowSize":"10px"},{"--Slider-thumbRadius":"calc(var(--Slider-thumbSize) / 2)","--Slider-thumbWidth":"var(--Slider-thumbSize)"},r(),{"&:hover":(0,a.Z)({},r({state:"Hover"})),"&:active":(0,a.Z)({},r({state:"Active"})),[`&.${M.disabled}`]:(0,a.Z)({pointerEvents:"none",color:e.vars.palette.text.tertiary},r({state:"Disabled"})),boxSizing:"border-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent"},"horizontal"===t.orientation&&{padding:"calc(var(--Slider-size) / 2) 0",width:"100%"},"vertical"===t.orientation&&{padding:"0 calc(var(--Slider-size) / 2)",height:"100%"},{"@media print":{colorAdjust:"exact"}})]}),N=(0,R.Z)("span",{name:"JoySlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>[(0,a.Z)({display:"block",position:"absolute",backgroundColor:"inverted"===e.track?"var(--Slider-trackBackground)":"var(--Slider-railBackground)",border:"inverted"===e.track?"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)":"initial",borderRadius:"var(--Slider-trackRadius)"},"horizontal"===e.orientation&&{height:"var(--Slider-trackSize)",top:"50%",left:0,right:0,transform:"translateY(-50%)"},"vertical"===e.orientation&&{width:"var(--Slider-trackSize)",top:0,bottom:0,left:"50%",transform:"translateX(-50%)"},"inverted"===e.track&&{opacity:1})]),W=(0,R.Z)("span",{name:"JoySlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({ownerState:e})=>[(0,a.Z)({display:"block",position:"absolute",color:"var(--Slider-trackColor)",border:"inverted"===e.track?"initial":"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",backgroundColor:"inverted"===e.track?"var(--Slider-railBackground)":"var(--Slider-trackBackground)"},"horizontal"===e.orientation&&{height:"var(--Slider-trackSize)",top:"50%",transform:"translateY(-50%)",borderRadius:"var(--Slider-trackRadius) 0 0 var(--Slider-trackRadius)"},"vertical"===e.orientation&&{width:"var(--Slider-trackSize)",left:"50%",transform:"translateX(-50%)",borderRadius:"0 0 var(--Slider-trackRadius) var(--Slider-trackRadius)"},!1===e.track&&{display:"none"})]),A=(0,R.Z)("span",{name:"JoySlider",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({ownerState:e,theme:t})=>{var r;return(0,a.Z)({position:"absolute",boxSizing:"border-box",outline:0,display:"flex",alignItems:"center",justifyContent:"center",width:"var(--Slider-thumbWidth)",height:"var(--Slider-thumbSize)",border:"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",borderRadius:"var(--Slider-thumbRadius)",boxShadow:"var(--Slider-thumbShadow)",color:"var(--Slider-thumbColor)",backgroundColor:"var(--Slider-thumbBackground)",[t.focus.selector]:(0,a.Z)({},t.focus.default,{outlineOffset:0,outlineWidth:"max(4px, var(--Slider-thumbSize) / 3.6)"},"context"!==e.color&&{outlineColor:`rgba(${null==(r=t.vars.palette)||null==(r=r[e.color])?void 0:r.mainChannel} / 0.32)`})},"horizontal"===e.orientation&&{top:"50%",transform:"translate(-50%, -50%)"},"vertical"===e.orientation&&{left:"50%",transform:"translate(-50%, 50%)"},{"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",background:"transparent",top:0,left:0,width:"100%",height:"100%",border:"2px solid",borderColor:"var(--Slider-thumbColor)",borderRadius:"inherit"}})}),_=(0,R.Z)("span",{name:"JoySlider",slot:"Mark",overridesResolver:(e,t)=>t.mark})(({ownerState:e})=>(0,a.Z)({position:"absolute",width:"var(--Slider-markSize)",height:"var(--Slider-markSize)",borderRadius:"var(--Slider-markSize)",backgroundColor:"var(--Slider-markBackground)"},"horizontal"===e.orientation&&(0,a.Z)({top:"50%",transform:"translate(calc(var(--Slider-markSize) / -2), -50%)"},0===e.percent&&{transform:"translate(min(var(--Slider-markSize), 3px), -50%)"},100===e.percent&&{transform:"translate(calc(var(--Slider-markSize) * -1 - min(var(--Slider-markSize), 3px)), -50%)"}),"vertical"===e.orientation&&(0,a.Z)({left:"50%",transform:"translate(-50%, calc(var(--Slider-markSize) / 2))"},0===e.percent&&{transform:"translate(-50%, calc(min(var(--Slider-markSize), 3px) * -1))"},100===e.percent&&{transform:"translate(-50%, calc(var(--Slider-markSize) * 1 + min(var(--Slider-markSize), 3px)))"}))),F=(0,R.Z)("span",{name:"JoySlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>(0,a.Z)({},"sm"===t.size&&{fontSize:e.fontSize.xs,lineHeight:e.lineHeight.md,paddingInline:"0.25rem",minWidth:"20px"},"md"===t.size&&{fontSize:e.fontSize.sm,lineHeight:e.lineHeight.md,paddingInline:"0.375rem",minWidth:"24px"},"lg"===t.size&&{fontSize:e.fontSize.md,lineHeight:e.lineHeight.md,paddingInline:"0.5rem",minWidth:"28px"},{zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,bottom:0,transformOrigin:"bottom center",transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(0)",position:"absolute",backgroundColor:e.vars.palette.background.tooltip,boxShadow:e.shadow.sm,borderRadius:e.vars.radius.xs,color:"#fff","&::before":{display:"var(--Slider-valueLabelArrowDisplay)",position:"absolute",content:'""',color:e.vars.palette.background.tooltip,bottom:0,border:"calc(var(--Slider-valueLabelArrowSize) / 2) solid",borderColor:"currentColor",borderRightColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",left:"50%",transform:"translate(-50%, 100%)",backgroundColor:"transparent"},[`&.${M.valueLabelOpen}`]:{transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(1)"}})),J=(0,R.Z)("span",{name:"JoySlider",slot:"MarkLabel",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t})=>(0,a.Z)({fontFamily:e.vars.fontFamily.body},"sm"===t.size&&{fontSize:e.vars.fontSize.xs},"md"===t.size&&{fontSize:e.vars.fontSize.sm},"lg"===t.size&&{fontSize:e.vars.fontSize.md},{color:e.palette.text.tertiary,position:"absolute",whiteSpace:"nowrap"},"horizontal"===t.orientation&&{top:"calc(50% + 4px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateX(-50%)"},"vertical"===t.orientation&&{left:"calc(50% + 8px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateY(50%)"})),q=(0,R.Z)("input",{name:"JoySlider",slot:"Input",overridesResolver:(e,t)=>t.input})({}),U=i.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"JoySlider"}),{"aria-label":n,"aria-valuetext":s,className:c,classes:g,disableSwap:R=!1,disabled:T=!1,defaultValue:B,getAriaLabel:M,getAriaValueText:H,marks:U=!1,max:X=100,min:G=0,orientation:K="horizontal",scale:Y=$,step:Q=1,track:ee="normal",valueLabelDisplay:et="off",valueLabelFormat:er=$,isRtl:en=!1,color:eo="primary",size:ea="md",variant:ei="solid",component:el,slots:es={},slotProps:ec={}}=r,eu=(0,o.Z)(r,E),{getColor:ed}=(0,L.VT)("solid"),ef=ed(e.color,eo),ev=(0,a.Z)({},r,{marks:U,classes:g,disabled:T,defaultValue:B,disableSwap:R,isRtl:en,max:X,min:G,orientation:K,scale:Y,step:Q,track:ee,valueLabelDisplay:et,valueLabelFormat:er,color:ef,size:ea,variant:ei}),{axisProps:ep,getRootProps:em,getHiddenInputProps:eg,getThumbProps:eh,open:eb,active:ex,axis:ey,focusedThumbIndex:eS,range:eZ,dragging:ek,marks:ez,values:ew,trackOffset:eC,trackLeap:eI,getThumbStyle:eR}=function(e){let{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:l=!1,marks:s=!1,max:c=100,min:g=0,name:I,onChange:R,onChangeCommitted:P,orientation:L="horizontal",rootRef:D,scale:T=w,step:B=1,tabIndex:M,value:O}=e,E=i.useRef(),[$,j]=i.useState(-1),[H,V]=i.useState(-1),[N,W]=i.useState(!1),A=i.useRef(0),[_,F]=function({controlled:e,default:t,name:r,state:n="value"}){let{current:o}=i.useRef(void 0!==e),[a,l]=i.useState(t),s=o?e:a,c=i.useCallback(e=>{o||l(e)},[]);return[s,c]}({controlled:O,default:null!=r?r:g,name:"Slider"}),J=R&&((e,t,r)=>{let n=e.nativeEvent||e,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:I}}),R(o,t,r)}),q=Array.isArray(_),U=q?_.slice().sort(h):[_];U=U.map(e=>b(e,g,c));let X=!0===s&&null!==B?[...Array(Math.floor((c-g)/B)+1)].map((e,t)=>({value:g+B*t})):s||[],G=X.map(e=>e.value),{isFocusVisibleRef:K,onBlur:Y,onFocus:Q,ref:ee}=(0,d.Z)(),[et,er]=i.useState(-1),en=i.useRef(),eo=(0,f.Z)(ee,en),ea=(0,f.Z)(D,eo),ei=e=>t=>{var r;let n=Number(t.currentTarget.getAttribute("data-index"));Q(t),!0===K.current&&er(n),V(n),null==e||null==(r=e.onFocus)||r.call(e,t)},el=e=>t=>{var r;Y(t),!1===K.current&&er(-1),V(-1),null==e||null==(r=e.onBlur)||r.call(e,t)};(0,v.Z)(()=>{if(n&&en.current.contains(document.activeElement)){var e;null==(e=document.activeElement)||e.blur()}},[n]),n&&-1!==$&&j(-1),n&&-1!==et&&er(-1);let es=e=>t=>{var r;null==(r=e.onChange)||r.call(e,t);let n=Number(t.currentTarget.getAttribute("data-index")),a=U[n],i=G.indexOf(a),l=t.target.valueAsNumber;if(X&&null==B){let e=G[G.length-1];l=l>e?e:l{let r,n;let{current:a}=en,{width:i,height:l,bottom:s,left:u}=a.getBoundingClientRect();if(r=0===eu.indexOf("vertical")?(s-e.y)/l:(e.x-u)/i,-1!==eu.indexOf("-reverse")&&(r=1-r),n=(c-g)*r+g,B)n=function(e,t,r){let n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(t)))}(n,B,g);else{let e=x(G,n);n=G[e]}n=b(n,g,c);let d=0;if(q){d=t?ec.current:x(U,n),o&&(n=b(n,U[d-1]||-1/0,U[d+1]||1/0));let e=n;n=S({values:U,newValue:n,index:d}),o&&t||(d=n.indexOf(e),ec.current=d)}return{newValue:n,activeIndex:d}},ef=p(e=>{let t=y(e,E);if(!t)return;if(A.current+=1,"mousemove"===e.type&&0===e.buttons){ev(e);return}let{newValue:r,activeIndex:n}=ed({finger:t,move:!0});Z({sliderRef:en,activeIndex:n,setActive:j}),F(r),!N&&A.current>2&&W(!0),J&&!k(r,_)&&J(e,r,n)}),ev=p(e=>{let t=y(e,E);if(W(!1),!t)return;let{newValue:r}=ed({finger:t,move:!0});j(-1),"touchend"===e.type&&V(-1),P&&P(e,r),E.current=void 0,em()}),ep=p(e=>{if(n)return;C()||e.preventDefault();let t=e.changedTouches[0];null!=t&&(E.current=t.identifier);let r=y(e,E);if(!1!==r){let{newValue:t,activeIndex:n}=ed({finger:r});Z({sliderRef:en,activeIndex:n,setActive:j}),F(t),J&&!k(t,_)&&J(e,t,n)}A.current=0;let o=(0,u.Z)(en.current);o.addEventListener("touchmove",ef),o.addEventListener("touchend",ev)}),em=i.useCallback(()=>{let e=(0,u.Z)(en.current);e.removeEventListener("mousemove",ef),e.removeEventListener("mouseup",ev),e.removeEventListener("touchmove",ef),e.removeEventListener("touchend",ev)},[ev,ef]);i.useEffect(()=>{let{current:e}=en;return e.addEventListener("touchstart",ep,{passive:C()}),()=>{e.removeEventListener("touchstart",ep,{passive:C()}),em()}},[em,ep]),i.useEffect(()=>{n&&em()},[n,em]);let eg=e=>t=>{var r;if(null==(r=e.onMouseDown)||r.call(e,t),n||t.defaultPrevented||0!==t.button)return;t.preventDefault();let o=y(t,E);if(!1!==o){let{newValue:e,activeIndex:r}=ed({finger:o});Z({sliderRef:en,activeIndex:r,setActive:j}),F(e),J&&!k(e,_)&&J(t,e,r)}A.current=0;let a=(0,u.Z)(en.current);a.addEventListener("mousemove",ef),a.addEventListener("mouseup",ev)},eh=((q?U[0]:g)-g)*100/(c-g),eb=(U[U.length-1]-g)*100/(c-g)-eh,ex=e=>t=>{var r;null==(r=e.onMouseOver)||r.call(e,t);let n=Number(t.currentTarget.getAttribute("data-index"));V(n)},ey=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),V(-1)};return{active:$,axis:eu,axisProps:z,dragging:N,focusedThumbIndex:et,getHiddenInputProps:(r={})=>{var o;let i={onChange:es(r||{}),onFocus:ei(r||{}),onBlur:el(r||{})},s=(0,a.Z)({},r,i);return(0,a.Z)({tabIndex:M,"aria-labelledby":t,"aria-orientation":L,"aria-valuemax":T(c),"aria-valuemin":T(g),name:I,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(o=e.step)?o:void 0,disabled:n},s,{style:(0,a.Z)({},m,{direction:l?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{let t={onMouseDown:eg(e||{})},r=(0,a.Z)({},e,t);return(0,a.Z)({ref:ea},r)},getThumbProps:(e={})=>{let t={onMouseOver:ex(e||{}),onMouseLeave:ey(e||{})};return(0,a.Z)({},e,t)},marks:X,open:H,range:q,rootRef:ea,trackLeap:eb,trackOffset:eh,values:U,getThumbStyle:e=>({pointerEvents:-1!==$&&$!==e?"none":void 0})}}((0,a.Z)({},ev,{rootRef:t}));ev.marked=ez.length>0&&ez.some(e=>e.label),ev.dragging=ek;let eP=(0,a.Z)({},ep[ey].offset(eC),ep[ey].leap(eI)),eL=j(ev),eD=(0,a.Z)({},eu,{component:el,slots:es,slotProps:ec}),[eT,eB]=(0,D.Z)("root",{ref:t,className:(0,l.Z)(eL.root,c),elementType:V,externalForwardedProps:eD,getSlotProps:em,ownerState:ev}),[eM,eO]=(0,D.Z)("rail",{className:eL.rail,elementType:N,externalForwardedProps:eD,ownerState:ev}),[eE,e$]=(0,D.Z)("track",{additionalProps:{style:eP},className:eL.track,elementType:W,externalForwardedProps:eD,ownerState:ev}),[ej,eH]=(0,D.Z)("mark",{className:eL.mark,elementType:_,externalForwardedProps:eD,ownerState:ev}),[eV,eN]=(0,D.Z)("markLabel",{className:eL.markLabel,elementType:J,externalForwardedProps:eD,ownerState:ev,additionalProps:{"aria-hidden":!0}}),[eW,eA]=(0,D.Z)("thumb",{className:eL.thumb,elementType:A,externalForwardedProps:eD,getSlotProps:eh,ownerState:ev}),[e_,eF]=(0,D.Z)("input",{className:eL.input,elementType:q,externalForwardedProps:eD,getSlotProps:eg,ownerState:ev}),[eJ,eq]=(0,D.Z)("valueLabel",{className:eL.valueLabel,elementType:F,externalForwardedProps:eD,ownerState:ev});return(0,O.jsxs)(eT,(0,a.Z)({},eB,{children:[(0,O.jsx)(eM,(0,a.Z)({},eO)),(0,O.jsx)(eE,(0,a.Z)({},e$)),ez.filter(e=>e.value>=G&&e.value<=X).map((e,t)=>{let r;let n=(e.value-G)*100/(X-G),o=ep[ey].offset(n);return r=!1===ee?-1!==ew.indexOf(e.value):"normal"===ee&&(eZ?e.value>=ew[0]&&e.value<=ew[ew.length-1]:e.value<=ew[0])||"inverted"===ee&&(eZ?e.value<=ew[0]||e.value>=ew[ew.length-1]:e.value>=ew[0]),(0,O.jsxs)(i.Fragment,{children:[(0,O.jsx)(ej,(0,a.Z)({"data-index":t},eH,!(0,I.X)(ej)&&{ownerState:(0,a.Z)({},eH.ownerState,{percent:n})},{style:(0,a.Z)({},o,eH.style),className:(0,l.Z)(eH.className,r&&eL.markActive)})),null!=e.label?(0,O.jsx)(eV,(0,a.Z)({"data-index":t},eN,{style:(0,a.Z)({},o,eN.style),className:(0,l.Z)(eL.markLabel,eN.className,r&&eL.markLabelActive),children:e.label})):null]},e.value)}),ew.map((e,t)=>{let r=(e-G)*100/(X-G),o=ep[ey].offset(r);return(0,O.jsxs)(eW,(0,a.Z)({"data-index":t},eA,{className:(0,l.Z)(eA.className,ex===t&&eL.active,eS===t&&eL.focusVisible),style:(0,a.Z)({},o,eR(t),eA.style),children:[(0,O.jsx)(e_,(0,a.Z)({"data-index":t,"aria-label":M?M(t):n,"aria-valuenow":Y(e),"aria-valuetext":H?H(Y(e),t):s,value:ew[t]},eF)),"off"!==et?(0,O.jsx)(eJ,(0,a.Z)({},eq,{className:(0,l.Z)(eq.className,(eb===t||ex===t||"on"===et)&&eL.valueLabelOpen),children:"function"==typeof er?er(Y(e),t):er})):null]}),t)})]}))});var X=U},21694:function(e,t,r){r.d(t,{Z:function(){return j}});var n=r(63366),o=r(87462),a=r(67294),i=r(62908),l=r(58510),s=r(73935),c=r(22760),u=r(36425);function d(e){let t=(0,u.Z)(e);return t.defaultView||window}var f=r(54895),v=r(85893);let p=["onChange","maxRows","minRows","style","value"];function m(e){return parseInt(e,10)||0}let g={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function h(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}let b=a.forwardRef(function(e,t){let{onChange:r,maxRows:i,minRows:l=1,style:u,value:b}=e,x=(0,n.Z)(e,p),{current:y}=a.useRef(null!=b),S=a.useRef(null),Z=(0,c.Z)(t,S),k=a.useRef(null),z=a.useRef(0),[w,C]=a.useState({outerHeightStyle:0}),I=a.useCallback(()=>{let t=S.current,r=d(t),n=r.getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0};let o=k.current;o.style.width=n.width,o.value=t.value||e.placeholder||"x","\n"===o.value.slice(-1)&&(o.value+=" ");let a=n.boxSizing,s=m(n.paddingBottom)+m(n.paddingTop),c=m(n.borderBottomWidth)+m(n.borderTopWidth),u=o.scrollHeight;o.value="x";let f=o.scrollHeight,v=u;l&&(v=Math.max(Number(l)*f,v)),i&&(v=Math.min(Number(i)*f,v)),v=Math.max(v,f);let p=v+("border-box"===a?s+c:0),g=1>=Math.abs(v-u);return{outerHeightStyle:p,overflow:g}},[i,l,e.placeholder]),R=(e,t)=>{let{outerHeightStyle:r,overflow:n}=t;return z.current<20&&(r>0&&Math.abs((e.outerHeightStyle||0)-r)>1||e.overflow!==n)?(z.current+=1,{overflow:n,outerHeightStyle:r}):e},P=a.useCallback(()=>{let e=I();h(e)||C(t=>R(t,e))},[I]),L=()=>{let e=I();h(e)||s.flushSync(()=>{C(t=>R(t,e))})};return a.useEffect(()=>{let e;let t=function(e,t=166){let r;function n(...o){clearTimeout(r),r=setTimeout(()=>{e.apply(this,o)},t)}return n.clear=()=>{clearTimeout(r)},n}(()=>{z.current=0,S.current&&L()}),r=S.current,n=d(r);return n.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(()=>{z.current=0,S.current&&L()})).observe(r),()=>{t.clear(),n.removeEventListener("resize",t),e&&e.disconnect()}}),(0,f.Z)(()=>{P()}),a.useEffect(()=>{z.current=0},[b]),(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)("textarea",(0,o.Z)({value:b,onChange:e=>{z.current=0,y||P(),r&&r(e)},ref:Z,rows:l,style:(0,o.Z)({height:w.outerHeightStyle,overflow:w.overflow?"hidden":void 0},u)},x)),(0,v.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:k,tabIndex:-1,style:(0,o.Z)({},g.shadow,u,{paddingTop:0,paddingBottom:0})})]})});var x=r(74312),y=r(20407),S=r(2226),Z=r(30220),k=r(26821);function z(e){return(0,k.d6)("MuiTextarea",e)}let w=(0,k.sI)("MuiTextarea",["root","textarea","startDecorator","endDecorator","formControl","disabled","error","focused","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft"]);var C=r(78758);let I=a.createContext(void 0);var R=r(30437),P=r(76043);let L=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"],D=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","size","color","variant","startDecorator","endDecorator","minRows","maxRows","component","slots","slotProps"],T=e=>{let{disabled:t,variant:r,color:n,size:o}=e,a={root:["root",t&&"disabled",r&&`variant${(0,i.Z)(r)}`,n&&`color${(0,i.Z)(n)}`,o&&`size${(0,i.Z)(o)}`],textarea:["textarea"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.Z)(a,z,{})},B=(0,x.Z)("div",{name:"JoyTextarea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,n,a,i,l;let s=null==(r=e.variants[`${t.variant}`])?void 0:r[t.color];return[(0,o.Z)({"--Textarea-radius":e.vars.radius.sm,"--Textarea-gap":"0.5rem","--Textarea-placeholderColor":"inherit","--Textarea-placeholderOpacity":.64,"--Textarea-decoratorColor":e.vars.palette.text.icon,"--Textarea-focused":"0","--Textarea-focusedThickness":e.vars.focus.thickness},"context"===t.color?{"--Textarea-focusedHighlight":e.vars.palette.focusVisible}:{"--Textarea-focusedHighlight":null==(n=e.vars.palette["neutral"===t.color?"primary":t.color])?void 0:n[500]},"sm"===t.size&&{"--Textarea-minHeight":"2rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.5rem","--Textarea-decoratorChildHeight":"min(1.5rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},"md"===t.size&&{"--Textarea-minHeight":"2.5rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.75rem","--Textarea-decoratorChildHeight":"min(2rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},"lg"===t.size&&{"--Textarea-minHeight":"3rem","--Textarea-paddingBlock":"calc(0.75rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"1rem","--Textarea-gap":"0.75rem","--Textarea-decoratorChildHeight":"min(2.375rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--_Textarea-paddingBlock":"max((var(--Textarea-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Textarea-decoratorChildHeight)) / 2, 0px)","--Textarea-decoratorChildRadius":"max(var(--Textarea-radius) - var(--variant-borderWidth, 0px) - var(--_Textarea-paddingBlock), min(var(--_Textarea-paddingBlock) + var(--variant-borderWidth, 0px), var(--Textarea-radius) / 2))","--Button-minHeight":"var(--Textarea-decoratorChildHeight)","--IconButton-size":"var(--Textarea-decoratorChildHeight)","--Button-radius":"var(--Textarea-decoratorChildRadius)","--IconButton-radius":"var(--Textarea-decoratorChildRadius)",boxSizing:"border-box"},"plain"!==t.variant&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Textarea-minHeight)",cursor:"text",position:"relative",display:"flex",flexDirection:"column",paddingInlineStart:"var(--Textarea-paddingInline)",paddingBlock:"var(--Textarea-paddingBlock)",borderRadius:"var(--Textarea-radius)"},e.typography[`body-${t.size}`],s,{backgroundColor:null!=(a=null==s?void 0:s.backgroundColor)?a:e.vars.palette.background.surface,"&:before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Textarea-focusedInset, inset) 0 0 0 calc(var(--Textarea-focused) * var(--Textarea-focusedThickness)) var(--Textarea-focusedHighlight)"}}),{"&:hover":(0,o.Z)({},null==(i=e.variants[`${t.variant}Hover`])?void 0:i[t.color],{backgroundColor:null,cursor:"text"}),[`&.${w.disabled}`]:null==(l=e.variants[`${t.variant}Disabled`])?void 0:l[t.color],"&:focus-within::before":{"--Textarea-focused":"1"}}]}),M=(0,x.Z)(b,{name:"JoyTextarea",slot:"Textarea",overridesResolver:(e,t)=>t.textarea})({resize:"none",border:"none",minWidth:0,outline:0,padding:0,paddingInlineEnd:"var(--Textarea-paddingInline)",flex:"auto",alignSelf:"stretch",color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit","&::-webkit-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"}}),O=(0,x.Z)("div",{name:"JoyTextarea",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockEnd:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),E=(0,x.Z)("div",{name:"JoyTextarea",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockStart:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),$=a.forwardRef(function(e,t){var r,i,l,s,u,d,f;let p=(0,y.Z)({props:e,name:"JoyTextarea"}),m=function(e,t){let r=a.useContext(P.Z),{"aria-describedby":i,"aria-label":l,"aria-labelledby":s,autoComplete:u,autoFocus:d,className:f,defaultValue:v,disabled:p,error:m,id:g,name:h,onClick:b,onChange:x,onKeyDown:y,onKeyUp:S,onFocus:Z,onBlur:k,placeholder:z,readOnly:w,required:D,type:T,value:B}=e,M=(0,n.Z)(e,L),{getRootProps:O,getInputProps:E,focused:$,error:j,disabled:H}=function(e){let t,r,n,i,l;let{defaultValue:s,disabled:u=!1,error:d=!1,onBlur:f,onChange:v,onFocus:p,required:m=!1,value:g,inputRef:h}=e,b=a.useContext(I);if(b){var x,y,S;t=void 0,r=null!=(x=b.disabled)&&x,n=null!=(y=b.error)&&y,i=null!=(S=b.required)&&S,l=b.value}else t=s,r=u,n=d,i=m,l=g;let{current:Z}=a.useRef(null!=l),k=a.useCallback(e=>{},[]),z=a.useRef(null),w=(0,c.Z)(z,h,k),[P,L]=a.useState(!1);a.useEffect(()=>{!b&&r&&P&&(L(!1),null==f||f())},[b,r,P,f]);let D=e=>t=>{var r,n;if(null!=b&&b.disabled){t.stopPropagation();return}null==(r=e.onFocus)||r.call(e,t),b&&b.onFocus?null==b||null==(n=b.onFocus)||n.call(b):L(!0)},T=e=>t=>{var r;null==(r=e.onBlur)||r.call(e,t),b&&b.onBlur?b.onBlur():L(!1)},B=e=>(t,...r)=>{var n,o;if(!Z){let e=t.target||z.current;if(null==e)throw Error((0,C.Z)(17))}null==b||null==(n=b.onChange)||n.call(b,t),null==(o=e.onChange)||o.call(e,t,...r)},M=e=>t=>{var r;z.current&&t.currentTarget===t.target&&z.current.focus(),null==(r=e.onClick)||r.call(e,t)};return{disabled:r,error:n,focused:P,formControlContext:b,getInputProps:(e={})=>{let a=(0,o.Z)({},{onBlur:f,onChange:v,onFocus:p},(0,R._)(e)),s=(0,o.Z)({},e,a,{onBlur:T(a),onChange:B(a),onFocus:D(a)});return(0,o.Z)({},s,{"aria-invalid":n||void 0,defaultValue:t,ref:w,value:l,required:i,disabled:r})},getRootProps:(t={})=>{let r=(0,R._)(e,["onBlur","onChange","onFocus"]),n=(0,o.Z)({},r,(0,R._)(t));return(0,o.Z)({},t,n,{onClick:M(n)})},inputRef:w,required:i,value:l}}({disabled:null!=p?p:null==r?void 0:r.disabled,defaultValue:v,error:m,onBlur:k,onClick:b,onChange:x,onFocus:Z,required:null!=D?D:null==r?void 0:r.required,value:B}),V={[t.disabled]:H,[t.error]:j,[t.focused]:$,[t.formControl]:!!r,[f]:f},N={[t.disabled]:H};return(0,o.Z)({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":l,"aria-labelledby":s,autoComplete:u,autoFocus:d,disabled:H,id:g,onKeyDown:y,onKeyUp:S,name:h,placeholder:z,readOnly:w,type:T},rootStateClasses:V,inputStateClasses:N,getRootProps:O,getInputProps:E,focused:$,error:j,disabled:H},M)}(p,w),{propsToForward:g,rootStateClasses:h,inputStateClasses:b,getRootProps:x,getInputProps:k,formControl:z,focused:$,error:j=!1,disabled:H=!1,size:V="md",color:N="neutral",variant:W="outlined",startDecorator:A,endDecorator:_,minRows:F,maxRows:J,component:q,slots:U={},slotProps:X={}}=m,G=(0,n.Z)(m,D),K=null!=(r=null!=(i=e.disabled)?i:null==z?void 0:z.disabled)?r:H,Y=null!=(l=null!=(s=e.error)?s:null==z?void 0:z.error)?l:j,Q=null!=(u=null!=(d=e.size)?d:null==z?void 0:z.size)?u:V,{getColor:ee}=(0,S.VT)(W),et=ee(e.color,Y?"danger":null!=(f=null==z?void 0:z.color)?f:N),er=(0,o.Z)({},p,{color:et,disabled:K,error:Y,focused:$,size:Q,variant:W}),en=T(er),eo=(0,o.Z)({},G,{component:q,slots:U,slotProps:X}),[ea,ei]=(0,Z.Z)("root",{ref:t,className:[en.root,h],elementType:B,externalForwardedProps:eo,getSlotProps:x,ownerState:er}),[el,es]=(0,Z.Z)("textarea",{additionalProps:{id:null==z?void 0:z.htmlFor,"aria-describedby":null==z?void 0:z["aria-describedby"]},className:[en.textarea,b],elementType:M,internalForwardedProps:(0,o.Z)({},g,{minRows:F,maxRows:J}),externalForwardedProps:eo,getSlotProps:k,ownerState:er}),[ec,eu]=(0,Z.Z)("startDecorator",{className:en.startDecorator,elementType:O,externalForwardedProps:eo,ownerState:er}),[ed,ef]=(0,Z.Z)("endDecorator",{className:en.endDecorator,elementType:E,externalForwardedProps:eo,ownerState:er});return(0,v.jsxs)(ea,(0,o.Z)({},ei,{children:[A&&(0,v.jsx)(ec,(0,o.Z)({},eu,{children:A})),(0,v.jsx)(el,(0,o.Z)({},es)),_&&(0,v.jsx)(ed,(0,o.Z)({},ef,{children:_}))]}))});var j=$},55907:function(e,t,r){r.d(t,{Yb:function(){return l},yP:function(){return i}});var n=r(67294),o=r(85893);let a=n.createContext(void 0);function i(e,t){var r;let o,i;let l=n.useContext(a),[s,c]="string"==typeof l?l.split(":"):[],u=(r=s||void 0,o=c||void 0,i=r,"outlined"===r&&(o="neutral",i="plain"),"plain"===r&&(o="neutral"),{variant:i,color:o});return u.variant=e||u.variant,u.color=t||u.color,u}function l({children:e,color:t,variant:r}){return(0,o.jsx)(a.Provider,{value:`${r||""}:${t||""}`,children:e})}},36425:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){return e&&e.ownerDocument||document}},54895:function(e,t,r){var n=r(67294);let o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;t.Z=o},89326:function(e,t,r){r.d(t,{Z:function(){return l}});var n,o=r(67294);let a=0,i=(n||(n=r.t(o,2)))["useId".toString()];function l(e){if(void 0!==i){let t=i();return null!=e?e:t}return function(e){let[t,r]=o.useState(e),n=e||t;return o.useEffect(()=>{null==t&&r(`mui-${a+=1}`)},[t]),n}(e)}},11136:function(e,t,r){r.d(t,{Z:function(){return f}});var n=r(67294);class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}let a=!0,i=!1,l=new o,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function u(){a=!1}function d(){"hidden"===this.visibilityState&&i&&(a=!0)}function f(){let e=n.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0)}},[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return a||function(e){let{type:t,tagName:r}=e;return"INPUT"===r&&!!s[t]&&!e.readOnly||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(i=!0,l.start(100,()=>{i=!1}),t.current=!1,!0)},ref:e}}}}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/2913-19ce7fd997956492.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/2913-315ad705b1306902.js similarity index 100% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/2913-19ce7fd997956492.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/2913-315ad705b1306902.js diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3768-deadababc1a231b3.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3768-973750300df397d1.js similarity index 100% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3768-deadababc1a231b3.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3768-973750300df397d1.js diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-50cdfc0c798fc2d4.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-b9b23649107dc418.js similarity index 99% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-50cdfc0c798fc2d4.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-b9b23649107dc418.js index 921fc0e8d..7442bae25 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-50cdfc0c798fc2d4.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/3913-b9b23649107dc418.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3913],{56397:function(e,t,l){l.r(t);var n=l(85893),r=l(48218),a=l(58638),i=l(31418),s=l(45030),o=l(20640),c=l.n(o),d=l(67294),u=l(73913);t.default=(0,d.memo)(()=>{var e;let{appInfo:t}=(0,d.useContext)(u.MobileChatContext),{message:l}=i.Z.useApp(),[o,m]=(0,d.useState)(0);if(!(null==t?void 0:t.app_code))return null;let v=async()=>{let e=c()("dingtalk://dingtalkclient/page/link?url=".concat(encodeURIComponent(location.href),"&pc_slide=true"));l[e?"success":"error"](e?"复制成功":"复制失败")};return o>6&&l.info(JSON.stringify(window.navigator.userAgent),2,()=>{m(0)}),(0,n.jsxs)("header",{className:"flex w-full items-center justify-between bg-[rgba(255,255,255,0.9)] border dark:bg-black dark:border-[rgba(255,255,255,0.6)] rounded-xl mx-auto px-4 py-2 mb-4 sticky top-4 z-50 mt-4 shadow-md",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",onClick:()=>m(o+1),children:[(0,n.jsx)(r.Z,{scene:(null==t?void 0:null===(e=t.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent",width:8,height:8}),(0,n.jsxs)("div",{className:"flex flex-col ml-2",children:[(0,n.jsx)(s.Z.Text,{className:"text-md font-bold line-clamp-2",children:null==t?void 0:t.app_name}),(0,n.jsx)(s.Z.Text,{className:"text-sm line-clamp-2",children:null==t?void 0:t.app_describe})]})]}),(0,n.jsx)("div",{onClick:v,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,n.jsx)(a.Z,{className:"text-lg"})})]})})},74638:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(62418),i=l(25519),s=l(30159),o=l(87740),c=l(50888),d=l(52645),u=l(27496),m=l(1375),v=l(65654),x=l(66309),p=l(55241),h=l(74330),f=l(25278),g=l(14726),b=l(93967),j=l.n(b),y=l(39332),w=l(67294),_=l(73913),N=l(7001),k=l(73749),C=l(97109),Z=l(83454);let S=["magenta","orange","geekblue","purple","cyan","green"];t.default=()=>{var e,t;let l=(0,y.useSearchParams)(),b=null!==(t=null==l?void 0:l.get("ques"))&&void 0!==t?t:"",{history:R,model:E,scene:M,temperature:O,resource:A,conv_uid:P,appInfo:T,scrollViewRef:V,order:z,userInput:D,ctrl:I,canAbort:J,canNewChat:L,setHistory:U,setCanNewChat:q,setCarAbort:H,setUserInput:W}=(0,w.useContext)(_.MobileChatContext),[$,B]=(0,w.useState)(!1),[F,K]=(0,w.useState)(!1),G=async e=>{var t,l,n;W(""),I.current=new AbortController;let r={chat_mode:M,model_name:E,user_input:e||D,conv_uid:P,temperature:O,app_code:null==T?void 0:T.app_code,...A&&{select_param:JSON.stringify(A)}};if(R&&R.length>0){let e=null==R?void 0:R.filter(e=>"view"===e.role);z.current=e[e.length-1].order+1}let s=[{role:"human",context:e||D,model_name:E,order:z.current,time_stamp:0},{role:"view",context:"",model_name:E,order:z.current,time_stamp:0,thinking:!0}],o=s.length-1;U([...R,...s]),q(!1);try{await (0,m.L)("".concat(null!==(t=Z.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[i.gp]:null!==(l=(0,a.n5)())&&void 0!==l?l:""},signal:I.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===m.a)return},onclose(){var e;null===(e=I.current)||void 0===e||e.abort(),q(!0),H(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(q(!0),H(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(s[o].context=null==t?void 0:t.replace("[ERROR]",""),s[o].thinking=!1,U([...R,...s]),q(!0),H(!1)):(H(!0),s[o].context=t,s[o].thinking=!1,U([...R,...s]))}})}catch(e){null===(n=I.current)||void 0===n||n.abort(),s[o].context="Sorry, we meet some error, please try again later.",s[o].thinking=!1,U([...s]),q(!0),H(!1)}},Q=async()=>{D.trim()&&L&&await G()};(0,w.useEffect)(()=>{var e,t;null===(e=V.current)||void 0===e||e.scrollTo({top:null===(t=V.current)||void 0===t?void 0:t.scrollHeight,behavior:"auto"})},[R,V]);let X=(0,w.useMemo)(()=>{if(!T)return[];let{param_need:e=[]}=T;return null==e?void 0:e.map(e=>e.type)},[T]),Y=(0,w.useMemo)(()=>{var e;return 0===R.length&&T&&!!(null==T?void 0:null===(e=T.recommend_questions)||void 0===e?void 0:e.length)},[R,T]),{run:ee,loading:et}=(0,v.Z)(async()=>await (0,r.Vx)((0,r.zR)(P)),{manual:!0,onSuccess:()=>{U([])}});return(0,w.useEffect)(()=>{b&&E&&P&&T&&G(b)},[T,P,E,b]),(0,n.jsxs)("div",{className:"flex flex-col",children:[Y&&(0,n.jsx)("ul",{children:null==T?void 0:null===(e=T.recommend_questions)||void 0===e?void 0:e.map((e,t)=>(0,n.jsx)("li",{className:"mb-3",children:(0,n.jsx)(x.Z,{color:S[t],className:"p-2 rounded-xl",onClick:async()=>{G(e.question)},children:e.question})},e.id))}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 mb-1 w-full overflow-x-auto",children:[(null==X?void 0:X.includes("model"))&&(0,n.jsx)(N.default,{}),(null==X?void 0:X.includes("resource"))&&(0,n.jsx)(k.default,{}),(null==X?void 0:X.includes("temperature"))&&(0,n.jsx)(C.default,{})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-lg font-bold",children:[(0,n.jsx)(p.Z,{content:"暂停回复",trigger:["hover"],children:(0,n.jsx)(s.Z,{className:j()("p-2 cursor-pointer",{"text-[#0c75fc]":J,"text-gray-400":!J}),onClick:()=>{var e;J&&(null===(e=I.current)||void 0===e||e.abort(),setTimeout(()=>{H(!1),q(!0)},100))}})}),(0,n.jsx)(p.Z,{content:"再来一次",trigger:["hover"],children:(0,n.jsx)(o.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!L}),onClick:()=>{var e,t;if(!L||0===R.length)return;let l=null===(e=null===(t=R.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];G((null==l?void 0:l.context)||"")}})}),et?(0,n.jsx)(h.Z,{spinning:et,indicator:(0,n.jsx)(c.Z,{style:{fontSize:18},spin:!0}),className:"p-2"}):(0,n.jsx)(p.Z,{content:"清除历史",trigger:["hover"],children:(0,n.jsx)(d.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!L}),onClick:()=>{L&&ee()}})})]})]}),(0,n.jsxs)("div",{className:j()("flex py-2 px-3 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border",{"border-[#0c75fc] dark:border-[rgba(12,117,252,0.8)]":$}),children:[(0,n.jsx)(f.default.TextArea,{placeholder:"可以问我任何问题",className:"w-full resize-none border-0 p-0 focus:shadow-none",value:D,autoSize:{minRows:1},onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(F){e.preventDefault();return}D.trim()&&(e.preventDefault(),Q())}},onChange:e=>{W(e.target.value)},onFocus:()=>{B(!0)},onBlur:()=>B(!1),onCompositionStartCapture:()=>{K(!0)},onCompositionEndCapture:()=>{setTimeout(()=>{K(!1)},0)}}),(0,n.jsx)(g.ZP,{type:"primary",className:j()("flex items-center justify-center rounded-lg bg-button-gradient border-0 ml-2",{"opacity-40 cursor-not-allowed":!D.trim()||!L}),onClick:Q,children:L?(0,n.jsx)(u.Z,{}):(0,n.jsx)(h.Z,{indicator:(0,n.jsx)(c.Z,{className:"text-white"})})})]})]})}},7001:function(e,t,l){l.r(t);var n=l(85893),r=l(41468),a=l(39718),i=l(94668),s=l(85418),o=l(55241),c=l(67294),d=l(73913);t.default=()=>{let{modelList:e}=(0,c.useContext)(r.p),{model:t,setModel:l}=(0,c.useContext)(d.MobileChatContext),u=(0,c.useMemo)(()=>e.length>0?e.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{l(e)},children:[(0,n.jsx)(a.Z,{width:14,height:14,model:e}),(0,n.jsx)("span",{className:"text-xs",children:e})]}),key:e})):[],[e,l]);return(0,n.jsx)(s.Z,{menu:{items:u},placement:"top",trigger:["click"],children:(0,n.jsx)(o.Z,{content:t,children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(a.Z,{width:16,height:16,model:t}),(0,n.jsx)("span",{className:"text-xs font-medium line-clamp-1",style:{maxWidth:96},children:t}),(0,n.jsx)(i.Z,{rotate:90})]})})})}},46568:function(e,t,l){l.r(t);var n=l(85893),r=l(25675),a=l.n(r),i=l(67294);t.default=(0,i.memo)(e=>{let{width:t,height:l,src:r,label:i}=e;return(0,n.jsx)(a(),{width:t||14,height:l||14,src:r,alt:i||"db-icon",priority:!0})})},73749:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(57249),i=l(62418),s=l(50888),o=l(94668),c=l(83266),d=l(65654),u=l(74330),m=l(23799),v=l(85418),x=l(67294),p=l(73913),h=l(46568);t.default=()=>{let{appInfo:e,resourceList:t,scene:l,model:f,conv_uid:g,getChatHistoryRun:b,setResource:j,resource:y}=(0,x.useContext)(p.MobileChatContext),{temperatureValue:w,maxNewTokensValue:_}=(0,x.useContext)(a.ChatContentContext),[N,k]=(0,x.useState)(null),C=(0,x.useMemo)(()=>{var t,l,n;return null===(t=null==e?void 0:null===(l=e.param_need)||void 0===l?void 0:l.filter(e=>"resource"===e.type))||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.value},[e]),Z=(0,x.useMemo)(()=>t&&t.length>0?t.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{k(e),j(e.space_id||e.param)},children:[(0,n.jsx)(h.default,{width:14,height:14,src:i.S$[e.type].icon,label:i.S$[e.type].label}),(0,n.jsx)("span",{className:"text-xs",children:e.param})]}),key:e.space_id||e.param})):[],[t,j]),{run:S,loading:R}=(0,d.Z)(async e=>{let[,t]=await (0,r.Vx)((0,r.qn)({convUid:g,chatMode:l,data:e,model:f,temperatureValue:w,maxNewTokensValue:_,config:{timeout:36e5}}));return j(t),t},{manual:!0,onSuccess:async()=>{await b()}}),E=async e=>{let t=new FormData;t.append("doc_file",null==e?void 0:e.file),await S(t)},M=(0,x.useMemo)(()=>R?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(u.Z,{size:"small",indicator:(0,n.jsx)(s.Z,{spin:!0})}),(0,n.jsx)("span",{className:"text-xs",children:"上传中"})]}):y?(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("span",{className:"text-xs",children:y.file_name}),(0,n.jsx)(o.Z,{rotate:90})]}):(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(c.Z,{className:"text-base"}),(0,n.jsx)("span",{className:"text-xs",children:"上传文件"})]}),[R,y]);return(0,n.jsx)(n.Fragment,{children:(()=>{switch(C){case"excel_file":case"text_file":case"image_file":return(0,n.jsx)("div",{className:"flex items-center justify-center gap-1 border rounded-xl bg-white dark:bg-black px-2 flex-shrink-0",children:(0,n.jsx)(m.default,{name:"file",accept:".xlsx,.xls",maxCount:1,showUploadList:!1,beforeUpload:()=>!1,onChange:E,className:"flex h-full w-full items-center justify-center",children:M})});case"database":case"knowledge":case"plugin":case"awel_flow":var e,l,r,a,s;if(!(null==t?void 0:t.length))return null;return(0,n.jsx)(v.Z,{menu:{items:Z},placement:"top",trigger:["click"],children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(h.default,{width:14,height:14,src:null===(e=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(l=t[0])||void 0===l?void 0:l.type)])||void 0===e?void 0:e.icon,label:null===(r=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(a=t[0])||void 0===a?void 0:a.type)])||void 0===r?void 0:r.label}),(0,n.jsx)("span",{className:"text-xs font-medium",children:(null==N?void 0:N.param)||(null==t?void 0:null===(s=t[0])||void 0===s?void 0:s.param)}),(0,n.jsx)(o.Z,{rotate:90})]})})}})()})}},97109:function(e,t,l){l.r(t);var n=l(85893),r=l(70065),a=l(85418),i=l(30568),s=l(67294),o=l(73913);t.default=()=>{let{temperature:e,setTemperature:t}=(0,s.useContext)(o.MobileChatContext),l=e=>{isNaN(e)||t(e)};return(0,n.jsx)(a.Z,{trigger:["click"],dropdownRender:()=>(0,n.jsx)("div",{className:"flex h-28 bg-white dark:bg-[rgba(255,255,255,0.5)] items-center justify-center rounded-xl py-3",children:(0,n.jsx)(i.Z,{defaultValue:.5,max:1,min:0,step:.1,vertical:!0,onChange:l,value:e})}),placement:"top",children:(0,n.jsxs)("div",{className:"flex items-center justify-between border rounded-xl bg-white dark:bg-black w-14 p-2 flex-shrink-0",children:[(0,n.jsx)(r.Z,{type:"icon-icons-temperature",className:"text-sm"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:e})]})})}},73913:function(e,t,l){l.r(t),l.d(t,{MobileChatContext:function(){return j}});var n=l(85893),r=l(41468),a=l(76212),i=l(2440),s=l(62418),o=l(25519),c=l(1375),d=l(65654),u=l(74330),m=l(5152),v=l.n(m),x=l(39332),p=l(67294),h=l(56397),f=l(74638),g=l(83454);let b=v()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(1154),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3768),l.e(5789),l.e(6818)]).then(l.bind(l,36818)),{loadableGenerated:{webpack:()=>[36818]},ssr:!1}),j=(0,p.createContext)({model:"",temperature:.5,resource:null,setModel:()=>{},setTemperature:()=>{},setResource:()=>{},scene:"",history:[],setHistory:()=>{},scrollViewRef:{current:null},appInfo:{},conv_uid:"",resourceList:[],order:{current:1},handleChat:()=>Promise.resolve(),canAbort:!1,setCarAbort:()=>{},canNewChat:!1,setCanNewChat:()=>{},ctrl:{current:void 0},userInput:"",setUserInput:()=>{},getChatHistoryRun:()=>{}});t.default=()=>{var e,t;let l=(0,x.useSearchParams)(),m=null!==(e=null==l?void 0:l.get("chat_scene"))&&void 0!==e?e:"",v=null!==(t=null==l?void 0:l.get("app_code"))&&void 0!==t?t:"",{modelList:y}=(0,p.useContext)(r.p),[w,_]=(0,p.useState)([]),[N,k]=(0,p.useState)(""),[C,Z]=(0,p.useState)(.5),[S,R]=(0,p.useState)(null),E=(0,p.useRef)(null),[M,O]=(0,p.useState)(""),[A,P]=(0,p.useState)(!1),[T,V]=(0,p.useState)(!0),z=(0,p.useRef)(),D=(0,p.useRef)(1),I=(0,i.Z)(),J=(0,p.useMemo)(()=>"".concat(null==I?void 0:I.user_no,"_").concat(v),[v,I]),{run:L,loading:U}=(0,d.Z)(async()=>await (0,a.Vx)((0,a.$i)("".concat(null==I?void 0:I.user_no,"_").concat(v))),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(D.current=l[l.length-1].order+1),_(t||[])}}),{data:q,run:H,loading:W}=(0,d.Z)(async e=>{let[,t]=await (0,a.Vx)((0,a.BN)(e));return null!=t?t:{}},{manual:!0}),{run:$,data:B,loading:F}=(0,d.Z)(async()=>{var e,t;let[,l]=await (0,a.Vx)((0,a.vD)(m));return R((null==l?void 0:null===(e=l[0])||void 0===e?void 0:e.space_id)||(null==l?void 0:null===(t=l[0])||void 0===t?void 0:t.param)),null!=l?l:[]},{manual:!0}),{run:K,loading:G}=(0,d.Z)(async()=>{let[,e]=await (0,a.Vx)((0,a.iP)());return null!=e?e:[]},{manual:!0,onSuccess:e=>{var t;let l=null===(t=null==e?void 0:e.filter(e=>e.conv_uid===J))||void 0===t?void 0:t[0];(null==l?void 0:l.select_param)&&R(JSON.parse(null==l?void 0:l.select_param))}});(0,p.useEffect)(()=>{m&&v&&y.length&&H({chat_scene:m,app_code:v})},[v,m,H,y]),(0,p.useEffect)(()=>{v&&L()},[v]),(0,p.useEffect)(()=>{if(y.length>0){var e,t,l;let n=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"model"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;k(n||y[0])}},[y,q]),(0,p.useEffect)(()=>{var e,t,l;let n=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;Z(n||.5)},[q]),(0,p.useEffect)(()=>{if(m&&(null==q?void 0:q.app_code)){var e,t,l,n,r,a;let i=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value,s=null===(n=null==q?void 0:null===(r=q.param_need)||void 0===r?void 0:r.filter(e=>"resource"===e.type))||void 0===n?void 0:null===(a=n[0])||void 0===a?void 0:a.bind_value;s&&R(s),["database","knowledge","plugin","awel_flow"].includes(i)&&!s&&$()}},[q,m,$]);let Q=async e=>{var t,l,n;O(""),z.current=new AbortController;let r={chat_mode:m,model_name:N,user_input:e||M,conv_uid:J,temperature:C,app_code:null==q?void 0:q.app_code,...S&&{select_param:S}};if(w&&w.length>0){let e=null==w?void 0:w.filter(e=>"view"===e.role);D.current=e[e.length-1].order+1}let a=[{role:"human",context:e||M,model_name:N,order:D.current,time_stamp:0},{role:"view",context:"",model_name:N,order:D.current,time_stamp:0,thinking:!0}],i=a.length-1;_([...w,...a]),V(!1);try{await (0,c.L)("".concat(null!==(t=g.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[o.gp]:null!==(l=(0,s.n5)())&&void 0!==l?l:""},signal:z.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===c.a)return},onclose(){var e;null===(e=z.current)||void 0===e||e.abort(),V(!0),P(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(V(!0),P(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(a[i].context=null==t?void 0:t.replace("[ERROR]",""),a[i].thinking=!1,_([...w,...a]),V(!0),P(!1)):(P(!0),a[i].context=t,a[i].thinking=!1,_([...w,...a]))}})}catch(e){null===(n=z.current)||void 0===n||n.abort(),a[i].context="Sorry, we meet some error, please try again later.",a[i].thinking=!1,_([...a]),V(!0),P(!1)}};return(0,p.useEffect)(()=>{m&&"chat_agent"!==m&&K()},[m,K]),(0,n.jsx)(j.Provider,{value:{model:N,resource:S,setModel:k,setTemperature:Z,setResource:R,temperature:C,appInfo:q,conv_uid:J,scene:m,history:w,scrollViewRef:E,setHistory:_,resourceList:B,order:D,handleChat:Q,setCanNewChat:V,ctrl:z,canAbort:A,setCarAbort:P,canNewChat:T,userInput:M,setUserInput:O,getChatHistoryRun:L},children:(0,n.jsx)(u.Z,{size:"large",className:"flex h-screen w-screen justify-center items-center max-h-screen",spinning:U||W||F||G,children:(0,n.jsxs)("div",{className:"flex flex-col h-screen bg-gradient-light dark:bg-gradient-dark p-4 pt-0",children:[(0,n.jsxs)("div",{ref:E,className:"flex flex-col flex-1 overflow-y-auto mb-3",children:[(0,n.jsx)(h.default,{}),(0,n.jsx)(b,{})]}),(null==q?void 0:q.app_code)&&(0,n.jsx)(f.default,{})]})})})}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3913],{56397:function(e,t,l){l.r(t);var n=l(85893),r=l(48218),a=l(58638),i=l(31418),s=l(45030),o=l(20640),c=l.n(o),d=l(67294),u=l(73913);t.default=(0,d.memo)(()=>{var e;let{appInfo:t}=(0,d.useContext)(u.MobileChatContext),{message:l}=i.Z.useApp(),[o,m]=(0,d.useState)(0);if(!(null==t?void 0:t.app_code))return null;let v=async()=>{let e=c()("dingtalk://dingtalkclient/page/link?url=".concat(encodeURIComponent(location.href),"&pc_slide=true"));l[e?"success":"error"](e?"复制成功":"复制失败")};return o>6&&l.info(JSON.stringify(window.navigator.userAgent),2,()=>{m(0)}),(0,n.jsxs)("header",{className:"flex w-full items-center justify-between bg-[rgba(255,255,255,0.9)] border dark:bg-black dark:border-[rgba(255,255,255,0.6)] rounded-xl mx-auto px-4 py-2 mb-4 sticky top-4 z-50 mt-4 shadow-md",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",onClick:()=>m(o+1),children:[(0,n.jsx)(r.Z,{scene:(null==t?void 0:null===(e=t.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent",width:8,height:8}),(0,n.jsxs)("div",{className:"flex flex-col ml-2",children:[(0,n.jsx)(s.Z.Text,{className:"text-md font-bold line-clamp-2",children:null==t?void 0:t.app_name}),(0,n.jsx)(s.Z.Text,{className:"text-sm line-clamp-2",children:null==t?void 0:t.app_describe})]})]}),(0,n.jsx)("div",{onClick:v,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,n.jsx)(a.Z,{className:"text-lg"})})]})})},74638:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(62418),i=l(25519),s=l(30159),o=l(87740),c=l(50888),d=l(52645),u=l(27496),m=l(1375),v=l(65654),x=l(66309),p=l(55241),h=l(74330),f=l(25278),g=l(14726),b=l(93967),j=l.n(b),y=l(39332),w=l(67294),_=l(73913),N=l(7001),k=l(73749),C=l(97109),Z=l(83454);let S=["magenta","orange","geekblue","purple","cyan","green"];t.default=()=>{var e,t;let l=(0,y.useSearchParams)(),b=null!==(t=null==l?void 0:l.get("ques"))&&void 0!==t?t:"",{history:R,model:E,scene:M,temperature:O,resource:A,conv_uid:P,appInfo:T,scrollViewRef:V,order:z,userInput:D,ctrl:I,canAbort:J,canNewChat:L,setHistory:U,setCanNewChat:q,setCarAbort:H,setUserInput:W}=(0,w.useContext)(_.MobileChatContext),[$,B]=(0,w.useState)(!1),[F,K]=(0,w.useState)(!1),G=async e=>{var t,l,n;W(""),I.current=new AbortController;let r={chat_mode:M,model_name:E,user_input:e||D,conv_uid:P,temperature:O,app_code:null==T?void 0:T.app_code,...A&&{select_param:JSON.stringify(A)}};if(R&&R.length>0){let e=null==R?void 0:R.filter(e=>"view"===e.role);z.current=e[e.length-1].order+1}let s=[{role:"human",context:e||D,model_name:E,order:z.current,time_stamp:0},{role:"view",context:"",model_name:E,order:z.current,time_stamp:0,thinking:!0}],o=s.length-1;U([...R,...s]),q(!1);try{await (0,m.L)("".concat(null!==(t=Z.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[i.gp]:null!==(l=(0,a.n5)())&&void 0!==l?l:""},signal:I.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===m.a)return},onclose(){var e;null===(e=I.current)||void 0===e||e.abort(),q(!0),H(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(q(!0),H(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(s[o].context=null==t?void 0:t.replace("[ERROR]",""),s[o].thinking=!1,U([...R,...s]),q(!0),H(!1)):(H(!0),s[o].context=t,s[o].thinking=!1,U([...R,...s]))}})}catch(e){null===(n=I.current)||void 0===n||n.abort(),s[o].context="Sorry, we meet some error, please try again later.",s[o].thinking=!1,U([...s]),q(!0),H(!1)}},Q=async()=>{D.trim()&&L&&await G()};(0,w.useEffect)(()=>{var e,t;null===(e=V.current)||void 0===e||e.scrollTo({top:null===(t=V.current)||void 0===t?void 0:t.scrollHeight,behavior:"auto"})},[R,V]);let X=(0,w.useMemo)(()=>{if(!T)return[];let{param_need:e=[]}=T;return null==e?void 0:e.map(e=>e.type)},[T]),Y=(0,w.useMemo)(()=>{var e;return 0===R.length&&T&&!!(null==T?void 0:null===(e=T.recommend_questions)||void 0===e?void 0:e.length)},[R,T]),{run:ee,loading:et}=(0,v.Z)(async()=>await (0,r.Vx)((0,r.zR)(P)),{manual:!0,onSuccess:()=>{U([])}});return(0,w.useEffect)(()=>{b&&E&&P&&T&&G(b)},[T,P,E,b]),(0,n.jsxs)("div",{className:"flex flex-col",children:[Y&&(0,n.jsx)("ul",{children:null==T?void 0:null===(e=T.recommend_questions)||void 0===e?void 0:e.map((e,t)=>(0,n.jsx)("li",{className:"mb-3",children:(0,n.jsx)(x.Z,{color:S[t],className:"p-2 rounded-xl",onClick:async()=>{G(e.question)},children:e.question})},e.id))}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 mb-1 w-full overflow-x-auto",children:[(null==X?void 0:X.includes("model"))&&(0,n.jsx)(N.default,{}),(null==X?void 0:X.includes("resource"))&&(0,n.jsx)(k.default,{}),(null==X?void 0:X.includes("temperature"))&&(0,n.jsx)(C.default,{})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-lg font-bold",children:[(0,n.jsx)(p.Z,{content:"暂停回复",trigger:["hover"],children:(0,n.jsx)(s.Z,{className:j()("p-2 cursor-pointer",{"text-[#0c75fc]":J,"text-gray-400":!J}),onClick:()=>{var e;J&&(null===(e=I.current)||void 0===e||e.abort(),setTimeout(()=>{H(!1),q(!0)},100))}})}),(0,n.jsx)(p.Z,{content:"再来一次",trigger:["hover"],children:(0,n.jsx)(o.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!L}),onClick:()=>{var e,t;if(!L||0===R.length)return;let l=null===(e=null===(t=R.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];G((null==l?void 0:l.context)||"")}})}),et?(0,n.jsx)(h.Z,{spinning:et,indicator:(0,n.jsx)(c.Z,{style:{fontSize:18},spin:!0}),className:"p-2"}):(0,n.jsx)(p.Z,{content:"清除历史",trigger:["hover"],children:(0,n.jsx)(d.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!L}),onClick:()=>{L&&ee()}})})]})]}),(0,n.jsxs)("div",{className:j()("flex py-2 px-3 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border",{"border-[#0c75fc] dark:border-[rgba(12,117,252,0.8)]":$}),children:[(0,n.jsx)(f.default.TextArea,{placeholder:"可以问我任何问题",className:"w-full resize-none border-0 p-0 focus:shadow-none",value:D,autoSize:{minRows:1},onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(F){e.preventDefault();return}D.trim()&&(e.preventDefault(),Q())}},onChange:e=>{W(e.target.value)},onFocus:()=>{B(!0)},onBlur:()=>B(!1),onCompositionStartCapture:()=>{K(!0)},onCompositionEndCapture:()=>{setTimeout(()=>{K(!1)},0)}}),(0,n.jsx)(g.ZP,{type:"primary",className:j()("flex items-center justify-center rounded-lg bg-button-gradient border-0 ml-2",{"opacity-40 cursor-not-allowed":!D.trim()||!L}),onClick:Q,children:L?(0,n.jsx)(u.Z,{}):(0,n.jsx)(h.Z,{indicator:(0,n.jsx)(c.Z,{className:"text-white"})})})]})]})}},7001:function(e,t,l){l.r(t);var n=l(85893),r=l(41468),a=l(39718),i=l(94668),s=l(85418),o=l(55241),c=l(67294),d=l(73913);t.default=()=>{let{modelList:e}=(0,c.useContext)(r.p),{model:t,setModel:l}=(0,c.useContext)(d.MobileChatContext),u=(0,c.useMemo)(()=>e.length>0?e.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{l(e)},children:[(0,n.jsx)(a.Z,{width:14,height:14,model:e}),(0,n.jsx)("span",{className:"text-xs",children:e})]}),key:e})):[],[e,l]);return(0,n.jsx)(s.Z,{menu:{items:u},placement:"top",trigger:["click"],children:(0,n.jsx)(o.Z,{content:t,children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(a.Z,{width:16,height:16,model:t}),(0,n.jsx)("span",{className:"text-xs font-medium line-clamp-1",style:{maxWidth:96},children:t}),(0,n.jsx)(i.Z,{rotate:90})]})})})}},46568:function(e,t,l){l.r(t);var n=l(85893),r=l(25675),a=l.n(r),i=l(67294);t.default=(0,i.memo)(e=>{let{width:t,height:l,src:r,label:i}=e;return(0,n.jsx)(a(),{width:t||14,height:l||14,src:r,alt:i||"db-icon",priority:!0})})},73749:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(57249),i=l(62418),s=l(50888),o=l(94668),c=l(83266),d=l(65654),u=l(74330),m=l(23799),v=l(85418),x=l(67294),p=l(73913),h=l(46568);t.default=()=>{let{appInfo:e,resourceList:t,scene:l,model:f,conv_uid:g,getChatHistoryRun:b,setResource:j,resource:y}=(0,x.useContext)(p.MobileChatContext),{temperatureValue:w,maxNewTokensValue:_}=(0,x.useContext)(a.ChatContentContext),[N,k]=(0,x.useState)(null),C=(0,x.useMemo)(()=>{var t,l,n;return null===(t=null==e?void 0:null===(l=e.param_need)||void 0===l?void 0:l.filter(e=>"resource"===e.type))||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.value},[e]),Z=(0,x.useMemo)(()=>t&&t.length>0?t.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{k(e),j(e.space_id||e.param)},children:[(0,n.jsx)(h.default,{width:14,height:14,src:i.S$[e.type].icon,label:i.S$[e.type].label}),(0,n.jsx)("span",{className:"text-xs",children:e.param})]}),key:e.space_id||e.param})):[],[t,j]),{run:S,loading:R}=(0,d.Z)(async e=>{let[,t]=await (0,r.Vx)((0,r.qn)({convUid:g,chatMode:l,data:e,model:f,temperatureValue:w,maxNewTokensValue:_,config:{timeout:36e5}}));return j(t),t},{manual:!0,onSuccess:async()=>{await b()}}),E=async e=>{let t=new FormData;t.append("doc_file",null==e?void 0:e.file),await S(t)},M=(0,x.useMemo)(()=>R?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(u.Z,{size:"small",indicator:(0,n.jsx)(s.Z,{spin:!0})}),(0,n.jsx)("span",{className:"text-xs",children:"上传中"})]}):y?(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("span",{className:"text-xs",children:y.file_name}),(0,n.jsx)(o.Z,{rotate:90})]}):(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(c.Z,{className:"text-base"}),(0,n.jsx)("span",{className:"text-xs",children:"上传文件"})]}),[R,y]);return(0,n.jsx)(n.Fragment,{children:(()=>{switch(C){case"excel_file":case"text_file":case"image_file":return(0,n.jsx)("div",{className:"flex items-center justify-center gap-1 border rounded-xl bg-white dark:bg-black px-2 flex-shrink-0",children:(0,n.jsx)(m.default,{name:"file",accept:".xlsx,.xls",maxCount:1,showUploadList:!1,beforeUpload:()=>!1,onChange:E,className:"flex h-full w-full items-center justify-center",children:M})});case"database":case"knowledge":case"plugin":case"awel_flow":var e,l,r,a,s;if(!(null==t?void 0:t.length))return null;return(0,n.jsx)(v.Z,{menu:{items:Z},placement:"top",trigger:["click"],children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(h.default,{width:14,height:14,src:null===(e=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(l=t[0])||void 0===l?void 0:l.type)])||void 0===e?void 0:e.icon,label:null===(r=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(a=t[0])||void 0===a?void 0:a.type)])||void 0===r?void 0:r.label}),(0,n.jsx)("span",{className:"text-xs font-medium",children:(null==N?void 0:N.param)||(null==t?void 0:null===(s=t[0])||void 0===s?void 0:s.param)}),(0,n.jsx)(o.Z,{rotate:90})]})})}})()})}},97109:function(e,t,l){l.r(t);var n=l(85893),r=l(70065),a=l(85418),i=l(30568),s=l(67294),o=l(73913);t.default=()=>{let{temperature:e,setTemperature:t}=(0,s.useContext)(o.MobileChatContext),l=e=>{isNaN(e)||t(e)};return(0,n.jsx)(a.Z,{trigger:["click"],dropdownRender:()=>(0,n.jsx)("div",{className:"flex h-28 bg-white dark:bg-[rgba(255,255,255,0.5)] items-center justify-center rounded-xl py-3",children:(0,n.jsx)(i.Z,{defaultValue:.5,max:1,min:0,step:.1,vertical:!0,onChange:l,value:e})}),placement:"top",children:(0,n.jsxs)("div",{className:"flex items-center justify-between border rounded-xl bg-white dark:bg-black w-14 p-2 flex-shrink-0",children:[(0,n.jsx)(r.Z,{type:"icon-icons-temperature",className:"text-sm"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:e})]})})}},73913:function(e,t,l){l.r(t),l.d(t,{MobileChatContext:function(){return j}});var n=l(85893),r=l(41468),a=l(76212),i=l(2440),s=l(62418),o=l(25519),c=l(1375),d=l(65654),u=l(74330),m=l(5152),v=l.n(m),x=l(39332),p=l(67294),h=l(56397),f=l(74638),g=l(83454);let b=v()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(9473),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3768),l.e(5789),l.e(6818)]).then(l.bind(l,36818)),{loadableGenerated:{webpack:()=>[36818]},ssr:!1}),j=(0,p.createContext)({model:"",temperature:.5,resource:null,setModel:()=>{},setTemperature:()=>{},setResource:()=>{},scene:"",history:[],setHistory:()=>{},scrollViewRef:{current:null},appInfo:{},conv_uid:"",resourceList:[],order:{current:1},handleChat:()=>Promise.resolve(),canAbort:!1,setCarAbort:()=>{},canNewChat:!1,setCanNewChat:()=>{},ctrl:{current:void 0},userInput:"",setUserInput:()=>{},getChatHistoryRun:()=>{}});t.default=()=>{var e,t;let l=(0,x.useSearchParams)(),m=null!==(e=null==l?void 0:l.get("chat_scene"))&&void 0!==e?e:"",v=null!==(t=null==l?void 0:l.get("app_code"))&&void 0!==t?t:"",{modelList:y}=(0,p.useContext)(r.p),[w,_]=(0,p.useState)([]),[N,k]=(0,p.useState)(""),[C,Z]=(0,p.useState)(.5),[S,R]=(0,p.useState)(null),E=(0,p.useRef)(null),[M,O]=(0,p.useState)(""),[A,P]=(0,p.useState)(!1),[T,V]=(0,p.useState)(!0),z=(0,p.useRef)(),D=(0,p.useRef)(1),I=(0,i.Z)(),J=(0,p.useMemo)(()=>"".concat(null==I?void 0:I.user_no,"_").concat(v),[v,I]),{run:L,loading:U}=(0,d.Z)(async()=>await (0,a.Vx)((0,a.$i)("".concat(null==I?void 0:I.user_no,"_").concat(v))),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(D.current=l[l.length-1].order+1),_(t||[])}}),{data:q,run:H,loading:W}=(0,d.Z)(async e=>{let[,t]=await (0,a.Vx)((0,a.BN)(e));return null!=t?t:{}},{manual:!0}),{run:$,data:B,loading:F}=(0,d.Z)(async()=>{var e,t;let[,l]=await (0,a.Vx)((0,a.vD)(m));return R((null==l?void 0:null===(e=l[0])||void 0===e?void 0:e.space_id)||(null==l?void 0:null===(t=l[0])||void 0===t?void 0:t.param)),null!=l?l:[]},{manual:!0}),{run:K,loading:G}=(0,d.Z)(async()=>{let[,e]=await (0,a.Vx)((0,a.iP)());return null!=e?e:[]},{manual:!0,onSuccess:e=>{var t;let l=null===(t=null==e?void 0:e.filter(e=>e.conv_uid===J))||void 0===t?void 0:t[0];(null==l?void 0:l.select_param)&&R(JSON.parse(null==l?void 0:l.select_param))}});(0,p.useEffect)(()=>{m&&v&&y.length&&H({chat_scene:m,app_code:v})},[v,m,H,y]),(0,p.useEffect)(()=>{v&&L()},[v]),(0,p.useEffect)(()=>{if(y.length>0){var e,t,l;let n=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"model"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;k(n||y[0])}},[y,q]),(0,p.useEffect)(()=>{var e,t,l;let n=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;Z(n||.5)},[q]),(0,p.useEffect)(()=>{if(m&&(null==q?void 0:q.app_code)){var e,t,l,n,r,a;let i=null===(e=null==q?void 0:null===(t=q.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value,s=null===(n=null==q?void 0:null===(r=q.param_need)||void 0===r?void 0:r.filter(e=>"resource"===e.type))||void 0===n?void 0:null===(a=n[0])||void 0===a?void 0:a.bind_value;s&&R(s),["database","knowledge","plugin","awel_flow"].includes(i)&&!s&&$()}},[q,m,$]);let Q=async e=>{var t,l,n;O(""),z.current=new AbortController;let r={chat_mode:m,model_name:N,user_input:e||M,conv_uid:J,temperature:C,app_code:null==q?void 0:q.app_code,...S&&{select_param:S}};if(w&&w.length>0){let e=null==w?void 0:w.filter(e=>"view"===e.role);D.current=e[e.length-1].order+1}let a=[{role:"human",context:e||M,model_name:N,order:D.current,time_stamp:0},{role:"view",context:"",model_name:N,order:D.current,time_stamp:0,thinking:!0}],i=a.length-1;_([...w,...a]),V(!1);try{await (0,c.L)("".concat(null!==(t=g.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[o.gp]:null!==(l=(0,s.n5)())&&void 0!==l?l:""},signal:z.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===c.a)return},onclose(){var e;null===(e=z.current)||void 0===e||e.abort(),V(!0),P(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(V(!0),P(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(a[i].context=null==t?void 0:t.replace("[ERROR]",""),a[i].thinking=!1,_([...w,...a]),V(!0),P(!1)):(P(!0),a[i].context=t,a[i].thinking=!1,_([...w,...a]))}})}catch(e){null===(n=z.current)||void 0===n||n.abort(),a[i].context="Sorry, we meet some error, please try again later.",a[i].thinking=!1,_([...a]),V(!0),P(!1)}};return(0,p.useEffect)(()=>{m&&"chat_agent"!==m&&K()},[m,K]),(0,n.jsx)(j.Provider,{value:{model:N,resource:S,setModel:k,setTemperature:Z,setResource:R,temperature:C,appInfo:q,conv_uid:J,scene:m,history:w,scrollViewRef:E,setHistory:_,resourceList:B,order:D,handleChat:Q,setCanNewChat:V,ctrl:z,canAbort:A,setCarAbort:P,canNewChat:T,userInput:M,setUserInput:O,getChatHistoryRun:L},children:(0,n.jsx)(u.Z,{size:"large",className:"flex h-screen w-screen justify-center items-center max-h-screen",spinning:U||W||F||G,children:(0,n.jsxs)("div",{className:"flex flex-col h-screen bg-gradient-light dark:bg-gradient-dark p-4 pt-0",children:[(0,n.jsxs)("div",{ref:E,className:"flex flex-col flex-1 overflow-y-auto mb-3",children:[(0,n.jsx)(h.default,{}),(0,n.jsx)(b,{})]}),(null==q?void 0:q.app_code)&&(0,n.jsx)(f.default,{})]})})})}}}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4744-a431699d60da1732.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4744-a431699d60da1732.js index d04da88c4..c9e4d863a 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4744-a431699d60da1732.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/4744-a431699d60da1732.js @@ -1,4 +1,4 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4744],{72137:function(t,e,r){"use strict";r.d(e,{k:function(){return u}});var n=r(90494);function i(t,e,r,n){for(;t.length;){let i=t.shift(),o=r(i);if(o)return!0;e.add(i.id),n(i.id).forEach(r=>{e.has(r.id)||(e.add(r.id),t.push(r))})}return!1}function o(t,e,r,n){let i=r(t);if(i)return!0;for(let i of(e.add(t.id),n(t.id)))if(!e.has(i.id)&&o(i,e,r,n))return!0;return!1}let s=()=>!0;class a{graph;nodeFilter;edgeFilter;cacheEnabled;inEdgesMap=new Map;outEdgesMap=new Map;bothEdgesMap=new Map;allNodesMap=new Map;allEdgesMap=new Map;constructor(t){this.graph=t.graph;let e=t.nodeFilter||s,r=t.edgeFilter||s;this.nodeFilter=e,this.edgeFilter=t=>{let{source:n,target:i}=this.graph.getEdgeDetail(t.id);return!!(e(n)&&e(i))&&r(t,n,i)},"auto"===t.cache?(this.cacheEnabled=!0,this.startAutoCache()):"manual"===t.cache?this.cacheEnabled=!0:this.cacheEnabled=!1}clearCache=()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()};refreshCache=()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(t=>t.id))};updateCache=t=>{let e=new Set;t.forEach(t=>{let r=this.bothEdgesMap.get(t);if(r&&r.forEach(t=>e.add(t.id)),this.hasNode(t)){let r=this.graph.getRelatedEdges(t,"in").filter(this.edgeFilter),n=this.graph.getRelatedEdges(t,"out").filter(this.edgeFilter),i=Array.from(new Set([...r,...n]));i.forEach(t=>e.add(t.id)),this.inEdgesMap.set(t,r),this.outEdgesMap.set(t,n),this.bothEdgesMap.set(t,i),this.allNodesMap.set(t,this.graph.getNode(t))}else this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.bothEdgesMap.delete(t),this.allNodesMap.delete(t)}),e.forEach(t=>{this.hasEdge(t)?this.allEdgesMap.set(t,this.graph.getEdge(t)):this.allEdgesMap.delete(t)})};startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}handleGraphChanged=t=>{let e=new Set;t.changes.forEach(r=>{switch(r.type){case"NodeAdded":case"NodeRemoved":e.add(r.value.id);break;case"NodeDataUpdated":e.add(r.id);break;case"EdgeAdded":case"EdgeRemoved":e.add(r.value.source),e.add(r.value.target);break;case"EdgeUpdated":("source"===r.propertyName||"target"===r.propertyName)&&(e.add(r.oldValue),e.add(r.newValue));break;case"EdgeDataUpdated":if(t.graph.hasEdge(r.id)){let n=t.graph.getEdge(r.id);e.add(n.source),e.add(n.target)}}}),this.updateCache(e)};checkNodeExistence(t){this.getNode(t)}hasNode(t){if(!this.graph.hasNode(t))return!1;let e=this.graph.getNode(t);return this.nodeFilter(e)}areNeighbors(t,e){return this.checkNodeExistence(t),this.getNeighbors(e).some(e=>e.id===t)}getNode(t){let e=this.graph.getNode(t);if(!this.nodeFilter(e))throw Error("Node not found for id: "+t);return e}getRelatedEdges(t,e){if(this.checkNodeExistence(t),this.cacheEnabled)return"in"===e?this.inEdgesMap.get(t):"out"===e?this.outEdgesMap.get(t):this.bothEdgesMap.get(t);let r=this.graph.getRelatedEdges(t,e);return r.filter(this.edgeFilter)}getDegree(t,e){return this.getRelatedEdges(t,e).length}getSuccessors(t){let e=this.getRelatedEdges(t,"out"),r=e.map(t=>this.getNode(t.target));return Array.from(new Set(r))}getPredecessors(t){let e=this.getRelatedEdges(t,"in"),r=e.map(t=>this.getNode(t.source));return Array.from(new Set(r))}getNeighbors(t){let e=this.getPredecessors(t),r=this.getSuccessors(t);return Array.from(new Set([...e,...r]))}hasEdge(t){if(!this.graph.hasEdge(t))return!1;let e=this.graph.getEdge(t);return this.edgeFilter(e)}getEdge(t){let e=this.graph.getEdge(t);if(!this.edgeFilter(e))throw Error("Edge not found for id: "+t);return e}getEdgeDetail(t){let e=this.getEdge(t);return{edge:e,source:this.getNode(e.source),target:this.getNode(e.target)}}hasTreeStructure(t){return this.graph.hasTreeStructure(t)}getRoots(t){return this.graph.getRoots(t).filter(this.nodeFilter)}getChildren(t,e){return this.checkNodeExistence(t),this.graph.getChildren(t,e).filter(this.nodeFilter)}getParent(t,e){this.checkNodeExistence(t);let r=this.graph.getParent(t,e);return r&&this.nodeFilter(r)?r:null}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];i([this.getNode(t)],new Set,e,n)}dfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];o(this.getNode(t),new Set,e,n)}}class u extends n.Z{nodeMap=new Map;edgeMap=new Map;inEdgesMap=new Map;outEdgesMap=new Map;bothEdgesMap=new Map;treeIndices=new Map;changes=[];batchCount=0;onChanged=()=>{};constructor(t){if(super(),!t)return;t.nodes&&this.addNodes(t.nodes),t.edges&&this.addEdges(t.edges),t.tree&&this.addTree(t.tree),t.onChanged&&(this.onChanged=t.onChanged)}batch=t=>{this.batchCount+=1,t(),this.batchCount-=1,this.batchCount||this.commit()};commit(){let t=this.changes;this.changes=[];let e={graph:this,changes:t};this.emit("changed",e),this.onChanged(e)}reduceChanges(t){let e=[];return t.forEach(t=>{switch(t.type){case"NodeRemoved":{let r=!1;e=e.filter(e=>{if("NodeAdded"===e.type){let n=e.value.id===t.value.id;return n&&(r=!0),!n}return"NodeDataUpdated"===e.type?e.id!==t.value.id:"TreeStructureChanged"!==e.type||e.nodeId!==t.value.id}),r||e.push(t);break}case"EdgeRemoved":{let r=!1;e=e.filter(e=>{if("EdgeAdded"===e.type){let n=e.value.id===t.value.id;return n&&(r=!0),!n}return"EdgeDataUpdated"!==e.type&&"EdgeUpdated"!==e.type||e.id!==t.value.id}),r||e.push(t);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{let r=e.findIndex(e=>e.type===t.type&&e.id===t.id&&(void 0===t.propertyName||e.propertyName===t.propertyName)),n=e[r];n?void 0!==t.propertyName?n.newValue=t.newValue:(e.splice(r,1),e.push(t)):e.push(t);break}case"TreeStructureDetached":(e=e.filter(e=>"TreeStructureAttached"===e.type?e.treeKey!==t.treeKey:"TreeStructureChanged"!==e.type||e.treeKey!==t.treeKey)).push(t);break;case"TreeStructureChanged":{let r=e.find(e=>"TreeStructureChanged"===e.type&&e.treeKey===t.treeKey&&e.nodeId===t.nodeId);r?r.newParentId=t.newParentId:e.push(t);break}default:e.push(t)}}),e}checkNodeExistence(t){this.getNode(t)}hasNode(t){return this.nodeMap.has(t)}areNeighbors(t,e){return this.getNeighbors(e).some(e=>e.id===t)}getNode(t){let e=this.nodeMap.get(t);if(!e)throw Error("Node not found for id: "+t);return e}getRelatedEdges(t,e){if(this.checkNodeExistence(t),"in"===e){let e=this.inEdgesMap.get(t);return Array.from(e)}if("out"===e){let e=this.outEdgesMap.get(t);return Array.from(e)}{let e=this.bothEdgesMap.get(t);return Array.from(e)}}getDegree(t,e){return this.getRelatedEdges(t,e).length}getSuccessors(t){let e=this.getRelatedEdges(t,"out"),r=e.map(t=>this.getNode(t.target));return Array.from(new Set(r))}getPredecessors(t){let e=this.getRelatedEdges(t,"in"),r=e.map(t=>this.getNode(t.source));return Array.from(new Set(r))}getNeighbors(t){let e=this.getPredecessors(t),r=this.getSuccessors(t);return Array.from(new Set([...e,...r]))}doAddNode(t){if(this.hasNode(t.id))throw Error("Node already exists: "+t.id);this.nodeMap.set(t.id,t),this.inEdgesMap.set(t.id,new Set),this.outEdgesMap.set(t.id,new Set),this.bothEdgesMap.set(t.id,new Set),this.treeIndices.forEach(e=>{e.childrenMap.set(t.id,new Set)}),this.changes.push({type:"NodeAdded",value:t})}addNodes(t){this.batch(()=>{for(let e of t)this.doAddNode(e)})}addNode(t){this.addNodes([t])}doRemoveNode(t){let e=this.getNode(t),r=this.bothEdgesMap.get(t);r?.forEach(t=>this.doRemoveEdge(t.id)),this.nodeMap.delete(t),this.treeIndices.forEach(r=>{r.childrenMap.get(t)?.forEach(t=>{r.parentMap.delete(t.id)});let n=r.parentMap.get(t);n&&r.childrenMap.get(n.id)?.delete(e),r.parentMap.delete(t),r.childrenMap.delete(t)}),this.bothEdgesMap.delete(t),this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.changes.push({type:"NodeRemoved",value:e})}removeNodes(t){this.batch(()=>{t.forEach(t=>this.doRemoveNode(t))})}removeNode(t){this.removeNodes([t])}updateNodeDataProperty(t,e,r){let n=this.getNode(t);this.batch(()=>{let i=n.data[e];n.data[e]=r,this.changes.push({type:"NodeDataUpdated",id:t,propertyName:e,oldValue:i,newValue:r})})}mergeNodeData(t,e){this.batch(()=>{Object.entries(e).forEach(([e,r])=>{this.updateNodeDataProperty(t,e,r)})})}updateNodeData(...t){let e;let r=t[0],n=this.getNode(r);if("string"==typeof t[1]){this.updateNodeDataProperty(r,t[1],t[2]);return}if("function"==typeof t[1]){let r=t[1];e=r(n.data)}else"object"==typeof t[1]&&(e=t[1]);this.batch(()=>{let t=n.data,i=e;n.data=e,this.changes.push({type:"NodeDataUpdated",id:r,oldValue:t,newValue:i})})}checkEdgeExistence(t){if(!this.hasEdge(t))throw Error("Edge not found for id: "+t)}hasEdge(t){return this.edgeMap.has(t)}getEdge(t){return this.checkEdgeExistence(t),this.edgeMap.get(t)}getEdgeDetail(t){let e=this.getEdge(t);return{edge:e,source:this.getNode(e.source),target:this.getNode(e.target)}}doAddEdge(t){if(this.hasEdge(t.id))throw Error("Edge already exists: "+t.id);this.checkNodeExistence(t.source),this.checkNodeExistence(t.target),this.edgeMap.set(t.id,t);let e=this.inEdgesMap.get(t.target),r=this.outEdgesMap.get(t.source),n=this.bothEdgesMap.get(t.source),i=this.bothEdgesMap.get(t.target);e.add(t),r.add(t),n.add(t),i.add(t),this.changes.push({type:"EdgeAdded",value:t})}addEdges(t){this.batch(()=>{for(let e of t)this.doAddEdge(e)})}addEdge(t){this.addEdges([t])}doRemoveEdge(t){let e=this.getEdge(t),r=this.outEdgesMap.get(e.source),n=this.inEdgesMap.get(e.target),i=this.bothEdgesMap.get(e.source),o=this.bothEdgesMap.get(e.target);r.delete(e),n.delete(e),i.delete(e),o.delete(e),this.edgeMap.delete(t),this.changes.push({type:"EdgeRemoved",value:e})}removeEdges(t){this.batch(()=>{t.forEach(t=>this.doRemoveEdge(t))})}removeEdge(t){this.removeEdges([t])}updateEdgeSource(t,e){let r=this.getEdge(t);this.checkNodeExistence(e);let n=r.source;this.outEdgesMap.get(n).delete(r),this.bothEdgesMap.get(n).delete(r),this.outEdgesMap.get(e).add(r),this.bothEdgesMap.get(e).add(r),r.source=e,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"source",oldValue:n,newValue:e})})}updateEdgeTarget(t,e){let r=this.getEdge(t);this.checkNodeExistence(e);let n=r.target;this.inEdgesMap.get(n).delete(r),this.bothEdgesMap.get(n).delete(r),this.inEdgesMap.get(e).add(r),this.bothEdgesMap.get(e).add(r),r.target=e,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"target",oldValue:n,newValue:e})})}updateEdgeDataProperty(t,e,r){let n=this.getEdge(t);this.batch(()=>{let i=n.data[e];n.data[e]=r,this.changes.push({type:"EdgeDataUpdated",id:t,propertyName:e,oldValue:i,newValue:r})})}updateEdgeData(...t){let e;let r=t[0],n=this.getEdge(r);if("string"==typeof t[1]){this.updateEdgeDataProperty(r,t[1],t[2]);return}if("function"==typeof t[1]){let r=t[1];e=r(n.data)}else"object"==typeof t[1]&&(e=t[1]);this.batch(()=>{let t=n.data,i=e;n.data=e,this.changes.push({type:"EdgeDataUpdated",id:r,oldValue:t,newValue:i})})}mergeEdgeData(t,e){this.batch(()=>{Object.entries(e).forEach(([e,r])=>{this.updateEdgeDataProperty(t,e,r)})})}checkTreeExistence(t){if(!this.hasTreeStructure(t))throw Error("Tree structure not found for treeKey: "+t)}hasTreeStructure(t){return this.treeIndices.has(t)}attachTreeStructure(t){this.treeIndices.has(t)||(this.treeIndices.set(t,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:t})}))}detachTreeStructure(t){this.checkTreeExistence(t),this.treeIndices.delete(t),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:t})})}addTree(t,e){this.batch(()=>{this.attachTreeStructure(e);let r=[],n=Array.isArray(t)?t:[t];for(;n.length;){let t=n.shift();r.push(t),t.children&&n.push(...t.children)}this.addNodes(r),r.forEach(t=>{t.children?.forEach(r=>{this.setParent(r.id,t.id,e)})})})}getRoots(t){return this.checkTreeExistence(t),this.getAllNodes().filter(e=>!this.getParent(e.id,t))}getChildren(t,e){this.checkNodeExistence(t),this.checkTreeExistence(e);let r=this.treeIndices.get(e),n=r.childrenMap.get(t);return Array.from(n||[])}getParent(t,e){this.checkNodeExistence(t),this.checkTreeExistence(e);let r=this.treeIndices.get(e);return r.parentMap.get(t)||null}getAncestors(t,e){let r;let n=[],i=this.getNode(t);for(;r=this.getParent(i.id,e);)n.push(r),i=r;return n}setParent(t,e,r){this.checkTreeExistence(r);let n=this.treeIndices.get(r),i=this.getNode(t),o=n.parentMap.get(t);if(o?.id===e)return;if(void 0===e){o&&n.childrenMap.get(o.id)?.delete(i),n.parentMap.delete(t);return}let s=this.getNode(e);n.parentMap.set(t,s),o&&n.childrenMap.get(o.id)?.delete(i);let a=n.childrenMap.get(s.id);a||(a=new Set,n.childrenMap.set(s.id,a)),a.add(i),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:r,nodeId:t,oldParentId:o?.id,newParentId:s.id})})}dfsTree(t,e,r){return o(this.getNode(t),new Set,e,t=>this.getChildren(t,r))}bfsTree(t,e,r){return i([this.getNode(t)],new Set,e,t=>this.getChildren(t,r))}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];return i([this.getNode(t)],new Set,e,n)}dfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];return o(this.getNode(t),new Set,e,n)}clone(){let t=this.getAllNodes().map(t=>({...t,data:{...t.data}})),e=this.getAllEdges().map(t=>({...t,data:{...t.data}})),r=new u({nodes:t,edges:e});return this.treeIndices.forEach(({parentMap:t,childrenMap:e},n)=>{let i=new Map;t.forEach((t,e)=>{i.set(e,r.getNode(t.id))});let o=new Map;e.forEach((t,e)=>{o.set(e,new Set(Array.from(t).map(t=>r.getNode(t.id))))}),r.treeIndices.set(n,{parentMap:i,childrenMap:o})}),r}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(t){return new a({graph:this,...t})}}},28104:function(t,e,r){"use strict";r.d(e,{b:function(){return eS}});var n=r(97582),i=r(72137),o=r(61035);let s=(t,e)=>{if("next"!==t&&"prev"!==t)return e},a=t=>{t.prev.next=t.next,t.next.prev=t.prev,delete t.next,delete t.prev};class u{constructor(){let t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){let t=this.shortcut,e=t.prev;if(e&&e!==t)return a(e),e}enqueue(t){let e=this.shortcut;t.prev&&t.next&&a(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){let t=[],e=this.shortcut,r=e.prev;for(;r!==e;)t.push(JSON.stringify(r,s)),r=null==r?void 0:r.prev;return`[${t.join(", ")}]`}}class d extends u{}let l=()=>1,h=(t,e)=>{var r;if(t.getAllNodes().length<=1)return[];let n=g(t,e||l),i=c(n.graph,n.buckets,n.zeroIdx);return null===(r=i.map(e=>t.getRelatedEdges(e.v,"out").filter(({target:t})=>t===e.w)))||void 0===r?void 0:r.flat()},c=(t,e,r)=>{let n,i=[],o=e[e.length-1],s=e[0];for(;t.getAllNodes().length;){for(;n=s.dequeue();)f(t,e,r,n);for(;n=o.dequeue();)f(t,e,r,n);if(t.getAllNodes().length){for(let o=e.length-2;o>0;--o)if(n=e[o].dequeue()){i=i.concat(f(t,e,r,n,!0));break}}}return i},f=(t,e,r,n,i)=>{var o,s;let a=[];return t.hasNode(n.v)&&(null===(o=t.getRelatedEdges(n.v,"in"))||void 0===o||o.forEach(n=>{let o=n.data.weight,s=t.getNode(n.source);i&&a.push({v:n.source,w:n.target,in:0,out:0}),void 0===s.data.out&&(s.data.out=0),s.data.out-=o,p(e,r,Object.assign({v:s.id},s.data))}),null===(s=t.getRelatedEdges(n.v,"out"))||void 0===s||s.forEach(n=>{let i=n.data.weight,o=n.target,s=t.getNode(o);void 0===s.data.in&&(s.data.in=0),s.data.in-=i,p(e,r,Object.assign({v:s.id},s.data))}),t.removeNode(n.v)),i?a:void 0},g=(t,e)=>{let r=new i.k,n=0,o=0;t.getAllNodes().forEach(t=>{r.addNode({id:t.id,data:{v:t.id,in:0,out:0}})}),t.getAllEdges().forEach(t=>{let i=r.getRelatedEdges(t.source,"out").find(e=>e.target===t.target),s=(null==e?void 0:e(t))||1;i?r.updateEdgeData(null==i?void 0:i.id,Object.assign(Object.assign({},i.data),{weight:i.data.weight+s})):r.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:s}}),o=Math.max(o,r.getNode(t.source).data.out+=s),n=Math.max(n,r.getNode(t.target).data.in+=s)});let s=[],a=o+n+3;for(let t=0;t{p(s,u,Object.assign({v:t.id},r.getNode(t.id).data))}),{buckets:s,zeroIdx:u,graph:r}},p=(t,e,r)=>{r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)},m=(t,e)=>{let r="greedy"===e?h(t,t=>t.data.weight||1):v(t);null==r||r.forEach(e=>{let r=e.data;t.removeEdge(e.id),r.forwardName=e.data.name,r.reversed=!0,t.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign({},r)})})},v=t=>{let e=[],r={},n={},i=o=>{n[o]||(n[o]=!0,r[o]=!0,t.getRelatedEdges(o,"out").forEach(t=>{r[t.target]?e.push(t):i(t.target)}),delete r[o])};return t.getAllNodes().forEach(t=>i(t.id)),e},y=t=>{t.getAllEdges().forEach(e=>{let r=e.data;if(r.reversed){t.removeEdge(e.id);let n=r.forwardName;delete r.reversed,delete r.forwardName,t.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign(Object.assign({},r),{forwardName:n})})}})},w=(t,e)=>Number(t)-Number(e),x=(t,e,r,n)=>{let i;do i=`${n}${Math.random()}`;while(t.hasNode(i));return r.dummy=e,t.addNode({id:i,data:r}),i},b=t=>{let e=new i.k;return t.getAllNodes().forEach(t=>{e.addNode(Object.assign({},t))}),t.getAllEdges().forEach(t=>{let r=e.getRelatedEdges(t.source,"out").find(e=>e.target===t.target);r?e.updateEdgeData(null==r?void 0:r.id,Object.assign(Object.assign({},r.data),{weight:r.data.weight+t.data.weight||0,minlen:Math.max(r.data.minlen,t.data.minlen||1)})):e.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||0,minlen:t.data.minlen||1}})}),e},E=t=>{let e=new i.k;return t.getAllNodes().forEach(r=>{t.getChildren(r.id).length||e.addNode(Object.assign({},r))}),t.getAllEdges().forEach(t=>{e.addEdge(t)}),e},N=(t,e)=>null==t?void 0:t.reduce((t,r,n)=>(t[r]=e[n],t),{}),M=(t,e)=>{let r,n;let i=Number(t.x),o=Number(t.y),s=Number(e.x)-i,a=Number(e.y)-o,u=Number(t.width)/2,d=Number(t.height)/2;return s||a?(Math.abs(a)*u>Math.abs(s)*d?(a<0&&(d=-d),r=d*s/a,n=d):(s<0&&(u=-u),r=u,n=u*a/s),{x:i+r,y:o+n}):{x:0,y:0}},_=t=>{let e=[],r=j(t)+1;for(let t=0;t{let r=t.data.rank;void 0!==r&&e[r]&&e[r].push(t.id)});for(let n=0;nw(t.getNode(e).data.order,t.getNode(r).data.order));return e},k=t=>{let e=t.getAllNodes().filter(t=>void 0!==t.data.rank).map(t=>t.data.rank),r=Math.min(...e);t.getAllNodes().forEach(t=>{t.data.hasOwnProperty("rank")&&r!==1/0&&(t.data.rank-=r)})},A=(t,e=0)=>{let r=t.getAllNodes(),n=r.filter(t=>void 0!==t.data.rank).map(t=>t.data.rank),i=Math.min(...n),o=[];r.forEach(t=>{let e=(t.data.rank||0)-i;o[e]||(o[e]=[]),o[e].push(t.id)});let s=0;for(let r=0;r{let r=t.getNode(e);r&&(r.data.rank=r.data.rank||0,r.data.rank+=s)}))}},S=(t,e,r,n)=>{let i={width:0,height:0};return(0,o.Z)(r)&&(0,o.Z)(n)&&(i.rank=r,i.order=n),x(t,"border",i,e)},j=t=>{let e;return t.getAllNodes().forEach(t=>{let r=t.data.rank;void 0!==r&&(void 0===e||r>e)&&(e=r)}),e||(e=0),e},O=(t,e)=>{let r={lhs:[],rhs:[]};return null==t||t.forEach(t=>{e(t)?r.lhs.push(t):r.rhs.push(t)}),r},R=(t,e)=>t.reduce((t,r)=>{let n=e(t),i=e(r);return n>i?r:t}),z=(t,e,r,n,i,o)=>{!n.includes(e.id)&&(n.push(e.id),r||o.push(e.id),i(e.id).forEach(e=>z(t,e,r,n,i,o)),r&&o.push(e.id))},I=(t,e,r,n)=>{let i=Array.isArray(e)?e:[e],o=e=>n?t.getSuccessors(e):t.getNeighbors(e),s=[],a=[];return i.forEach(e=>{if(t.hasNode(e.id))z(t,e,"post"===r,a,o,s);else throw Error(`Graph does not have node: ${e}`)}),s},C=t=>{let e=r=>{let n=t.getChildren(r),i=t.getNode(r);if((null==n?void 0:n.length)&&n.forEach(t=>e(t.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let e=i.data.minRank,n=i.data.maxRank+1;ee(t.id))},D=(t,e,r,n,i,o)=>{let s=i.data[e][o-1],a=x(t,"border",{rank:o,borderType:e,width:0,height:0},r);i.data[e][o]=a,t.setParent(a,n),s&&t.addEdge({id:`e${Math.random()}`,source:s,target:a,data:{weight:1}})},P=(t,e)=>{let r=e.toLowerCase();("lr"===r||"rl"===r)&&L(t)},T=(t,e)=>{let r=e.toLowerCase();("bt"===r||"rl"===r)&&q(t),("lr"===r||"rl"===r)&&(G(t),L(t))},L=t=>{t.getAllNodes().forEach(t=>{F(t)}),t.getAllEdges().forEach(t=>{F(t)})},F=t=>{let e=t.data.width;t.data.width=t.data.height,t.data.height=e},q=t=>{t.getAllNodes().forEach(t=>{Z(t.data)}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>Z(t)),t.data.hasOwnProperty("y")&&Z(t.data)})},Z=t=>{(null==t?void 0:t.y)&&(t.y=-t.y)},G=t=>{t.getAllNodes().forEach(t=>{V(t.data)}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>V(t)),t.data.hasOwnProperty("x")&&V(t.data)})},V=t=>{let e=t.x;t.x=t.y,t.y=e},U=t=>{let e=x(t,"root",{},"_root"),r=B(t),n=Math.max(...Object.values(r));Math.abs(n)===1/0&&(n=1);let i=n-1,o=2*i+1;t.getAllEdges().forEach(t=>{t.data.minlen*=o});let s=W(t)+1;return t.getRoots().forEach(n=>{$(t,e,o,s,i,r,n.id)}),{nestingRoot:e,nodeRankFactor:o}},$=(t,e,r,n,i,o,s)=>{let a=t.getChildren(s);if(!(null==a?void 0:a.length)){s!==e&&t.addEdge({id:`e${Math.random()}`,source:e,target:s,data:{weight:0,minlen:r}});return}let u=S(t,"_bt"),d=S(t,"_bb"),l=t.getNode(s);t.setParent(u,s),l.data.borderTop=u,t.setParent(d,s),l.data.borderBottom=d,null==a||a.forEach(a=>{$(t,e,r,n,i,o,a.id);let l=a.data.borderTop?a.data.borderTop:a.id,h=a.data.borderBottom?a.data.borderBottom:a.id,c=a.data.borderTop?n:2*n,f=l!==h?1:i-o[s]+1;t.addEdge({id:`e${Math.random()}`,source:u,target:l,data:{minlen:f,weight:c,nestingEdge:!0}}),t.addEdge({id:`e${Math.random()}`,source:h,target:d,data:{minlen:f,weight:c,nestingEdge:!0}})}),t.getParent(s)||t.addEdge({id:`e${Math.random()}`,source:e,target:u,data:{weight:0,minlen:i+o[s]}})},B=t=>{let e={},r=(n,i)=>{let o=t.getChildren(n);null==o||o.forEach(t=>r(t.id,i+1)),e[n]=i};return t.getRoots().forEach(t=>r(t.id,1)),e},W=t=>{let e=0;return t.getAllEdges().forEach(t=>{e+=t.data.weight}),e},Y=(t,e)=>{e&&t.removeNode(e),t.getAllEdges().forEach(e=>{e.data.nestingEdge&&t.removeEdge(e.id)})},H="edge-label",J=(t,e)=>{t.getAllEdges().forEach(r=>K(t,r,e))},K=(t,e,r)=>{let n,i,o,s=e.source,a=t.getNode(s).data.rank,u=e.target,d=t.getNode(u).data.rank,l=e.data.labelRank;if(d!==a+1){for(t.removeEdge(e.id),o=0,++a;a{e.forEach(e=>{let r,n=t.getNode(e),{data:i}=n,o=i.originalEdge;o&&t.addEdge(o);let s=e;for(;n.data.dummy;)r=t.getSuccessors(s)[0],t.removeNode(s),o.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===H&&(o.data.x=n.data.x,o.data.y=n.data.y,o.data.width=n.data.width,o.data.height=n.data.height),s=r.id,n=t.getNode(s)})};var X=r(59145),tt=function(t){if("object"!=typeof t||null===t)return t;if((0,X.Z)(t)){e=[];for(var e,r=0,n=t.length;r{let n;let i={};null==r||r.forEach(r=>{let o,s,a=t.getParent(r);for(;a;){if((o=t.getParent(a.id))?(s=i[o.id],i[o.id]=a.id):(s=n,n=a.id),s&&s!==a.id){e.hasNode(s)||e.addNode({id:s,data:{}}),e.hasNode(a.id)||e.addNode({id:a.id,data:{}}),e.hasEdge(`e${s}-${a.id}`)||e.addEdge({id:`e${s}-${a.id}`,source:s,target:a.id,data:{}});return}a=o}})},tr=(t,e,r)=>{let n=tn(t),o=new i.k({tree:[{id:n,children:[],data:{}}]});return t.getAllNodes().forEach(i=>{let s=t.getParent(i.id);(i.data.rank===e||i.data.minRank<=e&&e<=i.data.maxRank)&&(o.hasNode(i.id)||o.addNode(Object.assign({},i)),(null==s?void 0:s.id)&&!o.hasNode(null==s?void 0:s.id)&&o.addNode(Object.assign({},s)),o.setParent(i.id,(null==s?void 0:s.id)||n),t.getRelatedEdges(i.id,r).forEach(e=>{let r=e.source===i.id?e.target:e.source;o.hasNode(r)||o.addNode(Object.assign({},t.getNode(r)));let n=o.getRelatedEdges(r,"out").find(({target:t})=>t===i.id),s=void 0!==n?n.data.weight:0;n?o.updateEdgeData(n.id,Object.assign(Object.assign({},n.data),{weight:e.data.weight+s})):o.addEdge({id:e.id,source:r,target:i.id,data:{weight:e.data.weight+s}})}),i.data.hasOwnProperty("minRank")&&o.updateNodeData(i.id,Object.assign(Object.assign({},i.data),{borderLeft:i.data.borderLeft[e],borderRight:i.data.borderRight[e]})))}),o},tn=t=>{let e;for(;t.hasNode(e=`_root${Math.random()}`););return e},ti=(t,e,r)=>{let n=N(r,r.map((t,e)=>e)),i=e.map(e=>{let r=t.getRelatedEdges(e,"out").map(t=>({pos:n[t.target]||0,weight:t.data.weight}));return null==r?void 0:r.sort((t,e)=>t.pos-e.pos)}),o=i.flat().filter(t=>void 0!==t),s=1;for(;s{if(t){let e=t.pos+s;u[e]+=t.weight;let r=0;for(;e>0;)e%2&&(r+=u[e+1]),e=e-1>>1,u[e]+=t.weight;d+=t.weight*r}}),d},to=(t,e)=>{let r=0;for(let n=1;n<(null==e?void 0:e.length);n+=1)r+=ti(t,e[n-1],e[n]);return r},ts=t=>{let e={},r=t.getAllNodes(),n=r.map(t=>{var e;return null!==(e=t.data.rank)&&void 0!==e?e:-1/0}),i=Math.max(...n),o=[];for(let t=0;tt.getNode(e.id).data.rank-t.getNode(r.id).data.rank),a=s.filter(e=>void 0!==t.getNode(e.id).data.fixorder),u=a.sort((e,r)=>t.getNode(e.id).data.fixorder-t.getNode(r.id).data.fixorder);return null==u||u.forEach(r=>{isNaN(t.getNode(r.id).data.rank)||o[t.getNode(r.id).data.rank].push(r.id),e[r.id]=!0}),null==s||s.forEach(r=>t.dfsTree(r.id,t=>{if(e.hasOwnProperty(t.id))return!0;e[t.id]=!0,isNaN(t.data.rank)||o[t.data.rank].push(t.id)})),o},ta=(t,e)=>e.map(e=>{let r=t.getRelatedEdges(e,"in");if(!(null==r?void 0:r.length))return{v:e};let n={sum:0,weight:0};return null==r||r.forEach(e=>{let r=t.getNode(e.source);n.sum+=e.data.weight*r.data.order,n.weight+=e.data.weight}),{v:e,barycenter:n.sum/n.weight,weight:n.weight}}),tu=t=>{var e,r;let n=[],i=t=>e=>{!e.merged&&(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&td(t,e)},o=e=>r=>{r.in.push(e),0==--r.indegree&&t.push(r)};for(;null==t?void 0:t.length;){let s=t.pop();n.push(s),null===(e=s.in.reverse())||void 0===e||e.forEach(t=>i(s)(t)),null===(r=s.out)||void 0===r||r.forEach(t=>o(s)(t))}let s=n.filter(t=>!t.merged),a=["vs","i","barycenter","weight"];return s.map(t=>{let e={};return null==a||a.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])}),e})},td=(t,e)=>{var r;let n=0,i=0;t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.vs=null===(r=e.vs)||void 0===r?void 0:r.concat(t.vs),t.barycenter=n/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0};var tl=(t,e)=>{var r,n,i;let o={};null==t||t.forEach((t,e)=>{o[t.v]={i:e,indegree:0,in:[],out:[],vs:[t.v]};let r=o[t.v];void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)}),null===(r=e.getAllEdges())||void 0===r||r.forEach(t=>{let e=o[t.source],r=o[t.target];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(o[t.target]))});let s=null===(i=(n=Object.values(o)).filter)||void 0===i?void 0:i.call(n,t=>!t.indegree);return tu(s)};let th=(t,e,r,n)=>{let i=O(t,t=>{let e=t.hasOwnProperty("fixorder")&&!isNaN(t.fixorder);return n?!e&&t.hasOwnProperty("barycenter"):e||t.hasOwnProperty("barycenter")}),o=i.lhs,s=i.rhs.sort((t,e)=>-t.i- -e.i),a=[],u=0,d=0,l=0;null==o||o.sort(tf(!!e,!!r)),l=tc(a,s,l),null==o||o.forEach(t=>{var e;l+=null===(e=t.vs)||void 0===e?void 0:e.length,a.push(t.vs),u+=t.barycenter*t.weight,d+=t.weight,l=tc(a,s,l)});let h={vs:a.flat()};return d&&(h.barycenter=u/d,h.weight=d),h},tc=(t,e,r)=>{let n,i=r;for(;e.length&&(n=e[e.length-1]).i<=i;)e.pop(),null==t||t.push(n.vs),i++;return i},tf=(t,e)=>(r,n)=>{if(void 0!==r.fixorder&&void 0!==n.fixorder)return r.fixorder-n.fixorder;if(r.barycentern.barycenter)return 1;if(e&&void 0!==r.order&&void 0!==n.order){if(r.ordern.order)return 1}return t?n.i-r.i:r.i-n.i},tg=(t,e,r,n,i,o)=>{var s,a,u,d;let l=t.getChildren(e).map(t=>t.id),h=t.getNode(e),c=h?h.data.borderLeft:void 0,f=h?h.data.borderRight:void 0,g={};c&&(l=null==l?void 0:l.filter(t=>t!==c&&t!==f));let p=ta(t,l||[]);null==p||p.forEach(e=>{var i;if(null===(i=t.getChildren(e.v))||void 0===i?void 0:i.length){let i=tg(t,e.v,r,n,o);g[e.v]=i,i.hasOwnProperty("barycenter")&&tm(e,i)}});let m=tl(p,r);tp(m,g),null===(s=m.filter(t=>t.vs.length>0))||void 0===s||s.forEach(e=>{let r=t.getNode(e.vs[0]);r&&(e.fixorder=r.data.fixorder,e.order=r.data.order)});let v=th(m,n,i,o);if(c&&(v.vs=[c,v.vs,f].flat(),null===(a=t.getPredecessors(c))||void 0===a?void 0:a.length)){let e=t.getNode((null===(u=t.getPredecessors(c))||void 0===u?void 0:u[0].id)||""),r=t.getNode((null===(d=t.getPredecessors(f))||void 0===d?void 0:d[0].id)||"");v.hasOwnProperty("barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.data.order+r.data.order)/(v.weight+2),v.weight+=2}return v},tp=(t,e)=>{null==t||t.forEach(t=>{var r;let n=null===(r=t.vs)||void 0===r?void 0:r.map(t=>e[t]?e[t].vs:t);t.vs=n.flat()})},tm=(t,e)=>{void 0!==t.barycenter?(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight):(t.barycenter=e.barycenter,t.weight=e.weight)},tv=(t,e)=>{let r;let n=j(t),i=[],o=[];for(let t=1;t-1;t--)o.push(t);let s=ty(t,i,"in"),a=ty(t,o,"out"),u=ts(t);tx(t,u);let d=Number.POSITIVE_INFINITY;for(let n=0,i=0;i<4;++n,++i){tw(n%2?s:a,n%4>=2,!1,e),u=_(t);let o=to(t,u);o=2,!0,e),u=_(t);let o=to(t,u);oe.map(e=>tr(t,e,r)),tw=(t,e,r,n)=>{let o=new i.k;null==t||t.forEach(t=>{var i;let s=t.getRoots()[0].id,a=tg(t,s,o,e,r,n);for(let e=0;e<(null===(i=a.vs)||void 0===i?void 0:i.length);e++){let r=t.getNode(a.vs[e]);r&&(r.data.order=e)}te(t,o,a.vs)})},tx=(t,e)=>{null==e||e.forEach(e=>{null==e||e.forEach((e,r)=>{t.getNode(e).data.order=r})})},tb=(t,e)=>{let r=t.getAllNodes().filter(e=>{var r;return!(null===(r=t.getChildren(e.id))||void 0===r?void 0:r.length)}),n=r.map(t=>t.data.rank),i=Math.max(...n),o=[];for(let t=0;t{let r=t.getNode(e);r&&!r.data.dummy&&(isNaN(r.data.rank)||(r.data.fixorder=o[r.data.rank].length,o[r.data.rank].push(e)))})},tE=t=>{let e={},r=0,n=i=>{let o=r;t.getChildren(i).forEach(t=>n(t.id)),e[i]={low:o,lim:r++}};return t.getRoots().forEach(t=>n(t.id)),e},tN=(t,e,r,n)=>{var i,o;let s,a;let u=[],d=[],l=Math.min(e[r].low,e[n].low),h=Math.max(e[r].lim,e[n].lim);s=r;do u.push(s=null===(i=t.getParent(s))||void 0===i?void 0:i.id);while(s&&(e[s].low>l||h>e[s].lim));for(a=s,s=n;s&&s!==a;)d.push(s),s=null===(o=t.getParent(s))||void 0===o?void 0:o.id;return{lca:a,path:u.concat(d.reverse())}},tM=(t,e)=>{let r=tE(t);e.forEach(e=>{var n,i;let o=e,s=t.getNode(o),a=s.data.originalEdge;if(!a)return;let u=tN(t,r,a.source,a.target),d=u.path,l=u.lca,h=0,c=d[0],f=!0;for(;o!==a.target;){if(s=t.getNode(o),f){for(;c!==l&&(null===(n=t.getNode(c))||void 0===n?void 0:n.data.maxRank){let r={};return(null==e?void 0:e.length)&&e.reduce((e,n)=>{let i=0,o=0,s=e.length,a=null==n?void 0:n[(null==n?void 0:n.length)-1];return null==n||n.forEach((e,u)=>{var d;let l=tA(t,e),h=l?t.getNode(l.id).data.order:s;(l||e===a)&&(null===(d=n.slice(o,u+1))||void 0===d||d.forEach(e=>{var n;null===(n=t.getPredecessors(e))||void 0===n||n.forEach(n=>{var o;let s=t.getNode(n.id),a=s.data.order;(a{let r={};function n(e,n){let i=JSON.stringify(e.slice(1));n.get(i)||(!function(e,n,i,o,s){var a,u;let d;for(let l=n;l{let n=t.getNode(e.id);n.data.dummy&&(n.data.orders)&&tS(r,e.id,d)}))}(...e),n.set(i,!0))}return(null==e?void 0:e.length)&&e.reduce((e,r)=>{let i,o=-1,s=0,a=new Map;return null==r||r.forEach((u,d)=>{var l;if((null===(l=t.getNode(u))||void 0===l?void 0:l.data.dummy)==="border"){let e=t.getPredecessors(u)||[];e.length&&(n([r,s,d,o,i=t.getNode(e[0].id).data.order],a),s=d,o=i)}n([r,s,r.length,i,e.length],a)}),r}),r},tA=(t,e)=>{var r,n;if(null===(r=t.getNode(e))||void 0===r?void 0:r.data.dummy)return null===(n=t.getPredecessors(e))||void 0===n?void 0:n.find(e=>t.getNode(e.id).data.dummy)},tS=(t,e,r)=>{let n=e,i=r;if(n>i){let t=n;n=i,i=t}let o=t[n];o||(t[n]=o={}),o[i]=!0},tj=(t,e,r)=>{let n=e,i=r;return n>i&&(n=i,i=e),!!t[n]},tO=(t,e,r,n)=>{let i={},o={},s={};return null==e||e.forEach(t=>{null==t||t.forEach((t,e)=>{i[t]=t,o[t]=t,s[t]=e})}),null==e||e.forEach(t=>{let e=-1;null==t||t.forEach(t=>{let a=n(t).map(t=>t.id);if(a.length){a=a.sort((t,e)=>s[t]-s[e]);let n=(a.length-1)/2;for(let u=Math.floor(n),d=Math.ceil(n);u<=d;++u){let n=a[u];o[t]===t&&e{var a;let u={},d=tz(t,e,r,i,o,s),l=s?"borderLeft":"borderRight",h=(t,e)=>{let r=d.getAllNodes(),n=r.pop(),i={};for(;n;)i[n.id]?t(n.id):(i[n.id]=!0,r.push(n),r=r.concat(e(n.id))),n=r.pop()};return h(t=>{u[t]=(d.getRelatedEdges(t,"in")||[]).reduce((t,e)=>Math.max(t,(u[e.source]||0)+e.data.weight),0)},d.getPredecessors.bind(d)),h(e=>{let r=(d.getRelatedEdges(e,"out")||[]).reduce((t,e)=>Math.min(t,(u[e.target]||0)-e.data.weight),Number.POSITIVE_INFINITY),n=t.getNode(e);r!==Number.POSITIVE_INFINITY&&n.data.borderType!==l&&(u[e]=Math.max(u[e],r))},d.getSuccessors.bind(d)),null===(a=Object.values(n))||void 0===a||a.forEach(t=>{u[t]=u[r[t]]}),u},tz=(t,e,r,n,o,s)=>{let a=new i.k,u=tD(n,o,s);return null==e||e.forEach(e=>{let n;null==e||e.forEach(e=>{let i=r[e];if(a.hasNode(i)||a.addNode({id:i,data:{}}),n){let o=r[n],s=a.getRelatedEdges(o,"out").find(t=>t.target===i);s?a.updateEdgeData(s.id,Object.assign(Object.assign({},s.data),{weight:Math.max(u(t,e,n),s.data.weight||0)})):a.addEdge({id:`e${Math.random()}`,source:o,target:i,data:{weight:Math.max(u(t,e,n),0)}})}n=e})}),a},tI=(t,e)=>R(Object.values(e),e=>{var r;let n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return null===(r=Object.keys(e))||void 0===r||r.forEach(r=>{let o=e[r],s=tP(t,r)/2;n=Math.max(o+s,n),i=Math.min(o-s,i)}),n-i}),tC=(t,e)=>{let r={};return Object.keys(t.ul).forEach(n=>{if(e)r[n]=t[e.toLowerCase()][n];else{let e=Object.values(t).map(t=>t[n]);r[n]=(e[0]+e[1])/2}}),r},tD=(t,e,r)=>(n,i,o)=>{let s;let a=n.getNode(i),u=n.getNode(o),d=0;if(s=0+a.data.width/2,a.data.hasOwnProperty("labelpos"))switch((a.data.labelpos||"").toLowerCase()){case"l":d=-a.data.width/2;break;case"r":d=a.data.width/2}if(d&&(s+=r?d:-d),d=0,s+=(a.data.dummy?e:t)/2+(u.data.dummy?e:t)/2+u.data.width/2,u.data.labelpos)switch((u.data.labelpos||"").toLowerCase()){case"l":d=u.data.width/2;break;case"r":d=-u.data.width/2}return d&&(s+=r?d:-d),d=0,s},tP=(t,e)=>t.getNode(e).data.width||0,tT=(t,e)=>{let{ranksep:r=0}=e||{},n=_(t),i=0;null==n||n.forEach(e=>{let n=e.map(e=>t.getNode(e).data.height),o=Math.max(...n,0);null==e||e.forEach(e=>{t.getNode(e).data.y=i+o/2}),i+=o+r})},tL=(t,e)=>{let{align:r,nodesep:n=0,edgesep:i=0}=e||{},o=_(t),s=Object.assign(t_(t,o),tk(t,o)),a={},u=[];["u","d"].forEach(e=>{u="u"===e?o:Object.values(o).reverse(),["l","r"].forEach(r=>{"r"===r&&(u=u.map(t=>Object.values(t).reverse()));let o=("u"===e?t.getPredecessors:t.getSuccessors).bind(t),d=tO(t,u,s,o),l=tR(t,u,d.root,d.align,n,i,"r"===r);"r"===r&&Object.keys(l).forEach(t=>l[t]=-l[t]),a[e+r]=l})});let d=tI(t,a);return d&&function(t,e){let r=Object.values(e),n=Math.min(...r),i=Math.max(...r);["u","d"].forEach(r=>{["l","r"].forEach(o=>{let s;let a=r+o,u=t[a];if(u===e)return;let d=Object.values(u);(s="l"===o?n-Math.min(...d):i-Math.max(...d))&&(t[a]={},Object.keys(u).forEach(e=>{t[a][e]=u[e]+s}))})})}(a,d),tC(a,r)},tF=(t,e)=>{var r;let n=E(t);tT(n,e);let i=tL(n,e);null===(r=Object.keys(i))||void 0===r||r.forEach(t=>{n.getNode(t).data.x=i[t]})},tq=t=>{let e={},r=n=>{var i;let o;let s=t.getNode(n);return s?e[n]?s.data.rank:(e[n]=!0,null===(i=t.getRelatedEdges(n,"out"))||void 0===i||i.forEach(t=>{let e=r(t.target),n=t.data.minlen,i=e-n;i&&(void 0===o||i0===t.getRelatedEdges(e.id,"in").length).forEach(t=>r(t.id))},tZ=t=>{let e;let r={},n=i=>{var o;let s;let a=t.getNode(i);return a?r[i]?a.data.rank:(r[i]=!0,null===(o=t.getRelatedEdges(i,"out"))||void 0===o||o.forEach(t=>{let e=n(t.target),r=t.data.minlen,i=e-r;i&&(void 0===s||i0===t.getRelatedEdges(e.id,"in").length).forEach(t=>{t&&n(t.id)}),void 0===e&&(e=0);let i={},o=(e,r)=>{var n;let s=t.getNode(e),a=isNaN(s.data.layer)?r:s.data.layer;(void 0===s.data.rank||s.data.rank{o(t.target,a+t.data.minlen)}))};t.getAllNodes().forEach(t=>{let r=t.data;r&&(isNaN(r.layer)?r.rank-=e:o(t.id,r.layer))})},tG=(t,e)=>t.getNode(e.target).data.rank-t.getNode(e.source).data.rank-e.data.minlen,tV=t=>{let e,r;let n=new i.k({tree:[]}),o=t.getAllNodes()[0],s=t.getAllNodes().length;for(n.addNode(o);tU(n,t){let r=n=>{e.getRelatedEdges(n,"both").forEach(i=>{let o=i.source,s=n===o?i.target:o;t.hasNode(s)||tG(e,i)||(t.addNode({id:s,data:{}}),t.addEdge({id:i.id,source:n,target:s,data:{}}),r(s))})};return t.getAllNodes().forEach(t=>r(t.id)),t.getAllNodes().length},t$=t=>{let e,r;let n=new i.k({tree:[]}),o=t.getAllNodes()[0],s=t.getAllNodes().length;for(n.addNode(o);tB(n,t){let r=n=>{var i;null===(i=e.getRelatedEdges(n,"both"))||void 0===i||i.forEach(i=>{let o=i.source,s=n===o?i.target:o;t.hasNode(s)||void 0===e.getNode(s).data.layer&&tG(e,i)||(t.addNode({id:s,data:{}}),t.addEdge({id:i.id,source:n,target:s,data:{}}),r(s))})};return t.getAllNodes().forEach(t=>r(t.id)),t.getAllNodes().length},tW=(t,e)=>R(e.getAllEdges(),r=>t.hasNode(r.source)!==t.hasNode(r.target)?tG(e,r):1/0),tY=(t,e,r)=>{t.getAllNodes().forEach(t=>{let n=e.getNode(t.id);n.data.rank||(n.data.rank=0),n.data.rank+=r})},tH=t=>{let e,r;let n=b(t);tq(n);let i=tV(n);for(tX(i),tJ(i,n);e=t1(i);)r=t2(i,n,e),t3(i,n,e,r)},tJ=(t,e)=>{let r=I(t,t.getAllNodes(),"post",!1);(r=r.slice(0,(null==r?void 0:r.length)-1)).forEach(r=>{tK(t,e,r)})},tK=(t,e,r)=>{let n=t.getNode(r),i=n.data.parent,o=t.getRelatedEdges(r,"both").find(t=>t.target===i||t.source===i);o.data.cutvalue=tQ(t,e,r)},tQ=(t,e,r)=>{let n=t.getNode(r),i=n.data.parent,o=!0,s=e.getRelatedEdges(r,"out").find(t=>t.target===i),a=0;return s||(o=!1,s=e.getRelatedEdges(i,"out").find(t=>t.target===r)),a=s.data.weight,e.getRelatedEdges(r,"both").forEach(e=>{let n=e.source===r,s=n?e.target:e.source;if(s!==i){let i=n===o,u=e.data.weight;if(a+=i?u:-u,t6(t,r,s)){let e=t.getRelatedEdges(r,"both").find(t=>t.source===s||t.target===s).data.cutvalue;a+=i?-e:e}}}),a},tX=(t,e=t.getAllNodes()[0].id)=>{t0(t,{},1,e)},t0=(t,e,r,n,i)=>{var o;let s=r,a=t.getNode(n);return e[n]=!0,null===(o=t.getNeighbors(n))||void 0===o||o.forEach(r=>{e[r.id]||(s=t0(t,e,s,r.id,n))}),a.data.low=r,a.data.lim=s++,i?a.data.parent=i:delete a.data.parent,s},t1=t=>t.getAllEdges().find(t=>t.data.cutvalue<0),t2=(t,e,r)=>{let n=r.source,i=r.target;e.getRelatedEdges(n,"out").find(t=>t.target===i)||(n=r.target,i=r.source);let o=t.getNode(n),s=t.getNode(i),a=o,u=!1;o.data.lim>s.data.lim&&(a=s,u=!0);let d=e.getAllEdges().filter(e=>u===t4(t.getNode(e.source),a)&&u!==t4(t.getNode(e.target),a));return R(d,t=>tG(e,t))},t3=(t,e,r,n)=>{let i=t.getRelatedEdges(r.source,"both").find(t=>t.source===r.target||t.target===r.target);i&&t.removeEdge(i.id),t.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),tX(t),tJ(t,e),t8(t,e)},t8=(t,e)=>{let r=t.getAllNodes().find(t=>!t.data.parent),n=I(t,r,"pre",!1);(n=n.slice(1)).forEach(r=>{let n=t.getNode(r).data.parent,i=e.getRelatedEdges(r,"out").find(t=>t.target===n),o=!1;!i&&e.hasNode(n)&&(i=e.getRelatedEdges(n,"out").find(t=>t.target===r),o=!0),e.getNode(r).data.rank=(e.hasNode(n)&&e.getNode(n).data.rank||0)+(o?null==i?void 0:i.data.minlen:-(null==i?void 0:i.data.minlen))})},t6=(t,e,r)=>t.getRelatedEdges(e,"both").find(t=>t.source===r||t.target===r),t4=(t,e)=>e.data.low<=t.data.lim&&t.data.lim<=e.data.lim,t7=(t,e)=>{switch(e){case"network-simplex":et(t);break;case"tight-tree":default:t9(t);break;case"longest-path":t5(t)}},t5=tq,t9=t=>{tZ(t),t$(t)},et=t=>{tH(t)},ee=(t,e)=>{let r;let{edgeLabelSpace:n,keepNodeOrder:i,prevGraph:o,rankdir:s,ranksep:a}=e;!i&&o&&en(t,o);let u=el(t);n&&(e.ranksep=eh(u,{rankdir:s,ranksep:a}));try{r=er(u,e)}catch(t){if("Not possible to find intersection inside of the rectangle"===t.message){console.error("The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:\n",t);return}throw t}return ei(t,u),r},er=(t,e)=>{let{acyclicer:r,ranker:n,rankdir:i="tb",nodeOrder:o,keepNodeOrder:s,align:a,nodesep:u=50,edgesep:d=20,ranksep:l=50}=e;ex(t),m(t,r);let{nestingRoot:h,nodeRankFactor:c}=U(t);t7(E(t),n),ec(t),A(t,c),Y(t,h),k(t),ef(t),eg(t);let f=[];J(t,f),tM(t,f),C(t),s&&tb(t,o),tv(t,s),eb(t),P(t,i),tF(t,{align:a,nodesep:u,edgesep:d,ranksep:l}),eE(t),ew(t),Q(t,f),ev(t),T(t,i);let{width:g,height:p}=ep(t);return em(t),ey(t),y(t),{width:g,height:p}},en=(t,e)=>{t.getAllNodes().forEach(r=>{let n=t.getNode(r.id);if(e.hasNode(r.id)){let t=e.getNode(r.id);n.data.fixorder=t.data._order,delete t.data._order}else delete n.data.fixorder})},ei=(t,e)=>{t.getAllNodes().forEach(r=>{var n;let i=t.getNode(r.id);if(i){let t=e.getNode(r.id);i.data.x=t.data.x,i.data.y=t.data.y,i.data._order=t.data.order,i.data._rank=t.data.rank,(null===(n=e.getChildren(r.id))||void 0===n?void 0:n.length)&&(i.data.width=t.data.width,i.data.height=t.data.height)}}),t.getAllEdges().forEach(r=>{let n=t.getEdge(r.id),i=e.getEdge(r.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},eo=["width","height","layer","fixorder"],es={width:0,height:0},ea=["minlen","weight","width","height","labeloffset"],eu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ed=["labelpos"],el=t=>{let e=new i.k({tree:[]});return t.getAllNodes().forEach(r=>{let n=eM(t.getNode(r.id).data),i=Object.assign(Object.assign({},es),n),o=eN(i,eo);e.hasNode(r.id)||e.addNode({id:r.id,data:Object.assign({},o)});let s=t.hasTreeStructure("combo")?t.getParent(r.id,"combo"):t.getParent(r.id);null!=s&&(e.hasNode(s.id)||e.addNode(Object.assign({},s)),e.setParent(r.id,s.id))}),t.getAllEdges().forEach(r=>{let n=eM(t.getEdge(r.id).data),i={};null==ed||ed.forEach(t=>{void 0!==n[t]&&(i[t]=n[t])}),e.addEdge({id:r.id,source:r.source,target:r.target,data:Object.assign({},eu,eN(n,ea),i)})}),e},eh=(t,e)=>{let{ranksep:r=0,rankdir:n}=e;return t.getAllNodes().forEach(t=>{isNaN(t.data.layer)||t.data.layer||(t.data.layer=0)}),t.getAllEdges().forEach(t=>{var e;t.data.minlen*=2,(null===(e=t.data.labelpos)||void 0===e?void 0:e.toLowerCase())!=="c"&&("TB"===n||"BT"===n?t.data.width+=t.data.labeloffset:t.data.height+=t.data.labeloffset)}),r/2},ec=t=>{t.getAllEdges().forEach(e=>{if(e.data.width&&e.data.height){let r=t.getNode(e.source),n=t.getNode(e.target),i={e,rank:(n.data.rank-r.data.rank)/2+r.data.rank};x(t,"edge-proxy",i,"_ep")}})},ef=t=>{let e=0;return t.getAllNodes().forEach(r=>{var n,i;r.data.borderTop&&(r.data.minRank=null===(n=t.getNode(r.data.borderTop))||void 0===n?void 0:n.data.rank,r.data.maxRank=null===(i=t.getNode(r.data.borderBottom))||void 0===i?void 0:i.data.rank,e=Math.max(e,r.data.maxRank||-1/0))}),e},eg=t=>{t.getAllNodes().forEach(e=>{"edge-proxy"===e.data.dummy&&(t.getEdge(e.data.e.id).data.labelRank=e.data.rank,t.removeNode(e.id))})},ep=(t,e)=>{let r,n;let i=0,o=0,{marginx:s=0,marginy:a=0}=e||{},u=t=>{if(!t.data)return;let e=t.data.x,s=t.data.y,a=t.data.width,u=t.data.height;isNaN(e)||isNaN(a)||(void 0===r&&(r=e-a/2),r=Math.min(r,e-a/2),i=Math.max(i,e+a/2)),isNaN(s)||isNaN(u)||(void 0===n&&(n=s-u/2),n=Math.min(n,s-u/2),o=Math.max(o,s+u/2))};return t.getAllNodes().forEach(t=>{u(t)}),t.getAllEdges().forEach(t=>{(null==t?void 0:t.data.hasOwnProperty("x"))&&u(t)}),r-=s,n-=a,t.getAllNodes().forEach(t=>{t.data.x-=r,t.data.y-=n}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>{t.x-=r,t.y-=n}),t.data.hasOwnProperty("x")&&(t.data.x-=r),t.data.hasOwnProperty("y")&&(t.data.y-=n)}),{width:i-r+s,height:o-n+a}},em=t=>{t.getAllEdges().forEach(e=>{let r,n;let i=t.getNode(e.source),o=t.getNode(e.target);e.data.points?(r=e.data.points[0],n=e.data.points[e.data.points.length-1]):(e.data.points=[],r={x:o.data.x,y:o.data.y},n={x:i.data.x,y:i.data.y}),e.data.points.unshift(M(i.data,r)),e.data.points.push(M(o.data,n))})},ev=t=>{t.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch(("l"===t.data.labelpos||"r"===t.data.labelpos)&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset}})},ey=t=>{t.getAllEdges().forEach(t=>{var e;t.data.reversed&&(null===(e=t.data.points)||void 0===e||e.reverse())})},ew=t=>{t.getAllNodes().forEach(e=>{var r,n,i;if(null===(r=t.getChildren(e.id))||void 0===r?void 0:r.length){let r=t.getNode(e.id),o=t.getNode(r.data.borderTop),s=t.getNode(r.data.borderBottom),a=t.getNode(r.data.borderLeft[(null===(n=r.data.borderLeft)||void 0===n?void 0:n.length)-1]),u=t.getNode(r.data.borderRight[(null===(i=r.data.borderRight)||void 0===i?void 0:i.length)-1]);r.data.width=Math.abs((null==u?void 0:u.data.x)-(null==a?void 0:a.data.x))||10,r.data.height=Math.abs((null==s?void 0:s.data.y)-(null==o?void 0:o.data.y))||10,r.data.x=((null==a?void 0:a.data.x)||0)+r.data.width/2,r.data.y=((null==o?void 0:o.data.y)||0)+r.data.height/2}}),t.getAllNodes().forEach(e=>{"border"===e.data.dummy&&t.removeNode(e.id)})},ex=t=>{t.getAllEdges().forEach(e=>{if(e.source===e.target){let r=t.getNode(e.source);r.data.selfEdges||(r.data.selfEdges=[]),r.data.selfEdges.push(e),t.removeEdge(e.id)}})},eb=t=>{let e=_(t);null==e||e.forEach(e=>{let r=0;null==e||e.forEach((e,n)=>{var i;let o=t.getNode(e);o.data.order=n+r,null===(i=o.data.selfEdges)||void 0===i||i.forEach(e=>{x(t,"selfedge",{width:e.data.width,height:e.data.height,rank:o.data.rank,order:n+ ++r,e:e},"_se")}),delete o.data.selfEdges})})},eE=t=>{t.getAllNodes().forEach(e=>{let r=t.getNode(e.id);if("selfedge"===r.data.dummy){let n=t.getNode(r.data.e.source),i=n.data.x+n.data.width/2,o=n.data.y,s=r.data.x-i,a=n.data.height/2;t.hasEdge(r.data.e.id)?t.updateEdgeData(r.data.e.id,r.data.e.data):t.addEdge({id:r.data.e.id,source:r.data.e.source,target:r.data.e.target,data:r.data.e.data}),t.removeNode(e.id),r.data.e.data.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{y:o,x:i+s},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.data.e.data.x=r.data.x,r.data.e.data.y=r.data.y}})},eN=(t,e)=>{let r={};return null==e||e.forEach(e=>{void 0!==t[e]&&(r[e]=+t[e])}),r},eM=(t={})=>{let e={};return Object.keys(t).forEach(r=>{e[r.toLowerCase()]=t[r]}),e};var e_=r(78732),ek=r(98130);let eA={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class eS{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},eA),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let s=Object.assign(Object.assign({},this.options),r),{nodeSize:a,align:u,rankdir:d="TB",ranksep:l,nodesep:h,ranksepFunc:c,nodesepFunc:f,edgeLabelSpace:g,ranker:p,nodeOrder:m,begin:v,controlPoints:y,radial:w,sortByCombo:x,preset:b}=s,E=new i.k({tree:[]}),N=(0,e_.jE)(l||50,c),M=(0,e_.jE)(h||50,f),_=M,k=N;("LR"===d||"RL"===d)&&(_=N,k=M);let A=(0,e_.gl)(a,void 0),S=e.getAllNodes(),j=e.getAllEdges();S.forEach(t=>{let e=A(t),r=k(t),n=_(t),i=e+2*n,s=e+2*r,a=t.data.layer;(0,o.Z)(a)?E.addNode({id:t.id,data:{width:i,height:s,layer:a}}):E.addNode({id:t.id,data:{width:i,height:s}})}),x&&(E.attachTreeStructure("combo"),S.forEach(t=>{let{parentId:e}=t.data;void 0!==e&&E.hasNode(e)&&E.setParent(t.id,e,"combo")})),j.forEach(t=>{E.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||1}})}),(null==b?void 0:b.length)&&(n=new i.k({nodes:b})),ee(E,{prevGraph:n,edgeLabelSpace:g,keepNodeOrder:!!m,nodeOrder:m||[],acyclicer:"greedy",ranker:p,rankdir:d,nodesep:h,align:u});let O=[0,0];if(v){let t=1/0,e=1/0;E.getAllNodes().forEach(r=>{t>r.data.x&&(t=r.data.x),e>r.data.y&&(e=r.data.y)}),E.getAllEdges().forEach(r=>{var n;null===(n=r.data.points)||void 0===n||n.forEach(r=>{t>r.x&&(t=r.x),e>r.y&&(e=r.y)})}),O[0]=v[0]-t,O[1]=v[1]-e}let R="LR"===d||"RL"===d;if(w);else{let t=new Set,e="BT"===d||"RL"===d;E.getAllNodes().forEach(e=>{e.data.x=e.data.x+O[0],e.data.y=e.data.y+O[1],t.add(R?e.data.x:e.data.y)});let r=Array.from(t).sort(e?(t,e)=>e-t:(t,e)=>t-e),n=R?(t,e)=>t.x!==e.x:(t,e)=>t.y!==e.y,i=R?(t,e,r)=>{let n=Math.max(e.y,r.y),i=Math.min(e.y,r.y);return t.filter(t=>t.y<=n&&t.y>=i)}:(t,e,r)=>{let n=Math.max(e.x,r.x),i=Math.min(e.x,r.x);return t.filter(t=>t.x<=n&&t.x>=i)};E.getAllEdges().forEach((t,e)=>{var o;g&&y&&"loop"!==t.data.type&&(t.data.controlPoints=ej(null===(o=t.data.points)||void 0===o?void 0:o.map(({x:t,y:e})=>({x:t+O[0],y:e+O[1]})),E.getNode(t.source),E.getNode(t.target),r,R,n,i))})}let z=[];z=E.getAllNodes().map(t=>(0,ek.u)(t));let I=E.getAllEdges();t&&(z.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),I.forEach(t=>{e.mergeEdgeData(t.id,{controlPoints:t.data.controlPoints})}));let C={nodes:z,edges:I};return C})}}let ej=(t,e,r,n,i,o,s)=>{let a=(null==t?void 0:t.slice(1,t.length-1))||[];if(e&&r){let{x:t,y:u}=e.data,{x:d,y:l}=r.data;if(i&&(t=e.data.y,u=e.data.x,d=r.data.y,l=r.data.x),l!==u&&t!==d){let h=n.indexOf(u),c=n[h+1];if(c){let t=a[0],e=i?{x:(u+c)/2,y:(null==t?void 0:t.y)||d}:{x:(null==t?void 0:t.x)||d,y:(u+c)/2};(!t||o(t,e))&&a.unshift(e)}let f=n.indexOf(l),g=Math.abs(f-h);if(1===g)(a=s(a,e.data,r.data)).length||a.push(i?{x:(u+l)/2,y:t}:{x:t,y:(u+l)/2});else if(g>1){let e=n[f-1];if(e){let r=a[a.length-1],n=i?{x:(l+e)/2,y:(null==r?void 0:r.y)||d}:{x:(null==r?void 0:r.x)||t,y:(l+e)/2};(!r||o(r,n))&&a.push(n)}}}}return a}},63795:function(t,e,r){"use strict";r.d(e,{S:function(){return u}});var n=r(97582),i=r(78732),o=r(98130),s=r(20464);let a={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class u{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},a),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{width:a,height:u,center:h,divisions:c,startAngle:f=0,endAngle:g=2*Math.PI,angleRatio:p,ordering:m,clockwise:v,nodeSpacing:y,nodeSize:w}=n,x=e.getAllNodes(),b=e.getAllEdges(),[E,N,M]=l(a,u,h),_=null==x?void 0:x.length;if(!_||1===_)return(0,s.P)(e,t,M);let{radius:k,startRadius:A,endRadius:S}=n;if(y){let t=(0,i.jE)(10,y),e=(0,i.tO)(10,w),r=-1/0;x.forEach(t=>{let n=e(t);r{0===i?n+=r||10:n+=(t(e)||0)+(r||10)}),k=n/(2*Math.PI)}else k||A||S?!A&&S?A=S:A&&!S&&(S=A):k=Math.min(N,E)/2;let j=(g-f)/_*p,O=[];O="topology"===m?d(e,x):"topology-directed"===m?d(e,x,!0):"degree"===m?function(t,e){let r=[];return e.forEach((t,e)=>{r.push((0,o.u)(t))}),r.sort((e,r)=>t.getDegree(e.id,"both")-t.getDegree(r.id,"both")),r}(e,x):x.map(t=>(0,o.u)(t));let R=Math.ceil(_/c);for(let t=0;t<_;++t){let e=k;e||null===A||null===S||(e=A+t*(S-A)/(_-1)),e||(e=10+100*t/(_-1));let r=f+t%R*j+2*Math.PI/c*Math.floor(t/R);v||(r=g-t%R*j-2*Math.PI/c*Math.floor(t/R)),O[t].data.x=M[0]+Math.cos(r)*e,O[t].data.y=M[1]+Math.sin(r)*e}t&&O.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})});let z={nodes:O,edges:b};return z})}}let d=(t,e,r=!1)=>{let n=[(0,o.u)(e[0])],i={},s=e.length;i[e[0].id]=!0;let a=0;return e.forEach((u,d)=>{if(0!==d){if((d===s-1||t.getDegree(u.id,"both")!==t.getDegree(e[d+1].id,"both")||t.areNeighbors(n[a].id,u.id))&&!i[u.id])n.push((0,o.u)(u)),i[u.id]=!0,a++;else{let d=r?t.getSuccessors(n[a].id):t.getNeighbors(n[a].id),l=!1;for(let e=0;e{let n=t,i=e,o=r;return n||"undefined"==typeof window||(n=window.innerWidth),i||"undefined"==typeof window||(i=window.innerHeight),o||(o=[n/2,i/2]),[n,i,o]}},39233:function(t,e,r){"use strict";r.d(e,{u:function(){return m}});var n=r(97582),i=r(72137),o=r(61035),s=r(38027),a=r(97653),u=r(5192),d=r(12368),l=r(64912),h=r(80628),c=r(85087),f=r(20464);let g={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},p={center:[0,0],comboPadding:10,treeKey:"combo"};class m{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},p),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let o=this.initVals(Object.assign(Object.assign({},this.options),r)),{center:s,treeKey:a,outerLayout:c}=o,p=e.getAllNodes().filter(t=>!t.data._isCombo),m=e.getAllNodes().filter(t=>t.data._isCombo),v=e.getAllEdges(),y=null==p?void 0:p.length;if(!y||1===y)return(0,f.P)(e,t,s);let w=[],x=new Map;p.forEach(t=>{x.set(t.id,t)});let b=new Map;m.forEach(t=>{b.set(t.id,t)});let E=new Map,N=this.getInnerGraphs(e,a,x,b,v,o,E);yield Promise.all(N);let M=new Map,_=[],k=new Map,A=!0;e.getRoots(a).forEach(t=>{let r=E.get(t.id),n=b.get(t.id)||x.get(t.id),i={id:t.id,data:Object.assign(Object.assign({},t.data),{x:r.data.x||n.data.x,y:r.data.y||n.data.y,fx:r.data.fx||n.data.fx,fy:r.data.fy||n.data.fy,mass:r.data.mass||n.data.mass,size:r.data.size})};_.push(i),M.set(t.id,!0),isNaN(i.data.x)||0===i.data.x||isNaN(i.data.y)||0===i.data.y?(i.data.x=100*Math.random(),i.data.y=100*Math.random()):A=!1,(0,h._)(e,[t],e=>{e.id!==t.id&&k.set(e.id,t.id)},"TB",a)});let S=[];if(v.forEach(t=>{let e=k.get(t.source)||t.source,r=k.get(t.target)||t.target;e!==r&&M.has(e)&&M.has(r)&&S.push({id:t.id,source:e,target:r,data:{}})}),null==_?void 0:_.length){if(1===_.length)_[0].data.x=s[0],_[0].data.y=s[1];else{let t=new i.k({nodes:_,edges:S}),e=c||new d.y;if(A&&g[e.id]){let e=_.length<100?new l.A:new u.W;yield e.assign(t)}n=yield e.execute(t,Object.assign({center:s,kg:5,preventOverlap:!0,animate:!1},"force"===e.id?{gravity:1,factor:4,linkDistance:(t,e,r)=>{let n=Math.max(...e.data.size)||32,i=Math.max(...r.data.size)||32;return n/2+i/2+200}}:{}))}E.forEach(t=>{var e;let r=n.nodes.find(e=>e.id===t.id);if(r){let{x:e,y:n}=r.data;t.data.visited=!0,t.data.x=e,t.data.y=n,w.push({id:t.id,data:{x:e,y:n}})}let{x:i,y:o}=t.data;null===(e=t.data.nodes)||void 0===e||e.forEach(t=>{w.push({id:t.id,data:{x:t.data.x+i,y:t.data.y+o}})})}),E.forEach(({data:t})=>{let{x:e,y:r,visited:n,nodes:i}=t;null==i||i.forEach(t=>{if(!n){let n=w.find(e=>e.id===t.id);n.data.x+=e||0,n.data.y+=r||0}})})}return t&&w.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),{nodes:w,edges:v}})}initVals(t){let e,r,n;let i=Object.assign({},t),{nodeSize:u,spacing:d,comboPadding:l}=t;if(r=(0,o.Z)(d)?()=>d:(0,s.Z)(d)?d:()=>0,i.spacing=r,u){if((0,s.Z)(u))e=t=>{let e=u(t),n=r(t);if((0,c.k)(t.size)){let e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return(e+n)/2}return((e||32)+n)/2};else if((0,c.k)(u)){let t=u[0]>u[1]?u[0]:u[1],n=t/2;e=t=>n+r(t)/2}else{let t=u/2;e=e=>t+r(e)/2}}else e=t=>{let e=r(t);if(t.size){if((0,c.k)(t.size)){let r=t.size[0]>t.size[1]?t.size[0]:t.size[1];return(r+e)/2}if((0,a.Z)(t.size)){let r=t.size.width>t.size.height?t.size.width:t.size.height;return(r+e)/2}return(t.size+e)/2}return 32+e/2};return i.nodeSize=e,n=(0,o.Z)(l)?()=>l:(0,c.k)(l)?()=>Math.max.apply(null,l):(0,s.Z)(l)?l:()=>0,i.comboPadding=n,i}getInnerGraphs(t,e,r,s,a,d,l){let{nodeSize:f,comboPadding:g,spacing:p,innerLayout:m}=d,v=m||new u.W({}),y={center:[0,0],preventOverlap:!0,nodeSpacing:p},w=[],x=t=>{let e=(null==g?void 0:g(t))||10;return(0,c.k)(e)&&(e=Math.max(...e)),{size:e?[2*e,2*e]:[30,30],padding:e}};return t.getRoots(e).forEach(u=>{l.set(u.id,{id:u.id,data:{nodes:[],size:x(u).size}});let d=Promise.resolve();(0,h._)(t,[u],u=>{var c;if(!u.data._isCombo)return;let{size:g,padding:p}=x(u);if(null===(c=t.getChildren(u.id,e))||void 0===c?void 0:c.length){let c=l.get(u.id);l.set(u.id,{id:u.id,data:Object.assign({nodes:[]},null==c?void 0:c.data)});let g=new Map,m=t.getChildren(u.id,e).map(t=>{if(t.data._isCombo)return l.has(t.id)||l.set(t.id,{id:t.id,data:Object.assign({},t.data)}),g.set(t.id,!0),l.get(t.id);let e=r.get(t.id)||s.get(t.id);return g.set(t.id,!0),{id:t.id,data:Object.assign(Object.assign({},e.data),t.data)}}),w={nodes:m,edges:a.filter(t=>g.has(t.source)&&g.has(t.target))},x=1/0;m.forEach(t=>{var e;let{size:r}=t.data;r||(r=(null===(e=l.get(t.id))||void 0===e?void 0:e.data.size)||(null==f?void 0:f(t))||[30,30]),(0,o.Z)(r)&&(r=[r,r]);let[n,i]=r;x>n&&(x=n),x>i&&(x=i),t.data.size=r}),d=d.then(()=>(0,n.mG)(this,void 0,void 0,function*(){let t=new i.k(w),e=yield v.assign(t,y),{minX:r,minY:n,maxX:o,maxY:s}=(0,h.H0)(m),a={x:(o+r)/2,y:(s+n)/2};w.nodes.forEach(t=>{t.data.x-=a.x,t.data.y-=a.y});let d=[Math.max(o-r,x)+2*p,Math.max(s-n,x)+2*p];return l.get(u.id).data.size=d,l.get(u.id).data.nodes=m,e}))}else l.set(u.id,{id:u.id,data:Object.assign(Object.assign({},u.data),{size:g})});return!0},"BT",e),w.push(d)}),w}}},5192:function(t,e,r){"use strict";r.d(e,{W:function(){return c}});var n=r(97582),i=r(38027),o=r(61035),s=r(97653),a=r(52940),u=r(85087),d=r(98130),l=r(20464);let h={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:1.5*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class c{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},h),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let h=Object.assign(Object.assign({},this.options),r),{center:c,width:f,height:g,sortBy:p,maxLevelDiff:m,sweep:v,clockwise:y,equidistant:w,preventOverlap:x,startAngle:b=1.5*Math.PI,nodeSize:E,nodeSpacing:N}=h,M=e.getAllNodes(),_=e.getAllEdges(),k=f||"undefined"==typeof window?f:window.innerWidth,A=g||"undefined"==typeof window?g:window.innerHeight,S=c||[k/2,A/2];if(!(null==M?void 0:M.length)||1===M.length)return(0,l.P)(e,t,S);let j=[],O=0;(0,u.k)(E)?n=Math.max(E[0],E[1]):(0,i.Z)(E)?(n=-1/0,M.forEach(t=>{let e=E(t);e>n&&(n=e)})):n=E,(0,u.k)(N)?O=Math.max(N[0],N[1]):(0,o.Z)(N)&&(O=N),M.forEach(t=>{let e=(0,d.u)(t);j.push(e);let r=n,{data:a}=e;(0,u.k)(a.size)?r=Math.max(a.size[0],a.size[1]):(0,o.Z)(a.size)?r=a.size:(0,s.Z)(a.size)&&(r=Math.max(a.size.width,a.size.height)),n=Math.max(n,r),(0,i.Z)(N)&&(O=Math.max(N(t),O))});let R={};j.forEach((t,e)=>{R[t.id]=e});let z=p;(0,a.Z)(z)&&void 0!==j[0].data[z]||(z="degree"),"degree"===z?j.sort((t,r)=>e.getDegree(r.id,"both")-e.getDegree(t.id,"both")):j.sort((t,e)=>e.data[z]-t.data[z]);let I=j[0],C=(m||("degree"===z?e.getDegree(I.id,"both"):I.data[z]))/4,D=[{nodes:[]}],P=D[0];j.forEach(t=>{if(P.nodes.length>0){let r="degree"===z?Math.abs(e.getDegree(P.nodes[0].id,"both")-e.getDegree(t.id,"both")):Math.abs(P.nodes[0].data[z]-t.data[z]);C&&r>=C&&(P={nodes:[]},D.push(P))}P.nodes.push(t)});let T=n+O;if(!x){let t=D.length>0&&D[0].nodes.length>1,e=Math.min(k,A)/2-T,r=e/(D.length+(t?1:0));T=Math.min(T,r)}let L=0;if(D.forEach(t=>{let e=void 0===v?2*Math.PI-2*Math.PI/t.nodes.length:v;if(t.dTheta=e/Math.max(1,t.nodes.length-1),t.nodes.length>1&&x){let e=Math.cos(t.dTheta)-1,r=Math.sin(t.dTheta)-0,n=Math.sqrt(T*T/(e*e+r*r));L=Math.max(n,L)}t.r=L,L+=T}),w){let t=0,e=0;for(let r=0;r{0===n&&(e=r.r||0),r.r=e,e+=t})}return D.forEach(t=>{let e=t.dTheta||0,r=t.r||0;t.nodes.forEach((t,n)=>{let i=b+(y?1:-1)*e*n;t.data.x=S[0]+r*Math.cos(i),t.data.y=S[1]+r*Math.sin(i)})}),t&&j.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:j,edges:_}})}}},63330:function(t,e,r){"use strict";r.d(e,{j:function(){return _}});var n=r(97582),i=r(59145),o=r(19782),s=function(t){if(!("object"==typeof t&&null!==t)||!(0,o.Z)(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},a=function(t){for(var e=[],r=1;ru.index){var p=d-a.x-a.vx,m=l-a.y-a.vy,y=p*p+m*m;yd+g||ol+g||st.r&&(t.r=t[e].r)}function u(){if(e){var n,i,o=e.length;for(n=0,r=Array(o);nt.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},a(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){let r=this.context.nodes.find(e=>e.id===t);r&&e.forEach((t,e)=>{if("number"==typeof t||null===t){let n=["fx","fy","fz"][e];r[n]=t}})}getOptions(t){var e,r;let n=a({},this.options,t);return n.collide&&(null===(e=n.collide)||void 0===e?void 0:e.radius)===void 0&&(n.collide=n.collide||{},n.collide.radius=null!==(r=n.nodeSize)&&void 0!==r?r:10),void 0===n.iterations&&(n.link&&void 0===n.link.iterations&&(n.iterations=n.link.iterations),n.collide&&void 0===n.collide.iterations&&(n.iterations=n.collide.iterations)),this.context.options=n,n}genericLayout(t,e,r){var i;return(0,n.mG)(this,void 0,void 0,function*(){let n=this.getOptions(r),o=e.getAllNodes().map(({id:t,data:e})=>Object.assign({id:t,data:e},h(e,this.config.inputNodeAttrs))),s=e.getAllEdges().map(t=>Object.assign({},t));Object.assign(this.context,{assign:t,nodes:o,edges:s,graph:e});let a=new Promise(t=>{this.resolver=t}),u=this.setSimulation(n);return u.nodes(o),null===(i=u.force("link"))||void 0===i||i.links(s),a})}getResult(){let{assign:t,nodes:e,edges:r,graph:n}=this.context,i=e.map(t=>({id:t.id,data:Object.assign(Object.assign({},t.data),h(t,this.config.outputNodeAttrs))})),o=r.map(({id:t,source:e,target:r,data:n})=>({id:t,source:"object"==typeof e?e.id:e,target:"object"==typeof r?r.id:r,data:n}));return t&&i.forEach(t=>n.mergeNodeData(t.id,t.data)),{nodes:i,edges:o}}initSimulation(){return(0,M.Z)()}setSimulation(t){let e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var e;return null===(e=t.onTick)||void 0===e?void 0:e.call(t,this.getResult())}).on("end",()=>{var t;return null===(t=this.resolver)||void 0===t?void 0:t.call(this,this.getResult())})),k(e,this.config.simulationAttrs.map(e=>[e,t[e]])),Object.entries(this.forceMap).forEach(([r,n])=>{if(t[r]){let i=e.force(r);i||(i=n(),e.force(r,i)),k(i,Object.entries(t[r]))}else e.force(r,null)}),e}}let k=(t,e)=>e.reduce((e,[r,n])=>e[r]&&void 0!==n?e[r].call(t,n):e,t)},51712:function(t,e,r){"use strict";r.d(e,{V:function(){return u}});var n=r(97582),i=r(61035),o=r(38027),s=r(70681),a=r.n(s);class u{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,u.defaultOptions,t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let{nodeSize:u}=r,d=new s.graphlib.Graph;d.setGraph(r),d.setDefaultEdgeLabel(()=>({}));let l=e.getAllNodes(),h=e.getAllEdges();[...l,...h].some(({id:t})=>(0,i.Z)(t))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(t=>{let{id:e}=t,r=Object.assign({},t.data);if(void 0!==u){let[e,n]=function(t){if(!t)return[0,0,0];if((0,i.Z)(t))return[t,t,t];if(0===t.length)return[0,0,0];let[e,r=e,n=e]=t;return[e,r,n]}((0,o.Z)(u)?u(t):u);Object.assign(r,{width:e,height:n})}d.setNode(e.toString(),r)}),e.getAllEdges().forEach(({id:t,source:e,target:r})=>{d.setEdge(e.toString(),r.toString(),{id:t})}),a().layout(d);let c={nodes:[],edges:[]};return d.nodes().forEach(r=>{let n=d.node(r);c.nodes.push({id:r,data:n}),t&&e.mergeNodeData(r,n)}),d.edges().forEach(r=>{let i=d.edge(r),{id:o}=i,s=(0,n._T)(i,["id"]),{v:a,w:u}=r;c.edges.push({id:o,source:a,target:u,data:s}),t&&e.mergeEdgeData(o,s)}),c})}}u.defaultOptions={}},12368:function(t,e,r){"use strict";r.d(e,{y:function(){return p}});var n=r(97582),i=r(72137),o=r(61035),s=r(97653),a=r(38027),u=r(78732),d=r(85087),l=r(47148),h=r(33953);function c(t){let e=0,r=0,n=0,i=0,o=0,s=t.length;if(s){for(let a=0;a{var a;if((null===(a=t.data)||void 0===a?void 0:a.id)===o.id)return;let u=[r,n,i][s-1],d=o.x-t.x||.1,l=o.y-t.y||.1,h=o.z-t.z||.1,c=[d,l,h],f=u-e,g=0;for(let t=0;tthis.lastOptions.minMovement||e<1)&&ethis.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===this.options.dimensions?t.data.z:void 0})),e}genericForceLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),s=e.getAllNodes(),a=e.getAllEdges(),u=this.formatOptions(n,e),{dimensions:d,width:l,height:h,nodeSize:c,getMass:f,nodeStrength:g,edgeStrength:p,linkDistance:m}=u,v=s.map((t,e)=>Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{x:(0,o.Z)(t.data.x)?t.data.x:Math.random()*l,y:(0,o.Z)(t.data.y)?t.data.y:Math.random()*h,z:(0,o.Z)(t.data.z)?t.data.z:Math.random()*Math.sqrt(l*h),size:c(t)||30,mass:f(t),nodeStrength:g(t)})})),y=a.map(t=>Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{edgeStrength:p(t),linkDistance:m(t,e.getNode(t.source),e.getNode(t.target))})}));if(!(null==s?void 0:s.length))return this.lastResult={nodes:[],edges:a},{nodes:[],edges:a};let w={};s.forEach((t,e)=>{w[t.id]={x:0,y:0,z:0}});let b=new i.k({nodes:v,edges:y});this.formatCentripetal(u,b);let{maxIteration:E,minMovement:N,onTick:M}=u;if(this.lastLayoutNodes=v,this.lastLayoutEdges=y,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=b,this.lastOptions=u,this.lastVelMap=w,"undefined"==typeof window)return;let _=0;return new Promise(r=>{this.timeInterval=window.setInterval(()=>{s&&this.running||r({nodes:x(e,v),edges:a}),this.runOneStep(b,e,_,w,u),this.updatePosition(e,b,w,u),t&&v.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===d?t.data.z:void 0})),null==M||M({nodes:x(e,v),edges:a}),(++_>=E||this.judgingDistance{let r=1;(0,o.Z)(null==t?void 0:t.data.mass)&&(r=null==t?void 0:t.data.mass);let n=e.getDegree(t.id,"both");return!n||n<5?r:5*n*r});let f=(0,u.jE)(0,t.nodeSpacing);r=c?(0,a.Z)(c)?t=>c(t)+f(t):(0,d.k)(c)?t=>Math.max(c[0],c[1])+f(t):t=>c+f(t):t=>{let{size:e}=(null==t?void 0:t.data)||{};return e?(0,d.k)(e)?Math.max(e[0],e[1])+f(t):(0,s.Z)(e)?Math.max(e.width,e.height)+f(t):e+f(t):10+f(t)},n.nodeSize=r;let g=t.linkDistance?(0,u.jE)(1,t.linkDistance):t=>1+n.nodeSize(e.getNode(t.source))+n.nodeSize(e.getNode(t.target));return n.linkDistance=g,n.nodeStrength=(0,u.jE)(1,t.nodeStrength),n.edgeStrength=(0,u.jE)(1,t.edgeStrength),n}formatCentripetal(t,e){let r,n;let{dimensions:i,centripetalOptions:o,center:s,clusterNodeStrength:a,leafCluster:u,clustering:d,nodeClusterBy:l}=t,h=e.getAllNodes(),c=o||{leaf:2,single:2,others:1,center:t=>({x:s[0],y:s[1],z:3===i?s[2]:void 0})};if("function"!=typeof a&&(t.clusterNodeStrength=t=>a),u&&l&&(r=m(e,l),n=Array.from(new Set(null==h?void 0:h.map(t=>t.data[l])))||[],t.centripetalOptions=Object.assign(c,{single:100,leaf:e=>{let{siblingLeaves:i,sameTypeLeaves:o}=r[e.id]||{};return(null==o?void 0:o.length)===(null==i?void 0:i.length)||(null==n?void 0:n.length)===1?1:t.clusterNodeStrength(e)},others:1,center:t=>{let n;let i=e.getDegree(t.id,"both");if(!i)return{x:100,y:100,z:0};if(1===i){let{sameTypeLeaves:e=[]}=r[t.id]||{};1===e.length?n=void 0:e.length>1&&(n=w(e))}else n=void 0;return{x:null==n?void 0:n.x,y:null==n?void 0:n.y,z:null==n?void 0:n.z}}})),d&&l){r||(r=m(e,l)),n||(n=Array.from(new Set(h.map(t=>t.data[l])))),n=n.filter(t=>void 0!==t);let i={};n.forEach(t=>{let r=h.filter(e=>e.data[l]===t).map(t=>e.getNode(t.id));i[t]=w(r)}),t.centripetalOptions=Object.assign(c,{single:e=>t.clusterNodeStrength(e),leaf:e=>t.clusterNodeStrength(e),others:e=>t.clusterNodeStrength(e),center:t=>{let e=i[t.data[l]];return{x:null==e?void 0:e.x,y:null==e?void 0:e.y,z:null==e?void 0:e.z}}})}let{leaf:f,single:g,others:p}=t.centripetalOptions||{};f&&"function"!=typeof f&&(t.centripetalOptions.leaf=()=>f),g&&"function"!=typeof g&&(t.centripetalOptions.single=()=>g),p&&"function"!=typeof p&&(t.centripetalOptions.others=()=>p)}runOneStep(t,e,r,n,i){let o={},s=t.getAllNodes(),a=t.getAllEdges();if(!(null==s?void 0:s.length))return;let{monitor:u}=i;if(this.calRepulsive(t,o,i),a&&this.calAttractive(t,o,i),this.calGravity(t,e,o,i),this.updateVelocity(t,o,n,i),u){let t=this.calTotalEnergy(o,s);u({energy:t,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:r})}}calTotalEnergy(t,e){if(!(null==e?void 0:e.length))return 0;let r=0;return e.forEach((e,n)=>{let i=t[e.id].x,o=t[e.id].y,s=3===this.options.dimensions?t[e.id].z:0,{mass:a=1}=e.data;r+=a*(i*i+o*o+s*s)*.5}),r}calRepulsive(t,e,r){let{dimensions:n,factor:i,coulombDisScale:o}=r;!function(t,e,r,n,i=2){let o=e/r,s=t.getAllNodes(),a=s.map((t,e)=>{let{nodeStrength:r,x:n,y:i,z:s,size:a}=t.data;return{x:n,y:i,z:s,size:a,index:e,id:t.id,vx:0,vy:0,vz:0,weight:o*r}}),u=(2===i?(0,l.Z)(a,t=>t.x,t=>t.y):(0,h.Z)(a,t=>t.x,t=>t.y,t=>t.z)).visitAfter(c),d=new Map;a.forEach(t=>{d.set(t.id,t),function(t,e,r){e.visit((e,n,i,o,s)=>f(e,n,i,o,s,t,r))}(t,u,i)}),a.map((t,e)=>{let{id:r,data:i}=s[e],{mass:o=1}=i;n[r]={x:t.vx/o,y:t.vy/o,z:t.vz/o}})}(t,i,o*o,e,n)}calAttractive(t,e,r){let{dimensions:n,nodeSize:i}=r;t.getAllEdges().forEach((r,o)=>{let{source:s,target:a}=r,u=t.getNode(s),d=t.getNode(a);if(!u||!d)return;let l=d.data.x-u.data.x,h=d.data.y-u.data.y,c=3===n?d.data.z-u.data.z:0;l||h||(l=.01*Math.random(),h=.01*Math.random(),3!==n||c||(c=.01*Math.random()));let f=Math.sqrt(l*l+h*h+c*c);if(f{let{id:s,data:g}=n,{mass:p,x:m,y:v,z:y}=g,w=e.getNode(s),x=0,b=0,E=0,N=c,M=t.getDegree(s,"in"),_=t.getDegree(s,"out"),k=t.getDegree(s,"both"),A=null==i?void 0:i(w,k);if(A){let[t,e,r]=A;x=m-t,b=v-e,N=r}else x=m-h[0],b=v-h[1],E=y-h[2];if(N&&(r[s].x-=N*x/p,r[s].y-=N*b/p,r[s].z-=N*E/p),f){let{leaf:t,single:e,others:n,center:i}=f,{x:h,y:c,z:g,centerStrength:x}=(null==i?void 0:i(w,a,u,d,l))||{x:0,y:0,z:0,centerStrength:0};if(!(0,o.Z)(h)||!(0,o.Z)(c))return;let b=(m-h)/p,E=(v-c)/p,N=(y-g)/p;if(x&&(r[s].x-=x*b,r[s].y-=x*E,r[s].z-=x*N),0===k){let t=e(w);if(!t)return;r[s].x-=t*b,r[s].y-=t*E,r[s].z-=t*N;return}if(0===M||0===_){let e=t(w,a,u);if(!e)return;r[s].x-=e*b,r[s].y-=e*E,r[s].z-=e*N;return}let A=n(w);if(!A)return;r[s].x-=A*b,r[s].y-=A*E,r[s].z-=A*N}})}updateVelocity(t,e,r,n){let{damping:i,maxSpeed:o,interval:s,dimensions:a}=n,u=t.getAllNodes();(null==u?void 0:u.length)&&u.forEach(t=>{let{id:n}=t,u=(r[n].x+e[n].x*s)*i||.01,d=(r[n].y+e[n].y*s)*i||.01,l=3===a?(r[n].z+e[n].z*s)*i||.01:0,h=Math.sqrt(u*u+d*d+l*l);if(h>o){let t=o/h;u*=t,d*=t,l*=t}r[n]={x:u,y:d,z:l}})}updatePosition(t,e,r,n){let{distanceThresholdMode:i,interval:s,dimensions:a}=n,u=e.getAllNodes();if(!(null==u?void 0:u.length)){this.judgingDistance=0;return}let d=0;"max"===i?this.judgingDistance=-1/0:"min"===i&&(this.judgingDistance=1/0),u.forEach(n=>{let{id:u}=n,l=t.getNode(u);if((0,o.Z)(l.data.fx)&&(0,o.Z)(l.data.fy)){e.mergeNodeData(u,{x:l.data.fx,y:l.data.fy,z:3===a?l.data.fz:void 0});return}let h=r[u].x*s,c=r[u].y*s,f=3===a?r[u].z*s:0;e.mergeNodeData(u,{x:n.data.x+h,y:n.data.y+c,z:n.data.z+f});let g=Math.sqrt(h*h+c*c+f*f);switch(i){case"max":this.judgingDistanceg&&(this.judgingDistance=g);break;default:d+=g}}),i&&"mean"!==i||(this.judgingDistance=d/u.length)}}let m=(t,e)=>{let r=t.getAllNodes();if(!(null==r?void 0:r.length))return{};let n={};return r.forEach((r,i)=>{let o=t.getDegree(r.id,"both");1===o&&(n[r.id]=v(t,"leaf",r,e))}),n},v=(t,e,r,n)=>{let i=t.getDegree(r.id,"in"),o=t.getDegree(r.id,"out"),s=r,a=[];0===i?(s=t.getSuccessors(r.id)[0],a=t.getNeighbors(s.id)):0===o&&(s=t.getPredecessors(r.id)[0],a=t.getNeighbors(s.id)),a=a.filter(e=>0===t.getDegree(e.id,"in")||0===t.getDegree(e.id,"out"));let u=y(t,e,n,r,a);return{coreNode:s,siblingLeaves:a,sameTypeLeaves:u}},y=(t,e,r,n,i)=>{let o=n.data[r]||"",s=(null==i?void 0:i.filter(t=>t.data[r]===o))||[];return"leaf"===e&&(s=s.filter(e=>0===t.getDegree(e.id,"in")||0===t.getDegree(e.id,"out"))),s},w=t=>{let e={x:0,y:0};t.forEach(t=>{let{x:r,y:n}=t.data;e.x+=r||0,e.y+=n||0});let r=t.length||1;return{x:e.x/r,y:e.y/r}},x=(t,e)=>e.map(e=>{let{id:r,data:n}=e,i=t.getNode(r);return Object.assign(Object.assign({},i),{data:Object.assign(Object.assign({},i.data),{x:n.x,y:n.y,z:n.z})})})},67753:function(t,e,r){"use strict";r.d(e,{E:function(){return p}});var n=r(97582),i=r(72137),o=r(61035),s=r(97653),a=r(38027),u=r(98130),d=r(85087),l=r(20464);class h{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){let e=this.rx-t.rx,r=this.ry-t.ry;return Math.hypot(e,r)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){let e=t.rx-this.rx,r=t.ry-this.ry,n=Math.hypot(e,r);n=n<1e-4?1e-4:n;let i=this.g*(this.degree+1)*(t.degree+1)/n;this.fx+=i*e/n,this.fy+=i*r/n}in(t){return t.contains(this.rx,this.ry)}add(t){let e=this.mass+t.mass,r=(this.rx*this.mass+t.rx*t.mass)/e,n=(this.ry*this.mass+t.ry*t.mass)/e,i=this.degree+t.degree;return new h({rx:r,ry:n,mass:e,degree:i})}}class c{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){let r=this.length/2;return t<=this.xmid+r&&t>=this.xmid-r&&e<=this.ymid+r&&e>=this.ymid-r}NW(){let t=this.xmid-this.length/4,e=this.ymid+this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}NE(){let t=this.xmid+this.length/4,e=this.ymid+this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}SW(){let t=this.xmid-this.length/4,e=this.ymid-this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}SE(){let t=this.xmid+this.length/4,e=this.ymid-this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}}class f{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,null!=t&&(this.quad=t)}insert(t){if(null==this.body){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new f(this.quad.NW()),this.NE=new f(this.quad.NE()),this.SW=new f(this.quad.SW()),this.SE=new f(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return null==this.NW&&null==this.NE&&null==this.SW&&null==this.SE}updateForce(t){if(null!=this.body&&t!==this.body){if(this._isExternal())t.addForce(this.body);else{let e=this.quad?this.quad.getLength():0,r=this.body.distanceTo(t);e/r(0,u.u)(t,[a,d])),m=n.filter(t=>{let{source:e,target:r}=t;return e!==r}),v=new i.k({nodes:p,edges:m}),y=this.getSizes(v,e,f);if(this.run(v,e,c,y,t,s),h){for(let t=0;t250&&(r.barnesHut=!0),void 0===a&&e>100&&(r.prune=!0),0!==u||a?0===u&&a&&(r.maxIteration=100,e<=200&&e>100?r.maxIteration=500:e>200&&(r.maxIteration=950)):(r.maxIteration=250,e<=200&&e>100?r.maxIteration=1e3:e>200&&(r.maxIteration=1200)),!d&&(r.kr=50,e>100&&e<=500?r.kr=20:e>500&&(r.kr=1)),!l&&(r.kg=20,e>100&&e<=500?r.kg=10:e>500&&(r.kg=1)),r}run(t,e,r,n,i,o){let{kr:s,barnesHut:a,onTick:u}=o,d=t.getAllNodes(),l=0,c=r,f={},g={},p={};for(let e=0;e0;)l=this.oneStep(t,{iter:c,preventOverlapIters:50,krPrime:100,sg:l,forces:f,preForces:g,bodies:p,sizes:n},o),c--,null==u||u({nodes:d,edges:e.getAllEdges()});return t}oneStep(t,e,r){let{iter:n,preventOverlapIters:i,krPrime:o,sg:s,preForces:a,bodies:u,sizes:d}=e,{forces:l}=e,{preventOverlap:h,barnesHut:c}=r,f=t.getAllNodes();for(let t=0;ti||!h)?this.getOptRepGraForces(t,l,u,r):this.getRepGraForces(t,n,i,l,o,d,r),this.updatePos(t,l,a,s,r)}getAttrForces(t,e,r,n,i,o){let{preventOverlap:s,dissuadeHubs:a,mode:u,prune:d}=o,l=t.getAllEdges();for(let o=0;o0&&(w=y,x=y),i[h][0]+=w*v[0],i[c][0]-=x*v[0],i[h][1]+=w*v[1],i[c][1]-=x*v[1]}return i}getOptRepGraForces(t,e,r,n){let{kg:i,center:o,prune:s}=n,a=t.getAllNodes(),u=a.length,d=9e10,l=-9e10,h=9e10,g=-9e10;for(let e=0;e=t.getDegree(n))&&(r[n].setPos(i.x,i.y),i.x>=l&&(l=i.x),i.x<=d&&(d=i.x),i.y>=g&&(g=i.y),i.y<=h&&(h=i.y))}let p=Math.max(l-d,g-h),m={xmid:(l+d)/2,ymid:(g+h)/2,length:p,massCenter:o,mass:u},v=new c(m),y=new f(v);for(let e=0;e=t.getDegree(n))&&r[n].in(v)&&y.insert(r[n])}for(let n=0;n0&&(v=u*(p+1)*(l+1)/m),n[g.id][0]-=v*f[0],n[s.id][0]+=v*f[0],n[g.id][1]-=v*f[1],n[s.id][1]+=v*f[1]}let m=[g.data.x-l[0],g.data.y-l[1]],v=Math.hypot(m[0],m[1]);m[0]=m[0]/v,m[1]=m[1]/v;let y=d*(p+1);n[g.id][0]-=y*m[0],n[g.id][1]-=y*m[1]}return n}updatePos(t,e,r,n,i){let{ks:s,tao:a,prune:u,ksmax:d}=i,l=t.getAllNodes(),h=l.length,c=[],f=[],g=0,p=0,m=n;for(let n=0;n1.5*v?1.5*v:m);for(let r=0;rg?g:h;let p=h*e[n][0],v=h*e[n][1];t.mergeNodeData(n,{x:i.x+p,y:i.y+v})}return m}}},89469:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(97582),i=r(72137),o=r(61035),s=r(98130);let a={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"};class u{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},a),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let e=0;ethis.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===this.options.dimensions?t.data.z:void 0})),e}genericFruchtermanLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){if(this.running)return;let n=this.formatOptions(r),{dimensions:o,width:a,height:u,center:d,clustering:l,nodeClusterBy:h,maxIteration:c,onTick:f}=n,g=e.getAllNodes(),p=e.getAllEdges();if(!(null==g?void 0:g.length)){let t={nodes:[],edges:p};return this.lastResult=t,t}if(1===g.length){t&&e.mergeNodeData(g[0].id,{x:d[0],y:d[1],z:3===o?d[2]:void 0});let r={nodes:[Object.assign(Object.assign({},g[0]),{data:Object.assign(Object.assign({},g[0].data),{x:d[0],y:d[1],z:3===o?d[2]:void 0})})],edges:p};return this.lastResult=r,r}let m=g.map(t=>(0,s.u)(t,[a,u])),v=new i.k({nodes:m,edges:p}),y={};if(l&&m.forEach(t=>{let e=t.data[h];y[e]||(y[e]={name:e,cx:0,cy:0,count:0})}),this.lastLayoutNodes=m,this.lastLayoutEdges=p,this.lastAssign=t,this.lastGraph=v,this.lastOptions=n,this.lastClusterMap=y,"undefined"==typeof window)return;let w=0;return new Promise(r=>{this.timeInterval=window.setInterval(()=>{if(!this.running){r({nodes:m,edges:p});return}this.runOneStep(v,y,n),t&&m.forEach(({id:t,data:r})=>e.mergeNodeData(t,{x:r.x,y:r.y,z:3===o?r.z:void 0})),null==f||f({nodes:m,edges:p}),++w>=c&&(window.clearInterval(this.timeInterval),r({nodes:m,edges:p}))},0),this.running=!0})})}formatOptions(t={}){let e=Object.assign(Object.assign({},this.options),t),{clustering:r,nodeClusterBy:n}=e,{center:i,width:o,height:s}=e;return e.width=o||"undefined"==typeof window?o:window.innerWidth,e.height=s||"undefined"==typeof window?s:window.innerHeight,e.center=i||[e.width/2,e.height/2],e.clustering=r&&!!n,e}runOneStep(t,e,r){let{dimensions:n,height:i,width:s,gravity:a,center:u,speed:d,clustering:l,nodeClusterBy:h,clusterGravity:c}=r,f=i*s,g=Math.sqrt(f)/10,p=t.getAllNodes(),m=f/(p.length+1),v=Math.sqrt(m),y={};if(this.applyCalculate(t,y,v,m),l){for(let t in e)e[t].cx=0,e[t].cy=0,e[t].count=0;for(let t in p.forEach(t=>{let{data:r}=t,n=e[r[h]];(0,o.Z)(r.x)&&(n.cx+=r.x),(0,o.Z)(r.y)&&(n.cy+=r.y),n.count++}),e)e[t].cx/=e[t].count,e[t].cy/=e[t].count;let t=c||a;p.forEach((r,n)=>{let{id:i,data:s}=r;if(!(0,o.Z)(s.x)||!(0,o.Z)(s.y))return;let a=e[s[h]],u=Math.sqrt((s.x-a.cx)*(s.x-a.cx)+(s.y-a.cy)*(s.y-a.cy)),d=v*t;y[i].x-=d*(s.x-a.cx)/u,y[i].y-=d*(s.y-a.cy)/u})}p.forEach((t,e)=>{let{id:r,data:i}=t;if(!(0,o.Z)(i.x)||!(0,o.Z)(i.y))return;let s=.01*v*a;y[r].x-=s*(i.x-u[0]),y[r].y-=s*(i.y-u[1]),3===n&&(y[r].z-=s*(i.z-u[2]))}),p.forEach((e,r)=>{let{id:i,data:s}=e;if((0,o.Z)(s.fx)&&(0,o.Z)(s.fy)){s.x=s.fx,s.y=s.fy,3===n&&(s.z=s.fz);return}if(!(0,o.Z)(s.x)||!(0,o.Z)(s.y))return;let a=Math.sqrt(y[i].x*y[i].x+y[i].y*y[i].y+(3===n?y[i].z*y[i].z:0));if(a>0){let e=Math.min(g*(d/800),a);t.mergeNodeData(i,{x:s.x+y[i].x/a*e,y:s.y+y[i].y/a*e,z:3===n?s.z+y[i].z/a*e:void 0})}})}applyCalculate(t,e,r,n){this.calRepulsive(t,e,n),this.calAttractive(t,e,r)}calRepulsive(t,e,r){let n=t.getAllNodes();n.forEach(({data:t,id:i},s)=>{e[i]={x:0,y:0,z:0},n.forEach(({data:n,id:a},u)=>{if(s<=u||!(0,o.Z)(t.x)||!(0,o.Z)(n.x)||!(0,o.Z)(t.y)||!(0,o.Z)(n.y))return;let d=t.x-n.x,l=t.y-n.y,h=3===this.options.dimensions?t.z-n.z:0,c=d*d+l*l+h*h;0===c&&(c=1,d=.01,l=.01,h=.01);let f=r/c,g=d*f,p=l*f,m=h*f;e[i].x+=g,e[i].y+=p,e[a].x-=g,e[a].y-=p,3===this.options.dimensions&&(e[i].z+=m,e[a].z-=m)})})}calAttractive(t,e,r){let n=t.getAllEdges();n.forEach(n=>{let{source:i,target:s}=n;if(!i||!s||i===s)return;let{data:a}=t.getNode(i),{data:u}=t.getNode(s);if(!(0,o.Z)(u.x)||!(0,o.Z)(a.x)||!(0,o.Z)(u.y)||!(0,o.Z)(a.y))return;let d=u.x-a.x,l=u.y-a.y,h=3===this.options.dimensions?u.z-a.z:0,c=Math.sqrt(d*d+l*l+h*h)/r,f=d*c,g=l*c,p=h*c;e[i].x+=f,e[i].y+=g,e[s].x-=f,e[s].y-=g,3===this.options.dimensions&&(e[i].z+=p,e[s].z-=p)})}}},41733:function(t,e,r){"use strict";r.d(e,{M:function(){return h}});var n=r(97582),i=r(52940),o=r(61035),s=r(98130),a=r(78732),u=r(85087),d=r(20464);let l={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class h{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},l),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{begin:l=[0,0],condense:h,preventOverlapPadding:m,preventOverlap:y,rows:w,cols:x,nodeSpacing:b,nodeSize:E,width:N,height:M,position:_}=n,{sortBy:k}=n,A=e.getAllNodes(),S=e.getAllEdges(),j=null==A?void 0:A.length;if(!j||1===j)return(0,d.P)(e,t,l);let O=A.map(t=>(0,s.u)(t));"id"===k||(0,i.Z)(k)&&void 0!==O[0].data[k]||(k="degree"),"degree"===k?O.sort((t,r)=>e.getDegree(r.id,"both")-e.getDegree(t.id,"both")):"id"===k?O.sort((t,e)=>(0,o.Z)(e.id)&&(0,o.Z)(t.id)?e.id-t.id:`${t.id}`.localeCompare(`${e.id}`)):O.sort((t,e)=>e.data[k]-t.data[k]);let R=N||"undefined"==typeof window?N:window.innerWidth,z=M||"undefined"==typeof window?M:window.innerHeight,I={rows:w,cols:x};if(null!=w&&null!=x)I.rows=w,I.cols=x;else if(null!=w&&null==x)I.rows=w,I.cols=Math.ceil(j/I.rows);else if(null==w&&null!=x)I.cols=x,I.rows=Math.ceil(j/I.cols);else{let t=Math.sqrt(j*z/R);I.rows=Math.round(t),I.cols=Math.round(R/z*t)}if(I.rows=Math.max(I.rows,1),I.cols=Math.max(I.cols,1),I.cols*I.rows>j){let t=c(I),e=f(I);(t-1)*e>=j?c(I,t-1):(e-1)*t>=j&&f(I,e-1)}else for(;I.cols*I.rows=j?f(I,e+1):c(I,t+1)}let C=h?0:R/I.cols,D=h?0:z/I.rows;if(y||b){let t=(0,a.jE)(10,b),r=(0,a.tO)(30,E,!1);O.forEach(n=>{let i,o;n.data.x&&n.data.y||(n.data.x=0,n.data.y=0);let s=e.getNode(n.id),a=r(s)||30;(0,u.k)(a)?(i=a[0],o=a[1]):(i=a,o=a);let d=void 0!==t?t(n):m,l=i+d,h=o+d;C=Math.max(C,l),D=Math.max(D,h)})}let P={},T={row:0,col:0},L={};for(let t=0;t{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),{nodes:O,edges:S}})}}let c=(t,e)=>{let r;let n=t.rows||5,i=t.cols||5;return null==e?r=Math.min(n,i):Math.min(n,i)===t.rows?t.rows=e:t.cols=e,r},f=(t,e)=>{let r;let n=t.rows||5,i=t.cols||5;return null==e?r=Math.max(n,i):Math.max(n,i)===t.rows?t.rows=e:t.cols=e,r},g=(t,e)=>t[`c-${e.row}-${e.col}`]||!1,p=(t,e)=>t[`c-${e.row}-${e.col}`]=!0,m=(t,e)=>{let r=t.cols||5;e.col++,e.col>=r&&(e.col=0,e.row++)},v=(t,e,r,n,i,o,s,a)=>{let u,d;let l=i[t.id];if(l)u=l.col*r+r/2+e[0],d=l.row*n+n/2+e[1];else{for(;g(a,s);)m(o,s);u=s.col*r+r/2+e[0],d=s.row*n+n/2+e[1],p(a,s),m(o,s)}t.data.x=u,t.data.y=d}},64912:function(t,e,r){"use strict";r.d(e,{A:function(){return d}});var n=r(97582),i=r(93396),o=r(80628),s=r(98130),a=r(20464);let u={center:[0,0],linkDistance:50};class d{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},u),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{center:i=[0,0],linkDistance:u=50}=n,d=e.getAllNodes(),c=e.getAllEdges();if(!(null==d?void 0:d.length)||1===d.length)return(0,a.P)(e,t,i);let f=(0,o.zJ)({nodes:d,edges:c},!1),g=(0,o.qs)(f);l(g);let p=(0,o.nu)(g,u),m=h(p),v=[];return m.forEach((t,e)=>{let r=(0,s.u)(d[e]);r.data.x=t[0]+i[0],r.data.y=t[1]+i[1],v.push(r)}),t&&v.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:v,edges:c}})}}let l=t=>{let e=-999999;t.forEach(t=>{t.forEach(t=>{t!==1/0&&e{r.forEach((r,i)=>{r===1/0&&(t[n][i]=e)})})},h=t=>{let e=i.y3.mul(i.y3.pow(t,2),-.5),r=e.mean("row"),n=e.mean("column"),o=e.mean();e.add(o).subRowVector(r).subColumnVector(n);let s=new i.Sc(e),a=i.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(t=>i.y3.mul([t],[a]).toJSON()[0].splice(0,2))}},29257:function(t,e,r){"use strict";r.d(e,{D:function(){return m}});var n=r(97582),i=r(52940),o=r(80628),s=r(78732),a=r(98130),u=r(20464),d=r(93396);let l=(t,e,r)=>{try{let r=d.y3.mul(d.y3.pow(e,2),-.5),n=r.mean("row"),i=r.mean("column"),o=r.mean();r.add(o).subRowVector(n).subColumnVector(i);let s=new d.Sc(r),a=d.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(e=>d.y3.mul([e],[a]).toJSON()[0].splice(0,t))}catch(n){let t=[];for(let n=0;n{let r=Object.assign(Object.assign({},h),e),{positions:n,iterations:i,width:o,k:s,speed:a=100,strictRadial:u,focusIdx:d,radii:l=[],nodeSizeFunc:c}=r,p=t.getAllNodes(),m=[],v=o/10;for(let t=0;t{m[e]={x:0,y:0}}),f(p,n,m,s,l,c),g(n,m,a,u,d,v,o,l);return n},f=(t,e,r,n,i,o)=>{e.forEach((s,a)=>{r[a]={x:0,y:0},e.forEach((e,u)=>{if(a===u||i[a]!==i[u])return;let d=s.x-e.x,l=s.y-e.y,h=Math.sqrt(d*d+l*l);if(0===h){h=1;let t=a>u?1:-1;d=.01*t,l=.01*t}if(h{let u=o||s/10;return n&&e.forEach((e,r)=>{let n=t[r].x-t[i].x,o=t[r].y-t[i].y,s=Math.sqrt(n*n+o*o),a=o/s,u=-n/s,d=Math.sqrt(e.x*e.x+e.y*e.y),l=Math.acos((a*e.x+u*e.y)/d);l>Math.PI/2&&(l-=Math.PI/2,a*=-1,u*=-1);let h=Math.cos(l)*d;e.x=a*h,e.y=u*h}),t.forEach((o,s)=>{if(s===i)return;let d=Math.sqrt(e[s].x*e[s].x+e[s].y*e[s].y);if(d>0&&s!==i){let l=Math.min(u*(r/800),d);if(o.x+=e[s].x/d*l,o.y+=e[s].y/d*l,n){let e=o.x-t[i].x,r=o.y-t[i].y,n=Math.sqrt(e*e+r*r);e=e/n*a[s],r=r/n*a[s],o.x=t[i].x+e,o.y=t[i].y+r}}}),t},p={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class m{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},p),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let d=Object.assign(Object.assign({},this.options),r),{width:h,height:f,center:g,focusNode:p,unitRadius:m,nodeSize:E,nodeSpacing:N,strictRadial:M,preventOverlap:_,maxPreventOverlapIteration:k,sortBy:A,linkDistance:S=50,sortStrength:j=10,maxIteration:O=1e3}=d,R=e.getAllNodes(),z=e.getAllEdges(),I=h||"undefined"==typeof window?h:window.innerWidth,C=f||"undefined"==typeof window?f:window.innerHeight,D=g||[I/2,C/2];if(!(null==R?void 0:R.length)||1===R.length)return(0,u.P)(e,t,D);let P=R[0];if((0,i.Z)(p)){for(let t=0;tD[0]?D[0]:I-D[0],V=C-D[1]>D[1]?D[1]:C-D[1];0===G&&(G=I/2),0===V&&(V=C/2);let U=Math.min(G,V),$=[],B=m||U/Math.max(...Z);Z.forEach((t,e)=>{$[e]=t*B});let W=v(R,F,S,$,B,A,j),Y=y(W),H=l(S,W,S),J=H.map(([t,e])=>({x:(isNaN(t)?Math.random()*S:t)-H[T][0],y:(isNaN(e)?Math.random()*S:e)-H[T][1]}));if(this.run(O,J,Y,W,$,T),_){n=(0,s.gl)(E,N);let t={nodes:R,nodeSizeFunc:n,positions:J,radii:$,height:C,width:I,strictRadial:!!M,focusIdx:T,iterations:k||200,k:J.length/4.5};J=c(e,t)}let K=[];return J.forEach((t,e)=>{let r=(0,a.u)(R[e]);r.data.x=t.x+D[0],r.data.y=t.y+D[1],K.push(r)}),t&&K.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:K,edges:z}})}run(t,e,r,n,i,o){for(let s=0;s<=t;s++){let a=s/t;this.oneIteration(a,e,i,n,r,o)}}oneIteration(t,e,r,n,i,s){let a=1-t;e.forEach((u,d)=>{let l=(0,o.$y)(u,{x:0,y:0}),h=0===l?0:1/l;if(d===s)return;let c=0,f=0,g=0;e.forEach((t,e)=>{if(d===e)return;let r=(0,o.$y)(u,t),s=0===r?0:1/r,a=n[e][d];g+=i[d][e],c+=i[d][e]*(t.x+a*(u.x-t.x)*s),f+=i[d][e]*(t.y+a*(u.y-t.y)*s)});let p=0===r[d]?0:1/r[d];g*=a,g+=t*p*p,c*=a,c+=t*p*u.x*h,u.x=c/g,f*=a,f+=t*p*u.y*h,u.y=f/g})}}let v=(t,e,r,n,o,s,a)=>{if(!t)return[];let u=[];if(e){let d={};e.forEach((e,l)=>{let h=[];e.forEach((e,u)=>{var c,f;if(l===u)h.push(0);else if(n[l]===n[u]){if("data"===s)h.push(e*(Math.abs(l-u)*a)/(n[l]/o));else if(s){let r,g;if(d[t[l].id])r=d[t[l].id];else{let e=("id"===s?t[l].id:null===(c=t[l].data)||void 0===c?void 0:c[s])||0;r=(0,i.Z)(e)?e.charCodeAt(0):e,d[t[l].id]=r}if(d[t[u].id])g=d[t[u].id];else{let e=("id"===s?t[u].id:null===(f=t[u].data)||void 0===f?void 0:f[s])||0;g=(0,i.Z)(e)?e.charCodeAt(0):e,d[t[u].id]=g}h.push(e*(Math.abs(r-g)*a)/(n[l]/o))}else h.push(e*r/(n[l]/o))}else{let t=(r+o)/2;h.push(e*t)}}),u.push(h)})}return u},y=t=>{let e=t.length,r=t[0].length,n=[];for(let i=0;i{let r=-1;return t.forEach((t,n)=>{t.id===e&&(r=n)}),Math.max(r,0)},x=(t,e,r)=>{let n=t.length;for(let i=0;i{let r=0;for(let n=0;nr?t[e][n]:r);return r}},26629:function(t,e,r){"use strict";r.d(e,{_:function(){return o}});var n=r(97582);let i={center:[0,0],width:300,height:300};class o{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},i),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{center:i,width:o,height:s}=n,a=e.getAllNodes(),u=o||"undefined"==typeof window?o:window.innerWidth,d=s||"undefined"==typeof window?s:window.innerHeight,l=i||[u/2,d/2],h=[];a&&a.forEach(t=>{h.push({id:t.id,data:{x:(Math.random()-.5)*.9*u+l[0],y:(Math.random()-.5)*.9*d+l[1]}})}),t&&h.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y}));let c={nodes:h,edges:e.getAllEdges()};return c})}}},10779:function(t,e,r){"use strict";function n(t){return!!t.tick&&!!t.stop}r.d(e,{h:function(){return n}})},85087:function(t,e,r){"use strict";r.d(e,{k:function(){return n}});let n=Array.isArray},20464:function(t,e,r){"use strict";r.d(e,{P:function(){return n}});let n=(t,e,r)=>{let n=t.getAllNodes(),i=t.getAllEdges();if(!(null==n?void 0:n.length))return{nodes:[],edges:i};if(1===n.length){e&&t.mergeNodeData(n[0].id,{x:r[0],y:r[1]});let o={nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:r[0],y:r[1]})})],edges:i};return o}}},78732:function(t,e,r){"use strict";r.d(e,{gl:function(){return u},jE:function(){return s},tO:function(){return a}});var n=r(38027),i=r(61035),o=r(97653);function s(t,e){return(0,n.Z)(e)?e:(0,i.Z)(e)?()=>e:()=>t}function a(t,e,r=!0){return e||0===e?(0,n.Z)(e)?e:(0,i.Z)(e)?()=>e:Array.isArray(e)?()=>{if(r){let r=Math.max(...e);return isNaN(r)?t:r}return e}:(0,o.Z)(e)?()=>{if(r){let r=Math.max(e.width,e.height);return isNaN(r)?t:r}return[e.width,e.height]}:()=>t:e=>{let{size:r}=e.data||{};return r?Array.isArray(r)?r[0]>r[1]?r[0]:r[1]:(0,o.Z)(r)?r.width>r.height?r.width:r.height:r:t}}let u=(t,e)=>{let r;return r=(0,i.Z)(e)?()=>e:(0,n.Z)(e)?e:()=>0,t?Array.isArray(t)?e=>{let n=t[0]>t[1]?t[0]:t[1];return n+r(e)}:(0,n.Z)(t)?t:e=>t+r(e):t=>{var e,n;if(null===(e=t.data)||void 0===e?void 0:e.bboxSize)return Math.max(t.data.bboxSize[0],t.data.bboxSize[1])+r(t);if(null===(n=t.data)||void 0===n?void 0:n.size){if(Array.isArray(t.data.size))return Math.max(t.data.size[0],t.data.size[1])+r(t);let e=t.data.size;if((0,o.Z)(e)){let n=e.width>e.height?e.width:e.height;return n+r(t)}return e+r(t)}return 10+r(t)}}},80628:function(t,e,r){"use strict";r.d(e,{$y:function(){return d},H0:function(){return u},_:function(){return l},nu:function(){return a},qs:function(){return o},zJ:function(){return s}});var n=r(61035),i=r(85087);let o=t=>{let e=[],r=t.length;for(let n=0;ne[n][t]+e[t][i]&&(e[n][i]=e[n][t]+e[t][i]);return e},s=(t,e)=>{let{nodes:r,edges:n}=t,i=[],o={};if(!r)throw Error("invalid nodes data!");return r&&r.forEach((t,e)=>{o[t.id]=e,i.push([])}),null==n||n.forEach(t=>{let{source:r,target:n}=t,s=o[r],a=o[n];void 0===s||void 0===a||(i[s][a]=1,e||(i[a][s]=1))}),i},a=(t,e)=>{let r=[];return t.forEach(t=>{let n=[];t.forEach(t=>{n.push(t*e)}),r.push(n)}),r},u=t=>{let e=1/0,r=1/0,o=-1/0,s=-1/0;return t.forEach(t=>{let a=t.data.size;(0,i.k)(a)?1===a.length&&(a=[a[0],a[0]]):(0,n.Z)(a)?a=[a,a]:(void 0===a||isNaN(a))&&(a=[30,30]);let u=[a[0]/2,a[1]/2],d=t.data.x-u[0],l=t.data.x+u[0],h=t.data.y-u[1],c=t.data.y+u[1];e>d&&(e=d),r>h&&(r=h),oMath.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),l=(t,e,r,n="TB",i,o={})=>{if(!(null==e?void 0:e.length))return;let{stopBranchFn:s,stopAllFn:a}=o;for(let u=0;u{if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){let e=[];return t.forEach(t=>{e.push(t)}),e.map(t=>i(t))}if("object"==typeof t){let e={};return Object.keys(t).forEach(r=>{e[r]=i(t[r])}),e}return t},o=(t,e)=>{let r=i(t);return r.data=r.data||{},e&&((0,n.Z)(r.data.x)||(r.data.x=Math.random()*e[0]),(0,n.Z)(r.data.y)||(r.data.y=Math.random()*e[1])),r}},59145:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return Array.isArray?Array.isArray(t):(0,n.Z)(t,"Array")}},38027:function(t,e){"use strict";e.Z=function(t){return"function"==typeof t}},61035:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return(0,n.Z)(t,"Number")}},97653:function(t,e){"use strict";e.Z=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},52940:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return(0,n.Z)(t,"String")}},19782:function(t,e){"use strict";var r={}.toString;e.Z=function(t,e){return r.call(t)==="[object "+e+"]"}},70681:function(t,e,r){t.exports={graphlib:r(70574),layout:r(98123),debug:r(27570),util:{time:r(11138).time,notime:r(11138).notime},version:r(88177)}},92188:function(t,e,r){"use strict";var n=r(38436),i=r(74079);t.exports={run:function(t){var e,r,o,s="greedy"===t.graph().acyclicer?i(t,function(e){return t.edge(e).weight}):(e=[],r={},o={},n.forEach(t.nodes(),function i(s){n.has(o,s)||(o[s]=!0,r[s]=!0,n.forEach(t.outEdges(s),function(t){n.has(r,t.w)?e.push(t):i(t.w)}),delete r[s])}),e);n.forEach(s,function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,n.uniqueId("rev"))})},undo:function(t){n.forEach(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}}},61133:function(t,e,r){var n=r(38436),i=r(11138);function o(t,e,r,n,o,s){var a=o[e][s-1],u=i.addDummyNode(t,"border",{width:0,height:0,rank:s,borderType:e},r);o[e][s]=u,t.setParent(u,n),a&&t.setEdge(a,u,{weight:1})}t.exports=function(t){n.forEach(t.children(),function e(r){var i=t.children(r),s=t.node(r);if(i.length&&n.forEach(i,e),n.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var a=s.minRank,u=s.maxRank+1;a=t.nodeCount())return[];var r,d,l,h,c,f,g=(r=e||s,d=new i,l=0,h=0,n.forEach(t.nodes(),function(t){d.setNode(t,{v:t,in:0,out:0})}),n.forEach(t.edges(),function(t){var e=d.edge(t.v,t.w)||0,n=r(t),i=e+n;d.setEdge(t.v,t.w,i),h=Math.max(h,d.node(t.v).out+=n),l=Math.max(l,d.node(t.w).in+=n)}),c=n.range(h+l+3).map(function(){return new o}),f=l+1,n.forEach(d.nodes(),function(t){u(c,f,d.node(t))}),{graph:d,buckets:c,zeroIdx:f}),p=function(t,e,r){for(var n,i=[],o=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)a(t,e,r,n);for(;n=o.dequeue();)a(t,e,r,n);if(t.nodeCount()){for(var u=e.length-2;u>0;--u)if(n=e[u].dequeue()){i=i.concat(a(t,e,r,n,!0));break}}}return i}(g.graph,g.buckets,g.zeroIdx);return n.flatten(n.map(p,function(e){return t.outEdges(e.v,e.w)}),!0)};var s=n.constant(1);function a(t,e,r,i,o){var s=o?[]:void 0;return n.forEach(t.inEdges(i.v),function(n){var i=t.edge(n),a=t.node(n.v);o&&s.push({v:n.v,w:n.w}),a.out-=i,u(e,r,a)}),n.forEach(t.outEdges(i.v),function(n){var i=t.edge(n),o=n.w,s=t.node(o);s.in-=i,u(e,r,s)}),t.removeNode(i.v),s}function u(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}},98123:function(t,e,r){"use strict";var n=r(38436),i=r(92188),o=r(45995),s=r(78093),a=r(11138).normalizeRanks,u=r(24219),d=r(11138).removeEmptyRanks,l=r(72981),h=r(61133),c=r(53258),f=r(53408),g=r(17873),p=r(11138),m=r(70574).Graph;t.exports=function(t,e){var r=e&&e.debugTiming?p.time:p.notime;r("layout",function(){var e=r(" buildLayoutGraph",function(){var e,r;return e=new m({multigraph:!0,compound:!0}),r=k(t.graph()),e.setGraph(n.merge({},y,_(r,v),n.pick(r,w))),n.forEach(t.nodes(),function(r){var i=k(t.node(r));e.setNode(r,n.defaults(_(i,x),b)),e.setParent(r,t.parent(r))}),n.forEach(t.edges(),function(r){var i=k(t.edge(r));e.setEdge(r,n.merge({},N,_(i,E),n.pick(i,M)))}),e});r(" runLayout",function(){r(" makeSpaceForEdgeLabels",function(){var t;t=e.graph(),t.ranksep/=2,n.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}),r(" removeSelfEdges",function(){n.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}),r(" acyclic",function(){i.run(e)}),r(" nestingGraph.run",function(){l.run(e)}),r(" rank",function(){s(p.asNonCompoundGraph(e))}),r(" injectEdgeLabelProxies",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,"edge-proxy",i,"_ep")}})}),r(" removeEmptyRanks",function(){d(e)}),r(" nestingGraph.cleanup",function(){l.cleanup(e)}),r(" normalizeRanks",function(){a(e)}),r(" assignRankMinMax",function(){var t;t=0,n.forEach(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=n.max(t,i.maxRank))}),e.graph().maxRank=t}),r(" removeEdgeLabelProxies",function(){n.forEach(e.nodes(),function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}),r(" normalize.run",function(){o.run(e)}),r(" parentDummyChains",function(){u(e)}),r(" addBorderSegments",function(){h(e)}),r(" order",function(){f(e)}),r(" insertSelfEdges",function(){var t;t=p.buildLayerMatrix(e),n.forEach(t,function(t){var r=0;n.forEach(t,function(t,i){var o=e.node(t);o.order=i+r,n.forEach(o.selfEdges,function(t){p.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++r,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}),r(" adjustCoordinateSystem",function(){c.adjust(e)}),r(" position",function(){g(e)}),r(" positionSelfEdges",function(){n.forEach(e.nodes(),function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y}})}),r(" removeBorderNodes",function(){n.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),o=e.node(r.borderBottom),s=e.node(n.last(r.borderLeft)),a=e.node(n.last(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(o.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}),r(" normalize.undo",function(){o.undo(e)}),r(" fixupEdgeLabelCoords",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);if(n.has(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),r(" undoCoordinateSystem",function(){c.undo(e)}),r(" translateGraph",function(){(function(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,o=0,s=t.graph(),a=s.marginx||0,u=s.marginy||0;function d(t){var n=t.x,s=t.y,a=t.width,u=t.height;e=Math.min(e,n-a/2),r=Math.max(r,n+a/2),i=Math.min(i,s-u/2),o=Math.max(o,s+u/2)}n.forEach(t.nodes(),function(e){d(t.node(e))}),n.forEach(t.edges(),function(e){var r=t.edge(e);n.has(r,"x")&&d(r)}),e-=a,i-=u,n.forEach(t.nodes(),function(r){var n=t.node(r);n.x-=e,n.y-=i}),n.forEach(t.edges(),function(r){var o=t.edge(r);n.forEach(o.points,function(t){t.x-=e,t.y-=i}),n.has(o,"x")&&(o.x-=e),n.has(o,"y")&&(o.y-=i)}),s.width=r-e+a,s.height=o-i+u})(e)}),r(" assignNodeIntersects",function(){n.forEach(e.edges(),function(t){var r,n,i=e.edge(t),o=e.node(t.v),s=e.node(t.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=s,n=o),i.points.unshift(p.intersectRect(o,r)),i.points.push(p.intersectRect(s,n))})}),r(" reversePoints",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}),r(" acyclic.undo",function(){i.undo(e)})}),r(" updateInputGraph",function(){n.forEach(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),n.forEach(t.edges(),function(r){var i=t.edge(r),o=e.edge(r);i.points=o.points,n.has(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height})})};var v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],x=["width","height"],b={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function _(t,e){return n.mapValues(n.pick(t,e),Number)}function k(t){var e={};return n.forEach(t,function(t,r){e[r.toLowerCase()]=t}),e}},38436:function(t,e,r){var n;try{n={cloneDeep:r(50361),constant:r(75703),defaults:r(91747),each:r(66073),filter:r(63105),find:r(13311),flatten:r(85564),forEach:r(84486),forIn:r(62620),has:r(18721),isUndefined:r(52353),last:r(10928),map:r(35161),mapValues:r(8521),max:r(6162),merge:r(82492),min:r(53632),minBy:r(22762),now:r(7771),pick:r(78718),range:r(96026),reduce:r(54061),sortBy:r(89734),uniqueId:r(73955),values:r(52628),zipObject:r(7287)}}catch(t){}n||(n=window._),t.exports=n},72981:function(t,e,r){var n=r(38436),i=r(11138);t.exports={run:function(t){var e,r=i.addDummyNode(t,"root",{},"_root"),o=(e={},n.forEach(t.children(),function(r){!function r(i,o){var s=t.children(i);s&&s.length&&n.forEach(s,function(t){r(t,o+1)}),e[i]=o}(r,1)}),e),s=n.max(n.values(o))-1,a=2*s+1;t.graph().nestingRoot=r,n.forEach(t.edges(),function(e){t.edge(e).minlen*=a});var u=n.reduce(t.edges(),function(e,r){return e+t.edge(r).weight},0)+1;n.forEach(t.children(),function(e){(function t(e,r,o,s,a,u,d){var l=e.children(d);if(!l.length){d!==r&&e.setEdge(r,d,{weight:0,minlen:o});return}var h=i.addBorderNode(e,"_bt"),c=i.addBorderNode(e,"_bb"),f=e.node(d);e.setParent(h,d),f.borderTop=h,e.setParent(c,d),f.borderBottom=c,n.forEach(l,function(n){t(e,r,o,s,a,u,n);var i=e.node(n),l=i.borderTop?i.borderTop:n,f=i.borderBottom?i.borderBottom:n,g=i.borderTop?s:2*s,p=l!==f?1:a-u[d]+1;e.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:g,minlen:p,nestingEdge:!0})}),e.parent(d)||e.setEdge(r,h,{weight:0,minlen:a+u[d]})})(t,r,a,u,s,o,e)}),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,n.forEach(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}}},45995:function(t,e,r){"use strict";var n=r(38436),i=r(11138);t.exports={run:function(t){t.graph().dummyChains=[],n.forEach(t.edges(),function(e){(function(t,e){var r,n,o,s=e.v,a=t.node(s).rank,u=e.w,d=t.node(u).rank,l=e.name,h=t.edge(e),c=h.labelRank;if(d!==a+1){for(t.removeEdge(e),o=0,++a;a0;)e%2&&(r+=u[e+1]),e=e-1>>1,u[e]+=t.weight;d+=t.weight*r})),d}(t,e[i-1],e[i]);return r}},53408:function(t,e,r){"use strict";var n=r(38436),i=r(2588),o=r(56630),s=r(61026),a=r(23128),u=r(55093),d=r(70574).Graph,l=r(11138);function h(t,e,r){return n.map(e,function(e){return a(t,e,r)})}function c(t,e){n.forEach(e,function(e){n.forEach(e,function(e,r){t.node(e).order=r})})}t.exports=function(t){var e=l.maxRank(t),r=h(t,n.range(1,e+1),"inEdges"),a=h(t,n.range(e-1,-1,-1),"outEdges"),f=i(t);c(t,f);for(var g,p=Number.POSITIVE_INFINITY,m=0,v=0;v<4;++m,++v){(function(t,e){var r=new d;n.forEach(t,function(t){var i=t.graph().root,o=s(t,i,r,e);n.forEach(o.vs,function(e,r){t.node(e).order=r}),u(t,r,o.vs)})})(m%2?r:a,m%4>=2),f=l.buildLayerMatrix(t);var y=o(t,f);y=t.barycenter)&&function(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}(r)),n.forEach(r.out,function(e){return function(r){r.in.push(e),0==--r.indegree&&t.push(r)}}(r))}return n.map(n.filter(e,function(t){return!t.merged}),function(t){return n.pick(t,["vs","i","barycenter","weight"])})}(n.filter(r,function(t){return!t.indegree}))}},61026:function(t,e,r){var n=r(38436),i=r(35439),o=r(83678),s=r(87304);t.exports=function t(e,r,a,u){var d=e.children(r),l=e.node(r),h=l?l.borderLeft:void 0,c=l?l.borderRight:void 0,f={};h&&(d=n.filter(d,function(t){return t!==h&&t!==c}));var g=i(e,d);n.forEach(g,function(r){if(e.children(r.v).length){var i=t(e,r.v,a,u);f[r.v]=i,n.has(i,"barycenter")&&(n.isUndefined(r.barycenter)?(r.barycenter=i.barycenter,r.weight=i.weight):(r.barycenter=(r.barycenter*r.weight+i.barycenter*i.weight)/(r.weight+i.weight),r.weight+=i.weight))}});var p=o(g,a);n.forEach(p,function(t){t.vs=n.flatten(t.vs.map(function(t){return f[t]?f[t].vs:t}),!0)});var m=s(p,u);if(h&&(m.vs=n.flatten([h,m.vs,c],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),y=e.node(e.predecessors(c)[0]);n.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+v.order+y.order)/(m.weight+2),m.weight+=2}return m}},87304:function(t,e,r){var n=r(38436),i=r(11138);function o(t,e,r){for(var i;e.length&&(i=n.last(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}t.exports=function(t,e){var r,s=i.partition(t,function(t){return n.has(t,"barycenter")}),a=s.lhs,u=n.sortBy(s.rhs,function(t){return-t.i}),d=[],l=0,h=0,c=0;a.sort((r=!!e,function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i})),c=o(d,u,c),n.forEach(a,function(t){c+=t.vs.length,d.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,c=o(d,u,c)});var f={vs:n.flatten(d,!0)};return h&&(f.barycenter=l/h,f.weight=h),f}},24219:function(t,e,r){var n=r(38436);t.exports=function(t){var e,r,i=(e={},r=0,n.forEach(t.children(),function i(o){var s=r;n.forEach(t.children(o),i),e[o]={low:s,lim:r++}}),e);n.forEach(t.graph().dummyChains,function(e){for(var r=t.node(e),n=r.edgeObj,o=function(t,e,r,n){var i,o,s=[],a=[],u=Math.min(e[r].low,e[n].low),d=Math.max(e[r].lim,e[n].lim);i=r;do s.push(i=t.parent(i));while(i&&(e[i].low>u||d>e[i].lim));for(o=i,i=n;(i=t.parent(i))!==o;)a.push(i);return{path:s.concat(a.reverse()),lca:o}}(t,i,n.v,n.w),s=o.path,a=o.lca,u=0,d=s[0],l=!0;e!==n.w;){if(r=t.node(e),l){for(;(d=s[u])!==a&&t.node(d).maxRanka)&&u(r,e,d)})})}return n.reduce(e,function(e,r){var o,s=-1,a=0;return n.forEach(r,function(n,u){if("border"===t.node(n).dummy){var d=t.predecessors(n);d.length&&(i(r,a,u,s,o=t.node(d[0]).order),a=u,s=o)}i(r,a,r.length,o,e.length)}),r}),r}function u(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function d(t,e,r){if(e>r){var i=e;e=r,r=i}return n.has(t[e],r)}function l(t,e,r,i){var o={},s={},a={};return n.forEach(e,function(t){n.forEach(t,function(t,e){o[t]=t,s[t]=t,a[t]=e})}),n.forEach(e,function(t){var e=-1;n.forEach(t,function(t){var u=i(t);if(u.length)for(var l=((u=n.sortBy(u,function(t){return a[t]})).length-1)/2,h=Math.floor(l),c=Math.ceil(l);h<=c;++h){var f=u[h];s[t]===t&&eu.lim&&(d=u,l=!0);var h=n.filter(e.edges(),function(e){return l===v(t,t.node(e.v),d)&&l!==v(t,t.node(e.w),d)});return n.minBy(h,function(t){return o(e,t)})}function m(t,e,r,i){var o,s,u=r.v,d=r.w;t.removeEdge(u,d),t.setEdge(i.v,i.w,{}),f(t),h(t,e),o=n.find(t.nodes(),function(t){return!e.node(t).parent}),s=(s=a(t,o)).slice(1),n.forEach(s,function(r){var n=t.node(r).parent,i=e.edge(r,n),o=!1;i||(i=e.edge(n,r),o=!0),e.node(r).rank=e.node(n).rank+(o?i.minlen:-i.minlen)})}function v(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}t.exports=l,l.initLowLimValues=f,l.initCutValues=h,l.calcCutValue=c,l.leaveEdge=g,l.enterEdge=p,l.exchangeEdges=m},76681:function(t,e,r){"use strict";var n=r(38436);t.exports={longestPath:function(t){var e={};n.forEach(t.sources(),function r(i){var o=t.node(i);if(n.has(e,i))return o.rank;e[i]=!0;var s=n.min(n.map(t.outEdges(i),function(e){return r(e.w)-t.edge(e).minlen}));return(s===Number.POSITIVE_INFINITY||null==s)&&(s=0),o.rank=s})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},11138:function(t,e,r){"use strict";var n=r(38436),i=r(70574).Graph;function o(t,e,r,i){var o;do o=n.uniqueId(i);while(t.hasNode(o));return r.dummy=e,t.setNode(o,r),o}function s(t){return n.max(n.map(t.nodes(),function(e){var r=t.node(e).rank;if(!n.isUndefined(r))return r}))}t.exports={addDummyNode:o,simplify:function(t){var e=new i().setGraph(t.graph());return n.forEach(t.nodes(),function(r){e.setNode(r,t.node(r))}),n.forEach(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return n.forEach(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),n.forEach(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e},successorWeights:function(t){var e=n.map(t.nodes(),function(e){var r={};return n.forEach(t.outEdges(e),function(e){r[e.w]=(r[e.w]||0)+t.edge(e).weight}),r});return n.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=n.map(t.nodes(),function(e){var r={};return n.forEach(t.inEdges(e),function(e){r[e.v]=(r[e.v]||0)+t.edge(e).weight}),r});return n.zipObject(t.nodes(),e)},intersectRect:function(t,e){var r,n,i=t.x,o=t.y,s=e.x-i,a=e.y-o,u=t.width/2,d=t.height/2;if(!s&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*u>Math.abs(s)*d?(a<0&&(d=-d),r=d*s/a,n=d):(s<0&&(u=-u),r=u,n=u*a/s),{x:i+r,y:o+n}},buildLayerMatrix:function(t){var e=n.map(n.range(s(t)+1),function(){return[]});return n.forEach(t.nodes(),function(r){var i=t.node(r),o=i.rank;n.isUndefined(o)||(e[o][i.order]=r)}),e},normalizeRanks:function(t){var e=n.min(n.map(t.nodes(),function(e){return t.node(e).rank}));n.forEach(t.nodes(),function(r){var i=t.node(r);n.has(i,"rank")&&(i.rank-=e)})},removeEmptyRanks:function(t){var e=n.min(n.map(t.nodes(),function(e){return t.node(e).rank})),r=[];n.forEach(t.nodes(),function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)});var i=0,o=t.graph().nodeRankFactor;n.forEach(r,function(e,r){n.isUndefined(e)&&r%o!=0?--i:i&&n.forEach(e,function(e){t.node(e).rank+=i})})},addBorderNode:function(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),o(t,"border",i,e)},maxRank:s,partition:function(t,e){var r={lhs:[],rhs:[]};return n.forEach(t,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r},time:function(t,e){var r=n.now();try{return e()}finally{console.log(t+" time: "+(n.now()-r)+"ms")}},notime:function(t,e){return e()}}},88177:function(t){t.exports="0.8.5"},28282:function(t,e,r){var n=r(82354);t.exports={Graph:n.Graph,json:r(28974),alg:r(12440),version:n.version}},2842:function(t,e,r){var n=r(89126);t.exports=function(t){var e,r={},i=[];return n.each(t.nodes(),function(o){e=[],function i(o){n.has(r,o)||(r[o]=!0,e.push(o),n.each(t.successors(o),i),n.each(t.predecessors(o),i))}(o),e.length&&i.push(e)}),i}},53984:function(t,e,r){var n=r(89126);t.exports=function(t,e,r){n.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return n.each(e,function(e){if(!t.hasNode(e))throw Error("Graph does not have node: "+e);(function t(e,r,i,o,s,a){!n.has(o,r)&&(o[r]=!0,i||a.push(r),n.each(s(r),function(r){t(e,r,i,o,s,a)}),i&&a.push(r))})(t,e,"post"===r,s,i,o)}),o}},84847:function(t,e,r){var n=r(63763),i=r(89126);t.exports=function(t,e,r){return i.transform(t.nodes(),function(i,o){i[o]=n(t,o,e,r)},{})}},63763:function(t,e,r){var n=r(89126),i=r(75639);t.exports=function(t,e,r,n){return function(t,e,r,n){var o,s,a={},u=new i,d=function(t){var e=t.v!==o?t.v:t.w,n=a[e],i=r(t),d=s.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);d0&&(s=a[o=u.removeMin()]).distance!==Number.POSITIVE_INFINITY;)n(o).forEach(d);return a}(t,String(e),r||o,n||function(e){return t.outEdges(e)})};var o=n.constant(1)},9096:function(t,e,r){var n=r(89126),i=r(5023);t.exports=function(t){return n.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}},38924:function(t,e,r){var n=r(89126);t.exports=function(t,e,r){var n,o,s,a;return n=e||i,o=r||function(e){return t.outEdges(e)},s={},(a=t.nodes()).forEach(function(t){s[t]={},s[t][t]={distance:0},a.forEach(function(e){t!==e&&(s[t][e]={distance:Number.POSITIVE_INFINITY})}),o(t).forEach(function(e){var r=e.v===t?e.w:e.v,i=n(e);s[t][r]={distance:i,predecessor:t}})}),a.forEach(function(t){var e=s[t];a.forEach(function(r){var n=s[r];a.forEach(function(r){var i=n[t],o=e[r],s=n[r],a=i.distance+o.distance;a0;){if(r=u.removeMin(),n.has(a,r))s.setEdge(r,a[r]);else if(l)throw Error("Input graph is not connected: "+t);else l=!0;t.nodeEdges(r).forEach(d)}return s}},5023:function(t,e,r){var n=r(89126);t.exports=function(t){var e=0,r=[],i={},o=[];return t.nodes().forEach(function(s){n.has(i,s)||function s(a){var u=i[a]={onStack:!0,lowlink:e,index:e++};if(r.push(a),t.successors(a).forEach(function(t){n.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(s(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))}),u.lowlink===u.index){var d,l=[];do i[d=r.pop()].onStack=!1,l.push(d);while(a!==d);o.push(l)}}(s)}),o}},2166:function(t,e,r){var n=r(89126);function i(t){var e={},r={},i=[];if(n.each(t.sinks(),function s(a){if(n.has(r,a))throw new o;n.has(e,a)||(r[a]=!0,e[a]=!0,n.each(t.predecessors(a),s),delete r[a],i.push(a))}),n.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=Error()},75639:function(t,e,r){var n=r(89126);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(t){return t.key})},i.prototype.has=function(t){return n.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!n.has(r,t)){var i=this._arr,o=i.length;return r[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},i.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r>1].prioritys){var a=o;o=s,s=a}return o+"\x01"+s+"\x01"+(n.isUndefined(i)?"\x00":i)}function u(t,e){return a(t,e.v,e.w,e.name)}t.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return n.keys(this._nodes)},i.prototype.sources=function(){var t=this;return n.filter(this.nodes(),function(e){return n.isEmpty(t._in[e])})},i.prototype.sinks=function(){var t=this;return n.filter(this.nodes(),function(e){return n.isEmpty(t._out[e])})},i.prototype.setNodes=function(t,e){var r=arguments,i=this;return n.each(t,function(t){r.length>1?i.setNode(t,e):i.setNode(t)}),this},i.prototype.setNode=function(t,e){return n.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\x00",this._children[t]={},this._children["\x00"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return n.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(n.has(this._nodes,t)){var r=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],n.each(this.children(t),function(t){e.setParent(t)}),delete this._children[t]),n.each(n.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],n.each(n.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(n.isUndefined(e))e="\x00";else{e+="";for(var r=e;!n.isUndefined(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\x00"!==e)return e}},i.prototype.children=function(t){if(n.isUndefined(t)&&(t="\x00"),this._isCompound){var e=this._children[t];if(e)return n.keys(e)}else if("\x00"===t)return this.nodes();else if(this.hasNode(t))return[]},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return n.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return n.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return n.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;n.each(this._nodes,function(r,n){t(n)&&e.setNode(n,r)}),n.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var i={};return this._isCompound&&n.each(e.nodes(),function(t){e.setParent(t,function t(n){var o=r.parent(n);return void 0===o||e.hasNode(o)?(i[n]=o,o):o in i?i[o]:t(o)}(t))}),e},i.prototype.setDefaultEdgeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return n.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var r=this,i=arguments;return n.reduce(t,function(t,n){return i.length>1?r.setEdge(t,n,e):r.setEdge(t,n),n}),this},i.prototype.setEdge=function(){var t,e,r,i,s=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,e=u.w,r=u.name,2==arguments.length&&(i=arguments[1],s=!0)):(t=u,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,e=""+e,n.isUndefined(r)||(r=""+r);var d=a(this._isDirected,t,e,r);if(n.has(this._edgeLabels,d))return s&&(this._edgeLabels[d]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[d]=s?i:this._defaultEdgeLabelFn(t,e,r);var l=function(t,e,r,n){var i=""+e,o=""+r;if(!t&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return n&&(a.name=n),a}(this._isDirected,t,e,r);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[d]=l,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][d]=l,this._out[t][d]=l,this._edgeCount++,this},i.prototype.edge=function(t,e,r){var n=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return this._edgeLabels[n]},i.prototype.hasEdge=function(t,e,r){var i=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return n.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,r){var n=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var i=n.values(r);return e?n.filter(i,function(t){return t.v===e}):i}},i.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var i=n.values(r);return e?n.filter(i,function(t){return t.w===e}):i}},i.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}},82354:function(t,e,r){t.exports={Graph:r(30771),version:r(49631)}},28974:function(t,e,r){var n=r(89126),i=r(30771);t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n.map(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),o={v:e};return n.isUndefined(r)||(o.value=r),n.isUndefined(i)||(o.parent=i),o}),edges:n.map(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return n.isUndefined(e.name)||(i.name=e.name),n.isUndefined(r)||(i.value=r),i})};return n.isUndefined(t.graph())||(e.value=n.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return n.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),n.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}}},89126:function(t,e,r){var n;try{n={clone:r(66678),constant:r(75703),each:r(66073),filter:r(63105),has:r(18721),isArray:r(1469),isEmpty:r(41609),isFunction:r(23560),isUndefined:r(52353),keys:r(3674),map:r(35161),reduce:r(54061),size:r(84238),transform:r(68718),union:r(93386),values:r(52628)}}catch(t){}n||(n=window._),t.exports=n},49631:function(t){t.exports="2.1.8"},44091:function(t,e,r){"use strict";r.r(e),r.d(e,{isAnyArray:function(){return i}});let n=Object.prototype.toString;function i(t){let e=n.call(t);return e.endsWith("Array]")&&!e.includes("Big")}},1989:function(t,e,r){var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},1196:function(t){t.exports=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n0&&o(l)?r>1?t(l,r-1,o,s,a):n(a,l):s||(a[a.length]=l)}return a}},28483:function(t,e,r){var n=r(25063)();t.exports=n},47816:function(t,e,r){var n=r(28483),i=r(3674);t.exports=function(t,e){return t&&n(t,e,i)}},97786:function(t,e,r){var n=r(71811),i=r(40327);t.exports=function(t,e){e=n(e,t);for(var r=0,o=e.length;null!=t&&re}},78565:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t,r){return null!=t&&e.call(t,r)}},13:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},90939:function(t,e,r){var n=r(2492),i=r(37005);t.exports=function t(e,r,o,s,a){return e===r||(null!=e&&null!=r&&(i(e)||i(r))?n(e,r,o,s,t,a):e!=e&&r!=r)}},2492:function(t,e,r){var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),u=r(1469),d=r(44144),l=r(36719),h="[object Arguments]",c="[object Array]",f="[object Object]",g=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,p,m,v){var y=u(t),w=u(e),x=y?c:a(t),b=w?c:a(e);x=x==h?f:x,b=b==h?f:b;var E=x==f,N=b==f,M=x==b;if(M&&d(t)){if(!d(e))return!1;y=!0,E=!1}if(M&&!E)return v||(v=new n),y||l(t)?i(t,e,r,p,m,v):o(t,e,x,r,p,m,v);if(!(1&r)){var _=E&&g.call(t,"__wrapped__"),k=N&&g.call(e,"__wrapped__");if(_||k){var A=_?t.value():t,S=k?e.value():e;return v||(v=new n),m(A,S,r,p,v)}}return!!M&&(v||(v=new n),s(t,e,r,p,m,v))}},25588:function(t,e,r){var n=r(64160),i=r(37005);t.exports=function(t){return i(t)&&"[object Map]"==n(t)}},2958:function(t,e,r){var n=r(46384),i=r(90939);t.exports=function(t,e,r,o){var s=r.length,a=s,u=!o;if(null==t)return!a;for(t=Object(t);s--;){var d=r[s];if(u&&d[2]?d[1]!==t[d[0]]:!(d[0]in t))return!1}for(;++s=200){var p=e?null:a(t);if(p)return u(p);c=!1,l=s,g=new n}else g=e?[]:f;t:for(;++de||s&&a&&d&&!u&&!l||i&&a&&d||!r&&d||!o)return 1;if(!i&&!s&&!l&&t=u)return d;return d*("desc"==r[i]?-1:1)}}return t.index-e.index}},278:function(t){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n-1?a[u?e[d]:d]:void 0}}},47445:function(t,e,r){var n=r(40098),i=r(16612),o=r(18601);t.exports=function(t){return function(e,r,s){return s&&"number"!=typeof s&&i(e,r,s)&&(r=s=void 0),e=o(e),void 0===r?(r=e,e=0):r=o(r),s=void 0===s?el))return!1;var c=u.get(t),f=u.get(e);if(c&&f)return c==e&&f==t;var g=-1,p=!0,m=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++g-1}},54705:function(t,e,r){var n=r(18470);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},24785:function(t,e,r){var n=r(1989),i=r(38407),o=r(57071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:function(t,e,r){var n=r(45050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},96e3:function(t,e,r){var n=r(45050);t.exports=function(t){return n(this,t).get(t)}},49916:function(t,e,r){var n=r(45050);t.exports=function(t){return n(this,t).has(t)}},95265:function(t,e,r){var n=r(45050);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},68776:function(t){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},42634:function(t){t.exports=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}},24523:function(t,e,r){var n=r(15644);t.exports=function(t){var e=n(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}},94536:function(t,e,r){var n=r(10852)(Object,"create");t.exports=n},33498:function(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},45357:function(t,e,r){var n=r(96874),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},37465:function(t,e,r){var n=r(38407);t.exports=function(){this.__data__=new n,this.size=0}},63779:function(t){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},67599:function(t){t.exports=function(t){return this.__data__.get(t)}},44758:function(t){t.exports=function(t){return this.__data__.has(t)}},34309:function(t,e,r){var n=r(38407),i=r(57071),o=r(83369);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(t,e),this.size=r.size,this}},88016:function(t,e,r){var n=r(48983),i=r(62689),o=r(21903);t.exports=function(t){return i(t)?o(t):n(t)}},55514:function(t,e,r){var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e});t.exports=s},40327:function(t,e,r){var n=r(33448),i=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},21903:function(t){var e="\ud800-\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\ud83c[\udffb-\udfff]",i="[^"+e+"]",o="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+r+"|"+n+")?",u="[\\ufe0e\\ufe0f]?",d="(?:\\u200d(?:"+[i,o,s].join("|")+")"+u+a+")*",l=RegExp(n+"(?="+n+")|(?:"+[i+r+"?",r,o,s,"["+e+"]"].join("|")+")"+(u+a+d),"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},66678:function(t,e,r){var n=r(85990);t.exports=function(t){return n(t,4)}},50361:function(t,e,r){var n=r(85990);t.exports=function(t){return n(t,5)}},75703:function(t){t.exports=function(t){return function(){return t}}},91747:function(t,e,r){var n=r(5976),i=r(77813),o=r(16612),s=r(81704),a=Object.prototype,u=a.hasOwnProperty,d=n(function(t,e){t=Object(t);var r=-1,n=e.length,d=n>2?e[2]:void 0;for(d&&o(e[0],e[1],d)&&(n=1);++r1&&s(t,e[0],e[1])?e=[]:r>2&&s(e[0],e[1],e[2])&&(e=[e[0]]),i(t,n(e,1),[])});t.exports=a},70479:function(t){t.exports=function(){return[]}},59881:function(t,e,r){var n=r(98363),i=r(81704);t.exports=function(t){return n(t,i(t))}},68718:function(t,e,r){var n=r(77412),i=r(3118),o=r(47816),s=r(67206),a=r(85924),u=r(1469),d=r(44144),l=r(23560),h=r(13218),c=r(36719);t.exports=function(t,e,r){var f=u(t),g=f||d(t)||c(t);if(e=s(e,4),null==r){var p=t&&t.constructor;r=g?f?new p:[]:h(t)&&l(p)?i(a(t)):{}}return(g?n:o)(t,function(t,n,i){return e(r,t,n,i)}),r}},93386:function(t,e,r){var n=r(21078),i=r(5976),o=r(45652),s=r(29246),a=i(function(t){return o(n(t,1,s,!0))});t.exports=a},73955:function(t,e,r){var n=r(79833),i=0;t.exports=function(t){var e=++i;return n(t)+e}},7287:function(t,e,r){var n=r(34865),i=r(1757);t.exports=function(t,e){return i(t||[],e||[],n)}},75823:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return i}});var n=r(44091);function i(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,n.isAnyArray)(t)){if(0===t.length)throw TypeError("input must not be empty")}else throw TypeError("input must be an array");if(void 0!==r.output){if(!(0,n.isAnyArray)(r.output))throw TypeError("output option must be an array if specified");e=r.output}else e=Array(t.length);var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,n.isAnyArray)(t))throw TypeError("input must be an array");if(0===t.length)throw TypeError("input must not be empty");var r=e.fromIndex,i=void 0===r?0:r,o=e.toIndex,s=void 0===o?t.length:o;if(i<0||i>=t.length||!Number.isInteger(i))throw Error("fromIndex must be a positive integer smaller than length");if(s<=i||s>t.length||!Number.isInteger(s))throw Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var a=t[i],u=i+1;u1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,n.isAnyArray)(t))throw TypeError("input must be an array");if(0===t.length)throw TypeError("input must not be empty");var r=e.fromIndex,i=void 0===r?0:r,o=e.toIndex,s=void 0===o?t.length:o;if(i<0||i>=t.length||!Number.isInteger(i))throw Error("fromIndex must be a positive integer smaller than length");if(s<=i||s>t.length||!Number.isInteger(s))throw Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var a=t[i],u=i+1;ua&&(a=t[u]);return a}(t);if(i===o)throw RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var s=r.min,a=void 0===s?r.autoMinMax?i:0:s,u=r.max,d=void 0===u?r.autoMinMax?o:1:u;if(a>=d)throw RangeError("min option must be smaller than max option");for(var l=(d-a)/(o-i),h=0;h{e.has(r.id)||(e.add(r.id),t.push(r))})}return!1}function o(t,e,r,n){let i=r(t);if(i)return!0;for(let i of(e.add(t.id),n(t.id)))if(!e.has(i.id)&&o(i,e,r,n))return!0;return!1}let s=()=>!0;class a{graph;nodeFilter;edgeFilter;cacheEnabled;inEdgesMap=new Map;outEdgesMap=new Map;bothEdgesMap=new Map;allNodesMap=new Map;allEdgesMap=new Map;constructor(t){this.graph=t.graph;let e=t.nodeFilter||s,r=t.edgeFilter||s;this.nodeFilter=e,this.edgeFilter=t=>{let{source:n,target:i}=this.graph.getEdgeDetail(t.id);return!!(e(n)&&e(i))&&r(t,n,i)},"auto"===t.cache?(this.cacheEnabled=!0,this.startAutoCache()):"manual"===t.cache?this.cacheEnabled=!0:this.cacheEnabled=!1}clearCache=()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()};refreshCache=()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(t=>t.id))};updateCache=t=>{let e=new Set;t.forEach(t=>{let r=this.bothEdgesMap.get(t);if(r&&r.forEach(t=>e.add(t.id)),this.hasNode(t)){let r=this.graph.getRelatedEdges(t,"in").filter(this.edgeFilter),n=this.graph.getRelatedEdges(t,"out").filter(this.edgeFilter),i=Array.from(new Set([...r,...n]));i.forEach(t=>e.add(t.id)),this.inEdgesMap.set(t,r),this.outEdgesMap.set(t,n),this.bothEdgesMap.set(t,i),this.allNodesMap.set(t,this.graph.getNode(t))}else this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.bothEdgesMap.delete(t),this.allNodesMap.delete(t)}),e.forEach(t=>{this.hasEdge(t)?this.allEdgesMap.set(t,this.graph.getEdge(t)):this.allEdgesMap.delete(t)})};startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}handleGraphChanged=t=>{let e=new Set;t.changes.forEach(r=>{switch(r.type){case"NodeAdded":case"NodeRemoved":e.add(r.value.id);break;case"NodeDataUpdated":e.add(r.id);break;case"EdgeAdded":case"EdgeRemoved":e.add(r.value.source),e.add(r.value.target);break;case"EdgeUpdated":("source"===r.propertyName||"target"===r.propertyName)&&(e.add(r.oldValue),e.add(r.newValue));break;case"EdgeDataUpdated":if(t.graph.hasEdge(r.id)){let n=t.graph.getEdge(r.id);e.add(n.source),e.add(n.target)}}}),this.updateCache(e)};checkNodeExistence(t){this.getNode(t)}hasNode(t){if(!this.graph.hasNode(t))return!1;let e=this.graph.getNode(t);return this.nodeFilter(e)}areNeighbors(t,e){return this.checkNodeExistence(t),this.getNeighbors(e).some(e=>e.id===t)}getNode(t){let e=this.graph.getNode(t);if(!this.nodeFilter(e))throw Error("Node not found for id: "+t);return e}getRelatedEdges(t,e){if(this.checkNodeExistence(t),this.cacheEnabled)return"in"===e?this.inEdgesMap.get(t):"out"===e?this.outEdgesMap.get(t):this.bothEdgesMap.get(t);let r=this.graph.getRelatedEdges(t,e);return r.filter(this.edgeFilter)}getDegree(t,e){return this.getRelatedEdges(t,e).length}getSuccessors(t){let e=this.getRelatedEdges(t,"out"),r=e.map(t=>this.getNode(t.target));return Array.from(new Set(r))}getPredecessors(t){let e=this.getRelatedEdges(t,"in"),r=e.map(t=>this.getNode(t.source));return Array.from(new Set(r))}getNeighbors(t){let e=this.getPredecessors(t),r=this.getSuccessors(t);return Array.from(new Set([...e,...r]))}hasEdge(t){if(!this.graph.hasEdge(t))return!1;let e=this.graph.getEdge(t);return this.edgeFilter(e)}getEdge(t){let e=this.graph.getEdge(t);if(!this.edgeFilter(e))throw Error("Edge not found for id: "+t);return e}getEdgeDetail(t){let e=this.getEdge(t);return{edge:e,source:this.getNode(e.source),target:this.getNode(e.target)}}hasTreeStructure(t){return this.graph.hasTreeStructure(t)}getRoots(t){return this.graph.getRoots(t).filter(this.nodeFilter)}getChildren(t,e){return this.checkNodeExistence(t),this.graph.getChildren(t,e).filter(this.nodeFilter)}getParent(t,e){this.checkNodeExistence(t);let r=this.graph.getParent(t,e);return r&&this.nodeFilter(r)?r:null}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];i([this.getNode(t)],new Set,e,n)}dfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];o(this.getNode(t),new Set,e,n)}}class u extends n.Z{nodeMap=new Map;edgeMap=new Map;inEdgesMap=new Map;outEdgesMap=new Map;bothEdgesMap=new Map;treeIndices=new Map;changes=[];batchCount=0;onChanged=()=>{};constructor(t){if(super(),!t)return;t.nodes&&this.addNodes(t.nodes),t.edges&&this.addEdges(t.edges),t.tree&&this.addTree(t.tree),t.onChanged&&(this.onChanged=t.onChanged)}batch=t=>{this.batchCount+=1,t(),this.batchCount-=1,this.batchCount||this.commit()};commit(){let t=this.changes;this.changes=[];let e={graph:this,changes:t};this.emit("changed",e),this.onChanged(e)}reduceChanges(t){let e=[];return t.forEach(t=>{switch(t.type){case"NodeRemoved":{let r=!1;e=e.filter(e=>{if("NodeAdded"===e.type){let n=e.value.id===t.value.id;return n&&(r=!0),!n}return"NodeDataUpdated"===e.type?e.id!==t.value.id:"TreeStructureChanged"!==e.type||e.nodeId!==t.value.id}),r||e.push(t);break}case"EdgeRemoved":{let r=!1;e=e.filter(e=>{if("EdgeAdded"===e.type){let n=e.value.id===t.value.id;return n&&(r=!0),!n}return"EdgeDataUpdated"!==e.type&&"EdgeUpdated"!==e.type||e.id!==t.value.id}),r||e.push(t);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{let r=e.findIndex(e=>e.type===t.type&&e.id===t.id&&(void 0===t.propertyName||e.propertyName===t.propertyName)),n=e[r];n?void 0!==t.propertyName?n.newValue=t.newValue:(e.splice(r,1),e.push(t)):e.push(t);break}case"TreeStructureDetached":(e=e.filter(e=>"TreeStructureAttached"===e.type?e.treeKey!==t.treeKey:"TreeStructureChanged"!==e.type||e.treeKey!==t.treeKey)).push(t);break;case"TreeStructureChanged":{let r=e.find(e=>"TreeStructureChanged"===e.type&&e.treeKey===t.treeKey&&e.nodeId===t.nodeId);r?r.newParentId=t.newParentId:e.push(t);break}default:e.push(t)}}),e}checkNodeExistence(t){this.getNode(t)}hasNode(t){return this.nodeMap.has(t)}areNeighbors(t,e){return this.getNeighbors(e).some(e=>e.id===t)}getNode(t){let e=this.nodeMap.get(t);if(!e)throw Error("Node not found for id: "+t);return e}getRelatedEdges(t,e){if(this.checkNodeExistence(t),"in"===e){let e=this.inEdgesMap.get(t);return Array.from(e)}if("out"===e){let e=this.outEdgesMap.get(t);return Array.from(e)}{let e=this.bothEdgesMap.get(t);return Array.from(e)}}getDegree(t,e){return this.getRelatedEdges(t,e).length}getSuccessors(t){let e=this.getRelatedEdges(t,"out"),r=e.map(t=>this.getNode(t.target));return Array.from(new Set(r))}getPredecessors(t){let e=this.getRelatedEdges(t,"in"),r=e.map(t=>this.getNode(t.source));return Array.from(new Set(r))}getNeighbors(t){let e=this.getPredecessors(t),r=this.getSuccessors(t);return Array.from(new Set([...e,...r]))}doAddNode(t){if(this.hasNode(t.id))throw Error("Node already exists: "+t.id);this.nodeMap.set(t.id,t),this.inEdgesMap.set(t.id,new Set),this.outEdgesMap.set(t.id,new Set),this.bothEdgesMap.set(t.id,new Set),this.treeIndices.forEach(e=>{e.childrenMap.set(t.id,new Set)}),this.changes.push({type:"NodeAdded",value:t})}addNodes(t){this.batch(()=>{for(let e of t)this.doAddNode(e)})}addNode(t){this.addNodes([t])}doRemoveNode(t){let e=this.getNode(t),r=this.bothEdgesMap.get(t);r?.forEach(t=>this.doRemoveEdge(t.id)),this.nodeMap.delete(t),this.treeIndices.forEach(r=>{r.childrenMap.get(t)?.forEach(t=>{r.parentMap.delete(t.id)});let n=r.parentMap.get(t);n&&r.childrenMap.get(n.id)?.delete(e),r.parentMap.delete(t),r.childrenMap.delete(t)}),this.bothEdgesMap.delete(t),this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.changes.push({type:"NodeRemoved",value:e})}removeNodes(t){this.batch(()=>{t.forEach(t=>this.doRemoveNode(t))})}removeNode(t){this.removeNodes([t])}updateNodeDataProperty(t,e,r){let n=this.getNode(t);this.batch(()=>{let i=n.data[e];n.data[e]=r,this.changes.push({type:"NodeDataUpdated",id:t,propertyName:e,oldValue:i,newValue:r})})}mergeNodeData(t,e){this.batch(()=>{Object.entries(e).forEach(([e,r])=>{this.updateNodeDataProperty(t,e,r)})})}updateNodeData(...t){let e;let r=t[0],n=this.getNode(r);if("string"==typeof t[1]){this.updateNodeDataProperty(r,t[1],t[2]);return}if("function"==typeof t[1]){let r=t[1];e=r(n.data)}else"object"==typeof t[1]&&(e=t[1]);this.batch(()=>{let t=n.data,i=e;n.data=e,this.changes.push({type:"NodeDataUpdated",id:r,oldValue:t,newValue:i})})}checkEdgeExistence(t){if(!this.hasEdge(t))throw Error("Edge not found for id: "+t)}hasEdge(t){return this.edgeMap.has(t)}getEdge(t){return this.checkEdgeExistence(t),this.edgeMap.get(t)}getEdgeDetail(t){let e=this.getEdge(t);return{edge:e,source:this.getNode(e.source),target:this.getNode(e.target)}}doAddEdge(t){if(this.hasEdge(t.id))throw Error("Edge already exists: "+t.id);this.checkNodeExistence(t.source),this.checkNodeExistence(t.target),this.edgeMap.set(t.id,t);let e=this.inEdgesMap.get(t.target),r=this.outEdgesMap.get(t.source),n=this.bothEdgesMap.get(t.source),i=this.bothEdgesMap.get(t.target);e.add(t),r.add(t),n.add(t),i.add(t),this.changes.push({type:"EdgeAdded",value:t})}addEdges(t){this.batch(()=>{for(let e of t)this.doAddEdge(e)})}addEdge(t){this.addEdges([t])}doRemoveEdge(t){let e=this.getEdge(t),r=this.outEdgesMap.get(e.source),n=this.inEdgesMap.get(e.target),i=this.bothEdgesMap.get(e.source),o=this.bothEdgesMap.get(e.target);r.delete(e),n.delete(e),i.delete(e),o.delete(e),this.edgeMap.delete(t),this.changes.push({type:"EdgeRemoved",value:e})}removeEdges(t){this.batch(()=>{t.forEach(t=>this.doRemoveEdge(t))})}removeEdge(t){this.removeEdges([t])}updateEdgeSource(t,e){let r=this.getEdge(t);this.checkNodeExistence(e);let n=r.source;this.outEdgesMap.get(n).delete(r),this.bothEdgesMap.get(n).delete(r),this.outEdgesMap.get(e).add(r),this.bothEdgesMap.get(e).add(r),r.source=e,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"source",oldValue:n,newValue:e})})}updateEdgeTarget(t,e){let r=this.getEdge(t);this.checkNodeExistence(e);let n=r.target;this.inEdgesMap.get(n).delete(r),this.bothEdgesMap.get(n).delete(r),this.inEdgesMap.get(e).add(r),this.bothEdgesMap.get(e).add(r),r.target=e,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"target",oldValue:n,newValue:e})})}updateEdgeDataProperty(t,e,r){let n=this.getEdge(t);this.batch(()=>{let i=n.data[e];n.data[e]=r,this.changes.push({type:"EdgeDataUpdated",id:t,propertyName:e,oldValue:i,newValue:r})})}updateEdgeData(...t){let e;let r=t[0],n=this.getEdge(r);if("string"==typeof t[1]){this.updateEdgeDataProperty(r,t[1],t[2]);return}if("function"==typeof t[1]){let r=t[1];e=r(n.data)}else"object"==typeof t[1]&&(e=t[1]);this.batch(()=>{let t=n.data,i=e;n.data=e,this.changes.push({type:"EdgeDataUpdated",id:r,oldValue:t,newValue:i})})}mergeEdgeData(t,e){this.batch(()=>{Object.entries(e).forEach(([e,r])=>{this.updateEdgeDataProperty(t,e,r)})})}checkTreeExistence(t){if(!this.hasTreeStructure(t))throw Error("Tree structure not found for treeKey: "+t)}hasTreeStructure(t){return this.treeIndices.has(t)}attachTreeStructure(t){this.treeIndices.has(t)||(this.treeIndices.set(t,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:t})}))}detachTreeStructure(t){this.checkTreeExistence(t),this.treeIndices.delete(t),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:t})})}addTree(t,e){this.batch(()=>{this.attachTreeStructure(e);let r=[],n=Array.isArray(t)?t:[t];for(;n.length;){let t=n.shift();r.push(t),t.children&&n.push(...t.children)}this.addNodes(r),r.forEach(t=>{t.children?.forEach(r=>{this.setParent(r.id,t.id,e)})})})}getRoots(t){return this.checkTreeExistence(t),this.getAllNodes().filter(e=>!this.getParent(e.id,t))}getChildren(t,e){this.checkNodeExistence(t),this.checkTreeExistence(e);let r=this.treeIndices.get(e),n=r.childrenMap.get(t);return Array.from(n||[])}getParent(t,e){this.checkNodeExistence(t),this.checkTreeExistence(e);let r=this.treeIndices.get(e);return r.parentMap.get(t)||null}getAncestors(t,e){let r;let n=[],i=this.getNode(t);for(;r=this.getParent(i.id,e);)n.push(r),i=r;return n}setParent(t,e,r){this.checkTreeExistence(r);let n=this.treeIndices.get(r),i=this.getNode(t),o=n.parentMap.get(t);if(o?.id===e)return;if(void 0===e){o&&n.childrenMap.get(o.id)?.delete(i),n.parentMap.delete(t);return}let s=this.getNode(e);n.parentMap.set(t,s),o&&n.childrenMap.get(o.id)?.delete(i);let a=n.childrenMap.get(s.id);a||(a=new Set,n.childrenMap.set(s.id,a)),a.add(i),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:r,nodeId:t,oldParentId:o?.id,newParentId:s.id})})}dfsTree(t,e,r){return o(this.getNode(t),new Set,e,t=>this.getChildren(t,r))}bfsTree(t,e,r){return i([this.getNode(t)],new Set,e,t=>this.getChildren(t,r))}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];return i([this.getNode(t)],new Set,e,n)}dfs(t,e,r="out"){let n={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];return o(this.getNode(t),new Set,e,n)}clone(){let t=this.getAllNodes().map(t=>({...t,data:{...t.data}})),e=this.getAllEdges().map(t=>({...t,data:{...t.data}})),r=new u({nodes:t,edges:e});return this.treeIndices.forEach(({parentMap:t,childrenMap:e},n)=>{let i=new Map;t.forEach((t,e)=>{i.set(e,r.getNode(t.id))});let o=new Map;e.forEach((t,e)=>{o.set(e,new Set(Array.from(t).map(t=>r.getNode(t.id))))}),r.treeIndices.set(n,{parentMap:i,childrenMap:o})}),r}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(t){return new a({graph:this,...t})}}},28104:function(t,e,r){"use strict";r.d(e,{b:function(){return eS}});var n=r(97582),i=r(72137),o=r(61035);let s=(t,e)=>{if("next"!==t&&"prev"!==t)return e},a=t=>{t.prev.next=t.next,t.next.prev=t.prev,delete t.next,delete t.prev};class u{constructor(){let t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){let t=this.shortcut,e=t.prev;if(e&&e!==t)return a(e),e}enqueue(t){let e=this.shortcut;t.prev&&t.next&&a(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){let t=[],e=this.shortcut,r=e.prev;for(;r!==e;)t.push(JSON.stringify(r,s)),r=null==r?void 0:r.prev;return`[${t.join(", ")}]`}}class d extends u{}let l=()=>1,h=(t,e)=>{var r;if(t.getAllNodes().length<=1)return[];let n=g(t,e||l),i=c(n.graph,n.buckets,n.zeroIdx);return null===(r=i.map(e=>t.getRelatedEdges(e.v,"out").filter(({target:t})=>t===e.w)))||void 0===r?void 0:r.flat()},c=(t,e,r)=>{let n,i=[],o=e[e.length-1],s=e[0];for(;t.getAllNodes().length;){for(;n=s.dequeue();)f(t,e,r,n);for(;n=o.dequeue();)f(t,e,r,n);if(t.getAllNodes().length){for(let o=e.length-2;o>0;--o)if(n=e[o].dequeue()){i=i.concat(f(t,e,r,n,!0));break}}}return i},f=(t,e,r,n,i)=>{var o,s;let a=[];return t.hasNode(n.v)&&(null===(o=t.getRelatedEdges(n.v,"in"))||void 0===o||o.forEach(n=>{let o=n.data.weight,s=t.getNode(n.source);i&&a.push({v:n.source,w:n.target,in:0,out:0}),void 0===s.data.out&&(s.data.out=0),s.data.out-=o,p(e,r,Object.assign({v:s.id},s.data))}),null===(s=t.getRelatedEdges(n.v,"out"))||void 0===s||s.forEach(n=>{let i=n.data.weight,o=n.target,s=t.getNode(o);void 0===s.data.in&&(s.data.in=0),s.data.in-=i,p(e,r,Object.assign({v:s.id},s.data))}),t.removeNode(n.v)),i?a:void 0},g=(t,e)=>{let r=new i.k,n=0,o=0;t.getAllNodes().forEach(t=>{r.addNode({id:t.id,data:{v:t.id,in:0,out:0}})}),t.getAllEdges().forEach(t=>{let i=r.getRelatedEdges(t.source,"out").find(e=>e.target===t.target),s=(null==e?void 0:e(t))||1;i?r.updateEdgeData(null==i?void 0:i.id,Object.assign(Object.assign({},i.data),{weight:i.data.weight+s})):r.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:s}}),o=Math.max(o,r.getNode(t.source).data.out+=s),n=Math.max(n,r.getNode(t.target).data.in+=s)});let s=[],a=o+n+3;for(let t=0;t{p(s,u,Object.assign({v:t.id},r.getNode(t.id).data))}),{buckets:s,zeroIdx:u,graph:r}},p=(t,e,r)=>{r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)},m=(t,e)=>{let r="greedy"===e?h(t,t=>t.data.weight||1):v(t);null==r||r.forEach(e=>{let r=e.data;t.removeEdge(e.id),r.forwardName=e.data.name,r.reversed=!0,t.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign({},r)})})},v=t=>{let e=[],r={},n={},i=o=>{n[o]||(n[o]=!0,r[o]=!0,t.getRelatedEdges(o,"out").forEach(t=>{r[t.target]?e.push(t):i(t.target)}),delete r[o])};return t.getAllNodes().forEach(t=>i(t.id)),e},y=t=>{t.getAllEdges().forEach(e=>{let r=e.data;if(r.reversed){t.removeEdge(e.id);let n=r.forwardName;delete r.reversed,delete r.forwardName,t.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign(Object.assign({},r),{forwardName:n})})}})},w=(t,e)=>Number(t)-Number(e),x=(t,e,r,n)=>{let i;do i=`${n}${Math.random()}`;while(t.hasNode(i));return r.dummy=e,t.addNode({id:i,data:r}),i},b=t=>{let e=new i.k;return t.getAllNodes().forEach(t=>{e.addNode(Object.assign({},t))}),t.getAllEdges().forEach(t=>{let r=e.getRelatedEdges(t.source,"out").find(e=>e.target===t.target);r?e.updateEdgeData(null==r?void 0:r.id,Object.assign(Object.assign({},r.data),{weight:r.data.weight+t.data.weight||0,minlen:Math.max(r.data.minlen,t.data.minlen||1)})):e.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||0,minlen:t.data.minlen||1}})}),e},E=t=>{let e=new i.k;return t.getAllNodes().forEach(r=>{t.getChildren(r.id).length||e.addNode(Object.assign({},r))}),t.getAllEdges().forEach(t=>{e.addEdge(t)}),e},N=(t,e)=>null==t?void 0:t.reduce((t,r,n)=>(t[r]=e[n],t),{}),M=(t,e)=>{let r,n;let i=Number(t.x),o=Number(t.y),s=Number(e.x)-i,a=Number(e.y)-o,u=Number(t.width)/2,d=Number(t.height)/2;return s||a?(Math.abs(a)*u>Math.abs(s)*d?(a<0&&(d=-d),r=d*s/a,n=d):(s<0&&(u=-u),r=u,n=u*a/s),{x:i+r,y:o+n}):{x:0,y:0}},_=t=>{let e=[],r=j(t)+1;for(let t=0;t{let r=t.data.rank;void 0!==r&&e[r]&&e[r].push(t.id)});for(let n=0;nw(t.getNode(e).data.order,t.getNode(r).data.order));return e},k=t=>{let e=t.getAllNodes().filter(t=>void 0!==t.data.rank).map(t=>t.data.rank),r=Math.min(...e);t.getAllNodes().forEach(t=>{t.data.hasOwnProperty("rank")&&r!==1/0&&(t.data.rank-=r)})},A=(t,e=0)=>{let r=t.getAllNodes(),n=r.filter(t=>void 0!==t.data.rank).map(t=>t.data.rank),i=Math.min(...n),o=[];r.forEach(t=>{let e=(t.data.rank||0)-i;o[e]||(o[e]=[]),o[e].push(t.id)});let s=0;for(let r=0;r{let r=t.getNode(e);r&&(r.data.rank=r.data.rank||0,r.data.rank+=s)}))}},S=(t,e,r,n)=>{let i={width:0,height:0};return(0,o.Z)(r)&&(0,o.Z)(n)&&(i.rank=r,i.order=n),x(t,"border",i,e)},j=t=>{let e;return t.getAllNodes().forEach(t=>{let r=t.data.rank;void 0!==r&&(void 0===e||r>e)&&(e=r)}),e||(e=0),e},O=(t,e)=>{let r={lhs:[],rhs:[]};return null==t||t.forEach(t=>{e(t)?r.lhs.push(t):r.rhs.push(t)}),r},R=(t,e)=>t.reduce((t,r)=>{let n=e(t),i=e(r);return n>i?r:t}),z=(t,e,r,n,i,o)=>{!n.includes(e.id)&&(n.push(e.id),r||o.push(e.id),i(e.id).forEach(e=>z(t,e,r,n,i,o)),r&&o.push(e.id))},I=(t,e,r,n)=>{let i=Array.isArray(e)?e:[e],o=e=>n?t.getSuccessors(e):t.getNeighbors(e),s=[],a=[];return i.forEach(e=>{if(t.hasNode(e.id))z(t,e,"post"===r,a,o,s);else throw Error(`Graph does not have node: ${e}`)}),s},C=t=>{let e=r=>{let n=t.getChildren(r),i=t.getNode(r);if((null==n?void 0:n.length)&&n.forEach(t=>e(t.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let e=i.data.minRank,n=i.data.maxRank+1;ee(t.id))},D=(t,e,r,n,i,o)=>{let s=i.data[e][o-1],a=x(t,"border",{rank:o,borderType:e,width:0,height:0},r);i.data[e][o]=a,t.setParent(a,n),s&&t.addEdge({id:`e${Math.random()}`,source:s,target:a,data:{weight:1}})},P=(t,e)=>{let r=e.toLowerCase();("lr"===r||"rl"===r)&&L(t)},T=(t,e)=>{let r=e.toLowerCase();("bt"===r||"rl"===r)&&q(t),("lr"===r||"rl"===r)&&(G(t),L(t))},L=t=>{t.getAllNodes().forEach(t=>{F(t)}),t.getAllEdges().forEach(t=>{F(t)})},F=t=>{let e=t.data.width;t.data.width=t.data.height,t.data.height=e},q=t=>{t.getAllNodes().forEach(t=>{Z(t.data)}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>Z(t)),t.data.hasOwnProperty("y")&&Z(t.data)})},Z=t=>{(null==t?void 0:t.y)&&(t.y=-t.y)},G=t=>{t.getAllNodes().forEach(t=>{V(t.data)}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>V(t)),t.data.hasOwnProperty("x")&&V(t.data)})},V=t=>{let e=t.x;t.x=t.y,t.y=e},U=t=>{let e=x(t,"root",{},"_root"),r=B(t),n=Math.max(...Object.values(r));Math.abs(n)===1/0&&(n=1);let i=n-1,o=2*i+1;t.getAllEdges().forEach(t=>{t.data.minlen*=o});let s=W(t)+1;return t.getRoots().forEach(n=>{$(t,e,o,s,i,r,n.id)}),{nestingRoot:e,nodeRankFactor:o}},$=(t,e,r,n,i,o,s)=>{let a=t.getChildren(s);if(!(null==a?void 0:a.length)){s!==e&&t.addEdge({id:`e${Math.random()}`,source:e,target:s,data:{weight:0,minlen:r}});return}let u=S(t,"_bt"),d=S(t,"_bb"),l=t.getNode(s);t.setParent(u,s),l.data.borderTop=u,t.setParent(d,s),l.data.borderBottom=d,null==a||a.forEach(a=>{$(t,e,r,n,i,o,a.id);let l=a.data.borderTop?a.data.borderTop:a.id,h=a.data.borderBottom?a.data.borderBottom:a.id,c=a.data.borderTop?n:2*n,f=l!==h?1:i-o[s]+1;t.addEdge({id:`e${Math.random()}`,source:u,target:l,data:{minlen:f,weight:c,nestingEdge:!0}}),t.addEdge({id:`e${Math.random()}`,source:h,target:d,data:{minlen:f,weight:c,nestingEdge:!0}})}),t.getParent(s)||t.addEdge({id:`e${Math.random()}`,source:e,target:u,data:{weight:0,minlen:i+o[s]}})},B=t=>{let e={},r=(n,i)=>{let o=t.getChildren(n);null==o||o.forEach(t=>r(t.id,i+1)),e[n]=i};return t.getRoots().forEach(t=>r(t.id,1)),e},W=t=>{let e=0;return t.getAllEdges().forEach(t=>{e+=t.data.weight}),e},Y=(t,e)=>{e&&t.removeNode(e),t.getAllEdges().forEach(e=>{e.data.nestingEdge&&t.removeEdge(e.id)})},H="edge-label",J=(t,e)=>{t.getAllEdges().forEach(r=>K(t,r,e))},K=(t,e,r)=>{let n,i,o,s=e.source,a=t.getNode(s).data.rank,u=e.target,d=t.getNode(u).data.rank,l=e.data.labelRank;if(d!==a+1){for(t.removeEdge(e.id),o=0,++a;a{e.forEach(e=>{let r,n=t.getNode(e),{data:i}=n,o=i.originalEdge;o&&t.addEdge(o);let s=e;for(;n.data.dummy;)r=t.getSuccessors(s)[0],t.removeNode(s),o.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===H&&(o.data.x=n.data.x,o.data.y=n.data.y,o.data.width=n.data.width,o.data.height=n.data.height),s=r.id,n=t.getNode(s)})};var X=r(59145),tt=function(t){if("object"!=typeof t||null===t)return t;if((0,X.Z)(t)){e=[];for(var e,r=0,n=t.length;r{let n;let i={};null==r||r.forEach(r=>{let o,s,a=t.getParent(r);for(;a;){if((o=t.getParent(a.id))?(s=i[o.id],i[o.id]=a.id):(s=n,n=a.id),s&&s!==a.id){e.hasNode(s)||e.addNode({id:s,data:{}}),e.hasNode(a.id)||e.addNode({id:a.id,data:{}}),e.hasEdge(`e${s}-${a.id}`)||e.addEdge({id:`e${s}-${a.id}`,source:s,target:a.id,data:{}});return}a=o}})},tr=(t,e,r)=>{let n=tn(t),o=new i.k({tree:[{id:n,children:[],data:{}}]});return t.getAllNodes().forEach(i=>{let s=t.getParent(i.id);(i.data.rank===e||i.data.minRank<=e&&e<=i.data.maxRank)&&(o.hasNode(i.id)||o.addNode(Object.assign({},i)),(null==s?void 0:s.id)&&!o.hasNode(null==s?void 0:s.id)&&o.addNode(Object.assign({},s)),o.setParent(i.id,(null==s?void 0:s.id)||n),t.getRelatedEdges(i.id,r).forEach(e=>{let r=e.source===i.id?e.target:e.source;o.hasNode(r)||o.addNode(Object.assign({},t.getNode(r)));let n=o.getRelatedEdges(r,"out").find(({target:t})=>t===i.id),s=void 0!==n?n.data.weight:0;n?o.updateEdgeData(n.id,Object.assign(Object.assign({},n.data),{weight:e.data.weight+s})):o.addEdge({id:e.id,source:r,target:i.id,data:{weight:e.data.weight+s}})}),i.data.hasOwnProperty("minRank")&&o.updateNodeData(i.id,Object.assign(Object.assign({},i.data),{borderLeft:i.data.borderLeft[e],borderRight:i.data.borderRight[e]})))}),o},tn=t=>{let e;for(;t.hasNode(e=`_root${Math.random()}`););return e},ti=(t,e,r)=>{let n=N(r,r.map((t,e)=>e)),i=e.map(e=>{let r=t.getRelatedEdges(e,"out").map(t=>({pos:n[t.target]||0,weight:t.data.weight}));return null==r?void 0:r.sort((t,e)=>t.pos-e.pos)}),o=i.flat().filter(t=>void 0!==t),s=1;for(;s{if(t){let e=t.pos+s;u[e]+=t.weight;let r=0;for(;e>0;)e%2&&(r+=u[e+1]),e=e-1>>1,u[e]+=t.weight;d+=t.weight*r}}),d},to=(t,e)=>{let r=0;for(let n=1;n<(null==e?void 0:e.length);n+=1)r+=ti(t,e[n-1],e[n]);return r},ts=t=>{let e={},r=t.getAllNodes(),n=r.map(t=>{var e;return null!==(e=t.data.rank)&&void 0!==e?e:-1/0}),i=Math.max(...n),o=[];for(let t=0;tt.getNode(e.id).data.rank-t.getNode(r.id).data.rank),a=s.filter(e=>void 0!==t.getNode(e.id).data.fixorder),u=a.sort((e,r)=>t.getNode(e.id).data.fixorder-t.getNode(r.id).data.fixorder);return null==u||u.forEach(r=>{isNaN(t.getNode(r.id).data.rank)||o[t.getNode(r.id).data.rank].push(r.id),e[r.id]=!0}),null==s||s.forEach(r=>t.dfsTree(r.id,t=>{if(e.hasOwnProperty(t.id))return!0;e[t.id]=!0,isNaN(t.data.rank)||o[t.data.rank].push(t.id)})),o},ta=(t,e)=>e.map(e=>{let r=t.getRelatedEdges(e,"in");if(!(null==r?void 0:r.length))return{v:e};let n={sum:0,weight:0};return null==r||r.forEach(e=>{let r=t.getNode(e.source);n.sum+=e.data.weight*r.data.order,n.weight+=e.data.weight}),{v:e,barycenter:n.sum/n.weight,weight:n.weight}}),tu=t=>{var e,r;let n=[],i=t=>e=>{!e.merged&&(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&td(t,e)},o=e=>r=>{r.in.push(e),0==--r.indegree&&t.push(r)};for(;null==t?void 0:t.length;){let s=t.pop();n.push(s),null===(e=s.in.reverse())||void 0===e||e.forEach(t=>i(s)(t)),null===(r=s.out)||void 0===r||r.forEach(t=>o(s)(t))}let s=n.filter(t=>!t.merged),a=["vs","i","barycenter","weight"];return s.map(t=>{let e={};return null==a||a.forEach(r=>{void 0!==t[r]&&(e[r]=t[r])}),e})},td=(t,e)=>{var r;let n=0,i=0;t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.vs=null===(r=e.vs)||void 0===r?void 0:r.concat(t.vs),t.barycenter=n/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0};var tl=(t,e)=>{var r,n,i;let o={};null==t||t.forEach((t,e)=>{o[t.v]={i:e,indegree:0,in:[],out:[],vs:[t.v]};let r=o[t.v];void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)}),null===(r=e.getAllEdges())||void 0===r||r.forEach(t=>{let e=o[t.source],r=o[t.target];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(o[t.target]))});let s=null===(i=(n=Object.values(o)).filter)||void 0===i?void 0:i.call(n,t=>!t.indegree);return tu(s)};let th=(t,e,r,n)=>{let i=O(t,t=>{let e=t.hasOwnProperty("fixorder")&&!isNaN(t.fixorder);return n?!e&&t.hasOwnProperty("barycenter"):e||t.hasOwnProperty("barycenter")}),o=i.lhs,s=i.rhs.sort((t,e)=>-t.i- -e.i),a=[],u=0,d=0,l=0;null==o||o.sort(tf(!!e,!!r)),l=tc(a,s,l),null==o||o.forEach(t=>{var e;l+=null===(e=t.vs)||void 0===e?void 0:e.length,a.push(t.vs),u+=t.barycenter*t.weight,d+=t.weight,l=tc(a,s,l)});let h={vs:a.flat()};return d&&(h.barycenter=u/d,h.weight=d),h},tc=(t,e,r)=>{let n,i=r;for(;e.length&&(n=e[e.length-1]).i<=i;)e.pop(),null==t||t.push(n.vs),i++;return i},tf=(t,e)=>(r,n)=>{if(void 0!==r.fixorder&&void 0!==n.fixorder)return r.fixorder-n.fixorder;if(r.barycentern.barycenter)return 1;if(e&&void 0!==r.order&&void 0!==n.order){if(r.ordern.order)return 1}return t?n.i-r.i:r.i-n.i},tg=(t,e,r,n,i,o)=>{var s,a,u,d;let l=t.getChildren(e).map(t=>t.id),h=t.getNode(e),c=h?h.data.borderLeft:void 0,f=h?h.data.borderRight:void 0,g={};c&&(l=null==l?void 0:l.filter(t=>t!==c&&t!==f));let p=ta(t,l||[]);null==p||p.forEach(e=>{var i;if(null===(i=t.getChildren(e.v))||void 0===i?void 0:i.length){let i=tg(t,e.v,r,n,o);g[e.v]=i,i.hasOwnProperty("barycenter")&&tm(e,i)}});let m=tl(p,r);tp(m,g),null===(s=m.filter(t=>t.vs.length>0))||void 0===s||s.forEach(e=>{let r=t.getNode(e.vs[0]);r&&(e.fixorder=r.data.fixorder,e.order=r.data.order)});let v=th(m,n,i,o);if(c&&(v.vs=[c,v.vs,f].flat(),null===(a=t.getPredecessors(c))||void 0===a?void 0:a.length)){let e=t.getNode((null===(u=t.getPredecessors(c))||void 0===u?void 0:u[0].id)||""),r=t.getNode((null===(d=t.getPredecessors(f))||void 0===d?void 0:d[0].id)||"");v.hasOwnProperty("barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.data.order+r.data.order)/(v.weight+2),v.weight+=2}return v},tp=(t,e)=>{null==t||t.forEach(t=>{var r;let n=null===(r=t.vs)||void 0===r?void 0:r.map(t=>e[t]?e[t].vs:t);t.vs=n.flat()})},tm=(t,e)=>{void 0!==t.barycenter?(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight):(t.barycenter=e.barycenter,t.weight=e.weight)},tv=(t,e)=>{let r;let n=j(t),i=[],o=[];for(let t=1;t-1;t--)o.push(t);let s=ty(t,i,"in"),a=ty(t,o,"out"),u=ts(t);tx(t,u);let d=Number.POSITIVE_INFINITY;for(let n=0,i=0;i<4;++n,++i){tw(n%2?s:a,n%4>=2,!1,e),u=_(t);let o=to(t,u);o=2,!0,e),u=_(t);let o=to(t,u);oe.map(e=>tr(t,e,r)),tw=(t,e,r,n)=>{let o=new i.k;null==t||t.forEach(t=>{var i;let s=t.getRoots()[0].id,a=tg(t,s,o,e,r,n);for(let e=0;e<(null===(i=a.vs)||void 0===i?void 0:i.length);e++){let r=t.getNode(a.vs[e]);r&&(r.data.order=e)}te(t,o,a.vs)})},tx=(t,e)=>{null==e||e.forEach(e=>{null==e||e.forEach((e,r)=>{t.getNode(e).data.order=r})})},tb=(t,e)=>{let r=t.getAllNodes().filter(e=>{var r;return!(null===(r=t.getChildren(e.id))||void 0===r?void 0:r.length)}),n=r.map(t=>t.data.rank),i=Math.max(...n),o=[];for(let t=0;t{let r=t.getNode(e);r&&!r.data.dummy&&(isNaN(r.data.rank)||(r.data.fixorder=o[r.data.rank].length,o[r.data.rank].push(e)))})},tE=t=>{let e={},r=0,n=i=>{let o=r;t.getChildren(i).forEach(t=>n(t.id)),e[i]={low:o,lim:r++}};return t.getRoots().forEach(t=>n(t.id)),e},tN=(t,e,r,n)=>{var i,o;let s,a;let u=[],d=[],l=Math.min(e[r].low,e[n].low),h=Math.max(e[r].lim,e[n].lim);s=r;do u.push(s=null===(i=t.getParent(s))||void 0===i?void 0:i.id);while(s&&(e[s].low>l||h>e[s].lim));for(a=s,s=n;s&&s!==a;)d.push(s),s=null===(o=t.getParent(s))||void 0===o?void 0:o.id;return{lca:a,path:u.concat(d.reverse())}},tM=(t,e)=>{let r=tE(t);e.forEach(e=>{var n,i;let o=e,s=t.getNode(o),a=s.data.originalEdge;if(!a)return;let u=tN(t,r,a.source,a.target),d=u.path,l=u.lca,h=0,c=d[0],f=!0;for(;o!==a.target;){if(s=t.getNode(o),f){for(;c!==l&&(null===(n=t.getNode(c))||void 0===n?void 0:n.data.maxRank){let r={};return(null==e?void 0:e.length)&&e.reduce((e,n)=>{let i=0,o=0,s=e.length,a=null==n?void 0:n[(null==n?void 0:n.length)-1];return null==n||n.forEach((e,u)=>{var d;let l=tA(t,e),h=l?t.getNode(l.id).data.order:s;(l||e===a)&&(null===(d=n.slice(o,u+1))||void 0===d||d.forEach(e=>{var n;null===(n=t.getPredecessors(e))||void 0===n||n.forEach(n=>{var o;let s=t.getNode(n.id),a=s.data.order;(a{let r={};function n(e,n){let i=JSON.stringify(e.slice(1));n.get(i)||(!function(e,n,i,o,s){var a,u;let d;for(let l=n;l{let n=t.getNode(e.id);n.data.dummy&&(n.data.orders)&&tS(r,e.id,d)}))}(...e),n.set(i,!0))}return(null==e?void 0:e.length)&&e.reduce((e,r)=>{let i,o=-1,s=0,a=new Map;return null==r||r.forEach((u,d)=>{var l;if((null===(l=t.getNode(u))||void 0===l?void 0:l.data.dummy)==="border"){let e=t.getPredecessors(u)||[];e.length&&(n([r,s,d,o,i=t.getNode(e[0].id).data.order],a),s=d,o=i)}n([r,s,r.length,i,e.length],a)}),r}),r},tA=(t,e)=>{var r,n;if(null===(r=t.getNode(e))||void 0===r?void 0:r.data.dummy)return null===(n=t.getPredecessors(e))||void 0===n?void 0:n.find(e=>t.getNode(e.id).data.dummy)},tS=(t,e,r)=>{let n=e,i=r;if(n>i){let t=n;n=i,i=t}let o=t[n];o||(t[n]=o={}),o[i]=!0},tj=(t,e,r)=>{let n=e,i=r;return n>i&&(n=i,i=e),!!t[n]},tO=(t,e,r,n)=>{let i={},o={},s={};return null==e||e.forEach(t=>{null==t||t.forEach((t,e)=>{i[t]=t,o[t]=t,s[t]=e})}),null==e||e.forEach(t=>{let e=-1;null==t||t.forEach(t=>{let a=n(t).map(t=>t.id);if(a.length){a=a.sort((t,e)=>s[t]-s[e]);let n=(a.length-1)/2;for(let u=Math.floor(n),d=Math.ceil(n);u<=d;++u){let n=a[u];o[t]===t&&e{var a;let u={},d=tz(t,e,r,i,o,s),l=s?"borderLeft":"borderRight",h=(t,e)=>{let r=d.getAllNodes(),n=r.pop(),i={};for(;n;)i[n.id]?t(n.id):(i[n.id]=!0,r.push(n),r=r.concat(e(n.id))),n=r.pop()};return h(t=>{u[t]=(d.getRelatedEdges(t,"in")||[]).reduce((t,e)=>Math.max(t,(u[e.source]||0)+e.data.weight),0)},d.getPredecessors.bind(d)),h(e=>{let r=(d.getRelatedEdges(e,"out")||[]).reduce((t,e)=>Math.min(t,(u[e.target]||0)-e.data.weight),Number.POSITIVE_INFINITY),n=t.getNode(e);r!==Number.POSITIVE_INFINITY&&n.data.borderType!==l&&(u[e]=Math.max(u[e],r))},d.getSuccessors.bind(d)),null===(a=Object.values(n))||void 0===a||a.forEach(t=>{u[t]=u[r[t]]}),u},tz=(t,e,r,n,o,s)=>{let a=new i.k,u=tD(n,o,s);return null==e||e.forEach(e=>{let n;null==e||e.forEach(e=>{let i=r[e];if(a.hasNode(i)||a.addNode({id:i,data:{}}),n){let o=r[n],s=a.getRelatedEdges(o,"out").find(t=>t.target===i);s?a.updateEdgeData(s.id,Object.assign(Object.assign({},s.data),{weight:Math.max(u(t,e,n),s.data.weight||0)})):a.addEdge({id:`e${Math.random()}`,source:o,target:i,data:{weight:Math.max(u(t,e,n),0)}})}n=e})}),a},tI=(t,e)=>R(Object.values(e),e=>{var r;let n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return null===(r=Object.keys(e))||void 0===r||r.forEach(r=>{let o=e[r],s=tP(t,r)/2;n=Math.max(o+s,n),i=Math.min(o-s,i)}),n-i}),tC=(t,e)=>{let r={};return Object.keys(t.ul).forEach(n=>{if(e)r[n]=t[e.toLowerCase()][n];else{let e=Object.values(t).map(t=>t[n]);r[n]=(e[0]+e[1])/2}}),r},tD=(t,e,r)=>(n,i,o)=>{let s;let a=n.getNode(i),u=n.getNode(o),d=0;if(s=0+a.data.width/2,a.data.hasOwnProperty("labelpos"))switch((a.data.labelpos||"").toLowerCase()){case"l":d=-a.data.width/2;break;case"r":d=a.data.width/2}if(d&&(s+=r?d:-d),d=0,s+=(a.data.dummy?e:t)/2+(u.data.dummy?e:t)/2+u.data.width/2,u.data.labelpos)switch((u.data.labelpos||"").toLowerCase()){case"l":d=u.data.width/2;break;case"r":d=-u.data.width/2}return d&&(s+=r?d:-d),d=0,s},tP=(t,e)=>t.getNode(e).data.width||0,tT=(t,e)=>{let{ranksep:r=0}=e||{},n=_(t),i=0;null==n||n.forEach(e=>{let n=e.map(e=>t.getNode(e).data.height),o=Math.max(...n,0);null==e||e.forEach(e=>{t.getNode(e).data.y=i+o/2}),i+=o+r})},tL=(t,e)=>{let{align:r,nodesep:n=0,edgesep:i=0}=e||{},o=_(t),s=Object.assign(t_(t,o),tk(t,o)),a={},u=[];["u","d"].forEach(e=>{u="u"===e?o:Object.values(o).reverse(),["l","r"].forEach(r=>{"r"===r&&(u=u.map(t=>Object.values(t).reverse()));let o=("u"===e?t.getPredecessors:t.getSuccessors).bind(t),d=tO(t,u,s,o),l=tR(t,u,d.root,d.align,n,i,"r"===r);"r"===r&&Object.keys(l).forEach(t=>l[t]=-l[t]),a[e+r]=l})});let d=tI(t,a);return d&&function(t,e){let r=Object.values(e),n=Math.min(...r),i=Math.max(...r);["u","d"].forEach(r=>{["l","r"].forEach(o=>{let s;let a=r+o,u=t[a];if(u===e)return;let d=Object.values(u);(s="l"===o?n-Math.min(...d):i-Math.max(...d))&&(t[a]={},Object.keys(u).forEach(e=>{t[a][e]=u[e]+s}))})})}(a,d),tC(a,r)},tF=(t,e)=>{var r;let n=E(t);tT(n,e);let i=tL(n,e);null===(r=Object.keys(i))||void 0===r||r.forEach(t=>{n.getNode(t).data.x=i[t]})},tq=t=>{let e={},r=n=>{var i;let o;let s=t.getNode(n);return s?e[n]?s.data.rank:(e[n]=!0,null===(i=t.getRelatedEdges(n,"out"))||void 0===i||i.forEach(t=>{let e=r(t.target),n=t.data.minlen,i=e-n;i&&(void 0===o||i0===t.getRelatedEdges(e.id,"in").length).forEach(t=>r(t.id))},tZ=t=>{let e;let r={},n=i=>{var o;let s;let a=t.getNode(i);return a?r[i]?a.data.rank:(r[i]=!0,null===(o=t.getRelatedEdges(i,"out"))||void 0===o||o.forEach(t=>{let e=n(t.target),r=t.data.minlen,i=e-r;i&&(void 0===s||i0===t.getRelatedEdges(e.id,"in").length).forEach(t=>{t&&n(t.id)}),void 0===e&&(e=0);let i={},o=(e,r)=>{var n;let s=t.getNode(e),a=isNaN(s.data.layer)?r:s.data.layer;(void 0===s.data.rank||s.data.rank{o(t.target,a+t.data.minlen)}))};t.getAllNodes().forEach(t=>{let r=t.data;r&&(isNaN(r.layer)?r.rank-=e:o(t.id,r.layer))})},tG=(t,e)=>t.getNode(e.target).data.rank-t.getNode(e.source).data.rank-e.data.minlen,tV=t=>{let e,r;let n=new i.k({tree:[]}),o=t.getAllNodes()[0],s=t.getAllNodes().length;for(n.addNode(o);tU(n,t){let r=n=>{e.getRelatedEdges(n,"both").forEach(i=>{let o=i.source,s=n===o?i.target:o;t.hasNode(s)||tG(e,i)||(t.addNode({id:s,data:{}}),t.addEdge({id:i.id,source:n,target:s,data:{}}),r(s))})};return t.getAllNodes().forEach(t=>r(t.id)),t.getAllNodes().length},t$=t=>{let e,r;let n=new i.k({tree:[]}),o=t.getAllNodes()[0],s=t.getAllNodes().length;for(n.addNode(o);tB(n,t){let r=n=>{var i;null===(i=e.getRelatedEdges(n,"both"))||void 0===i||i.forEach(i=>{let o=i.source,s=n===o?i.target:o;t.hasNode(s)||void 0===e.getNode(s).data.layer&&tG(e,i)||(t.addNode({id:s,data:{}}),t.addEdge({id:i.id,source:n,target:s,data:{}}),r(s))})};return t.getAllNodes().forEach(t=>r(t.id)),t.getAllNodes().length},tW=(t,e)=>R(e.getAllEdges(),r=>t.hasNode(r.source)!==t.hasNode(r.target)?tG(e,r):1/0),tY=(t,e,r)=>{t.getAllNodes().forEach(t=>{let n=e.getNode(t.id);n.data.rank||(n.data.rank=0),n.data.rank+=r})},tH=t=>{let e,r;let n=b(t);tq(n);let i=tV(n);for(tX(i),tJ(i,n);e=t1(i);)r=t2(i,n,e),t3(i,n,e,r)},tJ=(t,e)=>{let r=I(t,t.getAllNodes(),"post",!1);(r=r.slice(0,(null==r?void 0:r.length)-1)).forEach(r=>{tK(t,e,r)})},tK=(t,e,r)=>{let n=t.getNode(r),i=n.data.parent,o=t.getRelatedEdges(r,"both").find(t=>t.target===i||t.source===i);o.data.cutvalue=tQ(t,e,r)},tQ=(t,e,r)=>{let n=t.getNode(r),i=n.data.parent,o=!0,s=e.getRelatedEdges(r,"out").find(t=>t.target===i),a=0;return s||(o=!1,s=e.getRelatedEdges(i,"out").find(t=>t.target===r)),a=s.data.weight,e.getRelatedEdges(r,"both").forEach(e=>{let n=e.source===r,s=n?e.target:e.source;if(s!==i){let i=n===o,u=e.data.weight;if(a+=i?u:-u,t6(t,r,s)){let e=t.getRelatedEdges(r,"both").find(t=>t.source===s||t.target===s).data.cutvalue;a+=i?-e:e}}}),a},tX=(t,e=t.getAllNodes()[0].id)=>{t0(t,{},1,e)},t0=(t,e,r,n,i)=>{var o;let s=r,a=t.getNode(n);return e[n]=!0,null===(o=t.getNeighbors(n))||void 0===o||o.forEach(r=>{e[r.id]||(s=t0(t,e,s,r.id,n))}),a.data.low=r,a.data.lim=s++,i?a.data.parent=i:delete a.data.parent,s},t1=t=>t.getAllEdges().find(t=>t.data.cutvalue<0),t2=(t,e,r)=>{let n=r.source,i=r.target;e.getRelatedEdges(n,"out").find(t=>t.target===i)||(n=r.target,i=r.source);let o=t.getNode(n),s=t.getNode(i),a=o,u=!1;o.data.lim>s.data.lim&&(a=s,u=!0);let d=e.getAllEdges().filter(e=>u===t4(t.getNode(e.source),a)&&u!==t4(t.getNode(e.target),a));return R(d,t=>tG(e,t))},t3=(t,e,r,n)=>{let i=t.getRelatedEdges(r.source,"both").find(t=>t.source===r.target||t.target===r.target);i&&t.removeEdge(i.id),t.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),tX(t),tJ(t,e),t8(t,e)},t8=(t,e)=>{let r=t.getAllNodes().find(t=>!t.data.parent),n=I(t,r,"pre",!1);(n=n.slice(1)).forEach(r=>{let n=t.getNode(r).data.parent,i=e.getRelatedEdges(r,"out").find(t=>t.target===n),o=!1;!i&&e.hasNode(n)&&(i=e.getRelatedEdges(n,"out").find(t=>t.target===r),o=!0),e.getNode(r).data.rank=(e.hasNode(n)&&e.getNode(n).data.rank||0)+(o?null==i?void 0:i.data.minlen:-(null==i?void 0:i.data.minlen))})},t6=(t,e,r)=>t.getRelatedEdges(e,"both").find(t=>t.source===r||t.target===r),t4=(t,e)=>e.data.low<=t.data.lim&&t.data.lim<=e.data.lim,t7=(t,e)=>{switch(e){case"network-simplex":et(t);break;case"tight-tree":default:t9(t);break;case"longest-path":t5(t)}},t5=tq,t9=t=>{tZ(t),t$(t)},et=t=>{tH(t)},ee=(t,e)=>{let r;let{edgeLabelSpace:n,keepNodeOrder:i,prevGraph:o,rankdir:s,ranksep:a}=e;!i&&o&&en(t,o);let u=el(t);n&&(e.ranksep=eh(u,{rankdir:s,ranksep:a}));try{r=er(u,e)}catch(t){if("Not possible to find intersection inside of the rectangle"===t.message){console.error("The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:\n",t);return}throw t}return ei(t,u),r},er=(t,e)=>{let{acyclicer:r,ranker:n,rankdir:i="tb",nodeOrder:o,keepNodeOrder:s,align:a,nodesep:u=50,edgesep:d=20,ranksep:l=50}=e;ex(t),m(t,r);let{nestingRoot:h,nodeRankFactor:c}=U(t);t7(E(t),n),ec(t),A(t,c),Y(t,h),k(t),ef(t),eg(t);let f=[];J(t,f),tM(t,f),C(t),s&&tb(t,o),tv(t,s),eb(t),P(t,i),tF(t,{align:a,nodesep:u,edgesep:d,ranksep:l}),eE(t),ew(t),Q(t,f),ev(t),T(t,i);let{width:g,height:p}=ep(t);return em(t),ey(t),y(t),{width:g,height:p}},en=(t,e)=>{t.getAllNodes().forEach(r=>{let n=t.getNode(r.id);if(e.hasNode(r.id)){let t=e.getNode(r.id);n.data.fixorder=t.data._order,delete t.data._order}else delete n.data.fixorder})},ei=(t,e)=>{t.getAllNodes().forEach(r=>{var n;let i=t.getNode(r.id);if(i){let t=e.getNode(r.id);i.data.x=t.data.x,i.data.y=t.data.y,i.data._order=t.data.order,i.data._rank=t.data.rank,(null===(n=e.getChildren(r.id))||void 0===n?void 0:n.length)&&(i.data.width=t.data.width,i.data.height=t.data.height)}}),t.getAllEdges().forEach(r=>{let n=t.getEdge(r.id),i=e.getEdge(r.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},eo=["width","height","layer","fixorder"],es={width:0,height:0},ea=["minlen","weight","width","height","labeloffset"],eu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ed=["labelpos"],el=t=>{let e=new i.k({tree:[]});return t.getAllNodes().forEach(r=>{let n=eM(t.getNode(r.id).data),i=Object.assign(Object.assign({},es),n),o=eN(i,eo);e.hasNode(r.id)||e.addNode({id:r.id,data:Object.assign({},o)});let s=t.hasTreeStructure("combo")?t.getParent(r.id,"combo"):t.getParent(r.id);null!=s&&(e.hasNode(s.id)||e.addNode(Object.assign({},s)),e.setParent(r.id,s.id))}),t.getAllEdges().forEach(r=>{let n=eM(t.getEdge(r.id).data),i={};null==ed||ed.forEach(t=>{void 0!==n[t]&&(i[t]=n[t])}),e.addEdge({id:r.id,source:r.source,target:r.target,data:Object.assign({},eu,eN(n,ea),i)})}),e},eh=(t,e)=>{let{ranksep:r=0,rankdir:n}=e;return t.getAllNodes().forEach(t=>{isNaN(t.data.layer)||t.data.layer||(t.data.layer=0)}),t.getAllEdges().forEach(t=>{var e;t.data.minlen*=2,(null===(e=t.data.labelpos)||void 0===e?void 0:e.toLowerCase())!=="c"&&("TB"===n||"BT"===n?t.data.width+=t.data.labeloffset:t.data.height+=t.data.labeloffset)}),r/2},ec=t=>{t.getAllEdges().forEach(e=>{if(e.data.width&&e.data.height){let r=t.getNode(e.source),n=t.getNode(e.target),i={e,rank:(n.data.rank-r.data.rank)/2+r.data.rank};x(t,"edge-proxy",i,"_ep")}})},ef=t=>{let e=0;return t.getAllNodes().forEach(r=>{var n,i;r.data.borderTop&&(r.data.minRank=null===(n=t.getNode(r.data.borderTop))||void 0===n?void 0:n.data.rank,r.data.maxRank=null===(i=t.getNode(r.data.borderBottom))||void 0===i?void 0:i.data.rank,e=Math.max(e,r.data.maxRank||-1/0))}),e},eg=t=>{t.getAllNodes().forEach(e=>{"edge-proxy"===e.data.dummy&&(t.getEdge(e.data.e.id).data.labelRank=e.data.rank,t.removeNode(e.id))})},ep=(t,e)=>{let r,n;let i=0,o=0,{marginx:s=0,marginy:a=0}=e||{},u=t=>{if(!t.data)return;let e=t.data.x,s=t.data.y,a=t.data.width,u=t.data.height;isNaN(e)||isNaN(a)||(void 0===r&&(r=e-a/2),r=Math.min(r,e-a/2),i=Math.max(i,e+a/2)),isNaN(s)||isNaN(u)||(void 0===n&&(n=s-u/2),n=Math.min(n,s-u/2),o=Math.max(o,s+u/2))};return t.getAllNodes().forEach(t=>{u(t)}),t.getAllEdges().forEach(t=>{(null==t?void 0:t.data.hasOwnProperty("x"))&&u(t)}),r-=s,n-=a,t.getAllNodes().forEach(t=>{t.data.x-=r,t.data.y-=n}),t.getAllEdges().forEach(t=>{var e;null===(e=t.data.points)||void 0===e||e.forEach(t=>{t.x-=r,t.y-=n}),t.data.hasOwnProperty("x")&&(t.data.x-=r),t.data.hasOwnProperty("y")&&(t.data.y-=n)}),{width:i-r+s,height:o-n+a}},em=t=>{t.getAllEdges().forEach(e=>{let r,n;let i=t.getNode(e.source),o=t.getNode(e.target);e.data.points?(r=e.data.points[0],n=e.data.points[e.data.points.length-1]):(e.data.points=[],r={x:o.data.x,y:o.data.y},n={x:i.data.x,y:i.data.y}),e.data.points.unshift(M(i.data,r)),e.data.points.push(M(o.data,n))})},ev=t=>{t.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch(("l"===t.data.labelpos||"r"===t.data.labelpos)&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset}})},ey=t=>{t.getAllEdges().forEach(t=>{var e;t.data.reversed&&(null===(e=t.data.points)||void 0===e||e.reverse())})},ew=t=>{t.getAllNodes().forEach(e=>{var r,n,i;if(null===(r=t.getChildren(e.id))||void 0===r?void 0:r.length){let r=t.getNode(e.id),o=t.getNode(r.data.borderTop),s=t.getNode(r.data.borderBottom),a=t.getNode(r.data.borderLeft[(null===(n=r.data.borderLeft)||void 0===n?void 0:n.length)-1]),u=t.getNode(r.data.borderRight[(null===(i=r.data.borderRight)||void 0===i?void 0:i.length)-1]);r.data.width=Math.abs((null==u?void 0:u.data.x)-(null==a?void 0:a.data.x))||10,r.data.height=Math.abs((null==s?void 0:s.data.y)-(null==o?void 0:o.data.y))||10,r.data.x=((null==a?void 0:a.data.x)||0)+r.data.width/2,r.data.y=((null==o?void 0:o.data.y)||0)+r.data.height/2}}),t.getAllNodes().forEach(e=>{"border"===e.data.dummy&&t.removeNode(e.id)})},ex=t=>{t.getAllEdges().forEach(e=>{if(e.source===e.target){let r=t.getNode(e.source);r.data.selfEdges||(r.data.selfEdges=[]),r.data.selfEdges.push(e),t.removeEdge(e.id)}})},eb=t=>{let e=_(t);null==e||e.forEach(e=>{let r=0;null==e||e.forEach((e,n)=>{var i;let o=t.getNode(e);o.data.order=n+r,null===(i=o.data.selfEdges)||void 0===i||i.forEach(e=>{x(t,"selfedge",{width:e.data.width,height:e.data.height,rank:o.data.rank,order:n+ ++r,e:e},"_se")}),delete o.data.selfEdges})})},eE=t=>{t.getAllNodes().forEach(e=>{let r=t.getNode(e.id);if("selfedge"===r.data.dummy){let n=t.getNode(r.data.e.source),i=n.data.x+n.data.width/2,o=n.data.y,s=r.data.x-i,a=n.data.height/2;t.hasEdge(r.data.e.id)?t.updateEdgeData(r.data.e.id,r.data.e.data):t.addEdge({id:r.data.e.id,source:r.data.e.source,target:r.data.e.target,data:r.data.e.data}),t.removeNode(e.id),r.data.e.data.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{y:o,x:i+s},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.data.e.data.x=r.data.x,r.data.e.data.y=r.data.y}})},eN=(t,e)=>{let r={};return null==e||e.forEach(e=>{void 0!==t[e]&&(r[e]=+t[e])}),r},eM=(t={})=>{let e={};return Object.keys(t).forEach(r=>{e[r.toLowerCase()]=t[r]}),e};var e_=r(78732),ek=r(98130);let eA={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class eS{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},eA),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let s=Object.assign(Object.assign({},this.options),r),{nodeSize:a,align:u,rankdir:d="TB",ranksep:l,nodesep:h,ranksepFunc:c,nodesepFunc:f,edgeLabelSpace:g,ranker:p,nodeOrder:m,begin:v,controlPoints:y,radial:w,sortByCombo:x,preset:b}=s,E=new i.k({tree:[]}),N=(0,e_.jE)(l||50,c),M=(0,e_.jE)(h||50,f),_=M,k=N;("LR"===d||"RL"===d)&&(_=N,k=M);let A=(0,e_.gl)(a,void 0),S=e.getAllNodes(),j=e.getAllEdges();S.forEach(t=>{let e=A(t),r=k(t),n=_(t),i=e+2*n,s=e+2*r,a=t.data.layer;(0,o.Z)(a)?E.addNode({id:t.id,data:{width:i,height:s,layer:a}}):E.addNode({id:t.id,data:{width:i,height:s}})}),x&&(E.attachTreeStructure("combo"),S.forEach(t=>{let{parentId:e}=t.data;void 0!==e&&E.hasNode(e)&&E.setParent(t.id,e,"combo")})),j.forEach(t=>{E.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||1}})}),(null==b?void 0:b.length)&&(n=new i.k({nodes:b})),ee(E,{prevGraph:n,edgeLabelSpace:g,keepNodeOrder:!!m,nodeOrder:m||[],acyclicer:"greedy",ranker:p,rankdir:d,nodesep:h,align:u});let O=[0,0];if(v){let t=1/0,e=1/0;E.getAllNodes().forEach(r=>{t>r.data.x&&(t=r.data.x),e>r.data.y&&(e=r.data.y)}),E.getAllEdges().forEach(r=>{var n;null===(n=r.data.points)||void 0===n||n.forEach(r=>{t>r.x&&(t=r.x),e>r.y&&(e=r.y)})}),O[0]=v[0]-t,O[1]=v[1]-e}let R="LR"===d||"RL"===d;if(w);else{let t=new Set,e="BT"===d||"RL"===d;E.getAllNodes().forEach(e=>{e.data.x=e.data.x+O[0],e.data.y=e.data.y+O[1],t.add(R?e.data.x:e.data.y)});let r=Array.from(t).sort(e?(t,e)=>e-t:(t,e)=>t-e),n=R?(t,e)=>t.x!==e.x:(t,e)=>t.y!==e.y,i=R?(t,e,r)=>{let n=Math.max(e.y,r.y),i=Math.min(e.y,r.y);return t.filter(t=>t.y<=n&&t.y>=i)}:(t,e,r)=>{let n=Math.max(e.x,r.x),i=Math.min(e.x,r.x);return t.filter(t=>t.x<=n&&t.x>=i)};E.getAllEdges().forEach((t,e)=>{var o;g&&y&&"loop"!==t.data.type&&(t.data.controlPoints=ej(null===(o=t.data.points)||void 0===o?void 0:o.map(({x:t,y:e})=>({x:t+O[0],y:e+O[1]})),E.getNode(t.source),E.getNode(t.target),r,R,n,i))})}let z=[];z=E.getAllNodes().map(t=>(0,ek.u)(t));let I=E.getAllEdges();t&&(z.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),I.forEach(t=>{e.mergeEdgeData(t.id,{controlPoints:t.data.controlPoints})}));let C={nodes:z,edges:I};return C})}}let ej=(t,e,r,n,i,o,s)=>{let a=(null==t?void 0:t.slice(1,t.length-1))||[];if(e&&r){let{x:t,y:u}=e.data,{x:d,y:l}=r.data;if(i&&(t=e.data.y,u=e.data.x,d=r.data.y,l=r.data.x),l!==u&&t!==d){let h=n.indexOf(u),c=n[h+1];if(c){let t=a[0],e=i?{x:(u+c)/2,y:(null==t?void 0:t.y)||d}:{x:(null==t?void 0:t.x)||d,y:(u+c)/2};(!t||o(t,e))&&a.unshift(e)}let f=n.indexOf(l),g=Math.abs(f-h);if(1===g)(a=s(a,e.data,r.data)).length||a.push(i?{x:(u+l)/2,y:t}:{x:t,y:(u+l)/2});else if(g>1){let e=n[f-1];if(e){let r=a[a.length-1],n=i?{x:(l+e)/2,y:(null==r?void 0:r.y)||d}:{x:(null==r?void 0:r.x)||t,y:(l+e)/2};(!r||o(r,n))&&a.push(n)}}}}return a}},63795:function(t,e,r){"use strict";r.d(e,{S:function(){return u}});var n=r(97582),i=r(78732),o=r(98130),s=r(20464);let a={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class u{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},a),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{width:a,height:u,center:h,divisions:c,startAngle:f=0,endAngle:g=2*Math.PI,angleRatio:p,ordering:m,clockwise:v,nodeSpacing:y,nodeSize:w}=n,x=e.getAllNodes(),b=e.getAllEdges(),[E,N,M]=l(a,u,h),_=null==x?void 0:x.length;if(!_||1===_)return(0,s.P)(e,t,M);let{radius:k,startRadius:A,endRadius:S}=n;if(y){let t=(0,i.jE)(10,y),e=(0,i.tO)(10,w),r=-1/0;x.forEach(t=>{let n=e(t);r{0===i?n+=r||10:n+=(t(e)||0)+(r||10)}),k=n/(2*Math.PI)}else k||A||S?!A&&S?A=S:A&&!S&&(S=A):k=Math.min(N,E)/2;let j=(g-f)/_*p,O=[];O="topology"===m?d(e,x):"topology-directed"===m?d(e,x,!0):"degree"===m?function(t,e){let r=[];return e.forEach((t,e)=>{r.push((0,o.u)(t))}),r.sort((e,r)=>t.getDegree(e.id,"both")-t.getDegree(r.id,"both")),r}(e,x):x.map(t=>(0,o.u)(t));let R=Math.ceil(_/c);for(let t=0;t<_;++t){let e=k;e||null===A||null===S||(e=A+t*(S-A)/(_-1)),e||(e=10+100*t/(_-1));let r=f+t%R*j+2*Math.PI/c*Math.floor(t/R);v||(r=g-t%R*j-2*Math.PI/c*Math.floor(t/R)),O[t].data.x=M[0]+Math.cos(r)*e,O[t].data.y=M[1]+Math.sin(r)*e}t&&O.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})});let z={nodes:O,edges:b};return z})}}let d=(t,e,r=!1)=>{let n=[(0,o.u)(e[0])],i={},s=e.length;i[e[0].id]=!0;let a=0;return e.forEach((u,d)=>{if(0!==d){if((d===s-1||t.getDegree(u.id,"both")!==t.getDegree(e[d+1].id,"both")||t.areNeighbors(n[a].id,u.id))&&!i[u.id])n.push((0,o.u)(u)),i[u.id]=!0,a++;else{let d=r?t.getSuccessors(n[a].id):t.getNeighbors(n[a].id),l=!1;for(let e=0;e{let n=t,i=e,o=r;return n||"undefined"==typeof window||(n=window.innerWidth),i||"undefined"==typeof window||(i=window.innerHeight),o||(o=[n/2,i/2]),[n,i,o]}},39233:function(t,e,r){"use strict";r.d(e,{u:function(){return m}});var n=r(97582),i=r(72137),o=r(61035),s=r(38027),a=r(97653),u=r(5192),d=r(12368),l=r(64912),h=r(80628),c=r(85087),f=r(20464);let g={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},p={center:[0,0],comboPadding:10,treeKey:"combo"};class m{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},p),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let o=this.initVals(Object.assign(Object.assign({},this.options),r)),{center:s,treeKey:a,outerLayout:c}=o,p=e.getAllNodes().filter(t=>!t.data._isCombo),m=e.getAllNodes().filter(t=>t.data._isCombo),v=e.getAllEdges(),y=null==p?void 0:p.length;if(!y||1===y)return(0,f.P)(e,t,s);let w=[],x=new Map;p.forEach(t=>{x.set(t.id,t)});let b=new Map;m.forEach(t=>{b.set(t.id,t)});let E=new Map,N=this.getInnerGraphs(e,a,x,b,v,o,E);yield Promise.all(N);let M=new Map,_=[],k=new Map,A=!0;e.getRoots(a).forEach(t=>{let r=E.get(t.id),n=b.get(t.id)||x.get(t.id),i={id:t.id,data:Object.assign(Object.assign({},t.data),{x:r.data.x||n.data.x,y:r.data.y||n.data.y,fx:r.data.fx||n.data.fx,fy:r.data.fy||n.data.fy,mass:r.data.mass||n.data.mass,size:r.data.size})};_.push(i),M.set(t.id,!0),isNaN(i.data.x)||0===i.data.x||isNaN(i.data.y)||0===i.data.y?(i.data.x=100*Math.random(),i.data.y=100*Math.random()):A=!1,(0,h._)(e,[t],e=>{e.id!==t.id&&k.set(e.id,t.id)},"TB",a)});let S=[];if(v.forEach(t=>{let e=k.get(t.source)||t.source,r=k.get(t.target)||t.target;e!==r&&M.has(e)&&M.has(r)&&S.push({id:t.id,source:e,target:r,data:{}})}),null==_?void 0:_.length){if(1===_.length)_[0].data.x=s[0],_[0].data.y=s[1];else{let t=new i.k({nodes:_,edges:S}),e=c||new d.y;if(A&&g[e.id]){let e=_.length<100?new l.A:new u.W;yield e.assign(t)}n=yield e.execute(t,Object.assign({center:s,kg:5,preventOverlap:!0,animate:!1},"force"===e.id?{gravity:1,factor:4,linkDistance:(t,e,r)=>{let n=Math.max(...e.data.size)||32,i=Math.max(...r.data.size)||32;return n/2+i/2+200}}:{}))}E.forEach(t=>{var e;let r=n.nodes.find(e=>e.id===t.id);if(r){let{x:e,y:n}=r.data;t.data.visited=!0,t.data.x=e,t.data.y=n,w.push({id:t.id,data:{x:e,y:n}})}let{x:i,y:o}=t.data;null===(e=t.data.nodes)||void 0===e||e.forEach(t=>{w.push({id:t.id,data:{x:t.data.x+i,y:t.data.y+o}})})}),E.forEach(({data:t})=>{let{x:e,y:r,visited:n,nodes:i}=t;null==i||i.forEach(t=>{if(!n){let n=w.find(e=>e.id===t.id);n.data.x+=e||0,n.data.y+=r||0}})})}return t&&w.forEach(t=>{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),{nodes:w,edges:v}})}initVals(t){let e,r,n;let i=Object.assign({},t),{nodeSize:u,spacing:d,comboPadding:l}=t;if(r=(0,o.Z)(d)?()=>d:(0,s.Z)(d)?d:()=>0,i.spacing=r,u){if((0,s.Z)(u))e=t=>{let e=u(t),n=r(t);if((0,c.k)(t.size)){let e=t.size[0]>t.size[1]?t.size[0]:t.size[1];return(e+n)/2}return((e||32)+n)/2};else if((0,c.k)(u)){let t=u[0]>u[1]?u[0]:u[1],n=t/2;e=t=>n+r(t)/2}else{let t=u/2;e=e=>t+r(e)/2}}else e=t=>{let e=r(t);if(t.size){if((0,c.k)(t.size)){let r=t.size[0]>t.size[1]?t.size[0]:t.size[1];return(r+e)/2}if((0,a.Z)(t.size)){let r=t.size.width>t.size.height?t.size.width:t.size.height;return(r+e)/2}return(t.size+e)/2}return 32+e/2};return i.nodeSize=e,n=(0,o.Z)(l)?()=>l:(0,c.k)(l)?()=>Math.max.apply(null,l):(0,s.Z)(l)?l:()=>0,i.comboPadding=n,i}getInnerGraphs(t,e,r,s,a,d,l){let{nodeSize:f,comboPadding:g,spacing:p,innerLayout:m}=d,v=m||new u.W({}),y={center:[0,0],preventOverlap:!0,nodeSpacing:p},w=[],x=t=>{let e=(null==g?void 0:g(t))||10;return(0,c.k)(e)&&(e=Math.max(...e)),{size:e?[2*e,2*e]:[30,30],padding:e}};return t.getRoots(e).forEach(u=>{l.set(u.id,{id:u.id,data:{nodes:[],size:x(u).size}});let d=Promise.resolve();(0,h._)(t,[u],u=>{var c;if(!u.data._isCombo)return;let{size:g,padding:p}=x(u);if(null===(c=t.getChildren(u.id,e))||void 0===c?void 0:c.length){let c=l.get(u.id);l.set(u.id,{id:u.id,data:Object.assign({nodes:[]},null==c?void 0:c.data)});let g=new Map,m=t.getChildren(u.id,e).map(t=>{if(t.data._isCombo)return l.has(t.id)||l.set(t.id,{id:t.id,data:Object.assign({},t.data)}),g.set(t.id,!0),l.get(t.id);let e=r.get(t.id)||s.get(t.id);return g.set(t.id,!0),{id:t.id,data:Object.assign(Object.assign({},e.data),t.data)}}),w={nodes:m,edges:a.filter(t=>g.has(t.source)&&g.has(t.target))},x=1/0;m.forEach(t=>{var e;let{size:r}=t.data;r||(r=(null===(e=l.get(t.id))||void 0===e?void 0:e.data.size)||(null==f?void 0:f(t))||[30,30]),(0,o.Z)(r)&&(r=[r,r]);let[n,i]=r;x>n&&(x=n),x>i&&(x=i),t.data.size=r}),d=d.then(()=>(0,n.mG)(this,void 0,void 0,function*(){let t=new i.k(w),e=yield v.assign(t,y),{minX:r,minY:n,maxX:o,maxY:s}=(0,h.H0)(m),a={x:(o+r)/2,y:(s+n)/2};w.nodes.forEach(t=>{t.data.x-=a.x,t.data.y-=a.y});let d=[Math.max(o-r,x)+2*p,Math.max(s-n,x)+2*p];return l.get(u.id).data.size=d,l.get(u.id).data.nodes=m,e}))}else l.set(u.id,{id:u.id,data:Object.assign(Object.assign({},u.data),{size:g})});return!0},"BT",e),w.push(d)}),w}}},5192:function(t,e,r){"use strict";r.d(e,{W:function(){return c}});var n=r(97582),i=r(38027),o=r(61035),s=r(97653),a=r(52940),u=r(85087),d=r(98130),l=r(20464);let h={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:1.5*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class c{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},h),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let h=Object.assign(Object.assign({},this.options),r),{center:c,width:f,height:g,sortBy:p,maxLevelDiff:m,sweep:v,clockwise:y,equidistant:w,preventOverlap:x,startAngle:b=1.5*Math.PI,nodeSize:E,nodeSpacing:N}=h,M=e.getAllNodes(),_=e.getAllEdges(),k=f||"undefined"==typeof window?f:window.innerWidth,A=g||"undefined"==typeof window?g:window.innerHeight,S=c||[k/2,A/2];if(!(null==M?void 0:M.length)||1===M.length)return(0,l.P)(e,t,S);let j=[],O=0;(0,u.k)(E)?n=Math.max(E[0],E[1]):(0,i.Z)(E)?(n=-1/0,M.forEach(t=>{let e=E(t);e>n&&(n=e)})):n=E,(0,u.k)(N)?O=Math.max(N[0],N[1]):(0,o.Z)(N)&&(O=N),M.forEach(t=>{let e=(0,d.u)(t);j.push(e);let r=n,{data:a}=e;(0,u.k)(a.size)?r=Math.max(a.size[0],a.size[1]):(0,o.Z)(a.size)?r=a.size:(0,s.Z)(a.size)&&(r=Math.max(a.size.width,a.size.height)),n=Math.max(n,r),(0,i.Z)(N)&&(O=Math.max(N(t),O))});let R={};j.forEach((t,e)=>{R[t.id]=e});let z=p;(0,a.Z)(z)&&void 0!==j[0].data[z]||(z="degree"),"degree"===z?j.sort((t,r)=>e.getDegree(r.id,"both")-e.getDegree(t.id,"both")):j.sort((t,e)=>e.data[z]-t.data[z]);let I=j[0],C=(m||("degree"===z?e.getDegree(I.id,"both"):I.data[z]))/4,D=[{nodes:[]}],P=D[0];j.forEach(t=>{if(P.nodes.length>0){let r="degree"===z?Math.abs(e.getDegree(P.nodes[0].id,"both")-e.getDegree(t.id,"both")):Math.abs(P.nodes[0].data[z]-t.data[z]);C&&r>=C&&(P={nodes:[]},D.push(P))}P.nodes.push(t)});let T=n+O;if(!x){let t=D.length>0&&D[0].nodes.length>1,e=Math.min(k,A)/2-T,r=e/(D.length+(t?1:0));T=Math.min(T,r)}let L=0;if(D.forEach(t=>{let e=void 0===v?2*Math.PI-2*Math.PI/t.nodes.length:v;if(t.dTheta=e/Math.max(1,t.nodes.length-1),t.nodes.length>1&&x){let e=Math.cos(t.dTheta)-1,r=Math.sin(t.dTheta)-0,n=Math.sqrt(T*T/(e*e+r*r));L=Math.max(n,L)}t.r=L,L+=T}),w){let t=0,e=0;for(let r=0;r{0===n&&(e=r.r||0),r.r=e,e+=t})}return D.forEach(t=>{let e=t.dTheta||0,r=t.r||0;t.nodes.forEach((t,n)=>{let i=b+(y?1:-1)*e*n;t.data.x=S[0]+r*Math.cos(i),t.data.y=S[1]+r*Math.sin(i)})}),t&&j.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:j,edges:_}})}}},63330:function(t,e,r){"use strict";r.d(e,{j:function(){return _}});var n=r(97582),i=r(59145),o=r(19782),s=function(t){if(!("object"==typeof t&&null!==t)||!(0,o.Z)(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},a=function(t){for(var e=[],r=1;ru.index){var p=d-a.x-a.vx,m=l-a.y-a.vy,y=p*p+m*m;yd+g||ol+g||st.r&&(t.r=t[e].r)}function u(){if(e){var n,i,o=e.length;for(n=0,r=Array(o);nt.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},a(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){let r=this.context.nodes.find(e=>e.id===t);r&&e.forEach((t,e)=>{if("number"==typeof t||null===t){let n=["fx","fy","fz"][e];r[n]=t}})}getOptions(t){var e,r;let n=a({},this.options,t);return n.collide&&(null===(e=n.collide)||void 0===e?void 0:e.radius)===void 0&&(n.collide=n.collide||{},n.collide.radius=null!==(r=n.nodeSize)&&void 0!==r?r:10),void 0===n.iterations&&(n.link&&void 0===n.link.iterations&&(n.iterations=n.link.iterations),n.collide&&void 0===n.collide.iterations&&(n.iterations=n.collide.iterations)),this.context.options=n,n}genericLayout(t,e,r){var i;return(0,n.mG)(this,void 0,void 0,function*(){let n=this.getOptions(r),o=e.getAllNodes().map(({id:t,data:e})=>Object.assign({id:t,data:e},h(e,this.config.inputNodeAttrs))),s=e.getAllEdges().map(t=>Object.assign({},t));Object.assign(this.context,{assign:t,nodes:o,edges:s,graph:e});let a=new Promise(t=>{this.resolver=t}),u=this.setSimulation(n);return u.nodes(o),null===(i=u.force("link"))||void 0===i||i.links(s),a})}getResult(){let{assign:t,nodes:e,edges:r,graph:n}=this.context,i=e.map(t=>({id:t.id,data:Object.assign(Object.assign({},t.data),h(t,this.config.outputNodeAttrs))})),o=r.map(({id:t,source:e,target:r,data:n})=>({id:t,source:"object"==typeof e?e.id:e,target:"object"==typeof r?r.id:r,data:n}));return t&&i.forEach(t=>n.mergeNodeData(t.id,t.data)),{nodes:i,edges:o}}initSimulation(){return(0,M.Z)()}setSimulation(t){let e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var e;return null===(e=t.onTick)||void 0===e?void 0:e.call(t,this.getResult())}).on("end",()=>{var t;return null===(t=this.resolver)||void 0===t?void 0:t.call(this,this.getResult())})),k(e,this.config.simulationAttrs.map(e=>[e,t[e]])),Object.entries(this.forceMap).forEach(([r,n])=>{if(t[r]){let i=e.force(r);i||(i=n(),e.force(r,i)),k(i,Object.entries(t[r]))}else e.force(r,null)}),e}}let k=(t,e)=>e.reduce((e,[r,n])=>e[r]&&void 0!==n?e[r].call(t,n):e,t)},51712:function(t,e,r){"use strict";r.d(e,{V:function(){return u}});var n=r(97582),i=r(61035),o=r(38027),s=r(70681),a=r.n(s);class u{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,u.defaultOptions,t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let{nodeSize:u}=r,d=new s.graphlib.Graph;d.setGraph(r),d.setDefaultEdgeLabel(()=>({}));let l=e.getAllNodes(),h=e.getAllEdges();[...l,...h].some(({id:t})=>(0,i.Z)(t))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(t=>{let{id:e}=t,r=Object.assign({},t.data);if(void 0!==u){let[e,n]=function(t){if(!t)return[0,0,0];if((0,i.Z)(t))return[t,t,t];if(0===t.length)return[0,0,0];let[e,r=e,n=e]=t;return[e,r,n]}((0,o.Z)(u)?u(t):u);Object.assign(r,{width:e,height:n})}d.setNode(e.toString(),r)}),e.getAllEdges().forEach(({id:t,source:e,target:r})=>{d.setEdge(e.toString(),r.toString(),{id:t})}),a().layout(d);let c={nodes:[],edges:[]};return d.nodes().forEach(r=>{let n=d.node(r);c.nodes.push({id:r,data:n}),t&&e.mergeNodeData(r,n)}),d.edges().forEach(r=>{let i=d.edge(r),{id:o}=i,s=(0,n._T)(i,["id"]),{v:a,w:u}=r;c.edges.push({id:o,source:a,target:u,data:s}),t&&e.mergeEdgeData(o,s)}),c})}}u.defaultOptions={}},67753:function(t,e,r){"use strict";r.d(e,{E:function(){return p}});var n=r(97582),i=r(72137),o=r(61035),s=r(97653),a=r(38027),u=r(98130),d=r(85087),l=r(20464);class h{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){let e=this.rx-t.rx,r=this.ry-t.ry;return Math.hypot(e,r)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){let e=t.rx-this.rx,r=t.ry-this.ry,n=Math.hypot(e,r);n=n<1e-4?1e-4:n;let i=this.g*(this.degree+1)*(t.degree+1)/n;this.fx+=i*e/n,this.fy+=i*r/n}in(t){return t.contains(this.rx,this.ry)}add(t){let e=this.mass+t.mass,r=(this.rx*this.mass+t.rx*t.mass)/e,n=(this.ry*this.mass+t.ry*t.mass)/e,i=this.degree+t.degree;return new h({rx:r,ry:n,mass:e,degree:i})}}class c{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){let r=this.length/2;return t<=this.xmid+r&&t>=this.xmid-r&&e<=this.ymid+r&&e>=this.ymid-r}NW(){let t=this.xmid-this.length/4,e=this.ymid+this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}NE(){let t=this.xmid+this.length/4,e=this.ymid+this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}SW(){let t=this.xmid-this.length/4,e=this.ymid-this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}SE(){let t=this.xmid+this.length/4,e=this.ymid-this.length/4,r=this.length/2,n=new c({xmid:t,ymid:e,length:r});return n}}class f{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,null!=t&&(this.quad=t)}insert(t){if(null==this.body){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new f(this.quad.NW()),this.NE=new f(this.quad.NE()),this.SW=new f(this.quad.SW()),this.SE=new f(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return null==this.NW&&null==this.NE&&null==this.SW&&null==this.SE}updateForce(t){if(null!=this.body&&t!==this.body){if(this._isExternal())t.addForce(this.body);else{let e=this.quad?this.quad.getLength():0,r=this.body.distanceTo(t);e/r(0,u.u)(t,[a,d])),m=n.filter(t=>{let{source:e,target:r}=t;return e!==r}),v=new i.k({nodes:p,edges:m}),y=this.getSizes(v,e,f);if(this.run(v,e,c,y,t,s),h){for(let t=0;t250&&(r.barnesHut=!0),void 0===a&&e>100&&(r.prune=!0),0!==u||a?0===u&&a&&(r.maxIteration=100,e<=200&&e>100?r.maxIteration=500:e>200&&(r.maxIteration=950)):(r.maxIteration=250,e<=200&&e>100?r.maxIteration=1e3:e>200&&(r.maxIteration=1200)),!d&&(r.kr=50,e>100&&e<=500?r.kr=20:e>500&&(r.kr=1)),!l&&(r.kg=20,e>100&&e<=500?r.kg=10:e>500&&(r.kg=1)),r}run(t,e,r,n,i,o){let{kr:s,barnesHut:a,onTick:u}=o,d=t.getAllNodes(),l=0,c=r,f={},g={},p={};for(let e=0;e0;)l=this.oneStep(t,{iter:c,preventOverlapIters:50,krPrime:100,sg:l,forces:f,preForces:g,bodies:p,sizes:n},o),c--,null==u||u({nodes:d,edges:e.getAllEdges()});return t}oneStep(t,e,r){let{iter:n,preventOverlapIters:i,krPrime:o,sg:s,preForces:a,bodies:u,sizes:d}=e,{forces:l}=e,{preventOverlap:h,barnesHut:c}=r,f=t.getAllNodes();for(let t=0;ti||!h)?this.getOptRepGraForces(t,l,u,r):this.getRepGraForces(t,n,i,l,o,d,r),this.updatePos(t,l,a,s,r)}getAttrForces(t,e,r,n,i,o){let{preventOverlap:s,dissuadeHubs:a,mode:u,prune:d}=o,l=t.getAllEdges();for(let o=0;o0&&(w=y,x=y),i[h][0]+=w*v[0],i[c][0]-=x*v[0],i[h][1]+=w*v[1],i[c][1]-=x*v[1]}return i}getOptRepGraForces(t,e,r,n){let{kg:i,center:o,prune:s}=n,a=t.getAllNodes(),u=a.length,d=9e10,l=-9e10,h=9e10,g=-9e10;for(let e=0;e=t.getDegree(n))&&(r[n].setPos(i.x,i.y),i.x>=l&&(l=i.x),i.x<=d&&(d=i.x),i.y>=g&&(g=i.y),i.y<=h&&(h=i.y))}let p=Math.max(l-d,g-h),m={xmid:(l+d)/2,ymid:(g+h)/2,length:p,massCenter:o,mass:u},v=new c(m),y=new f(v);for(let e=0;e=t.getDegree(n))&&r[n].in(v)&&y.insert(r[n])}for(let n=0;n0&&(v=u*(p+1)*(l+1)/m),n[g.id][0]-=v*f[0],n[s.id][0]+=v*f[0],n[g.id][1]-=v*f[1],n[s.id][1]+=v*f[1]}let m=[g.data.x-l[0],g.data.y-l[1]],v=Math.hypot(m[0],m[1]);m[0]=m[0]/v,m[1]=m[1]/v;let y=d*(p+1);n[g.id][0]-=y*m[0],n[g.id][1]-=y*m[1]}return n}updatePos(t,e,r,n,i){let{ks:s,tao:a,prune:u,ksmax:d}=i,l=t.getAllNodes(),h=l.length,c=[],f=[],g=0,p=0,m=n;for(let n=0;n1.5*v?1.5*v:m);for(let r=0;rg?g:h;let p=h*e[n][0],v=h*e[n][1];t.mergeNodeData(n,{x:i.x+p,y:i.y+v})}return m}}},12368:function(t,e,r){"use strict";r.d(e,{y:function(){return p}});var n=r(97582),i=r(72137),o=r(61035),s=r(97653),a=r(38027),u=r(78732),d=r(85087),l=r(47148),h=r(33953);function c(t){let e=0,r=0,n=0,i=0,o=0,s=t.length;if(s){for(let a=0;a{var a;if((null===(a=t.data)||void 0===a?void 0:a.id)===o.id)return;let u=[r,n,i][s-1],d=o.x-t.x||.1,l=o.y-t.y||.1,h=o.z-t.z||.1,c=[d,l,h],f=u-e,g=0;for(let t=0;tthis.lastOptions.minMovement||e<1)&&ethis.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===this.options.dimensions?t.data.z:void 0})),e}genericForceLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),s=e.getAllNodes(),a=e.getAllEdges(),u=this.formatOptions(n,e),{dimensions:d,width:l,height:h,nodeSize:c,getMass:f,nodeStrength:g,edgeStrength:p,linkDistance:m}=u,v=s.map((t,e)=>Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{x:(0,o.Z)(t.data.x)?t.data.x:Math.random()*l,y:(0,o.Z)(t.data.y)?t.data.y:Math.random()*h,z:(0,o.Z)(t.data.z)?t.data.z:Math.random()*Math.sqrt(l*h),size:c(t)||30,mass:f(t),nodeStrength:g(t)})})),y=a.map(t=>Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{edgeStrength:p(t),linkDistance:m(t,e.getNode(t.source),e.getNode(t.target))})}));if(!(null==s?void 0:s.length))return this.lastResult={nodes:[],edges:a},{nodes:[],edges:a};let w={};s.forEach((t,e)=>{w[t.id]={x:0,y:0,z:0}});let b=new i.k({nodes:v,edges:y});this.formatCentripetal(u,b);let{maxIteration:E,minMovement:N,onTick:M}=u;if(this.lastLayoutNodes=v,this.lastLayoutEdges=y,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=b,this.lastOptions=u,this.lastVelMap=w,"undefined"==typeof window)return;let _=0;return new Promise(r=>{this.timeInterval=window.setInterval(()=>{s&&this.running||r({nodes:x(e,v),edges:a}),this.runOneStep(b,e,_,w,u),this.updatePosition(e,b,w,u),t&&v.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===d?t.data.z:void 0})),null==M||M({nodes:x(e,v),edges:a}),(++_>=E||this.judgingDistance{let r=1;(0,o.Z)(null==t?void 0:t.data.mass)&&(r=null==t?void 0:t.data.mass);let n=e.getDegree(t.id,"both");return!n||n<5?r:5*n*r});let f=(0,u.jE)(0,t.nodeSpacing);r=c?(0,a.Z)(c)?t=>c(t)+f(t):(0,d.k)(c)?t=>Math.max(c[0],c[1])+f(t):t=>c+f(t):t=>{let{size:e}=(null==t?void 0:t.data)||{};return e?(0,d.k)(e)?Math.max(e[0],e[1])+f(t):(0,s.Z)(e)?Math.max(e.width,e.height)+f(t):e+f(t):10+f(t)},n.nodeSize=r;let g=t.linkDistance?(0,u.jE)(1,t.linkDistance):t=>1+n.nodeSize(e.getNode(t.source))+n.nodeSize(e.getNode(t.target));return n.linkDistance=g,n.nodeStrength=(0,u.jE)(1,t.nodeStrength),n.edgeStrength=(0,u.jE)(1,t.edgeStrength),n}formatCentripetal(t,e){let r,n;let{dimensions:i,centripetalOptions:o,center:s,clusterNodeStrength:a,leafCluster:u,clustering:d,nodeClusterBy:l}=t,h=e.getAllNodes(),c=o||{leaf:2,single:2,others:1,center:t=>({x:s[0],y:s[1],z:3===i?s[2]:void 0})};if("function"!=typeof a&&(t.clusterNodeStrength=t=>a),u&&l&&(r=m(e,l),n=Array.from(new Set(null==h?void 0:h.map(t=>t.data[l])))||[],t.centripetalOptions=Object.assign(c,{single:100,leaf:e=>{let{siblingLeaves:i,sameTypeLeaves:o}=r[e.id]||{};return(null==o?void 0:o.length)===(null==i?void 0:i.length)||(null==n?void 0:n.length)===1?1:t.clusterNodeStrength(e)},others:1,center:t=>{let n;let i=e.getDegree(t.id,"both");if(!i)return{x:100,y:100,z:0};if(1===i){let{sameTypeLeaves:e=[]}=r[t.id]||{};1===e.length?n=void 0:e.length>1&&(n=w(e))}else n=void 0;return{x:null==n?void 0:n.x,y:null==n?void 0:n.y,z:null==n?void 0:n.z}}})),d&&l){r||(r=m(e,l)),n||(n=Array.from(new Set(h.map(t=>t.data[l])))),n=n.filter(t=>void 0!==t);let i={};n.forEach(t=>{let r=h.filter(e=>e.data[l]===t).map(t=>e.getNode(t.id));i[t]=w(r)}),t.centripetalOptions=Object.assign(c,{single:e=>t.clusterNodeStrength(e),leaf:e=>t.clusterNodeStrength(e),others:e=>t.clusterNodeStrength(e),center:t=>{let e=i[t.data[l]];return{x:null==e?void 0:e.x,y:null==e?void 0:e.y,z:null==e?void 0:e.z}}})}let{leaf:f,single:g,others:p}=t.centripetalOptions||{};f&&"function"!=typeof f&&(t.centripetalOptions.leaf=()=>f),g&&"function"!=typeof g&&(t.centripetalOptions.single=()=>g),p&&"function"!=typeof p&&(t.centripetalOptions.others=()=>p)}runOneStep(t,e,r,n,i){let o={},s=t.getAllNodes(),a=t.getAllEdges();if(!(null==s?void 0:s.length))return;let{monitor:u}=i;if(this.calRepulsive(t,o,i),a&&this.calAttractive(t,o,i),this.calGravity(t,e,o,i),this.updateVelocity(t,o,n,i),u){let t=this.calTotalEnergy(o,s);u({energy:t,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:r})}}calTotalEnergy(t,e){if(!(null==e?void 0:e.length))return 0;let r=0;return e.forEach((e,n)=>{let i=t[e.id].x,o=t[e.id].y,s=3===this.options.dimensions?t[e.id].z:0,{mass:a=1}=e.data;r+=a*(i*i+o*o+s*s)*.5}),r}calRepulsive(t,e,r){let{dimensions:n,factor:i,coulombDisScale:o}=r;!function(t,e,r,n,i=2){let o=e/r,s=t.getAllNodes(),a=s.map((t,e)=>{let{nodeStrength:r,x:n,y:i,z:s,size:a}=t.data;return{x:n,y:i,z:s,size:a,index:e,id:t.id,vx:0,vy:0,vz:0,weight:o*r}}),u=(2===i?(0,l.Z)(a,t=>t.x,t=>t.y):(0,h.Z)(a,t=>t.x,t=>t.y,t=>t.z)).visitAfter(c),d=new Map;a.forEach(t=>{d.set(t.id,t),function(t,e,r){e.visit((e,n,i,o,s)=>f(e,n,i,o,s,t,r))}(t,u,i)}),a.map((t,e)=>{let{id:r,data:i}=s[e],{mass:o=1}=i;n[r]={x:t.vx/o,y:t.vy/o,z:t.vz/o}})}(t,i,o*o,e,n)}calAttractive(t,e,r){let{dimensions:n,nodeSize:i}=r;t.getAllEdges().forEach((r,o)=>{let{source:s,target:a}=r,u=t.getNode(s),d=t.getNode(a);if(!u||!d)return;let l=d.data.x-u.data.x,h=d.data.y-u.data.y,c=3===n?d.data.z-u.data.z:0;l||h||(l=.01*Math.random(),h=.01*Math.random(),3!==n||c||(c=.01*Math.random()));let f=Math.sqrt(l*l+h*h+c*c);if(f{let{id:s,data:g}=n,{mass:p,x:m,y:v,z:y}=g,w=e.getNode(s),x=0,b=0,E=0,N=c,M=t.getDegree(s,"in"),_=t.getDegree(s,"out"),k=t.getDegree(s,"both"),A=null==i?void 0:i(w,k);if(A){let[t,e,r]=A;x=m-t,b=v-e,N=r}else x=m-h[0],b=v-h[1],E=y-h[2];if(N&&(r[s].x-=N*x/p,r[s].y-=N*b/p,r[s].z-=N*E/p),f){let{leaf:t,single:e,others:n,center:i}=f,{x:h,y:c,z:g,centerStrength:x}=(null==i?void 0:i(w,a,u,d,l))||{x:0,y:0,z:0,centerStrength:0};if(!(0,o.Z)(h)||!(0,o.Z)(c))return;let b=(m-h)/p,E=(v-c)/p,N=(y-g)/p;if(x&&(r[s].x-=x*b,r[s].y-=x*E,r[s].z-=x*N),0===k){let t=e(w);if(!t)return;r[s].x-=t*b,r[s].y-=t*E,r[s].z-=t*N;return}if(0===M||0===_){let e=t(w,a,u);if(!e)return;r[s].x-=e*b,r[s].y-=e*E,r[s].z-=e*N;return}let A=n(w);if(!A)return;r[s].x-=A*b,r[s].y-=A*E,r[s].z-=A*N}})}updateVelocity(t,e,r,n){let{damping:i,maxSpeed:o,interval:s,dimensions:a}=n,u=t.getAllNodes();(null==u?void 0:u.length)&&u.forEach(t=>{let{id:n}=t,u=(r[n].x+e[n].x*s)*i||.01,d=(r[n].y+e[n].y*s)*i||.01,l=3===a?(r[n].z+e[n].z*s)*i||.01:0,h=Math.sqrt(u*u+d*d+l*l);if(h>o){let t=o/h;u*=t,d*=t,l*=t}r[n]={x:u,y:d,z:l}})}updatePosition(t,e,r,n){let{distanceThresholdMode:i,interval:s,dimensions:a}=n,u=e.getAllNodes();if(!(null==u?void 0:u.length)){this.judgingDistance=0;return}let d=0;"max"===i?this.judgingDistance=-1/0:"min"===i&&(this.judgingDistance=1/0),u.forEach(n=>{let{id:u}=n,l=t.getNode(u);if((0,o.Z)(l.data.fx)&&(0,o.Z)(l.data.fy)){e.mergeNodeData(u,{x:l.data.fx,y:l.data.fy,z:3===a?l.data.fz:void 0});return}let h=r[u].x*s,c=r[u].y*s,f=3===a?r[u].z*s:0;e.mergeNodeData(u,{x:n.data.x+h,y:n.data.y+c,z:n.data.z+f});let g=Math.sqrt(h*h+c*c+f*f);switch(i){case"max":this.judgingDistanceg&&(this.judgingDistance=g);break;default:d+=g}}),i&&"mean"!==i||(this.judgingDistance=d/u.length)}}let m=(t,e)=>{let r=t.getAllNodes();if(!(null==r?void 0:r.length))return{};let n={};return r.forEach((r,i)=>{let o=t.getDegree(r.id,"both");1===o&&(n[r.id]=v(t,"leaf",r,e))}),n},v=(t,e,r,n)=>{let i=t.getDegree(r.id,"in"),o=t.getDegree(r.id,"out"),s=r,a=[];0===i?(s=t.getSuccessors(r.id)[0],a=t.getNeighbors(s.id)):0===o&&(s=t.getPredecessors(r.id)[0],a=t.getNeighbors(s.id)),a=a.filter(e=>0===t.getDegree(e.id,"in")||0===t.getDegree(e.id,"out"));let u=y(t,e,n,r,a);return{coreNode:s,siblingLeaves:a,sameTypeLeaves:u}},y=(t,e,r,n,i)=>{let o=n.data[r]||"",s=(null==i?void 0:i.filter(t=>t.data[r]===o))||[];return"leaf"===e&&(s=s.filter(e=>0===t.getDegree(e.id,"in")||0===t.getDegree(e.id,"out"))),s},w=t=>{let e={x:0,y:0};t.forEach(t=>{let{x:r,y:n}=t.data;e.x+=r||0,e.y+=n||0});let r=t.length||1;return{x:e.x/r,y:e.y/r}},x=(t,e)=>e.map(e=>{let{id:r,data:n}=e,i=t.getNode(r);return Object.assign(Object.assign({},i),{data:Object.assign(Object.assign({},i.data),{x:n.x,y:n.y,z:n.z})})})},89469:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(97582),i=r(72137),o=r(61035),s=r(98130);let a={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"};class u{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},a),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&"undefined"!=typeof window&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let e=0;ethis.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:3===this.options.dimensions?t.data.z:void 0})),e}genericFruchtermanLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){if(this.running)return;let n=this.formatOptions(r),{dimensions:o,width:a,height:u,center:d,clustering:l,nodeClusterBy:h,maxIteration:c,onTick:f}=n,g=e.getAllNodes(),p=e.getAllEdges();if(!(null==g?void 0:g.length)){let t={nodes:[],edges:p};return this.lastResult=t,t}if(1===g.length){t&&e.mergeNodeData(g[0].id,{x:d[0],y:d[1],z:3===o?d[2]:void 0});let r={nodes:[Object.assign(Object.assign({},g[0]),{data:Object.assign(Object.assign({},g[0].data),{x:d[0],y:d[1],z:3===o?d[2]:void 0})})],edges:p};return this.lastResult=r,r}let m=g.map(t=>(0,s.u)(t,[a,u])),v=new i.k({nodes:m,edges:p}),y={};if(l&&m.forEach(t=>{let e=t.data[h];y[e]||(y[e]={name:e,cx:0,cy:0,count:0})}),this.lastLayoutNodes=m,this.lastLayoutEdges=p,this.lastAssign=t,this.lastGraph=v,this.lastOptions=n,this.lastClusterMap=y,"undefined"==typeof window)return;let w=0;return new Promise(r=>{this.timeInterval=window.setInterval(()=>{if(!this.running){r({nodes:m,edges:p});return}this.runOneStep(v,y,n),t&&m.forEach(({id:t,data:r})=>e.mergeNodeData(t,{x:r.x,y:r.y,z:3===o?r.z:void 0})),null==f||f({nodes:m,edges:p}),++w>=c&&(window.clearInterval(this.timeInterval),r({nodes:m,edges:p}))},0),this.running=!0})})}formatOptions(t={}){let e=Object.assign(Object.assign({},this.options),t),{clustering:r,nodeClusterBy:n}=e,{center:i,width:o,height:s}=e;return e.width=o||"undefined"==typeof window?o:window.innerWidth,e.height=s||"undefined"==typeof window?s:window.innerHeight,e.center=i||[e.width/2,e.height/2],e.clustering=r&&!!n,e}runOneStep(t,e,r){let{dimensions:n,height:i,width:s,gravity:a,center:u,speed:d,clustering:l,nodeClusterBy:h,clusterGravity:c}=r,f=i*s,g=Math.sqrt(f)/10,p=t.getAllNodes(),m=f/(p.length+1),v=Math.sqrt(m),y={};if(this.applyCalculate(t,y,v,m),l){for(let t in e)e[t].cx=0,e[t].cy=0,e[t].count=0;for(let t in p.forEach(t=>{let{data:r}=t,n=e[r[h]];(0,o.Z)(r.x)&&(n.cx+=r.x),(0,o.Z)(r.y)&&(n.cy+=r.y),n.count++}),e)e[t].cx/=e[t].count,e[t].cy/=e[t].count;let t=c||a;p.forEach((r,n)=>{let{id:i,data:s}=r;if(!(0,o.Z)(s.x)||!(0,o.Z)(s.y))return;let a=e[s[h]],u=Math.sqrt((s.x-a.cx)*(s.x-a.cx)+(s.y-a.cy)*(s.y-a.cy)),d=v*t;y[i].x-=d*(s.x-a.cx)/u,y[i].y-=d*(s.y-a.cy)/u})}p.forEach((t,e)=>{let{id:r,data:i}=t;if(!(0,o.Z)(i.x)||!(0,o.Z)(i.y))return;let s=.01*v*a;y[r].x-=s*(i.x-u[0]),y[r].y-=s*(i.y-u[1]),3===n&&(y[r].z-=s*(i.z-u[2]))}),p.forEach((e,r)=>{let{id:i,data:s}=e;if((0,o.Z)(s.fx)&&(0,o.Z)(s.fy)){s.x=s.fx,s.y=s.fy,3===n&&(s.z=s.fz);return}if(!(0,o.Z)(s.x)||!(0,o.Z)(s.y))return;let a=Math.sqrt(y[i].x*y[i].x+y[i].y*y[i].y+(3===n?y[i].z*y[i].z:0));if(a>0){let e=Math.min(g*(d/800),a);t.mergeNodeData(i,{x:s.x+y[i].x/a*e,y:s.y+y[i].y/a*e,z:3===n?s.z+y[i].z/a*e:void 0})}})}applyCalculate(t,e,r,n){this.calRepulsive(t,e,n),this.calAttractive(t,e,r)}calRepulsive(t,e,r){let n=t.getAllNodes();n.forEach(({data:t,id:i},s)=>{e[i]={x:0,y:0,z:0},n.forEach(({data:n,id:a},u)=>{if(s<=u||!(0,o.Z)(t.x)||!(0,o.Z)(n.x)||!(0,o.Z)(t.y)||!(0,o.Z)(n.y))return;let d=t.x-n.x,l=t.y-n.y,h=3===this.options.dimensions?t.z-n.z:0,c=d*d+l*l+h*h;0===c&&(c=1,d=.01,l=.01,h=.01);let f=r/c,g=d*f,p=l*f,m=h*f;e[i].x+=g,e[i].y+=p,e[a].x-=g,e[a].y-=p,3===this.options.dimensions&&(e[i].z+=m,e[a].z-=m)})})}calAttractive(t,e,r){let n=t.getAllEdges();n.forEach(n=>{let{source:i,target:s}=n;if(!i||!s||i===s)return;let{data:a}=t.getNode(i),{data:u}=t.getNode(s);if(!(0,o.Z)(u.x)||!(0,o.Z)(a.x)||!(0,o.Z)(u.y)||!(0,o.Z)(a.y))return;let d=u.x-a.x,l=u.y-a.y,h=3===this.options.dimensions?u.z-a.z:0,c=Math.sqrt(d*d+l*l+h*h)/r,f=d*c,g=l*c,p=h*c;e[i].x+=f,e[i].y+=g,e[s].x-=f,e[s].y-=g,3===this.options.dimensions&&(e[i].z+=p,e[s].z-=p)})}}},41733:function(t,e,r){"use strict";r.d(e,{M:function(){return h}});var n=r(97582),i=r(52940),o=r(61035),s=r(98130),a=r(78732),u=r(85087),d=r(20464);let l={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class h{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},l),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{begin:l=[0,0],condense:h,preventOverlapPadding:m,preventOverlap:y,rows:w,cols:x,nodeSpacing:b,nodeSize:E,width:N,height:M,position:_}=n,{sortBy:k}=n,A=e.getAllNodes(),S=e.getAllEdges(),j=null==A?void 0:A.length;if(!j||1===j)return(0,d.P)(e,t,l);let O=A.map(t=>(0,s.u)(t));"id"===k||(0,i.Z)(k)&&void 0!==O[0].data[k]||(k="degree"),"degree"===k?O.sort((t,r)=>e.getDegree(r.id,"both")-e.getDegree(t.id,"both")):"id"===k?O.sort((t,e)=>(0,o.Z)(e.id)&&(0,o.Z)(t.id)?e.id-t.id:`${t.id}`.localeCompare(`${e.id}`)):O.sort((t,e)=>e.data[k]-t.data[k]);let R=N||"undefined"==typeof window?N:window.innerWidth,z=M||"undefined"==typeof window?M:window.innerHeight,I={rows:w,cols:x};if(null!=w&&null!=x)I.rows=w,I.cols=x;else if(null!=w&&null==x)I.rows=w,I.cols=Math.ceil(j/I.rows);else if(null==w&&null!=x)I.cols=x,I.rows=Math.ceil(j/I.cols);else{let t=Math.sqrt(j*z/R);I.rows=Math.round(t),I.cols=Math.round(R/z*t)}if(I.rows=Math.max(I.rows,1),I.cols=Math.max(I.cols,1),I.cols*I.rows>j){let t=c(I),e=f(I);(t-1)*e>=j?c(I,t-1):(e-1)*t>=j&&f(I,e-1)}else for(;I.cols*I.rows=j?f(I,e+1):c(I,t+1)}let C=h?0:R/I.cols,D=h?0:z/I.rows;if(y||b){let t=(0,a.jE)(10,b),r=(0,a.tO)(30,E,!1);O.forEach(n=>{let i,o;n.data.x&&n.data.y||(n.data.x=0,n.data.y=0);let s=e.getNode(n.id),a=r(s)||30;(0,u.k)(a)?(i=a[0],o=a[1]):(i=a,o=a);let d=void 0!==t?t(n):m,l=i+d,h=o+d;C=Math.max(C,l),D=Math.max(D,h)})}let P={},T={row:0,col:0},L={};for(let t=0;t{e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})}),{nodes:O,edges:S}})}}let c=(t,e)=>{let r;let n=t.rows||5,i=t.cols||5;return null==e?r=Math.min(n,i):Math.min(n,i)===t.rows?t.rows=e:t.cols=e,r},f=(t,e)=>{let r;let n=t.rows||5,i=t.cols||5;return null==e?r=Math.max(n,i):Math.max(n,i)===t.rows?t.rows=e:t.cols=e,r},g=(t,e)=>t[`c-${e.row}-${e.col}`]||!1,p=(t,e)=>t[`c-${e.row}-${e.col}`]=!0,m=(t,e)=>{let r=t.cols||5;e.col++,e.col>=r&&(e.col=0,e.row++)},v=(t,e,r,n,i,o,s,a)=>{let u,d;let l=i[t.id];if(l)u=l.col*r+r/2+e[0],d=l.row*n+n/2+e[1];else{for(;g(a,s);)m(o,s);u=s.col*r+r/2+e[0],d=s.row*n+n/2+e[1],p(a,s),m(o,s)}t.data.x=u,t.data.y=d}},64912:function(t,e,r){"use strict";r.d(e,{A:function(){return d}});var n=r(97582),i=r(93396),o=r(80628),s=r(98130),a=r(20464);let u={center:[0,0],linkDistance:50};class d{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},u),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{center:i=[0,0],linkDistance:u=50}=n,d=e.getAllNodes(),c=e.getAllEdges();if(!(null==d?void 0:d.length)||1===d.length)return(0,a.P)(e,t,i);let f=(0,o.zJ)({nodes:d,edges:c},!1),g=(0,o.qs)(f);l(g);let p=(0,o.nu)(g,u),m=h(p),v=[];return m.forEach((t,e)=>{let r=(0,s.u)(d[e]);r.data.x=t[0]+i[0],r.data.y=t[1]+i[1],v.push(r)}),t&&v.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:v,edges:c}})}}let l=t=>{let e=-999999;t.forEach(t=>{t.forEach(t=>{t!==1/0&&e{r.forEach((r,i)=>{r===1/0&&(t[n][i]=e)})})},h=t=>{let e=i.y3.mul(i.y3.pow(t,2),-.5),r=e.mean("row"),n=e.mean("column"),o=e.mean();e.add(o).subRowVector(r).subColumnVector(n);let s=new i.Sc(e),a=i.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(t=>i.y3.mul([t],[a]).toJSON()[0].splice(0,2))}},29257:function(t,e,r){"use strict";r.d(e,{D:function(){return m}});var n=r(97582),i=r(52940),o=r(80628),s=r(78732),a=r(98130),u=r(20464),d=r(93396);let l=(t,e,r)=>{try{let r=d.y3.mul(d.y3.pow(e,2),-.5),n=r.mean("row"),i=r.mean("column"),o=r.mean();r.add(o).subRowVector(n).subColumnVector(i);let s=new d.Sc(r),a=d.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(e=>d.y3.mul([e],[a]).toJSON()[0].splice(0,t))}catch(n){let t=[];for(let n=0;n{let r=Object.assign(Object.assign({},h),e),{positions:n,iterations:i,width:o,k:s,speed:a=100,strictRadial:u,focusIdx:d,radii:l=[],nodeSizeFunc:c}=r,p=t.getAllNodes(),m=[],v=o/10;for(let t=0;t{m[e]={x:0,y:0}}),f(p,n,m,s,l,c),g(n,m,a,u,d,v,o,l);return n},f=(t,e,r,n,i,o)=>{e.forEach((s,a)=>{r[a]={x:0,y:0},e.forEach((e,u)=>{if(a===u||i[a]!==i[u])return;let d=s.x-e.x,l=s.y-e.y,h=Math.sqrt(d*d+l*l);if(0===h){h=1;let t=a>u?1:-1;d=.01*t,l=.01*t}if(h{let u=o||s/10;return n&&e.forEach((e,r)=>{let n=t[r].x-t[i].x,o=t[r].y-t[i].y,s=Math.sqrt(n*n+o*o),a=o/s,u=-n/s,d=Math.sqrt(e.x*e.x+e.y*e.y),l=Math.acos((a*e.x+u*e.y)/d);l>Math.PI/2&&(l-=Math.PI/2,a*=-1,u*=-1);let h=Math.cos(l)*d;e.x=a*h,e.y=u*h}),t.forEach((o,s)=>{if(s===i)return;let d=Math.sqrt(e[s].x*e[s].x+e[s].y*e[s].y);if(d>0&&s!==i){let l=Math.min(u*(r/800),d);if(o.x+=e[s].x/d*l,o.y+=e[s].y/d*l,n){let e=o.x-t[i].x,r=o.y-t[i].y,n=Math.sqrt(e*e+r*r);e=e/n*a[s],r=r/n*a[s],o.x=t[i].x+e,o.y=t[i].y+r}}}),t},p={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class m{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},p),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n;let d=Object.assign(Object.assign({},this.options),r),{width:h,height:f,center:g,focusNode:p,unitRadius:m,nodeSize:E,nodeSpacing:N,strictRadial:M,preventOverlap:_,maxPreventOverlapIteration:k,sortBy:A,linkDistance:S=50,sortStrength:j=10,maxIteration:O=1e3}=d,R=e.getAllNodes(),z=e.getAllEdges(),I=h||"undefined"==typeof window?h:window.innerWidth,C=f||"undefined"==typeof window?f:window.innerHeight,D=g||[I/2,C/2];if(!(null==R?void 0:R.length)||1===R.length)return(0,u.P)(e,t,D);let P=R[0];if((0,i.Z)(p)){for(let t=0;tD[0]?D[0]:I-D[0],V=C-D[1]>D[1]?D[1]:C-D[1];0===G&&(G=I/2),0===V&&(V=C/2);let U=Math.min(G,V),$=[],B=m||U/Math.max(...Z);Z.forEach((t,e)=>{$[e]=t*B});let W=v(R,F,S,$,B,A,j),Y=y(W),H=l(S,W,S),J=H.map(([t,e])=>({x:(isNaN(t)?Math.random()*S:t)-H[T][0],y:(isNaN(e)?Math.random()*S:e)-H[T][1]}));if(this.run(O,J,Y,W,$,T),_){n=(0,s.gl)(E,N);let t={nodes:R,nodeSizeFunc:n,positions:J,radii:$,height:C,width:I,strictRadial:!!M,focusIdx:T,iterations:k||200,k:J.length/4.5};J=c(e,t)}let K=[];return J.forEach((t,e)=>{let r=(0,a.u)(R[e]);r.data.x=t.x+D[0],r.data.y=t.y+D[1],K.push(r)}),t&&K.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y})),{nodes:K,edges:z}})}run(t,e,r,n,i,o){for(let s=0;s<=t;s++){let a=s/t;this.oneIteration(a,e,i,n,r,o)}}oneIteration(t,e,r,n,i,s){let a=1-t;e.forEach((u,d)=>{let l=(0,o.$y)(u,{x:0,y:0}),h=0===l?0:1/l;if(d===s)return;let c=0,f=0,g=0;e.forEach((t,e)=>{if(d===e)return;let r=(0,o.$y)(u,t),s=0===r?0:1/r,a=n[e][d];g+=i[d][e],c+=i[d][e]*(t.x+a*(u.x-t.x)*s),f+=i[d][e]*(t.y+a*(u.y-t.y)*s)});let p=0===r[d]?0:1/r[d];g*=a,g+=t*p*p,c*=a,c+=t*p*u.x*h,u.x=c/g,f*=a,f+=t*p*u.y*h,u.y=f/g})}}let v=(t,e,r,n,o,s,a)=>{if(!t)return[];let u=[];if(e){let d={};e.forEach((e,l)=>{let h=[];e.forEach((e,u)=>{var c,f;if(l===u)h.push(0);else if(n[l]===n[u]){if("data"===s)h.push(e*(Math.abs(l-u)*a)/(n[l]/o));else if(s){let r,g;if(d[t[l].id])r=d[t[l].id];else{let e=("id"===s?t[l].id:null===(c=t[l].data)||void 0===c?void 0:c[s])||0;r=(0,i.Z)(e)?e.charCodeAt(0):e,d[t[l].id]=r}if(d[t[u].id])g=d[t[u].id];else{let e=("id"===s?t[u].id:null===(f=t[u].data)||void 0===f?void 0:f[s])||0;g=(0,i.Z)(e)?e.charCodeAt(0):e,d[t[u].id]=g}h.push(e*(Math.abs(r-g)*a)/(n[l]/o))}else h.push(e*r/(n[l]/o))}else{let t=(r+o)/2;h.push(e*t)}}),u.push(h)})}return u},y=t=>{let e=t.length,r=t[0].length,n=[];for(let i=0;i{let r=-1;return t.forEach((t,n)=>{t.id===e&&(r=n)}),Math.max(r,0)},x=(t,e,r)=>{let n=t.length;for(let i=0;i{let r=0;for(let n=0;nr?t[e][n]:r);return r}},26629:function(t,e,r){"use strict";r.d(e,{_:function(){return o}});var n=r(97582);let i={center:[0,0],width:300,height:300};class o{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},i),t)}execute(t,e){return(0,n.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,n.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,r){return(0,n.mG)(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.options),r),{center:i,width:o,height:s}=n,a=e.getAllNodes(),u=o||"undefined"==typeof window?o:window.innerWidth,d=s||"undefined"==typeof window?s:window.innerHeight,l=i||[u/2,d/2],h=[];a&&a.forEach(t=>{h.push({id:t.id,data:{x:(Math.random()-.5)*.9*u+l[0],y:(Math.random()-.5)*.9*d+l[1]}})}),t&&h.forEach(t=>e.mergeNodeData(t.id,{x:t.data.x,y:t.data.y}));let c={nodes:h,edges:e.getAllEdges()};return c})}}},10779:function(t,e,r){"use strict";function n(t){return!!t.tick&&!!t.stop}r.d(e,{h:function(){return n}})},85087:function(t,e,r){"use strict";r.d(e,{k:function(){return n}});let n=Array.isArray},20464:function(t,e,r){"use strict";r.d(e,{P:function(){return n}});let n=(t,e,r)=>{let n=t.getAllNodes(),i=t.getAllEdges();if(!(null==n?void 0:n.length))return{nodes:[],edges:i};if(1===n.length){e&&t.mergeNodeData(n[0].id,{x:r[0],y:r[1]});let o={nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:r[0],y:r[1]})})],edges:i};return o}}},78732:function(t,e,r){"use strict";r.d(e,{gl:function(){return u},jE:function(){return s},tO:function(){return a}});var n=r(38027),i=r(61035),o=r(97653);function s(t,e){return(0,n.Z)(e)?e:(0,i.Z)(e)?()=>e:()=>t}function a(t,e,r=!0){return e||0===e?(0,n.Z)(e)?e:(0,i.Z)(e)?()=>e:Array.isArray(e)?()=>{if(r){let r=Math.max(...e);return isNaN(r)?t:r}return e}:(0,o.Z)(e)?()=>{if(r){let r=Math.max(e.width,e.height);return isNaN(r)?t:r}return[e.width,e.height]}:()=>t:e=>{let{size:r}=e.data||{};return r?Array.isArray(r)?r[0]>r[1]?r[0]:r[1]:(0,o.Z)(r)?r.width>r.height?r.width:r.height:r:t}}let u=(t,e)=>{let r;return r=(0,i.Z)(e)?()=>e:(0,n.Z)(e)?e:()=>0,t?Array.isArray(t)?e=>{let n=t[0]>t[1]?t[0]:t[1];return n+r(e)}:(0,n.Z)(t)?t:e=>t+r(e):t=>{var e,n;if(null===(e=t.data)||void 0===e?void 0:e.bboxSize)return Math.max(t.data.bboxSize[0],t.data.bboxSize[1])+r(t);if(null===(n=t.data)||void 0===n?void 0:n.size){if(Array.isArray(t.data.size))return Math.max(t.data.size[0],t.data.size[1])+r(t);let e=t.data.size;if((0,o.Z)(e)){let n=e.width>e.height?e.width:e.height;return n+r(t)}return e+r(t)}return 10+r(t)}}},80628:function(t,e,r){"use strict";r.d(e,{$y:function(){return d},H0:function(){return u},_:function(){return l},nu:function(){return a},qs:function(){return o},zJ:function(){return s}});var n=r(61035),i=r(85087);let o=t=>{let e=[],r=t.length;for(let n=0;ne[n][t]+e[t][i]&&(e[n][i]=e[n][t]+e[t][i]);return e},s=(t,e)=>{let{nodes:r,edges:n}=t,i=[],o={};if(!r)throw Error("invalid nodes data!");return r&&r.forEach((t,e)=>{o[t.id]=e,i.push([])}),null==n||n.forEach(t=>{let{source:r,target:n}=t,s=o[r],a=o[n];void 0===s||void 0===a||(i[s][a]=1,e||(i[a][s]=1))}),i},a=(t,e)=>{let r=[];return t.forEach(t=>{let n=[];t.forEach(t=>{n.push(t*e)}),r.push(n)}),r},u=t=>{let e=1/0,r=1/0,o=-1/0,s=-1/0;return t.forEach(t=>{let a=t.data.size;(0,i.k)(a)?1===a.length&&(a=[a[0],a[0]]):(0,n.Z)(a)?a=[a,a]:(void 0===a||isNaN(a))&&(a=[30,30]);let u=[a[0]/2,a[1]/2],d=t.data.x-u[0],l=t.data.x+u[0],h=t.data.y-u[1],c=t.data.y+u[1];e>d&&(e=d),r>h&&(r=h),oMath.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),l=(t,e,r,n="TB",i,o={})=>{if(!(null==e?void 0:e.length))return;let{stopBranchFn:s,stopAllFn:a}=o;for(let u=0;u{if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){let e=[];return t.forEach(t=>{e.push(t)}),e.map(t=>i(t))}if("object"==typeof t){let e={};return Object.keys(t).forEach(r=>{e[r]=i(t[r])}),e}return t},o=(t,e)=>{let r=i(t);return r.data=r.data||{},e&&((0,n.Z)(r.data.x)||(r.data.x=Math.random()*e[0]),(0,n.Z)(r.data.y)||(r.data.y=Math.random()*e[1])),r}},59145:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return Array.isArray?Array.isArray(t):(0,n.Z)(t,"Array")}},38027:function(t,e){"use strict";e.Z=function(t){return"function"==typeof t}},61035:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return(0,n.Z)(t,"Number")}},97653:function(t,e){"use strict";e.Z=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},52940:function(t,e,r){"use strict";var n=r(19782);e.Z=function(t){return(0,n.Z)(t,"String")}},19782:function(t,e){"use strict";var r={}.toString;e.Z=function(t,e){return r.call(t)==="[object "+e+"]"}},70681:function(t,e,r){t.exports={graphlib:r(70574),layout:r(98123),debug:r(27570),util:{time:r(11138).time,notime:r(11138).notime},version:r(88177)}},92188:function(t,e,r){"use strict";var n=r(38436),i=r(74079);t.exports={run:function(t){var e,r,o,s="greedy"===t.graph().acyclicer?i(t,function(e){return t.edge(e).weight}):(e=[],r={},o={},n.forEach(t.nodes(),function i(s){n.has(o,s)||(o[s]=!0,r[s]=!0,n.forEach(t.outEdges(s),function(t){n.has(r,t.w)?e.push(t):i(t.w)}),delete r[s])}),e);n.forEach(s,function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,n.uniqueId("rev"))})},undo:function(t){n.forEach(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}}},61133:function(t,e,r){var n=r(38436),i=r(11138);function o(t,e,r,n,o,s){var a=o[e][s-1],u=i.addDummyNode(t,"border",{width:0,height:0,rank:s,borderType:e},r);o[e][s]=u,t.setParent(u,n),a&&t.setEdge(a,u,{weight:1})}t.exports=function(t){n.forEach(t.children(),function e(r){var i=t.children(r),s=t.node(r);if(i.length&&n.forEach(i,e),n.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var a=s.minRank,u=s.maxRank+1;a=t.nodeCount())return[];var r,d,l,h,c,f,g=(r=e||s,d=new i,l=0,h=0,n.forEach(t.nodes(),function(t){d.setNode(t,{v:t,in:0,out:0})}),n.forEach(t.edges(),function(t){var e=d.edge(t.v,t.w)||0,n=r(t),i=e+n;d.setEdge(t.v,t.w,i),h=Math.max(h,d.node(t.v).out+=n),l=Math.max(l,d.node(t.w).in+=n)}),c=n.range(h+l+3).map(function(){return new o}),f=l+1,n.forEach(d.nodes(),function(t){u(c,f,d.node(t))}),{graph:d,buckets:c,zeroIdx:f}),p=function(t,e,r){for(var n,i=[],o=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)a(t,e,r,n);for(;n=o.dequeue();)a(t,e,r,n);if(t.nodeCount()){for(var u=e.length-2;u>0;--u)if(n=e[u].dequeue()){i=i.concat(a(t,e,r,n,!0));break}}}return i}(g.graph,g.buckets,g.zeroIdx);return n.flatten(n.map(p,function(e){return t.outEdges(e.v,e.w)}),!0)};var s=n.constant(1);function a(t,e,r,i,o){var s=o?[]:void 0;return n.forEach(t.inEdges(i.v),function(n){var i=t.edge(n),a=t.node(n.v);o&&s.push({v:n.v,w:n.w}),a.out-=i,u(e,r,a)}),n.forEach(t.outEdges(i.v),function(n){var i=t.edge(n),o=n.w,s=t.node(o);s.in-=i,u(e,r,s)}),t.removeNode(i.v),s}function u(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}},98123:function(t,e,r){"use strict";var n=r(38436),i=r(92188),o=r(45995),s=r(78093),a=r(11138).normalizeRanks,u=r(24219),d=r(11138).removeEmptyRanks,l=r(72981),h=r(61133),c=r(53258),f=r(53408),g=r(17873),p=r(11138),m=r(70574).Graph;t.exports=function(t,e){var r=e&&e.debugTiming?p.time:p.notime;r("layout",function(){var e=r(" buildLayoutGraph",function(){var e,r;return e=new m({multigraph:!0,compound:!0}),r=k(t.graph()),e.setGraph(n.merge({},y,_(r,v),n.pick(r,w))),n.forEach(t.nodes(),function(r){var i=k(t.node(r));e.setNode(r,n.defaults(_(i,x),b)),e.setParent(r,t.parent(r))}),n.forEach(t.edges(),function(r){var i=k(t.edge(r));e.setEdge(r,n.merge({},N,_(i,E),n.pick(i,M)))}),e});r(" runLayout",function(){r(" makeSpaceForEdgeLabels",function(){var t;t=e.graph(),t.ranksep/=2,n.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}),r(" removeSelfEdges",function(){n.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}),r(" acyclic",function(){i.run(e)}),r(" nestingGraph.run",function(){l.run(e)}),r(" rank",function(){s(p.asNonCompoundGraph(e))}),r(" injectEdgeLabelProxies",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,"edge-proxy",i,"_ep")}})}),r(" removeEmptyRanks",function(){d(e)}),r(" nestingGraph.cleanup",function(){l.cleanup(e)}),r(" normalizeRanks",function(){a(e)}),r(" assignRankMinMax",function(){var t;t=0,n.forEach(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=n.max(t,i.maxRank))}),e.graph().maxRank=t}),r(" removeEdgeLabelProxies",function(){n.forEach(e.nodes(),function(t){var r=e.node(t);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}),r(" normalize.run",function(){o.run(e)}),r(" parentDummyChains",function(){u(e)}),r(" addBorderSegments",function(){h(e)}),r(" order",function(){f(e)}),r(" insertSelfEdges",function(){var t;t=p.buildLayerMatrix(e),n.forEach(t,function(t){var r=0;n.forEach(t,function(t,i){var o=e.node(t);o.order=i+r,n.forEach(o.selfEdges,function(t){p.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++r,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}),r(" adjustCoordinateSystem",function(){c.adjust(e)}),r(" position",function(){g(e)}),r(" positionSelfEdges",function(){n.forEach(e.nodes(),function(t){var r=e.node(t);if("selfedge"===r.dummy){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y}})}),r(" removeBorderNodes",function(){n.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),o=e.node(r.borderBottom),s=e.node(n.last(r.borderLeft)),a=e.node(n.last(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(o.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}),r(" normalize.undo",function(){o.undo(e)}),r(" fixupEdgeLabelCoords",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);if(n.has(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),r(" undoCoordinateSystem",function(){c.undo(e)}),r(" translateGraph",function(){(function(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,o=0,s=t.graph(),a=s.marginx||0,u=s.marginy||0;function d(t){var n=t.x,s=t.y,a=t.width,u=t.height;e=Math.min(e,n-a/2),r=Math.max(r,n+a/2),i=Math.min(i,s-u/2),o=Math.max(o,s+u/2)}n.forEach(t.nodes(),function(e){d(t.node(e))}),n.forEach(t.edges(),function(e){var r=t.edge(e);n.has(r,"x")&&d(r)}),e-=a,i-=u,n.forEach(t.nodes(),function(r){var n=t.node(r);n.x-=e,n.y-=i}),n.forEach(t.edges(),function(r){var o=t.edge(r);n.forEach(o.points,function(t){t.x-=e,t.y-=i}),n.has(o,"x")&&(o.x-=e),n.has(o,"y")&&(o.y-=i)}),s.width=r-e+a,s.height=o-i+u})(e)}),r(" assignNodeIntersects",function(){n.forEach(e.edges(),function(t){var r,n,i=e.edge(t),o=e.node(t.v),s=e.node(t.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=s,n=o),i.points.unshift(p.intersectRect(o,r)),i.points.push(p.intersectRect(s,n))})}),r(" reversePoints",function(){n.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}),r(" acyclic.undo",function(){i.undo(e)})}),r(" updateInputGraph",function(){n.forEach(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),n.forEach(t.edges(),function(r){var i=t.edge(r),o=e.edge(r);i.points=o.points,n.has(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height})})};var v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],x=["width","height"],b={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function _(t,e){return n.mapValues(n.pick(t,e),Number)}function k(t){var e={};return n.forEach(t,function(t,r){e[r.toLowerCase()]=t}),e}},38436:function(t,e,r){var n;try{n={cloneDeep:r(50361),constant:r(75703),defaults:r(91747),each:r(66073),filter:r(63105),find:r(13311),flatten:r(85564),forEach:r(84486),forIn:r(62620),has:r(18721),isUndefined:r(52353),last:r(10928),map:r(35161),mapValues:r(8521),max:r(6162),merge:r(82492),min:r(53632),minBy:r(22762),now:r(7771),pick:r(78718),range:r(96026),reduce:r(54061),sortBy:r(89734),uniqueId:r(73955),values:r(52628),zipObject:r(7287)}}catch(t){}n||(n=window._),t.exports=n},72981:function(t,e,r){var n=r(38436),i=r(11138);t.exports={run:function(t){var e,r=i.addDummyNode(t,"root",{},"_root"),o=(e={},n.forEach(t.children(),function(r){!function r(i,o){var s=t.children(i);s&&s.length&&n.forEach(s,function(t){r(t,o+1)}),e[i]=o}(r,1)}),e),s=n.max(n.values(o))-1,a=2*s+1;t.graph().nestingRoot=r,n.forEach(t.edges(),function(e){t.edge(e).minlen*=a});var u=n.reduce(t.edges(),function(e,r){return e+t.edge(r).weight},0)+1;n.forEach(t.children(),function(e){(function t(e,r,o,s,a,u,d){var l=e.children(d);if(!l.length){d!==r&&e.setEdge(r,d,{weight:0,minlen:o});return}var h=i.addBorderNode(e,"_bt"),c=i.addBorderNode(e,"_bb"),f=e.node(d);e.setParent(h,d),f.borderTop=h,e.setParent(c,d),f.borderBottom=c,n.forEach(l,function(n){t(e,r,o,s,a,u,n);var i=e.node(n),l=i.borderTop?i.borderTop:n,f=i.borderBottom?i.borderBottom:n,g=i.borderTop?s:2*s,p=l!==f?1:a-u[d]+1;e.setEdge(h,l,{weight:g,minlen:p,nestingEdge:!0}),e.setEdge(f,c,{weight:g,minlen:p,nestingEdge:!0})}),e.parent(d)||e.setEdge(r,h,{weight:0,minlen:a+u[d]})})(t,r,a,u,s,o,e)}),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,n.forEach(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}}},45995:function(t,e,r){"use strict";var n=r(38436),i=r(11138);t.exports={run:function(t){t.graph().dummyChains=[],n.forEach(t.edges(),function(e){(function(t,e){var r,n,o,s=e.v,a=t.node(s).rank,u=e.w,d=t.node(u).rank,l=e.name,h=t.edge(e),c=h.labelRank;if(d!==a+1){for(t.removeEdge(e),o=0,++a;a0;)e%2&&(r+=u[e+1]),e=e-1>>1,u[e]+=t.weight;d+=t.weight*r})),d}(t,e[i-1],e[i]);return r}},53408:function(t,e,r){"use strict";var n=r(38436),i=r(2588),o=r(56630),s=r(61026),a=r(23128),u=r(55093),d=r(70574).Graph,l=r(11138);function h(t,e,r){return n.map(e,function(e){return a(t,e,r)})}function c(t,e){n.forEach(e,function(e){n.forEach(e,function(e,r){t.node(e).order=r})})}t.exports=function(t){var e=l.maxRank(t),r=h(t,n.range(1,e+1),"inEdges"),a=h(t,n.range(e-1,-1,-1),"outEdges"),f=i(t);c(t,f);for(var g,p=Number.POSITIVE_INFINITY,m=0,v=0;v<4;++m,++v){(function(t,e){var r=new d;n.forEach(t,function(t){var i=t.graph().root,o=s(t,i,r,e);n.forEach(o.vs,function(e,r){t.node(e).order=r}),u(t,r,o.vs)})})(m%2?r:a,m%4>=2),f=l.buildLayerMatrix(t);var y=o(t,f);y=t.barycenter)&&function(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}(r)),n.forEach(r.out,function(e){return function(r){r.in.push(e),0==--r.indegree&&t.push(r)}}(r))}return n.map(n.filter(e,function(t){return!t.merged}),function(t){return n.pick(t,["vs","i","barycenter","weight"])})}(n.filter(r,function(t){return!t.indegree}))}},61026:function(t,e,r){var n=r(38436),i=r(35439),o=r(83678),s=r(87304);t.exports=function t(e,r,a,u){var d=e.children(r),l=e.node(r),h=l?l.borderLeft:void 0,c=l?l.borderRight:void 0,f={};h&&(d=n.filter(d,function(t){return t!==h&&t!==c}));var g=i(e,d);n.forEach(g,function(r){if(e.children(r.v).length){var i=t(e,r.v,a,u);f[r.v]=i,n.has(i,"barycenter")&&(n.isUndefined(r.barycenter)?(r.barycenter=i.barycenter,r.weight=i.weight):(r.barycenter=(r.barycenter*r.weight+i.barycenter*i.weight)/(r.weight+i.weight),r.weight+=i.weight))}});var p=o(g,a);n.forEach(p,function(t){t.vs=n.flatten(t.vs.map(function(t){return f[t]?f[t].vs:t}),!0)});var m=s(p,u);if(h&&(m.vs=n.flatten([h,m.vs,c],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),y=e.node(e.predecessors(c)[0]);n.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+v.order+y.order)/(m.weight+2),m.weight+=2}return m}},87304:function(t,e,r){var n=r(38436),i=r(11138);function o(t,e,r){for(var i;e.length&&(i=n.last(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}t.exports=function(t,e){var r,s=i.partition(t,function(t){return n.has(t,"barycenter")}),a=s.lhs,u=n.sortBy(s.rhs,function(t){return-t.i}),d=[],l=0,h=0,c=0;a.sort((r=!!e,function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i})),c=o(d,u,c),n.forEach(a,function(t){c+=t.vs.length,d.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,c=o(d,u,c)});var f={vs:n.flatten(d,!0)};return h&&(f.barycenter=l/h,f.weight=h),f}},24219:function(t,e,r){var n=r(38436);t.exports=function(t){var e,r,i=(e={},r=0,n.forEach(t.children(),function i(o){var s=r;n.forEach(t.children(o),i),e[o]={low:s,lim:r++}}),e);n.forEach(t.graph().dummyChains,function(e){for(var r=t.node(e),n=r.edgeObj,o=function(t,e,r,n){var i,o,s=[],a=[],u=Math.min(e[r].low,e[n].low),d=Math.max(e[r].lim,e[n].lim);i=r;do s.push(i=t.parent(i));while(i&&(e[i].low>u||d>e[i].lim));for(o=i,i=n;(i=t.parent(i))!==o;)a.push(i);return{path:s.concat(a.reverse()),lca:o}}(t,i,n.v,n.w),s=o.path,a=o.lca,u=0,d=s[0],l=!0;e!==n.w;){if(r=t.node(e),l){for(;(d=s[u])!==a&&t.node(d).maxRanka)&&u(r,e,d)})})}return n.reduce(e,function(e,r){var o,s=-1,a=0;return n.forEach(r,function(n,u){if("border"===t.node(n).dummy){var d=t.predecessors(n);d.length&&(i(r,a,u,s,o=t.node(d[0]).order),a=u,s=o)}i(r,a,r.length,o,e.length)}),r}),r}function u(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function d(t,e,r){if(e>r){var i=e;e=r,r=i}return n.has(t[e],r)}function l(t,e,r,i){var o={},s={},a={};return n.forEach(e,function(t){n.forEach(t,function(t,e){o[t]=t,s[t]=t,a[t]=e})}),n.forEach(e,function(t){var e=-1;n.forEach(t,function(t){var u=i(t);if(u.length)for(var l=((u=n.sortBy(u,function(t){return a[t]})).length-1)/2,h=Math.floor(l),c=Math.ceil(l);h<=c;++h){var f=u[h];s[t]===t&&eu.lim&&(d=u,l=!0);var h=n.filter(e.edges(),function(e){return l===v(t,t.node(e.v),d)&&l!==v(t,t.node(e.w),d)});return n.minBy(h,function(t){return o(e,t)})}function m(t,e,r,i){var o,s,u=r.v,d=r.w;t.removeEdge(u,d),t.setEdge(i.v,i.w,{}),f(t),h(t,e),o=n.find(t.nodes(),function(t){return!e.node(t).parent}),s=(s=a(t,o)).slice(1),n.forEach(s,function(r){var n=t.node(r).parent,i=e.edge(r,n),o=!1;i||(i=e.edge(n,r),o=!0),e.node(r).rank=e.node(n).rank+(o?i.minlen:-i.minlen)})}function v(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}t.exports=l,l.initLowLimValues=f,l.initCutValues=h,l.calcCutValue=c,l.leaveEdge=g,l.enterEdge=p,l.exchangeEdges=m},76681:function(t,e,r){"use strict";var n=r(38436);t.exports={longestPath:function(t){var e={};n.forEach(t.sources(),function r(i){var o=t.node(i);if(n.has(e,i))return o.rank;e[i]=!0;var s=n.min(n.map(t.outEdges(i),function(e){return r(e.w)-t.edge(e).minlen}));return(s===Number.POSITIVE_INFINITY||null==s)&&(s=0),o.rank=s})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},11138:function(t,e,r){"use strict";var n=r(38436),i=r(70574).Graph;function o(t,e,r,i){var o;do o=n.uniqueId(i);while(t.hasNode(o));return r.dummy=e,t.setNode(o,r),o}function s(t){return n.max(n.map(t.nodes(),function(e){var r=t.node(e).rank;if(!n.isUndefined(r))return r}))}t.exports={addDummyNode:o,simplify:function(t){var e=new i().setGraph(t.graph());return n.forEach(t.nodes(),function(r){e.setNode(r,t.node(r))}),n.forEach(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return n.forEach(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),n.forEach(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e},successorWeights:function(t){var e=n.map(t.nodes(),function(e){var r={};return n.forEach(t.outEdges(e),function(e){r[e.w]=(r[e.w]||0)+t.edge(e).weight}),r});return n.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=n.map(t.nodes(),function(e){var r={};return n.forEach(t.inEdges(e),function(e){r[e.v]=(r[e.v]||0)+t.edge(e).weight}),r});return n.zipObject(t.nodes(),e)},intersectRect:function(t,e){var r,n,i=t.x,o=t.y,s=e.x-i,a=e.y-o,u=t.width/2,d=t.height/2;if(!s&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*u>Math.abs(s)*d?(a<0&&(d=-d),r=d*s/a,n=d):(s<0&&(u=-u),r=u,n=u*a/s),{x:i+r,y:o+n}},buildLayerMatrix:function(t){var e=n.map(n.range(s(t)+1),function(){return[]});return n.forEach(t.nodes(),function(r){var i=t.node(r),o=i.rank;n.isUndefined(o)||(e[o][i.order]=r)}),e},normalizeRanks:function(t){var e=n.min(n.map(t.nodes(),function(e){return t.node(e).rank}));n.forEach(t.nodes(),function(r){var i=t.node(r);n.has(i,"rank")&&(i.rank-=e)})},removeEmptyRanks:function(t){var e=n.min(n.map(t.nodes(),function(e){return t.node(e).rank})),r=[];n.forEach(t.nodes(),function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)});var i=0,o=t.graph().nodeRankFactor;n.forEach(r,function(e,r){n.isUndefined(e)&&r%o!=0?--i:i&&n.forEach(e,function(e){t.node(e).rank+=i})})},addBorderNode:function(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),o(t,"border",i,e)},maxRank:s,partition:function(t,e){var r={lhs:[],rhs:[]};return n.forEach(t,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r},time:function(t,e){var r=n.now();try{return e()}finally{console.log(t+" time: "+(n.now()-r)+"ms")}},notime:function(t,e){return e()}}},88177:function(t){t.exports="0.8.5"},28282:function(t,e,r){var n=r(82354);t.exports={Graph:n.Graph,json:r(28974),alg:r(12440),version:n.version}},2842:function(t,e,r){var n=r(89126);t.exports=function(t){var e,r={},i=[];return n.each(t.nodes(),function(o){e=[],function i(o){n.has(r,o)||(r[o]=!0,e.push(o),n.each(t.successors(o),i),n.each(t.predecessors(o),i))}(o),e.length&&i.push(e)}),i}},53984:function(t,e,r){var n=r(89126);t.exports=function(t,e,r){n.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return n.each(e,function(e){if(!t.hasNode(e))throw Error("Graph does not have node: "+e);(function t(e,r,i,o,s,a){!n.has(o,r)&&(o[r]=!0,i||a.push(r),n.each(s(r),function(r){t(e,r,i,o,s,a)}),i&&a.push(r))})(t,e,"post"===r,s,i,o)}),o}},84847:function(t,e,r){var n=r(63763),i=r(89126);t.exports=function(t,e,r){return i.transform(t.nodes(),function(i,o){i[o]=n(t,o,e,r)},{})}},63763:function(t,e,r){var n=r(89126),i=r(75639);t.exports=function(t,e,r,n){return function(t,e,r,n){var o,s,a={},u=new i,d=function(t){var e=t.v!==o?t.v:t.w,n=a[e],i=r(t),d=s.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);d0&&(s=a[o=u.removeMin()]).distance!==Number.POSITIVE_INFINITY;)n(o).forEach(d);return a}(t,String(e),r||o,n||function(e){return t.outEdges(e)})};var o=n.constant(1)},9096:function(t,e,r){var n=r(89126),i=r(5023);t.exports=function(t){return n.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}},38924:function(t,e,r){var n=r(89126);t.exports=function(t,e,r){var n,o,s,a;return n=e||i,o=r||function(e){return t.outEdges(e)},s={},(a=t.nodes()).forEach(function(t){s[t]={},s[t][t]={distance:0},a.forEach(function(e){t!==e&&(s[t][e]={distance:Number.POSITIVE_INFINITY})}),o(t).forEach(function(e){var r=e.v===t?e.w:e.v,i=n(e);s[t][r]={distance:i,predecessor:t}})}),a.forEach(function(t){var e=s[t];a.forEach(function(r){var n=s[r];a.forEach(function(r){var i=n[t],o=e[r],s=n[r],a=i.distance+o.distance;a0;){if(r=u.removeMin(),n.has(a,r))s.setEdge(r,a[r]);else if(l)throw Error("Input graph is not connected: "+t);else l=!0;t.nodeEdges(r).forEach(d)}return s}},5023:function(t,e,r){var n=r(89126);t.exports=function(t){var e=0,r=[],i={},o=[];return t.nodes().forEach(function(s){n.has(i,s)||function s(a){var u=i[a]={onStack:!0,lowlink:e,index:e++};if(r.push(a),t.successors(a).forEach(function(t){n.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(s(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))}),u.lowlink===u.index){var d,l=[];do i[d=r.pop()].onStack=!1,l.push(d);while(a!==d);o.push(l)}}(s)}),o}},2166:function(t,e,r){var n=r(89126);function i(t){var e={},r={},i=[];if(n.each(t.sinks(),function s(a){if(n.has(r,a))throw new o;n.has(e,a)||(r[a]=!0,e[a]=!0,n.each(t.predecessors(a),s),delete r[a],i.push(a))}),n.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=Error()},75639:function(t,e,r){var n=r(89126);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(t){return t.key})},i.prototype.has=function(t){return n.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!n.has(r,t)){var i=this._arr,o=i.length;return r[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},i.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r>1].prioritys){var a=o;o=s,s=a}return o+"\x01"+s+"\x01"+(n.isUndefined(i)?"\x00":i)}function u(t,e){return a(t,e.v,e.w,e.name)}t.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return n.keys(this._nodes)},i.prototype.sources=function(){var t=this;return n.filter(this.nodes(),function(e){return n.isEmpty(t._in[e])})},i.prototype.sinks=function(){var t=this;return n.filter(this.nodes(),function(e){return n.isEmpty(t._out[e])})},i.prototype.setNodes=function(t,e){var r=arguments,i=this;return n.each(t,function(t){r.length>1?i.setNode(t,e):i.setNode(t)}),this},i.prototype.setNode=function(t,e){return n.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\x00",this._children[t]={},this._children["\x00"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return n.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(n.has(this._nodes,t)){var r=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],n.each(this.children(t),function(t){e.setParent(t)}),delete this._children[t]),n.each(n.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],n.each(n.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(n.isUndefined(e))e="\x00";else{e+="";for(var r=e;!n.isUndefined(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\x00"!==e)return e}},i.prototype.children=function(t){if(n.isUndefined(t)&&(t="\x00"),this._isCompound){var e=this._children[t];if(e)return n.keys(e)}else if("\x00"===t)return this.nodes();else if(this.hasNode(t))return[]},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return n.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return n.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return n.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;n.each(this._nodes,function(r,n){t(n)&&e.setNode(n,r)}),n.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var i={};return this._isCompound&&n.each(e.nodes(),function(t){e.setParent(t,function t(n){var o=r.parent(n);return void 0===o||e.hasNode(o)?(i[n]=o,o):o in i?i[o]:t(o)}(t))}),e},i.prototype.setDefaultEdgeLabel=function(t){return n.isFunction(t)||(t=n.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return n.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var r=this,i=arguments;return n.reduce(t,function(t,n){return i.length>1?r.setEdge(t,n,e):r.setEdge(t,n),n}),this},i.prototype.setEdge=function(){var t,e,r,i,s=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,e=u.w,r=u.name,2==arguments.length&&(i=arguments[1],s=!0)):(t=u,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,e=""+e,n.isUndefined(r)||(r=""+r);var d=a(this._isDirected,t,e,r);if(n.has(this._edgeLabels,d))return s&&(this._edgeLabels[d]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[d]=s?i:this._defaultEdgeLabelFn(t,e,r);var l=function(t,e,r,n){var i=""+e,o=""+r;if(!t&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return n&&(a.name=n),a}(this._isDirected,t,e,r);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[d]=l,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][d]=l,this._out[t][d]=l,this._edgeCount++,this},i.prototype.edge=function(t,e,r){var n=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return this._edgeLabels[n]},i.prototype.hasEdge=function(t,e,r){var i=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return n.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,r){var n=1==arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var i=n.values(r);return e?n.filter(i,function(t){return t.v===e}):i}},i.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var i=n.values(r);return e?n.filter(i,function(t){return t.w===e}):i}},i.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}},82354:function(t,e,r){t.exports={Graph:r(30771),version:r(49631)}},28974:function(t,e,r){var n=r(89126),i=r(30771);t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n.map(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),o={v:e};return n.isUndefined(r)||(o.value=r),n.isUndefined(i)||(o.parent=i),o}),edges:n.map(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return n.isUndefined(e.name)||(i.name=e.name),n.isUndefined(r)||(i.value=r),i})};return n.isUndefined(t.graph())||(e.value=n.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return n.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),n.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}}},89126:function(t,e,r){var n;try{n={clone:r(66678),constant:r(75703),each:r(66073),filter:r(63105),has:r(18721),isArray:r(1469),isEmpty:r(41609),isFunction:r(23560),isUndefined:r(52353),keys:r(3674),map:r(35161),reduce:r(54061),size:r(84238),transform:r(68718),union:r(93386),values:r(52628)}}catch(t){}n||(n=window._),t.exports=n},49631:function(t){t.exports="2.1.8"},44091:function(t,e,r){"use strict";r.r(e),r.d(e,{isAnyArray:function(){return i}});let n=Object.prototype.toString;function i(t){let e=n.call(t);return e.endsWith("Array]")&&!e.includes("Big")}},1989:function(t,e,r){var n=r(51789),i=r(80401),o=r(57667),s=r(21327),a=r(81866);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},1196:function(t){t.exports=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n0&&o(l)?r>1?t(l,r-1,o,s,a):n(a,l):s||(a[a.length]=l)}return a}},28483:function(t,e,r){var n=r(25063)();t.exports=n},47816:function(t,e,r){var n=r(28483),i=r(3674);t.exports=function(t,e){return t&&n(t,e,i)}},97786:function(t,e,r){var n=r(71811),i=r(40327);t.exports=function(t,e){e=n(e,t);for(var r=0,o=e.length;null!=t&&re}},78565:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t,r){return null!=t&&e.call(t,r)}},13:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},90939:function(t,e,r){var n=r(2492),i=r(37005);t.exports=function t(e,r,o,s,a){return e===r||(null!=e&&null!=r&&(i(e)||i(r))?n(e,r,o,s,t,a):e!=e&&r!=r)}},2492:function(t,e,r){var n=r(46384),i=r(67114),o=r(18351),s=r(16096),a=r(64160),u=r(1469),d=r(44144),l=r(36719),h="[object Arguments]",c="[object Array]",f="[object Object]",g=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,p,m,v){var y=u(t),w=u(e),x=y?c:a(t),b=w?c:a(e);x=x==h?f:x,b=b==h?f:b;var E=x==f,N=b==f,M=x==b;if(M&&d(t)){if(!d(e))return!1;y=!0,E=!1}if(M&&!E)return v||(v=new n),y||l(t)?i(t,e,r,p,m,v):o(t,e,x,r,p,m,v);if(!(1&r)){var _=E&&g.call(t,"__wrapped__"),k=N&&g.call(e,"__wrapped__");if(_||k){var A=_?t.value():t,S=k?e.value():e;return v||(v=new n),m(A,S,r,p,v)}}return!!M&&(v||(v=new n),s(t,e,r,p,m,v))}},25588:function(t,e,r){var n=r(64160),i=r(37005);t.exports=function(t){return i(t)&&"[object Map]"==n(t)}},2958:function(t,e,r){var n=r(46384),i=r(90939);t.exports=function(t,e,r,o){var s=r.length,a=s,u=!o;if(null==t)return!a;for(t=Object(t);s--;){var d=r[s];if(u&&d[2]?d[1]!==t[d[0]]:!(d[0]in t))return!1}for(;++s=200){var p=e?null:a(t);if(p)return u(p);c=!1,l=s,g=new n}else g=e?[]:f;t:for(;++de||s&&a&&d&&!u&&!l||i&&a&&d||!r&&d||!o)return 1;if(!i&&!s&&!l&&t=u)return d;return d*("desc"==r[i]?-1:1)}}return t.index-e.index}},278:function(t){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n-1?a[u?e[d]:d]:void 0}}},47445:function(t,e,r){var n=r(40098),i=r(16612),o=r(18601);t.exports=function(t){return function(e,r,s){return s&&"number"!=typeof s&&i(e,r,s)&&(r=s=void 0),e=o(e),void 0===r?(r=e,e=0):r=o(r),s=void 0===s?el))return!1;var c=u.get(t),f=u.get(e);if(c&&f)return c==e&&f==t;var g=-1,p=!0,m=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++g-1}},54705:function(t,e,r){var n=r(18470);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},24785:function(t,e,r){var n=r(1989),i=r(38407),o=r(57071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},11285:function(t,e,r){var n=r(45050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},96e3:function(t,e,r){var n=r(45050);t.exports=function(t){return n(this,t).get(t)}},49916:function(t,e,r){var n=r(45050);t.exports=function(t){return n(this,t).has(t)}},95265:function(t,e,r){var n=r(45050);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},68776:function(t){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},42634:function(t){t.exports=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}},24523:function(t,e,r){var n=r(15644);t.exports=function(t){var e=n(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}},94536:function(t,e,r){var n=r(10852)(Object,"create");t.exports=n},33498:function(t){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},45357:function(t,e,r){var n=r(96874),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},37465:function(t,e,r){var n=r(38407);t.exports=function(){this.__data__=new n,this.size=0}},63779:function(t){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},67599:function(t){t.exports=function(t){return this.__data__.get(t)}},44758:function(t){t.exports=function(t){return this.__data__.has(t)}},34309:function(t,e,r){var n=r(38407),i=r(57071),o=r(83369);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(t,e),this.size=r.size,this}},88016:function(t,e,r){var n=r(48983),i=r(62689),o=r(21903);t.exports=function(t){return i(t)?o(t):n(t)}},55514:function(t,e,r){var n=r(24523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e});t.exports=s},40327:function(t,e,r){var n=r(33448),i=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},21903:function(t){var e="\ud800-\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\ud83c[\udffb-\udfff]",i="[^"+e+"]",o="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",a="(?:"+r+"|"+n+")?",u="[\\ufe0e\\ufe0f]?",d="(?:\\u200d(?:"+[i,o,s].join("|")+")"+u+a+")*",l=RegExp(n+"(?="+n+")|(?:"+[i+r+"?",r,o,s,"["+e+"]"].join("|")+")"+(u+a+d),"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},66678:function(t,e,r){var n=r(85990);t.exports=function(t){return n(t,4)}},50361:function(t,e,r){var n=r(85990);t.exports=function(t){return n(t,5)}},75703:function(t){t.exports=function(t){return function(){return t}}},91747:function(t,e,r){var n=r(5976),i=r(77813),o=r(16612),s=r(81704),a=Object.prototype,u=a.hasOwnProperty,d=n(function(t,e){t=Object(t);var r=-1,n=e.length,d=n>2?e[2]:void 0;for(d&&o(e[0],e[1],d)&&(n=1);++r1&&s(t,e[0],e[1])?e=[]:r>2&&s(e[0],e[1],e[2])&&(e=[e[0]]),i(t,n(e,1),[])});t.exports=a},70479:function(t){t.exports=function(){return[]}},59881:function(t,e,r){var n=r(98363),i=r(81704);t.exports=function(t){return n(t,i(t))}},68718:function(t,e,r){var n=r(77412),i=r(3118),o=r(47816),s=r(67206),a=r(85924),u=r(1469),d=r(44144),l=r(23560),h=r(13218),c=r(36719);t.exports=function(t,e,r){var f=u(t),g=f||d(t)||c(t);if(e=s(e,4),null==r){var p=t&&t.constructor;r=g?f?new p:[]:h(t)&&l(p)?i(a(t)):{}}return(g?n:o)(t,function(t,n,i){return e(r,t,n,i)}),r}},93386:function(t,e,r){var n=r(21078),i=r(5976),o=r(45652),s=r(29246),a=i(function(t){return o(n(t,1,s,!0))});t.exports=a},73955:function(t,e,r){var n=r(79833),i=0;t.exports=function(t){var e=++i;return n(t)+e}},7287:function(t,e,r){var n=r(34865),i=r(1757);t.exports=function(t,e){return i(t||[],e||[],n)}},75823:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return i}});var n=r(44091);function i(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,n.isAnyArray)(t)){if(0===t.length)throw TypeError("input must not be empty")}else throw TypeError("input must be an array");if(void 0!==r.output){if(!(0,n.isAnyArray)(r.output))throw TypeError("output option must be an array if specified");e=r.output}else e=Array(t.length);var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,n.isAnyArray)(t))throw TypeError("input must be an array");if(0===t.length)throw TypeError("input must not be empty");var r=e.fromIndex,i=void 0===r?0:r,o=e.toIndex,s=void 0===o?t.length:o;if(i<0||i>=t.length||!Number.isInteger(i))throw Error("fromIndex must be a positive integer smaller than length");if(s<=i||s>t.length||!Number.isInteger(s))throw Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var a=t[i],u=i+1;u1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,n.isAnyArray)(t))throw TypeError("input must be an array");if(0===t.length)throw TypeError("input must not be empty");var r=e.fromIndex,i=void 0===r?0:r,o=e.toIndex,s=void 0===o?t.length:o;if(i<0||i>=t.length||!Number.isInteger(i))throw Error("fromIndex must be a positive integer smaller than length");if(s<=i||s>t.length||!Number.isInteger(s))throw Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var a=t[i],u=i+1;ua&&(a=t[u]);return a}(t);if(i===o)throw RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var s=r.min,a=void 0===s?r.autoMinMax?i:0:s,u=r.max,d=void 0===u?r.autoMinMax?o:1:u;if(a>=d)throw RangeError("min option must be smaller than max option");for(var l=(d-a)/(o-i),h=0;ht.get(e,r)){i=!0;break e}}for(let e=0;e=0&&f?` ${u(c,n-1)}`:u(c,n)).padEnd(n)))}h.push(`${r.join(" ")}`)}return l!==a&&(h[h.length-1]+=` ... ${a-r} more columns`),d!==o&&h.push(`... ${o-e} more rows`),h.join(` ${s}`)}(t,r,n,i,a)} diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.b4ac08214a9c9287.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.0b035da005129040.js similarity index 88% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.b4ac08214a9c9287.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.0b035da005129040.js index e023e8df9..f8c0e8252 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.b4ac08214a9c9287.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5000.0b035da005129040.js @@ -506,7 +506,7 @@ ${e.toString()}`}}class oX{constructor(e=new oY.y,t=!1,i){this._activeInstantiat ); background-size: 8px 8px; } - `)})},75623:function(e,t,i){"use strict";i.d(t,{F:function(){return h}});var n=i(35146),o=i(4669),r=i(9917),s=i(36248),a=i(24314);let l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class h extends r.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new o.Q5),this._editor=e,this._options=s.jB(t,l,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){let e=this._editor.getLineChanges();if(!e)return}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})}),this.ranges.sort((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},84527:function(e,t,i){"use strict";i.d(t,{H:function(){return m}});var n=i(36248),o=i(11640),r=i(27982),s=i(94565),a=i(38819),l=i(72065),h=i(59422),d=i(97781),u=i(31106),c=i(4256),g=i(71922),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends r.Gm{constructor(e,t,i,n,o,r,s,a,l,h,d,u){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,r,s,a,l,h,d,u),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(3,l.TG),p(4,o.$),p(5,s.Hy),p(6,a.i6),p(7,d.XE),p(8,h.lT),p(9,u.F),p(10,c.c_),p(11,g.p)],m)},61329:function(e,t,i){"use strict";i.d(t,{OY:function(){return r},Sj:function(){return s},T4:function(){return o},Uo:function(){return a},hP:function(){return l}});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getEndPosition())}}class r{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromRange(o,0)}}class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},10291:function(e,t,i){"use strict";i.d(t,{U:function(){return c}});var n,o=i(97295),r=i(7988),s=i(24314),a=i(3860),l=i(1615),h=i(4256);let d=Object.create(null);function u(e,t){if(t<=0)return"";d[e]||(d[e]=["",e]);let i=d[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let c=class e{constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){let s=r.i.visibleColumnFromColumn(e,t,i);if(o){let e=u(" ",n),t=r.i.prevIndentTabStop(s,n),i=t/n;return u(e,i)}{let e=r.i.prevRenderTabStop(s,i),t=e/i;return u(" ",t)}}static shiftIndent(e,t,i,n,o){let s=r.i.visibleColumnFromColumn(e,t,i);if(o){let e=u(" ",n),t=r.i.nextIndentTabStop(s,n),i=t/n;return u(e,i)}{let e=r.i.nextRenderTabStop(s,i),t=e/i;return u(" ",t)}}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(t,i){let n=this._selection.startLineNumber,a=this._selection.endLineNumber;1===this._selection.endColumn&&n!==a&&(a-=1);let{tabSize:h,indentSize:d,insertSpaces:c}=this._opts,g=n===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let u=0,p=0;for(let m=n;m<=a;m++,u=p){let a;p=0;let f=t.getLineContent(m),_=o.LC(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1){let e=r.i.visibleColumnFromColumn(f,_+1,h);if(e%d!=0&&t.tokenization.isCheapToTokenize(m-1)){let e=(0,l.A)(this._opts.autoIndent,t,new s.e(m-1,t.getLineMaxColumn(m-1),m-1,t.getLineMaxColumn(m-1)),this._languageConfigurationService);if(e){if(p=u,e.appendText)for(let t=0,i=e.appendText.length;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=h.c_,function(e,t){n(e,t,2)})],c)},800:function(e,t,i){"use strict";i.d(t,{Pe:function(){return g},ei:function(){return c},wk:function(){return l}});var n=i(64141),o=i(22075),r=i(63580),s=i(23193),a=i(89872);let l=Object.freeze({id:"editor",order:5,type:"object",title:r.NC("editorConfigurationTitle","Editor"),scope:5}),h=Object.assign(Object.assign({},l),{properties:{"editor.tabSize":{type:"number",default:o.D.tabSize,minimum:1,markdownDescription:r.NC("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:o.D.insertSpaces,markdownDescription:r.NC("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:o.D.detectIndentation,markdownDescription:r.NC("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:o.D.trimAutoWhitespace,description:r.NC("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:o.D.largeFileOptimizations,description:r.NC("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:r.NC("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.NC("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),r.NC("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),r.NC("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:r.NC("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.NC("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.NC("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.NC("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.NC("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.NC("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.NC("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:r.NC("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.NC("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:r.NC("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:r.NC("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:r.NC("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:r.NC("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:r.NC("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:r.NC("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:r.NC("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(let e of n.Bc){let t=e.schema;if(void 0!==t){if(void 0!==t.type||void 0!==t.anyOf)h.properties[`editor.${e.name}`]=t;else for(let e in t)Object.hasOwnProperty.call(t,e)&&(h.properties[e]=t[e])}}let d=null;function u(){return null===d&&(d=Object.create(null),Object.keys(h.properties).forEach(e=>{d[e]=!0})),d}function c(e){let t=u();return t[`editor.${e}`]||!1}function g(e){let t=u();return t[`diffEditor.${e}`]||!1}let p=a.B.as(s.IP.Configuration);p.registerConfiguration(h)},64141:function(e,t,i){"use strict";i.d(t,{$J:function(){return T},Av:function(){return A},BH:function(){return V},Bb:function(){return c},Bc:function(){return F},LJ:function(){return g},NY:function(){return k},O7:function(){return C},Zc:function(){return w},d2:function(){return o},gk:function(){return E},hL:function(){return P},n0:function(){return x},qt:function(){return R},rk:function(){return m},y0:function(){return u}});var n,o,r=i(63580),s=i(1432),a=i(270),l=i(9488),h=i(36248),d=i(22075);let u=8;class c{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class g{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class p{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}compute(e,t,i){return i}}class m{constructor(e,t){this.newValue=e,this.didChange=t}}function f(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new m(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){let i=Array.isArray(e)&&Array.isArray(t)&&l.fS(e,t);return new m(t,!i)}let i=!1;for(let n in t)if(t.hasOwnProperty(n)){let o=f(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new m(e,i)}class _{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return f(e,t)}validate(e){return this.defaultValue}}class v{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function C(e,t){return void 0===e?t:"false"!==e&&!!e}class b extends v{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return C(e,this.defaultValue)}}function w(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),0|(o=Math.min(n,o)))}class y extends v{constructor(e,t,i,n,o,r){void 0!==r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return w(e,t,i,n)}validate(e){return y.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class S extends v{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;let i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(S.float(e,this.defaultValue))}}class L extends v{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return L.string(e,this.defaultValue)}}function k(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class N extends v{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class D extends p{constructor(e,t,i,n,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}(n=o||(o={}))[n.Line=1]="Line",n[n.Block=2]="Block",n[n.Underline=3]="Underline",n[n.LineThin=4]="LineThin",n[n.BlockOutline=5]="BlockOutline",n[n.UnderlineThin=6]="UnderlineThin";class x extends p{constructor(){super(47,"fontLigatures",x.OFF,{anyOf:[{type:"boolean",description:r.NC("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:r.NC("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:r.NC("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?x.OFF:"true"===e?x.ON:e:e?x.ON:x.OFF}}x.OFF='"liga" off, "calt" off',x.ON='"liga" on, "calt" on';class I extends p{constructor(){super(49,"fontWeight",P.fontWeight,{anyOf:[{type:"number",minimum:I.MINIMUM_VALUE,maximum:I.MAXIMUM_VALUE,errorMessage:r.NC("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:I.SUGGESTION_VALUES}],default:P.fontWeight,description:r.NC("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(y.clampedInt(e,P.fontWeight,I.MINIMUM_VALUE,I.MAXIMUM_VALUE))}}I.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],I.MINIMUM_VALUE=1,I.MAXIMUM_VALUE=1e3;class E extends _{constructor(){super(133)}compute(e,t,i){return E.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){let i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};let r=t.stableMinimapLayoutInput,s=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters,c=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale,g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,C=e.isViewportWrapping,b=d?2:3,w=Math.floor(o*n),y=w/o,S=!1,L=!1,k=b*c,N=c/o,D=1;if("fill"===p||"fit"===p){let{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:l,minimapLineCount:d}=E.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,height:n,lineHeight:a,pixelRatio:o});if(_/d>1)S=!0,L=!0,k=1,N=(c=1)/o;else{let n=!1,h=c+1;if("fit"===p){let e=Math.ceil((_+r)*k);C&&s&&v<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;let n=c;k=Math.min(a*o,Math.max(1,Math.floor(1/l))),C&&s&&v<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),(c=Math.min(h,Math.max(1,Math.floor(k/b))))>n&&(D=Math.min(2,c/n)),N=c/o/D,w=Math.ceil(Math.max(i,_+r)*k),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=c):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let x=Math.floor(g*N),I=Math.min(x,Math.max(0,Math.floor((v-f-2)*N/(l+N)))+u),T=Math.floor(o*I),M=T/o;return{renderMinimap:d?1:2,minimapLeft:"left"===m?0:i-I-f,minimapWidth:I,minimapHeightIsEditorHeight:S,minimapIsSampling:L,minimapScale:c,minimapLineHeight:k,minimapCanvasInnerWidth:T=Math.floor(T*D),minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){let i;let n=0|t.outerWidth,o=0|t.outerHeight,r=0|t.lineHeight,s=0|t.lineNumbersDigitCount,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,h=t.pixelRatio,d=t.viewLineCount,u=e.get(125),c="inherit"===u?e.get(124):u,p="inherit"===c?e.get(120):c,m=e.get(123),f=e.get(2),_=t.isDominatedByLongLines,v=e.get(52),C=0!==e.get(62).renderType,b=e.get(63),w=e.get(96),S=e.get(67),L=e.get(94),k=L.verticalScrollbarSize,N=L.verticalHasArrows,D=L.arrowSize,x=L.horizontalScrollbarSize,I=e.get(60),T=e.get(39),M="never"!==e.get(101);if("string"==typeof I&&/^\d+(\.\d+)?ch$/.test(I)){let e=parseFloat(I.substr(0,I.length-2));i=y.clampedInt(e*a,0,0,1e3)}else i=y.clampedInt(I,0,0,1e3);T&&M&&(i+=16);let A=0;C&&(A=Math.round(Math.max(s,b)*l));let R=0;v&&(R=r);let O=0,P=0+R,F=P+A,B=F+i,V=n-R-A-i,W=!1,H=!1,z=-1;2!==f&&("inherit"===c&&_?(W=!0,H=!0):"on"===p||"bounded"===p?H=!0:"wordWrapColumn"===p&&(z=m));let K=E._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:h,scrollBeyondLastLine:w,minimap:S,verticalScrollbarWidth:k,viewLineCount:d,remainingWidth:V,isViewportWrapping:H},t.memory||new g);0!==K.renderMinimap&&0===K.minimapLeft&&(O+=K.minimapWidth,P+=K.minimapWidth,F+=K.minimapWidth,B+=K.minimapWidth);let U=V-K.minimapWidth,$=Math.max(1,Math.floor((U-k-2)/a)),j=N?D:0;return H&&(z=Math.max(1,$),"bounded"===p&&(z=Math.min(z,m))),{width:n,height:o,glyphMarginLeft:O,glyphMarginWidth:R,lineNumbersLeft:P,lineNumbersWidth:A,decorationsLeft:F,decorationsWidth:i,contentLeft:B,contentWidth:U,minimap:K,viewportColumn:$,isWordWrapMinified:W,isViewportWrapping:H,wrappingColumn:z,verticalScrollbarWidth:k,horizontalScrollbarHeight:x,overviewRuler:{top:j,width:k,height:o-2*j,right:0}}}}function T(e){let t=e.get(89);return"editable"===t?e.get(83):"on"!==t}function M(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}let A="inUntrustedWorkspace",R={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function O(e,t,i){let n=i.indexOf(e);return -1===n?t:i[n]}let P={fontFamily:s.dz?"Menlo, Monaco, 'Courier New', monospace":s.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:s.dz?12:14,lineHeight:0,letterSpacing:0},F=[];function B(e){return F[e.id]=e,e}let V={acceptSuggestionOnCommitCharacter:B(new b(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:r.NC("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`; `) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:B(new N(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",r.NC("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:r.NC("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:B(new class extends p{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[r.NC("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),r.NC("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),r.NC("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:r.NC("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:B(new y(3,"accessibilityPageSize",10,1,1073741824,{description:r.NC("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:B(new L(4,"ariaLabel",r.NC("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:B(new N(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r.NC("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),r.NC("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:r.NC("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:B(new N(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",r.NC("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:r.NC("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:B(new N(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",r.NC("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:r.NC("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:B(new N(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r.NC("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),r.NC("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:r.NC("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:B(new D(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}},{enumDescriptions:[r.NC("editor.autoIndent.none","The editor will not insert indentation automatically."),r.NC("editor.autoIndent.keep","The editor will keep the current line's indentation."),r.NC("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),r.NC("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),r.NC("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:r.NC("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:B(new b(10,"automaticLayout",!1)),autoSurround:B(new N(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[r.NC("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),r.NC("editor.autoSurround.quotes","Surround with quotes but not brackets."),r.NC("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:r.NC("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:B(new class extends p{constructor(){let e={enabled:d.D.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:d.D.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:r.NC("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:r.NC("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:C(e.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}:this.defaultValue}}),bracketPairGuides:B(new class extends p{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[r.NC("editor.guides.bracketPairs.true","Enables bracket pair guides."),r.NC("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),r.NC("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:r.NC("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[r.NC("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),r.NC("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),r.NC("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:r.NC("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:r.NC("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:r.NC("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[r.NC("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),r.NC("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),r.NC("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:r.NC("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){return e&&"object"==typeof e?{bracketPairs:O(e.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:O(e.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:C(e.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:C(e.indentation,this.defaultValue.indentation),highlightActiveIndentation:O(e.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}:this.defaultValue}}),stickyTabStops:B(new b(106,"stickyTabStops",!1,{description:r.NC("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:B(new b(14,"codeLens",!0,{description:r.NC("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:B(new L(15,"codeLensFontFamily","",{description:r.NC("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:B(new y(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:r.NC("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:B(new b(17,"colorDecorators",!0,{description:r.NC("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:B(new b(18,"columnSelection",!1,{description:r.NC("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:B(new class extends p{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:r.NC("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:r.NC("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){return e&&"object"==typeof e?{insertSpace:C(e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:C(e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}:this.defaultValue}}),contextmenu:B(new b(20,"contextmenu",!0)),copyWithSyntaxHighlighting:B(new b(21,"copyWithSyntaxHighlighting",!0,{description:r.NC("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:B(new D(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}},{description:r.NC("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:B(new b(23,"cursorSmoothCaretAnimation",!1,{description:r.NC("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:B(new D(24,"cursorStyle",o.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],function(e){switch(e){case"line":return o.Line;case"block":return o.Block;case"underline":return o.Underline;case"line-thin":return o.LineThin;case"block-outline":return o.BlockOutline;case"underline-thin":return o.UnderlineThin}},{description:r.NC("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:B(new y(25,"cursorSurroundingLines",0,0,1073741824,{description:r.NC("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:B(new N(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[r.NC("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),r.NC("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:r.NC("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:B(new y(27,"cursorWidth",0,0,1073741824,{markdownDescription:r.NC("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:B(new b(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:B(new b(29,"disableMonospaceOptimizations",!1)),domReadOnly:B(new b(30,"domReadOnly",!1)),dragAndDrop:B(new b(31,"dragAndDrop",!0,{description:r.NC("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:B(new class extends b{constructor(){super(33,"emptySelectionClipboard",!0,{description:r.NC("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:B(new class extends p{constructor(){let e={enabled:!0};super(32,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:r.NC("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),experimental:B(new class extends p{constructor(){let e={stickyScroll:{enabled:!1}};super(34,"experimental",e,{"editor.experimental.stickyScroll.enabled":{type:"boolean",default:e.stickyScroll.enabled,description:r.NC("editor.experimental.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")}})}validate(e){var t;return e&&"object"==typeof e?{stickyScroll:{enabled:C(null===(t=e.stickyScroll)||void 0===t?void 0:t.enabled,this.defaultValue.stickyScroll.enabled)}}:this.defaultValue}}),extraEditorClassName:B(new L(35,"extraEditorClassName","")),fastScrollSensitivity:B(new S(36,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:r.NC("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:B(new class extends p{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(37,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:r.NC("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[r.NC("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),r.NC("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),r.NC("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:r.NC("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[r.NC("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),r.NC("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),r.NC("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:r.NC("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:r.NC("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:r.NC("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:r.NC("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){return e&&"object"==typeof e?{cursorMoveOnType:C(e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:C(e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:C(e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:C(e.loop,this.defaultValue.loop)}:this.defaultValue}}),fixedOverflowWidgets:B(new b(38,"fixedOverflowWidgets",!1)),folding:B(new b(39,"folding",!0,{description:r.NC("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:B(new N(40,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[r.NC("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),r.NC("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:r.NC("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:B(new b(41,"foldingHighlight",!0,{description:r.NC("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:B(new b(42,"foldingImportsByDefault",!1,{description:r.NC("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:B(new y(43,"foldingMaximumRegions",5e3,10,65e3,{description:r.NC("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:B(new b(44,"unfoldOnClickAfterEndOfLine",!1,{description:r.NC("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:B(new L(45,"fontFamily",P.fontFamily,{description:r.NC("fontFamily","Controls the font family.")})),fontInfo:B(new class extends _{constructor(){super(46)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:B(new x),fontSize:B(new class extends v{constructor(){super(48,"fontSize",P.fontSize,{type:"number",minimum:6,maximum:100,default:P.fontSize,description:r.NC("fontSize","Controls the font size in pixels.")})}validate(e){let t=S.float(e,this.defaultValue);return 0===t?P.fontSize:S.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:B(new I),formatOnPaste:B(new b(50,"formatOnPaste",!1,{description:r.NC("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:B(new b(51,"formatOnType",!1,{description:r.NC("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:B(new b(52,"glyphMargin",!0,{description:r.NC("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:B(new class extends p{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[r.NC("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),r.NC("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),r.NC("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(53,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:r.NC("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:r.NC("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:r.NC("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:r.NC("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:r.NC("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:r.NC("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;return e&&"object"==typeof e?{multiple:k(e.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=e.multipleDefinitions)&&void 0!==t?t:k(e.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=e.multipleTypeDefinitions)&&void 0!==i?i:k(e.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=e.multipleDeclarations)&&void 0!==n?n:k(e.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=e.multipleImplementations)&&void 0!==o?o:k(e.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=e.multipleReferences)&&void 0!==r?r:k(e.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:L.string(e.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:L.string(e.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:L.string(e.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:L.string(e.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:L.string(e.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}:this.defaultValue}}),hideCursorInOverviewRuler:B(new b(54,"hideCursorInOverviewRuler",!1,{description:r.NC("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:B(new class extends p{constructor(){let e={enabled:!0,delay:300,sticky:!0,above:!0};super(55,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:r.NC("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:r.NC("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:r.NC("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:r.NC("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),delay:y.clampedInt(e.delay,this.defaultValue.delay,0,1e4),sticky:C(e.sticky,this.defaultValue.sticky),above:C(e.above,this.defaultValue.above)}:this.defaultValue}}),inDiffEditor:B(new b(56,"inDiffEditor",!1)),letterSpacing:B(new S(58,"letterSpacing",P.letterSpacing,e=>S.clamp(e,-5,20),{description:r.NC("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:B(new class extends p{constructor(){let e={enabled:!0};super(59,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:r.NC("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:B(new v(60,"lineDecorationsWidth",10)),lineHeight:B(new class extends S{constructor(){super(61,"lineHeight",P.lineHeight,e=>S.clamp(e,0,150),{markdownDescription:r.NC("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:B(new class extends p{constructor(){super(62,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[r.NC("lineNumbers.off","Line numbers are not rendered."),r.NC("lineNumbers.on","Line numbers are rendered as absolute number."),r.NC("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),r.NC("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:r.NC("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:B(new y(63,"lineNumbersMinChars",5,1,300)),linkedEditing:B(new b(64,"linkedEditing",!1,{description:r.NC("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:B(new b(65,"links",!0,{description:r.NC("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:B(new N(66,"matchBrackets","always",["always","near","never"],{description:r.NC("matchBrackets","Highlight matching brackets.")})),minimap:B(new class extends p{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:r.NC("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:r.NC("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[r.NC("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),r.NC("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),r.NC("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:r.NC("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:r.NC("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:r.NC("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:r.NC("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:r.NC("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:r.NC("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),autohide:C(e.autohide,this.defaultValue.autohide),size:k(e.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(e.side,this.defaultValue.side,["right","left"]),showSlider:k(e.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:C(e.renderCharacters,this.defaultValue.renderCharacters),scale:y.clampedInt(e.scale,1,1,3),maxColumn:y.clampedInt(e.maxColumn,this.defaultValue.maxColumn,1,1e4)}:this.defaultValue}}),mouseStyle:B(new N(68,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:B(new S(69,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:r.NC("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:B(new b(70,"mouseWheelZoom",!1,{markdownDescription:r.NC("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:B(new b(71,"multiCursorMergeOverlapping",!0,{description:r.NC("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:B(new D(72,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],function(e){return"ctrlCmd"===e?s.dz?"metaKey":"ctrlKey":"altKey"},{markdownEnumDescriptions:[r.NC("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),r.NC("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:r.NC({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:B(new N(73,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[r.NC("multiCursorPaste.spread","Each cursor pastes a single line of the text."),r.NC("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:r.NC("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:B(new b(74,"occurrencesHighlight",!0,{description:r.NC("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:B(new b(75,"overviewRulerBorder",!0,{description:r.NC("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:B(new y(76,"overviewRulerLanes",3,0,3)),padding:B(new class extends p{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:r.NC("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:r.NC("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){return e&&"object"==typeof e?{top:y.clampedInt(e.top,0,0,1e3),bottom:y.clampedInt(e.bottom,0,0,1e3)}:this.defaultValue}}),parameterHints:B(new class extends p{constructor(){let e={enabled:!0,cycle:!1};super(78,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:r.NC("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:r.NC("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),cycle:C(e.cycle,this.defaultValue.cycle)}:this.defaultValue}}),peekWidgetDefaultFocus:B(new N(79,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[r.NC("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),r.NC("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:r.NC("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:B(new b(80,"definitionLinkOpensInPeek",!1,{description:r.NC("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:B(new class extends p{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[r.NC("on","Quick suggestions show inside the suggest widget"),r.NC("inline","Quick suggestions show as ghost text"),r.NC("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:r.NC("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:r.NC("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:r.NC("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:r.NC("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){let t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;let{other:t,comments:i,strings:n}=e,o=["on","inline","off"];return{other:"boolean"==typeof t?t?"on":"off":k(t,this.defaultValue.other,o),comments:"boolean"==typeof i?i?"on":"off":k(i,this.defaultValue.comments,o),strings:"boolean"==typeof n?n?"on":"off":k(n,this.defaultValue.strings,o)}}}),quickSuggestionsDelay:B(new y(82,"quickSuggestionsDelay",10,0,1073741824,{description:r.NC("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:B(new b(83,"readOnly",!1)),renameOnType:B(new b(84,"renameOnType",!1,{description:r.NC("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:r.NC("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:B(new b(85,"renderControlCharacters",!0,{description:r.NC("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:B(new b(86,"renderFinalNewline",!0,{description:r.NC("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:B(new N(87,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",r.NC("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:r.NC("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:B(new b(88,"renderLineHighlightOnlyWhenFocus",!1,{description:r.NC("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:B(new N(89,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:B(new N(90,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",r.NC("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),r.NC("renderWhitespace.selection","Render whitespace characters only on selected text."),r.NC("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:r.NC("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:B(new y(91,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:B(new b(92,"roundedSelection",!0,{description:r.NC("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:B(new class extends p{constructor(){let e=[],t={type:"number",description:r.NC("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(93,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:r.NC("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:r.NC("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)"number"==typeof i?t.push({column:y.clampedInt(i,0,0,1e4),color:null}):i&&"object"==typeof i&&t.push({column:y.clampedInt(i.column,0,0,1e4),color:i.color});return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}),scrollbar:B(new class extends p{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(94,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[r.NC("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),r.NC("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),r.NC("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:r.NC("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[r.NC("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),r.NC("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),r.NC("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:r.NC("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:r.NC("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:r.NC("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:r.NC("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;let t=y.clampedInt(e.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=y.clampedInt(e.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:y.clampedInt(e.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:M(e.vertical,this.defaultValue.vertical),horizontal:M(e.horizontal,this.defaultValue.horizontal),useShadows:C(e.useShadows,this.defaultValue.useShadows),verticalHasArrows:C(e.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:C(e.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:C(e.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:C(e.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:t,horizontalSliderSize:y.clampedInt(e.horizontalSliderSize,t,0,1e3),verticalScrollbarSize:i,verticalSliderSize:y.clampedInt(e.verticalSliderSize,i,0,1e3),scrollByPage:C(e.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:B(new y(95,"scrollBeyondLastColumn",4,0,1073741824,{description:r.NC("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:B(new b(96,"scrollBeyondLastLine",!0,{description:r.NC("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:B(new b(97,"scrollPredominantAxis",!0,{description:r.NC("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:B(new b(98,"selectionClipboard",!0,{description:r.NC("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.IJ})),selectionHighlight:B(new b(99,"selectionHighlight",!0,{description:r.NC("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:B(new b(100,"selectOnLineNumbers",!0)),showFoldingControls:B(new N(101,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[r.NC("showFoldingControls.always","Always show the folding controls."),r.NC("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),r.NC("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:r.NC("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:B(new b(102,"showUnused",!0,{description:r.NC("showUnused","Controls fading out of unused code.")})),showDeprecated:B(new b(128,"showDeprecated",!0,{description:r.NC("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:B(new class extends p{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:r.NC("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[r.NC("editor.inlayHints.on","Inlay hints are enabled"),r.NC("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding `Ctrl+Alt`"),r.NC("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding `Ctrl+Alt`"),r.NC("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:r.NC("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:r.NC("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:r.NC("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){return e&&"object"==typeof e?("boolean"==typeof e.enabled&&(e.enabled=e.enabled?"on":"off"),{enabled:k(e.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:y.clampedInt(e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:L.string(e.fontFamily,this.defaultValue.fontFamily),padding:C(e.padding,this.defaultValue.padding)}):this.defaultValue}}),snippetSuggestions:B(new N(103,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[r.NC("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),r.NC("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),r.NC("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),r.NC("snippetSuggestions.none","Do not show snippet suggestions.")],description:r.NC("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:B(new class extends p{constructor(){super(104,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:r.NC("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:C(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:B(new b(105,"smoothScrolling",!1,{description:r.NC("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:B(new y(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:B(new class extends p{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(108,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[r.NC("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),r.NC("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:r.NC("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:r.NC("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:r.NC("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:r.NC("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:r.NC("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:r.NC("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:r.NC("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:r.NC("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:r.NC("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:r.NC("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:r.NC("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){return e&&"object"==typeof e?{insertMode:k(e.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:C(e.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:C(e.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:C(e.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:C(e.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:C(e.showIcons,this.defaultValue.showIcons),showStatusBar:C(e.showStatusBar,this.defaultValue.showStatusBar),preview:C(e.preview,this.defaultValue.preview),previewMode:k(e.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:C(e.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:C(e.showMethods,this.defaultValue.showMethods),showFunctions:C(e.showFunctions,this.defaultValue.showFunctions),showConstructors:C(e.showConstructors,this.defaultValue.showConstructors),showDeprecated:C(e.showDeprecated,this.defaultValue.showDeprecated),showFields:C(e.showFields,this.defaultValue.showFields),showVariables:C(e.showVariables,this.defaultValue.showVariables),showClasses:C(e.showClasses,this.defaultValue.showClasses),showStructs:C(e.showStructs,this.defaultValue.showStructs),showInterfaces:C(e.showInterfaces,this.defaultValue.showInterfaces),showModules:C(e.showModules,this.defaultValue.showModules),showProperties:C(e.showProperties,this.defaultValue.showProperties),showEvents:C(e.showEvents,this.defaultValue.showEvents),showOperators:C(e.showOperators,this.defaultValue.showOperators),showUnits:C(e.showUnits,this.defaultValue.showUnits),showValues:C(e.showValues,this.defaultValue.showValues),showConstants:C(e.showConstants,this.defaultValue.showConstants),showEnums:C(e.showEnums,this.defaultValue.showEnums),showEnumMembers:C(e.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:C(e.showKeywords,this.defaultValue.showKeywords),showWords:C(e.showWords,this.defaultValue.showWords),showColors:C(e.showColors,this.defaultValue.showColors),showFiles:C(e.showFiles,this.defaultValue.showFiles),showReferences:C(e.showReferences,this.defaultValue.showReferences),showFolders:C(e.showFolders,this.defaultValue.showFolders),showTypeParameters:C(e.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:C(e.showSnippets,this.defaultValue.showSnippets),showUsers:C(e.showUsers,this.defaultValue.showUsers),showIssues:C(e.showIssues,this.defaultValue.showIssues)}:this.defaultValue}}),inlineSuggest:B(new class extends p{constructor(){let e={enabled:!0,mode:"subwordSmart"};super(57,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:r.NC("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),mode:k(e.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}:this.defaultValue}}),suggestFontSize:B(new y(109,"suggestFontSize",0,0,1e3,{markdownDescription:r.NC("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:B(new y(110,"suggestLineHeight",0,0,1e3,{markdownDescription:r.NC("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:B(new b(111,"suggestOnTriggerCharacters",!0,{description:r.NC("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:B(new N(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[r.NC("suggestSelection.first","Always select the first suggestion."),r.NC("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),r.NC("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:r.NC("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:B(new N(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[r.NC("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),r.NC("tabCompletion.off","Disable tab completions."),r.NC("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:r.NC("tabCompletion","Enables tab completions.")})),tabIndex:B(new y(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:B(new class extends p{constructor(){let e={nonBasicASCII:A,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:A,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",e,{[R.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.nonBasicASCII,description:r.NC("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[R.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:r.NC("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[R.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:r.NC("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[R.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeComments,description:r.NC("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[R.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeStrings,description:r.NC("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[R.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:r.NC("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[R.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:r.NC("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&!h.fS(e.allowedCharacters,t.allowedCharacters)&&(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0),t.allowedLocales&&e&&!h.fS(e.allowedLocales,t.allowedLocales)&&(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0);let n=super.applyUpdate(e,t);return i?new m(n.newValue,!0):n}validate(e){return e&&"object"==typeof e?{nonBasicASCII:O(e.nonBasicASCII,A,[!0,!1,A]),invisibleCharacters:C(e.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:C(e.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:O(e.includeComments,A,[!0,!1,A]),includeStrings:O(e.includeStrings,A,[!0,!1,A]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}:this.defaultValue}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;let i={};for(let[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:B(new N(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[r.NC("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),r.NC("unusualLineTerminators.off","Unusual line terminators are ignored."),r.NC("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:r.NC("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:B(new b(117,"useShadowDOM",!0)),useTabStops:B(new b(118,"useTabStops",!0,{description:r.NC("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:B(new L(119,"wordSeparators",a.vu,{description:r.NC("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:B(new N(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),r.NC({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:r.NC({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:B(new L(121,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xa2\xb0′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:B(new L(122,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「\xa3\xa5$£¥++")),wordWrapColumn:B(new y(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:r.NC({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:B(new N(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:B(new N(125,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:B(new D(126,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}},{enumDescriptions:[r.NC("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),r.NC("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),r.NC("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),r.NC("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:r.NC("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:B(new N(127,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[r.NC("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),r.NC("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:r.NC("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:B(new class extends _{constructor(){super(130)}compute(e,t,i){let n=["monaco-editor"];return t.get(35)&&n.push(t.get(35)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(68)?n.push("mouse-default"):"copy"===t.get(68)&&n.push("mouse-copy"),t.get(102)&&n.push("showUnused"),t.get(128)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:B(new class extends _{constructor(){super(131)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:B(new class extends _{constructor(){super(132)}compute(e,t,i){let n=t.get(83);return!!n||e.tabFocusMode}}),layoutInfo:B(new E),wrappingInfo:B(new class extends _{constructor(){super(134)}compute(e,t,i){let n=t.get(133);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},82334:function(e,t,i){"use strict";i.d(t,{C:function(){return o}});var n=i(4669);let o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},27374:function(e,t,i){"use strict";i.d(t,{E4:function(){return a},pR:function(){return l}});var n=i(1432),o=i(64141),r=i(82334);let s=n.dz?1.5:1.35;class a{constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){let n=e.get(45),o=e.get(49),r=e.get(48),s=e.get(47),l=e.get(61),h=e.get(58);return a._create(n,o,r,s,l,h,t,i)}static _create(e,t,i,n,o,l,h,d){0===o?o=s*i:o<8&&(o*=i),(o=Math.round(o))<8&&(o=8);let u=1+(d?0:.1*r.C.getZoomLevel());return i*=u,o*=u,new a({pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:o,letterSpacing:l})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){let e=o.hL.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},44906:function(e,t,i){"use strict";i.d(t,{N:function(){return o},q:function(){return r}});var n=i(85427);class o{constructor(e){let t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class r{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},7988:function(e,t,i){"use strict";i.d(t,{i:function(){return o}});var n=i(97295);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){let o=Math.min(t-1,e.length),r=e.substring(0,o),s=new n.W1(r),a=0;for(;!s.eol();){let e=n.ZH(r,o,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;let o=e.length,r=new n.W1(e),s=0,a=1;for(;!r.eol();){let l=n.ZH(e,o,r.offset);r.nextGraphemeLength();let h=this._nextVisibleColumn(l,s,i),d=r.offset+1;if(h>=t){let e=t-s,i=h-t;if(i{let i=e.getColor(r.cvW);i&&t.addRule(`.monaco-editor, .monaco-editor-background { background-color: ${i}; }`);let n=e.getColor(l),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`);let s=e.getColor(r.NOs);s&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${s}; }`);let h=e.getColor(D);h&&t.addRule(`.monaco-editor .margin { background-color: ${h}; }`);let p=e.getColor(d);p&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${p}; }`);let m=e.getColor(u);m&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${(0,a.c3)(e.type)?"dotted":"solid"} ${m}; }`);let _=e.getColor(c);_&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${_}; }`);let v=e.getColor(g);v&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${(0,a.c3)(e.type)?"dotted":"solid"} ${v}; }`);let C=e.getColor(f);C&&(t.addRule(`.monaco-editor .mtkw { color: ${C} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${C} !important; }`))})},23795:function(e,t,i){"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;ri||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<=e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>=e.endColumn))}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumne.endColumn))}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<=e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>=e.endColumn))}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new o(i,n,r,s)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,d=t.endColumn;return(ih?(r=h,s=d):r===h&&(s=Math.min(s,d)),i>r||i===r&&n>s)?null:new o(i,n,r,s)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},3860:function(e,t,i){"use strict";i.d(t,{Y:function(){return r}});var n=i(50187),o=i(24314);class r extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return r.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new r(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;inew m(e),a=function(e,t,i){let n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?p(e,t,i):u().decode(n)}):(s=e=>new f,a=p);class m{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return c().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){let t=this._capacity-this._bufferLength;t<=1&&(0===t||l.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}(e=>new o(e))},270:function(e,t,i){"use strict";i.d(t,{Af:function(){return s},eq:function(){return a},t2:function(){return function e(t,i,o,r,s){if(s||(s=n.$.first(l)),o.length>s.maxLen){let n=t-s.maxLen/2;return n<0?n=0:r+=n,o=o.substring(n,t+s.maxLen/2),e(t,i,o,r,s)}let a=Date.now(),h=t-1-r,d=-1,u=null;for(let e=1;!(Date.now()-a>=s.timeBudget);e++){let t=h-s.windowSize*e;i.lastIndex=Math.max(0,t);let n=function(e,t,i,n){let o;for(;o=e.exec(t);){let t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)break}return null}(i,o,h,d);if(!n&&u||(u=n,t<=0))break;d=t}if(u){let e={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return i.lastIndex=0,e}return null}},vu:function(){return r}});var n=i(53725),o=i(91741);let r="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",s=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let i of r)e.indexOf(i)>=0||(t+="\\"+i);return RegExp(t+="\\s]+)","g")}();function a(e){let t=s;if(e&&e instanceof RegExp){if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}}return t.lastIndex=0,t}let l=new o.S;l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},47128:function(e,t,i){"use strict";i.d(t,{l:function(){return o}});var n=i(7988);class o{static whitespaceVisibleColumn(e,t,i){let o=e.length,r=0,s=-1,a=-1;for(let l=0;l=u.length+1)return!1;let c=u.charAt(d.column-2),g=n.get(c);if(!g)return!1;if((0,r.LN)(c)){if("never"===i)return!1}else if("never"===t)return!1;let p=u.charAt(d.column-1),m=!1;for(let e of g)e.open===c&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){let e=t.getLineContent(o.lineNumber),r=n.LC(e),a=-1===r?e.length+1:r+1;if(o.column<=a){let e=i.visibleColumnFromColumn(t,o),n=s.i.prevIndentTabStop(e,i.indentSize),r=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.e(o.lineNumber,r,o.lineNumber,o.column)}}return l.e.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(!(e.lineNumber>1))return e;{let i=e.lineNumber-1;return new h.L(i,t.getLineMaxColumn(i))}}static cut(e,t,i){let n=[],s=null;i.sort((e,t)=>h.L.compare(e.getStartPosition(),t.getEndPosition()));for(let r=0,a=i.length;r1&&(null==s?void 0:s.endLineNumber)!==u.lineNumber?(e=u.lineNumber-1,i=t.getLineMaxColumn(u.lineNumber-1),h=u.lineNumber,d=t.getLineMaxColumn(u.lineNumber)):(e=u.lineNumber,i=1,h=u.lineNumber,d=t.getLineMaxColumn(u.lineNumber));let c=new l.e(e,i,h,d);s=c,c.isEmpty()?n[r]=null:n[r]=new o.T4(c,"")}else n[r]=null}else n[r]=new o.T4(a,"")}return new r.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},28108:function(e,t,i){"use strict";i.d(t,{N:function(){return o},P:function(){return u}});var n,o,r=i(98401),s=i(55343),a=i(10839),l=i(92896),h=i(50187),d=i(24314);class u{static addCursorDown(e,t,i){let n=[],o=0;for(let r=0,l=t.length;rt&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new d.e(r.lineNumber,1,i,n),0,new h.L(i,n),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberl){let i=e.getLineCount(),n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{let e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){let o=e.model.validatePosition(n);return s.Vi.fromModelState(l.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);let i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new d.e(i,n,i,n),0,new h.L(i,n),0))}static moveTo(e,t,i,n,o){let r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new h.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,r){switch(i){case 0:if(4===r)return this._moveHalfLineLeft(e,t,n);return this._moveLeft(e,t,n,o);case 1:if(4===r)return this._moveHalfLineRight(e,t,n);return this._moveRight(e,t,n,o);case 2:if(2===r)return this._moveUpByViewLines(e,t,n,o);return this._moveUpByModelLines(e,t,n,o);case 3:if(2===r)return this._moveDownByViewLines(e,t,n,o);return this._moveDownByModelLines(e,t,n,o);case 4:if(2===r)return t.map(t=>s.Vi.fromViewState(a.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)));return t.map(t=>s.Vi.fromModelState(a.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 5:if(2===r)return t.map(t=>s.Vi.fromViewState(a.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)));return t.map(t=>s.Vi.fromModelState(a.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){let r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{let i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 13:{let i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 12:{let i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{let i=[];for(let o=0,s=t.length;oi.endLineNumber-1?i.endLineNumber-1:os.Vi.fromViewState(a.o.moveLeft(e.cursorConfig,e,t.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,r=t.length;os.Vi.fromViewState(a.o.moveRight(e.cursorConfig,e,t.viewState,i,n)))}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,r=t.length;othis.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){let e=this._editor.getLineChanges();if(!e)return}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})}),this.ranges.sort((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},84527:function(e,t,i){"use strict";i.d(t,{H:function(){return m}});var n=i(36248),o=i(11640),r=i(27982),s=i(94565),a=i(38819),l=i(72065),h=i(59422),d=i(97781),u=i(31106),c=i(4256),g=i(71922),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends r.Gm{constructor(e,t,i,n,o,r,s,a,l,h,d,u){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,r,s,a,l,h,d,u),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(3,l.TG),p(4,o.$),p(5,s.Hy),p(6,a.i6),p(7,d.XE),p(8,h.lT),p(9,u.F),p(10,c.c_),p(11,g.p)],m)},61329:function(e,t,i){"use strict";i.d(t,{OY:function(){return r},Sj:function(){return s},T4:function(){return o},Uo:function(){return a},hP:function(){return l}});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getEndPosition())}}class r{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromRange(o,0)}}class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),o=i[0].range;return n.Y.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},10291:function(e,t,i){"use strict";i.d(t,{U:function(){return c}});var n,o=i(97295),r=i(7988),s=i(24314),a=i(3860),l=i(1615),h=i(4256);let d=Object.create(null);function u(e,t){if(t<=0)return"";d[e]||(d[e]=["",e]);let i=d[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let c=class e{constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){let s=r.i.visibleColumnFromColumn(e,t,i);if(o){let e=u(" ",n),t=r.i.prevIndentTabStop(s,n),i=t/n;return u(e,i)}{let e=r.i.prevRenderTabStop(s,i),t=e/i;return u(" ",t)}}static shiftIndent(e,t,i,n,o){let s=r.i.visibleColumnFromColumn(e,t,i);if(o){let e=u(" ",n),t=r.i.nextIndentTabStop(s,n),i=t/n;return u(e,i)}{let e=r.i.nextRenderTabStop(s,i),t=e/i;return u(" ",t)}}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(t,i){let n=this._selection.startLineNumber,a=this._selection.endLineNumber;1===this._selection.endColumn&&n!==a&&(a-=1);let{tabSize:h,indentSize:d,insertSpaces:c}=this._opts,g=n===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let u=0,p=0;for(let m=n;m<=a;m++,u=p){let a;p=0;let f=t.getLineContent(m),_=o.LC(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1){let e=r.i.visibleColumnFromColumn(f,_+1,h);if(e%d!=0&&t.tokenization.isCheapToTokenize(m-1)){let e=(0,l.A)(this._opts.autoIndent,t,new s.e(m-1,t.getLineMaxColumn(m-1),m-1,t.getLineMaxColumn(m-1)),this._languageConfigurationService);if(e){if(p=u,e.appendText)for(let t=0,i=e.appendText.length;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=h.c_,function(e,t){n(e,t,2)})],c)},800:function(e,t,i){"use strict";i.d(t,{Pe:function(){return g},ei:function(){return c},wk:function(){return l}});var n=i(64141),o=i(22075),r=i(63580),s=i(23193),a=i(89872);let l=Object.freeze({id:"editor",order:5,type:"object",title:r.NC("editorConfigurationTitle","Editor"),scope:5}),h=Object.assign(Object.assign({},l),{properties:{"editor.tabSize":{type:"number",default:o.D.tabSize,minimum:1,markdownDescription:r.NC("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:o.D.insertSpaces,markdownDescription:r.NC("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:o.D.detectIndentation,markdownDescription:r.NC("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:o.D.trimAutoWhitespace,description:r.NC("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:o.D.largeFileOptimizations,description:r.NC("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:r.NC("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.NC("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),r.NC("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),r.NC("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:r.NC("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.NC("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.NC("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.NC("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.NC("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.NC("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.NC("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:["array","null"],default:null,description:r.NC("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.NC("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:r.NC("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:r.NC("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:r.NC("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:r.NC("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:r.NC("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:r.NC("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:r.NC("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(let e of n.Bc){let t=e.schema;if(void 0!==t){if(void 0!==t.type||void 0!==t.anyOf)h.properties[`editor.${e.name}`]=t;else for(let e in t)Object.hasOwnProperty.call(t,e)&&(h.properties[e]=t[e])}}let d=null;function u(){return null===d&&(d=Object.create(null),Object.keys(h.properties).forEach(e=>{d[e]=!0})),d}function c(e){let t=u();return t[`editor.${e}`]||!1}function g(e){let t=u();return t[`diffEditor.${e}`]||!1}let p=a.B.as(s.IP.Configuration);p.registerConfiguration(h)},64141:function(e,t,i){"use strict";i.d(t,{$J:function(){return T},Av:function(){return A},BH:function(){return V},Bb:function(){return c},Bc:function(){return F},LJ:function(){return g},NY:function(){return k},O7:function(){return C},Zc:function(){return w},d2:function(){return o},gk:function(){return E},hL:function(){return P},n0:function(){return x},qt:function(){return R},rk:function(){return m},y0:function(){return u}});var n,o,r=i(63580),s=i(1432),a=i(270),l=i(9488),h=i(36248),d=i(22075);let u=8;class c{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class g{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class p{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}compute(e,t,i){return i}}class m{constructor(e,t){this.newValue=e,this.didChange=t}}function f(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new m(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){let i=Array.isArray(e)&&Array.isArray(t)&&l.fS(e,t);return new m(t,!i)}let i=!1;for(let n in t)if(t.hasOwnProperty(n)){let o=f(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new m(e,i)}class _{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return f(e,t)}validate(e){return this.defaultValue}}class v{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function C(e,t){return void 0===e?t:"false"!==e&&!!e}class b extends v{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return C(e,this.defaultValue)}}function w(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),0|(o=Math.min(n,o)))}class y extends v{constructor(e,t,i,n,o,r){void 0!==r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return w(e,t,i,n)}validate(e){return y.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class S extends v{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;let i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(S.float(e,this.defaultValue))}}class L extends v{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return L.string(e,this.defaultValue)}}function k(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class N extends v{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class D extends p{constructor(e,t,i,n,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}(n=o||(o={}))[n.Line=1]="Line",n[n.Block=2]="Block",n[n.Underline=3]="Underline",n[n.LineThin=4]="LineThin",n[n.BlockOutline=5]="BlockOutline",n[n.UnderlineThin=6]="UnderlineThin";class x extends p{constructor(){super(47,"fontLigatures",x.OFF,{anyOf:[{type:"boolean",description:r.NC("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:r.NC("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:r.NC("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?x.OFF:"true"===e?x.ON:e:e?x.ON:x.OFF}}x.OFF='"liga" off, "calt" off',x.ON='"liga" on, "calt" on';class I extends p{constructor(){super(49,"fontWeight",P.fontWeight,{anyOf:[{type:"number",minimum:I.MINIMUM_VALUE,maximum:I.MAXIMUM_VALUE,errorMessage:r.NC("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:I.SUGGESTION_VALUES}],default:P.fontWeight,description:r.NC("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(y.clampedInt(e,P.fontWeight,I.MINIMUM_VALUE,I.MAXIMUM_VALUE))}}I.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],I.MINIMUM_VALUE=1,I.MAXIMUM_VALUE=1e3;class E extends _{constructor(){super(133)}compute(e,t,i){return E.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){let t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){let i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};let r=t.stableMinimapLayoutInput,s=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters,c=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale,g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,C=e.isViewportWrapping,b=d?2:3,w=Math.floor(o*n),y=w/o,S=!1,L=!1,k=b*c,N=c/o,D=1;if("fill"===p||"fit"===p){let{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:l,minimapLineCount:d}=E.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,height:n,lineHeight:a,pixelRatio:o});if(_/d>1)S=!0,L=!0,k=1,N=(c=1)/o;else{let n=!1,h=c+1;if("fit"===p){let e=Math.ceil((_+r)*k);C&&s&&v<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;let n=c;k=Math.min(a*o,Math.max(1,Math.floor(1/l))),C&&s&&v<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),(c=Math.min(h,Math.max(1,Math.floor(k/b))))>n&&(D=Math.min(2,c/n)),N=c/o/D,w=Math.ceil(Math.max(i,_+r)*k),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=c):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}let x=Math.floor(g*N),I=Math.min(x,Math.max(0,Math.floor((v-f-2)*N/(l+N)))+u),T=Math.floor(o*I),M=T/o;return{renderMinimap:d?1:2,minimapLeft:"left"===m?0:i-I-f,minimapWidth:I,minimapHeightIsEditorHeight:S,minimapIsSampling:L,minimapScale:c,minimapLineHeight:k,minimapCanvasInnerWidth:T=Math.floor(T*D),minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){let i;let n=0|t.outerWidth,o=0|t.outerHeight,r=0|t.lineHeight,s=0|t.lineNumbersDigitCount,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,h=t.pixelRatio,d=t.viewLineCount,u=e.get(125),c="inherit"===u?e.get(124):u,p="inherit"===c?e.get(120):c,m=e.get(123),f=e.get(2),_=t.isDominatedByLongLines,v=e.get(52),C=0!==e.get(62).renderType,b=e.get(63),w=e.get(96),S=e.get(67),L=e.get(94),k=L.verticalScrollbarSize,N=L.verticalHasArrows,D=L.arrowSize,x=L.horizontalScrollbarSize,I=e.get(60),T=e.get(39),M="never"!==e.get(101);if("string"==typeof I&&/^\d+(\.\d+)?ch$/.test(I)){let e=parseFloat(I.substr(0,I.length-2));i=y.clampedInt(e*a,0,0,1e3)}else i=y.clampedInt(I,0,0,1e3);T&&M&&(i+=16);let A=0;C&&(A=Math.round(Math.max(s,b)*l));let R=0;v&&(R=r);let O=0,P=0+R,F=P+A,B=F+i,V=n-R-A-i,W=!1,H=!1,z=-1;2!==f&&("inherit"===c&&_?(W=!0,H=!0):"on"===p||"bounded"===p?H=!0:"wordWrapColumn"===p&&(z=m));let K=E._computeMinimapLayout({outerWidth:n,outerHeight:o,lineHeight:r,typicalHalfwidthCharacterWidth:a,pixelRatio:h,scrollBeyondLastLine:w,minimap:S,verticalScrollbarWidth:k,viewLineCount:d,remainingWidth:V,isViewportWrapping:H},t.memory||new g);0!==K.renderMinimap&&0===K.minimapLeft&&(O+=K.minimapWidth,P+=K.minimapWidth,F+=K.minimapWidth,B+=K.minimapWidth);let U=V-K.minimapWidth,$=Math.max(1,Math.floor((U-k-2)/a)),j=N?D:0;return H&&(z=Math.max(1,$),"bounded"===p&&(z=Math.min(z,m))),{width:n,height:o,glyphMarginLeft:O,glyphMarginWidth:R,lineNumbersLeft:P,lineNumbersWidth:A,decorationsLeft:F,decorationsWidth:i,contentLeft:B,contentWidth:U,minimap:K,viewportColumn:$,isWordWrapMinified:W,isViewportWrapping:H,wrappingColumn:z,verticalScrollbarWidth:k,horizontalScrollbarHeight:x,overviewRuler:{top:j,width:k,height:o-2*j,right:0}}}}function T(e){let t=e.get(89);return"editable"===t?e.get(83):"on"!==t}function M(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}let A="inUntrustedWorkspace",R={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function O(e,t,i){let n=i.indexOf(e);return -1===n?t:i[n]}let P={fontFamily:s.dz?"Menlo, Monaco, 'Courier New', monospace":s.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:s.dz?12:14,lineHeight:0,letterSpacing:0},F=[];function B(e){return F[e.id]=e,e}let V={acceptSuggestionOnCommitCharacter:B(new b(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:r.NC("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`; `) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:B(new N(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",r.NC("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:r.NC("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:B(new class extends p{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[r.NC("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),r.NC("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),r.NC("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:r.NC("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:B(new y(3,"accessibilityPageSize",10,1,1073741824,{description:r.NC("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:B(new L(4,"ariaLabel",r.NC("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:B(new N(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r.NC("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),r.NC("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:r.NC("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:B(new N(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",r.NC("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:r.NC("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:B(new N(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",r.NC("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:r.NC("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:B(new N(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",r.NC("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),r.NC("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:r.NC("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:B(new D(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}},{enumDescriptions:[r.NC("editor.autoIndent.none","The editor will not insert indentation automatically."),r.NC("editor.autoIndent.keep","The editor will keep the current line's indentation."),r.NC("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),r.NC("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),r.NC("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:r.NC("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:B(new b(10,"automaticLayout",!1)),autoSurround:B(new N(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[r.NC("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),r.NC("editor.autoSurround.quotes","Surround with quotes but not brackets."),r.NC("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:r.NC("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:B(new class extends p{constructor(){let e={enabled:d.D.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:d.D.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:r.NC("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:r.NC("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:C(e.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}:this.defaultValue}}),bracketPairGuides:B(new class extends p{constructor(){let e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[r.NC("editor.guides.bracketPairs.true","Enables bracket pair guides."),r.NC("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),r.NC("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:r.NC("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[r.NC("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),r.NC("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),r.NC("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:r.NC("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:r.NC("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:r.NC("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[r.NC("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),r.NC("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),r.NC("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:r.NC("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){return e&&"object"==typeof e?{bracketPairs:O(e.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:O(e.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:C(e.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:C(e.indentation,this.defaultValue.indentation),highlightActiveIndentation:O(e.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}:this.defaultValue}}),stickyTabStops:B(new b(106,"stickyTabStops",!1,{description:r.NC("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:B(new b(14,"codeLens",!0,{description:r.NC("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:B(new L(15,"codeLensFontFamily","",{description:r.NC("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:B(new y(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:r.NC("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:B(new b(17,"colorDecorators",!0,{description:r.NC("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:B(new b(18,"columnSelection",!1,{description:r.NC("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:B(new class extends p{constructor(){let e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:r.NC("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:r.NC("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){return e&&"object"==typeof e?{insertSpace:C(e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:C(e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}:this.defaultValue}}),contextmenu:B(new b(20,"contextmenu",!0)),copyWithSyntaxHighlighting:B(new b(21,"copyWithSyntaxHighlighting",!0,{description:r.NC("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:B(new D(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}},{description:r.NC("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:B(new b(23,"cursorSmoothCaretAnimation",!1,{description:r.NC("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:B(new D(24,"cursorStyle",o.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],function(e){switch(e){case"line":return o.Line;case"block":return o.Block;case"underline":return o.Underline;case"line-thin":return o.LineThin;case"block-outline":return o.BlockOutline;case"underline-thin":return o.UnderlineThin}},{description:r.NC("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:B(new y(25,"cursorSurroundingLines",0,0,1073741824,{description:r.NC("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:B(new N(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[r.NC("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),r.NC("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:r.NC("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:B(new y(27,"cursorWidth",0,0,1073741824,{markdownDescription:r.NC("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:B(new b(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:B(new b(29,"disableMonospaceOptimizations",!1)),domReadOnly:B(new b(30,"domReadOnly",!1)),dragAndDrop:B(new b(31,"dragAndDrop",!0,{description:r.NC("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:B(new class extends b{constructor(){super(33,"emptySelectionClipboard",!0,{description:r.NC("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:B(new class extends p{constructor(){let e={enabled:!0};super(32,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:r.NC("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),experimental:B(new class extends p{constructor(){let e={stickyScroll:{enabled:!1}};super(34,"experimental",e,{"editor.experimental.stickyScroll.enabled":{type:"boolean",default:e.stickyScroll.enabled,description:r.NC("editor.experimental.stickyScroll","Shows the nested current scopes during the scroll at the top of the editor.")}})}validate(e){var t;return e&&"object"==typeof e?{stickyScroll:{enabled:C(null===(t=e.stickyScroll)||void 0===t?void 0:t.enabled,this.defaultValue.stickyScroll.enabled)}}:this.defaultValue}}),extraEditorClassName:B(new L(35,"extraEditorClassName","")),fastScrollSensitivity:B(new S(36,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:r.NC("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:B(new class extends p{constructor(){let e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(37,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:r.NC("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[r.NC("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),r.NC("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),r.NC("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:r.NC("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[r.NC("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),r.NC("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),r.NC("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:r.NC("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:r.NC("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:r.NC("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:r.NC("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){return e&&"object"==typeof e?{cursorMoveOnType:C(e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:C(e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:C(e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:C(e.loop,this.defaultValue.loop)}:this.defaultValue}}),fixedOverflowWidgets:B(new b(38,"fixedOverflowWidgets",!1)),folding:B(new b(39,"folding",!0,{description:r.NC("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:B(new N(40,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[r.NC("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),r.NC("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:r.NC("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:B(new b(41,"foldingHighlight",!0,{description:r.NC("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:B(new b(42,"foldingImportsByDefault",!1,{description:r.NC("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:B(new y(43,"foldingMaximumRegions",5e3,10,65e3,{description:r.NC("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:B(new b(44,"unfoldOnClickAfterEndOfLine",!1,{description:r.NC("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:B(new L(45,"fontFamily",P.fontFamily,{description:r.NC("fontFamily","Controls the font family.")})),fontInfo:B(new class extends _{constructor(){super(46)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:B(new x),fontSize:B(new class extends v{constructor(){super(48,"fontSize",P.fontSize,{type:"number",minimum:6,maximum:100,default:P.fontSize,description:r.NC("fontSize","Controls the font size in pixels.")})}validate(e){let t=S.float(e,this.defaultValue);return 0===t?P.fontSize:S.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:B(new I),formatOnPaste:B(new b(50,"formatOnPaste",!1,{description:r.NC("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:B(new b(51,"formatOnType",!1,{description:r.NC("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:B(new b(52,"glyphMargin",!0,{description:r.NC("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:B(new class extends p{constructor(){let e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[r.NC("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),r.NC("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),r.NC("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(53,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:r.NC("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:r.NC("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:r.NC("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:r.NC("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:r.NC("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:r.NC("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:r.NC("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;return e&&"object"==typeof e?{multiple:k(e.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=e.multipleDefinitions)&&void 0!==t?t:k(e.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=e.multipleTypeDefinitions)&&void 0!==i?i:k(e.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=e.multipleDeclarations)&&void 0!==n?n:k(e.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=e.multipleImplementations)&&void 0!==o?o:k(e.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=e.multipleReferences)&&void 0!==r?r:k(e.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:L.string(e.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:L.string(e.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:L.string(e.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:L.string(e.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:L.string(e.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}:this.defaultValue}}),hideCursorInOverviewRuler:B(new b(54,"hideCursorInOverviewRuler",!1,{description:r.NC("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:B(new class extends p{constructor(){let e={enabled:!0,delay:300,sticky:!0,above:!0};super(55,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:r.NC("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:r.NC("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:r.NC("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:r.NC("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),delay:y.clampedInt(e.delay,this.defaultValue.delay,0,1e4),sticky:C(e.sticky,this.defaultValue.sticky),above:C(e.above,this.defaultValue.above)}:this.defaultValue}}),inDiffEditor:B(new b(56,"inDiffEditor",!1)),letterSpacing:B(new S(58,"letterSpacing",P.letterSpacing,e=>S.clamp(e,-5,20),{description:r.NC("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:B(new class extends p{constructor(){let e={enabled:!0};super(59,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:r.NC("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:B(new v(60,"lineDecorationsWidth",10)),lineHeight:B(new class extends S{constructor(){super(61,"lineHeight",P.lineHeight,e=>S.clamp(e,0,150),{markdownDescription:r.NC("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:B(new class extends p{constructor(){super(62,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[r.NC("lineNumbers.off","Line numbers are not rendered."),r.NC("lineNumbers.on","Line numbers are rendered as absolute number."),r.NC("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),r.NC("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:r.NC("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:B(new y(63,"lineNumbersMinChars",5,1,300)),linkedEditing:B(new b(64,"linkedEditing",!1,{description:r.NC("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:B(new b(65,"links",!0,{description:r.NC("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:B(new N(66,"matchBrackets","always",["always","near","never"],{description:r.NC("matchBrackets","Highlight matching brackets.")})),minimap:B(new class extends p{constructor(){let e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:r.NC("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:r.NC("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[r.NC("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),r.NC("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),r.NC("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:r.NC("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:r.NC("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:r.NC("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:r.NC("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:r.NC("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:r.NC("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),autohide:C(e.autohide,this.defaultValue.autohide),size:k(e.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(e.side,this.defaultValue.side,["right","left"]),showSlider:k(e.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:C(e.renderCharacters,this.defaultValue.renderCharacters),scale:y.clampedInt(e.scale,1,1,3),maxColumn:y.clampedInt(e.maxColumn,this.defaultValue.maxColumn,1,1e4)}:this.defaultValue}}),mouseStyle:B(new N(68,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:B(new S(69,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:r.NC("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:B(new b(70,"mouseWheelZoom",!1,{markdownDescription:r.NC("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:B(new b(71,"multiCursorMergeOverlapping",!0,{description:r.NC("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:B(new D(72,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],function(e){return"ctrlCmd"===e?s.dz?"metaKey":"ctrlKey":"altKey"},{markdownEnumDescriptions:[r.NC("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),r.NC("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:r.NC({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:B(new N(73,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[r.NC("multiCursorPaste.spread","Each cursor pastes a single line of the text."),r.NC("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:r.NC("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:B(new b(74,"occurrencesHighlight",!0,{description:r.NC("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:B(new b(75,"overviewRulerBorder",!0,{description:r.NC("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:B(new y(76,"overviewRulerLanes",3,0,3)),padding:B(new class extends p{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:r.NC("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:r.NC("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){return e&&"object"==typeof e?{top:y.clampedInt(e.top,0,0,1e3),bottom:y.clampedInt(e.bottom,0,0,1e3)}:this.defaultValue}}),parameterHints:B(new class extends p{constructor(){let e={enabled:!0,cycle:!1};super(78,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:r.NC("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:r.NC("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),cycle:C(e.cycle,this.defaultValue.cycle)}:this.defaultValue}}),peekWidgetDefaultFocus:B(new N(79,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[r.NC("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),r.NC("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:r.NC("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:B(new b(80,"definitionLinkOpensInPeek",!1,{description:r.NC("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:B(new class extends p{constructor(){let e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[r.NC("on","Quick suggestions show inside the suggest widget"),r.NC("inline","Quick suggestions show as ghost text"),r.NC("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:r.NC("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:r.NC("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:r.NC("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:r.NC("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){let t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;let{other:t,comments:i,strings:n}=e,o=["on","inline","off"];return{other:"boolean"==typeof t?t?"on":"off":k(t,this.defaultValue.other,o),comments:"boolean"==typeof i?i?"on":"off":k(i,this.defaultValue.comments,o),strings:"boolean"==typeof n?n?"on":"off":k(n,this.defaultValue.strings,o)}}}),quickSuggestionsDelay:B(new y(82,"quickSuggestionsDelay",10,0,1073741824,{description:r.NC("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:B(new b(83,"readOnly",!1)),renameOnType:B(new b(84,"renameOnType",!1,{description:r.NC("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:r.NC("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:B(new b(85,"renderControlCharacters",!0,{description:r.NC("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:B(new b(86,"renderFinalNewline",!0,{description:r.NC("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:B(new N(87,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",r.NC("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:r.NC("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:B(new b(88,"renderLineHighlightOnlyWhenFocus",!1,{description:r.NC("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:B(new N(89,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:B(new N(90,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",r.NC("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),r.NC("renderWhitespace.selection","Render whitespace characters only on selected text."),r.NC("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:r.NC("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:B(new y(91,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:B(new b(92,"roundedSelection",!0,{description:r.NC("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:B(new class extends p{constructor(){let e=[],t={type:"number",description:r.NC("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(93,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:r.NC("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:r.NC("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)"number"==typeof i?t.push({column:y.clampedInt(i,0,0,1e4),color:null}):i&&"object"==typeof i&&t.push({column:y.clampedInt(i.column,0,0,1e4),color:i.color});return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}),scrollbar:B(new class extends p{constructor(){let e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(94,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[r.NC("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),r.NC("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),r.NC("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:r.NC("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[r.NC("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),r.NC("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),r.NC("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:r.NC("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:r.NC("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:r.NC("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:r.NC("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;let t=y.clampedInt(e.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=y.clampedInt(e.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:y.clampedInt(e.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:M(e.vertical,this.defaultValue.vertical),horizontal:M(e.horizontal,this.defaultValue.horizontal),useShadows:C(e.useShadows,this.defaultValue.useShadows),verticalHasArrows:C(e.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:C(e.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:C(e.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:C(e.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:t,horizontalSliderSize:y.clampedInt(e.horizontalSliderSize,t,0,1e3),verticalScrollbarSize:i,verticalSliderSize:y.clampedInt(e.verticalSliderSize,i,0,1e3),scrollByPage:C(e.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:B(new y(95,"scrollBeyondLastColumn",4,0,1073741824,{description:r.NC("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:B(new b(96,"scrollBeyondLastLine",!0,{description:r.NC("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:B(new b(97,"scrollPredominantAxis",!0,{description:r.NC("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:B(new b(98,"selectionClipboard",!0,{description:r.NC("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.IJ})),selectionHighlight:B(new b(99,"selectionHighlight",!0,{description:r.NC("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:B(new b(100,"selectOnLineNumbers",!0)),showFoldingControls:B(new N(101,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[r.NC("showFoldingControls.always","Always show the folding controls."),r.NC("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),r.NC("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:r.NC("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:B(new b(102,"showUnused",!0,{description:r.NC("showUnused","Controls fading out of unused code.")})),showDeprecated:B(new b(128,"showDeprecated",!0,{description:r.NC("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:B(new class extends p{constructor(){let e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:r.NC("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[r.NC("editor.inlayHints.on","Inlay hints are enabled"),r.NC("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding `Ctrl+Alt`"),r.NC("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding `Ctrl+Alt`"),r.NC("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:r.NC("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:r.NC("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:r.NC("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){return e&&"object"==typeof e?("boolean"==typeof e.enabled&&(e.enabled=e.enabled?"on":"off"),{enabled:k(e.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:y.clampedInt(e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:L.string(e.fontFamily,this.defaultValue.fontFamily),padding:C(e.padding,this.defaultValue.padding)}):this.defaultValue}}),snippetSuggestions:B(new N(103,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[r.NC("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),r.NC("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),r.NC("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),r.NC("snippetSuggestions.none","Do not show snippet suggestions.")],description:r.NC("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:B(new class extends p{constructor(){super(104,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:r.NC("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:C(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:B(new b(105,"smoothScrolling",!1,{description:r.NC("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:B(new y(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:B(new class extends p{constructor(){let e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(108,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[r.NC("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),r.NC("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:r.NC("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:r.NC("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:r.NC("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:r.NC("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:r.NC("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:r.NC("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:r.NC("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:r.NC("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:r.NC("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:r.NC("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:r.NC("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:r.NC("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){return e&&"object"==typeof e?{insertMode:k(e.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:C(e.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:C(e.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:C(e.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:C(e.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:C(e.showIcons,this.defaultValue.showIcons),showStatusBar:C(e.showStatusBar,this.defaultValue.showStatusBar),preview:C(e.preview,this.defaultValue.preview),previewMode:k(e.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:C(e.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:C(e.showMethods,this.defaultValue.showMethods),showFunctions:C(e.showFunctions,this.defaultValue.showFunctions),showConstructors:C(e.showConstructors,this.defaultValue.showConstructors),showDeprecated:C(e.showDeprecated,this.defaultValue.showDeprecated),showFields:C(e.showFields,this.defaultValue.showFields),showVariables:C(e.showVariables,this.defaultValue.showVariables),showClasses:C(e.showClasses,this.defaultValue.showClasses),showStructs:C(e.showStructs,this.defaultValue.showStructs),showInterfaces:C(e.showInterfaces,this.defaultValue.showInterfaces),showModules:C(e.showModules,this.defaultValue.showModules),showProperties:C(e.showProperties,this.defaultValue.showProperties),showEvents:C(e.showEvents,this.defaultValue.showEvents),showOperators:C(e.showOperators,this.defaultValue.showOperators),showUnits:C(e.showUnits,this.defaultValue.showUnits),showValues:C(e.showValues,this.defaultValue.showValues),showConstants:C(e.showConstants,this.defaultValue.showConstants),showEnums:C(e.showEnums,this.defaultValue.showEnums),showEnumMembers:C(e.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:C(e.showKeywords,this.defaultValue.showKeywords),showWords:C(e.showWords,this.defaultValue.showWords),showColors:C(e.showColors,this.defaultValue.showColors),showFiles:C(e.showFiles,this.defaultValue.showFiles),showReferences:C(e.showReferences,this.defaultValue.showReferences),showFolders:C(e.showFolders,this.defaultValue.showFolders),showTypeParameters:C(e.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:C(e.showSnippets,this.defaultValue.showSnippets),showUsers:C(e.showUsers,this.defaultValue.showUsers),showIssues:C(e.showIssues,this.defaultValue.showIssues)}:this.defaultValue}}),inlineSuggest:B(new class extends p{constructor(){let e={enabled:!0,mode:"subwordSmart"};super(57,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:r.NC("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:C(e.enabled,this.defaultValue.enabled),mode:k(e.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}:this.defaultValue}}),suggestFontSize:B(new y(109,"suggestFontSize",0,0,1e3,{markdownDescription:r.NC("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:B(new y(110,"suggestLineHeight",0,0,1e3,{markdownDescription:r.NC("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:B(new b(111,"suggestOnTriggerCharacters",!0,{description:r.NC("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:B(new N(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[r.NC("suggestSelection.first","Always select the first suggestion."),r.NC("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),r.NC("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:r.NC("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:B(new N(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[r.NC("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),r.NC("tabCompletion.off","Disable tab completions."),r.NC("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:r.NC("tabCompletion","Enables tab completions.")})),tabIndex:B(new y(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:B(new class extends p{constructor(){let e={nonBasicASCII:A,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:A,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",e,{[R.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.nonBasicASCII,description:r.NC("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[R.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:r.NC("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[R.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:r.NC("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[R.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeComments,description:r.NC("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[R.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeStrings,description:r.NC("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[R.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:r.NC("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[R.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:r.NC("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&!h.fS(e.allowedCharacters,t.allowedCharacters)&&(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0),t.allowedLocales&&e&&!h.fS(e.allowedLocales,t.allowedLocales)&&(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0);let n=super.applyUpdate(e,t);return i?new m(n.newValue,!0):n}validate(e){return e&&"object"==typeof e?{nonBasicASCII:O(e.nonBasicASCII,A,[!0,!1,A]),invisibleCharacters:C(e.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:C(e.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:O(e.includeComments,A,[!0,!1,A]),includeStrings:O(e.includeStrings,A,[!0,!1,A]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}:this.defaultValue}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;let i={};for(let[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:B(new N(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[r.NC("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),r.NC("unusualLineTerminators.off","Unusual line terminators are ignored."),r.NC("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:r.NC("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:B(new b(117,"useShadowDOM",!0)),useTabStops:B(new b(118,"useTabStops",!0,{description:r.NC("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:B(new L(119,"wordSeparators",a.vu,{description:r.NC("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:B(new N(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),r.NC({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:r.NC({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:B(new L(121,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xa2\xb0′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:B(new L(122,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「\xa3\xa5$£¥++")),wordWrapColumn:B(new y(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:r.NC({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:B(new N(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:B(new N(125,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:B(new D(126,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}},{enumDescriptions:[r.NC("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),r.NC("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),r.NC("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),r.NC("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:r.NC("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:B(new N(127,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[r.NC("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),r.NC("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:r.NC("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:B(new class extends _{constructor(){super(130)}compute(e,t,i){let n=["monaco-editor"];return t.get(35)&&n.push(t.get(35)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(68)?n.push("mouse-default"):"copy"===t.get(68)&&n.push("mouse-copy"),t.get(102)&&n.push("showUnused"),t.get(128)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:B(new class extends _{constructor(){super(131)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:B(new class extends _{constructor(){super(132)}compute(e,t,i){let n=t.get(83);return!!n||e.tabFocusMode}}),layoutInfo:B(new E),wrappingInfo:B(new class extends _{constructor(){super(134)}compute(e,t,i){let n=t.get(133);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},82334:function(e,t,i){"use strict";i.d(t,{C:function(){return o}});var n=i(4669);let o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},27374:function(e,t,i){"use strict";i.d(t,{E4:function(){return a},pR:function(){return l}});var n=i(1432),o=i(64141),r=i(82334);let s=n.dz?1.5:1.35;class a{constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){let n=e.get(45),o=e.get(49),r=e.get(48),s=e.get(47),l=e.get(61),h=e.get(58);return a._create(n,o,r,s,l,h,t,i)}static _create(e,t,i,n,o,l,h,d){0===o?o=s*i:o<8&&(o*=i),(o=Math.round(o))<8&&(o=8);let u=1+(d?0:.1*r.C.getZoomLevel());return i*=u,o*=u,new a({pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:o,letterSpacing:l})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){let e=o.hL.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},44906:function(e,t,i){"use strict";i.d(t,{N:function(){return o},q:function(){return r}});var n=i(85427);class o{constructor(e){let t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class r{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},7988:function(e,t,i){"use strict";i.d(t,{i:function(){return o}});var n=i(97295);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){let o=Math.min(t-1,e.length),r=e.substring(0,o),s=new n.W1(r),a=0;for(;!s.eol();){let e=n.ZH(r,o,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;let o=e.length,r=new n.W1(e),s=0,a=1;for(;!r.eol();){let l=n.ZH(e,o,r.offset);r.nextGraphemeLength();let h=this._nextVisibleColumn(l,s,i),d=r.offset+1;if(h>=t){let e=t-s,i=h-t;if(i{let i=e.getColor(r.cvW);i&&t.addRule(`.monaco-editor, .monaco-editor-background { background-color: ${i}; }`);let n=e.getColor(l),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`);let s=e.getColor(r.NOs);s&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${s}; }`);let h=e.getColor(D);h&&t.addRule(`.monaco-editor .margin { background-color: ${h}; }`);let p=e.getColor(d);p&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${p}; }`);let m=e.getColor(u);m&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${(0,a.c3)(e.type)?"dotted":"solid"} ${m}; }`);let _=e.getColor(c);_&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${_}; }`);let v=e.getColor(g);v&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${(0,a.c3)(e.type)?"dotted":"solid"} ${v}; }`);let C=e.getColor(f);C&&(t.addRule(`.monaco-editor .mtkw { color: ${C} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${C} !important; }`))})},23795:function(e,t,i){"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;ri||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<=e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>=e.endColumn))}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumne.endColumn))}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<=e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>=e.endColumn))}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new o(i,n,r,s)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,d=t.endColumn;return(ih?(r=h,s=d):r===h&&(s=Math.min(s,d)),i>r||i===r&&n>s)?null:new o(i,n,r,s)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},3860:function(e,t,i){"use strict";i.d(t,{Y:function(){return r}});var n=i(50187),o=i(24314);class r extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return r.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new r(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;inew m(e),a=function(e,t,i){let n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?p(e,t,i):u().decode(n)}):(s=e=>new f,a=p);class m{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";let e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return c().decode(e)}_flushBuffer(){let e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){let t=this._capacity-this._bufferLength;t<=1&&(0===t||l.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){let t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}(e=>new o(e))},270:function(e,t,i){"use strict";i.d(t,{Af:function(){return s},eq:function(){return a},t2:function(){return function e(t,i,o,r,s){if(s||(s=n.$.first(l)),o.length>s.maxLen){let n=t-s.maxLen/2;return n<0?n=0:r+=n,o=o.substring(n,t+s.maxLen/2),e(t,i,o,r,s)}let a=Date.now(),h=t-1-r,d=-1,u=null;for(let e=1;!(Date.now()-a>=s.timeBudget);e++){let t=h-s.windowSize*e;i.lastIndex=Math.max(0,t);let n=function(e,t,i,n){let o;for(;o=e.exec(t);){let t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)break}return null}(i,o,h,d);if(!n&&u||(u=n,t<=0))break;d=t}if(u){let e={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return i.lastIndex=0,e}return null}},vu:function(){return r}});var n=i(53725),o=i(91741);let r="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",s=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let i of r)e.indexOf(i)>=0||(t+="\\"+i);return RegExp(t+="\\s]+)","g")}();function a(e){let t=s;if(e&&e instanceof RegExp){if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}}return t.lastIndex=0,t}let l=new o.S;l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},55343:function(e,t,i){"use strict";i.d(t,{LM:function(){return c},LN:function(){return v},Tp:function(){return _},Vi:function(){return g},rS:function(){return f}});var n=i(50187),o=i(24314),r=i(3860),s=i(19111),a=i(7988),l=i(83158);let h=()=>!0,d=()=>!1,u=e=>" "===e||" "===e;class c{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let o=i.options,r=o.get(133);this.readOnly=o.get(83),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(106),this.lineHeight=o.get(61),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(118),this.wordSeparators=o.get(119),this.emptySelectionClipboard=o.get(33),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(71),this.multiCursorPaste=o.get(73),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let s=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(s)for(let e of s)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(133)||e.hasChanged(119)||e.hasChanged(33)||e.hasChanged(71)||e.hasChanged(73)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(118)||e.hasChanged(61)||e.hasChanged(83)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};let t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(let e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){let n=(0,s.wH)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return u;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return h;case"never":return d}}_getLanguageDefinedShouldAutoClose(e){let t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){let n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(nr?r:n}}class g{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){let t=r.Y.liftSelection(e),i=new f(o.e.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i=u.length+1)return!1;let c=u.charAt(d.column-2),g=n.get(c);if(!g)return!1;if((0,r.LN)(c)){if("never"===i)return!1}else if("never"===t)return!1;let p=u.charAt(d.column-1),m=!1;for(let e of g)e.open===c&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){let e=t.getLineContent(o.lineNumber),r=n.LC(e),a=-1===r?e.length+1:r+1;if(o.column<=a){let e=i.visibleColumnFromColumn(t,o),n=s.i.prevIndentTabStop(e,i.indentSize),r=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.e(o.lineNumber,r,o.lineNumber,o.column)}}return l.e.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(!(e.lineNumber>1))return e;{let i=e.lineNumber-1;return new h.L(i,t.getLineMaxColumn(i))}}static cut(e,t,i){let n=[],s=null;i.sort((e,t)=>h.L.compare(e.getStartPosition(),t.getEndPosition()));for(let r=0,a=i.length;r1&&(null==s?void 0:s.endLineNumber)!==u.lineNumber?(e=u.lineNumber-1,i=t.getLineMaxColumn(u.lineNumber-1),h=u.lineNumber,d=t.getLineMaxColumn(u.lineNumber)):(e=u.lineNumber,i=1,h=u.lineNumber,d=t.getLineMaxColumn(u.lineNumber));let c=new l.e(e,i,h,d);s=c,c.isEmpty()?n[r]=null:n[r]=new o.T4(c,"")}else n[r]=null}else n[r]=new o.T4(a,"")}return new r.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},28108:function(e,t,i){"use strict";i.d(t,{N:function(){return o},P:function(){return u}});var n,o,r=i(98401),s=i(55343),a=i(10839),l=i(92896),h=i(50187),d=i(24314);class u{static addCursorDown(e,t,i){let n=[],o=0;for(let r=0,l=t.length;rt&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new d.e(r.lineNumber,1,i,n),0,new h.L(i,n),0))}let l=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberl){let i=e.getLineCount(),n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{let e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){let o=e.model.validatePosition(n);return s.Vi.fromModelState(l.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);let i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new d.e(i,n,i,n),0,new h.L(i,n),0))}static moveTo(e,t,i,n,o){let r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new h.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,r){switch(i){case 0:if(4===r)return this._moveHalfLineLeft(e,t,n);return this._moveLeft(e,t,n,o);case 1:if(4===r)return this._moveHalfLineRight(e,t,n);return this._moveRight(e,t,n,o);case 2:if(2===r)return this._moveUpByViewLines(e,t,n,o);return this._moveUpByModelLines(e,t,n,o);case 3:if(2===r)return this._moveDownByViewLines(e,t,n,o);return this._moveDownByModelLines(e,t,n,o);case 4:if(2===r)return t.map(t=>s.Vi.fromViewState(a.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)));return t.map(t=>s.Vi.fromModelState(a.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 5:if(2===r)return t.map(t=>s.Vi.fromViewState(a.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)));return t.map(t=>s.Vi.fromModelState(a.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){let r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{let i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 13:{let i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 12:{let i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{let i=[];for(let o=0,s=t.length;oi.endLineNumber-1?i.endLineNumber-1:os.Vi.fromViewState(a.o.moveLeft(e.cursorConfig,e,t.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,r=t.length;os.Vi.fromViewState(a.o.moveRight(e.cursorConfig,e,t.viewState,i,n)))}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,r=t.length;oe.getLineMinColumn(t.lineNumber))return t.delta(void 0,-a.HO(e.getLineContent(t.lineNumber),t.column-1));if(!(t.lineNumber>1))return t;{let i=t.lineNumber-1;return new r.L(i,e.getLineMaxColumn(i))}}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),s=l.l.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new r.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){let n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new h(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{let n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static clipPositionColumn(e,t){return new r.L(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ic?(i=c,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,u),s=m?0:u-o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){let e=new r.L(i,n),o=t.normalizePosition(e,d);s+=n-o.column,i=o.lineNumber,n=o.column}return new h(i,n,s)}static down(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i+r,s,4)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);let a=d.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let o=i.selection,a=d.down(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.down(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i-r,s,3)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);let a=d.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let o=i.selection,a=d.up(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.up(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){let o=t.getLineCount(),r=i.position.lineNumber;for(;r1){let n;for(n=i-1;n>=1;n--){let e=t.getLineContent(n),i=o.ow(e);if(i>=0)break}if(n<1)return null;let s=t.getLineMaxColumn(n),l=(0,v.A)(e.autoIndent,t,new a.e(n,s,n,s),e.languageConfigurationService);l&&(r=l.indentation+l.appendText)}return(n&&(n===p.wU.Indent&&(r=C.shiftIndent(e,r)),n===p.wU.Outdent&&(r=C.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r)?r:null}static _replaceJumpToNextIndent(e,t,i,n){let o="",s=i.getStartPosition();if(e.insertSpaces){let i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,r,s,a));return new u.Tp(4,l,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;let l=t.getPosition(),h=Math.max(1,l.column-n),d=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),u=new a.e(l.lineNumber,h,l.lineNumber,d),c=e.getValueInRange(u);return c===i&&0===s?null:new r.Uo(u,i,0,s)}static _typeCommand(e,t,i){return i?new r.Sj(e,t,!0):new r.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return C._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let r=t.getLineContent(n.startLineNumber),s=o.V8(r).substring(0,n.startColumn-1);return C._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}let s=(0,v.A)(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===p.wU.None||s.indentAction===p.wU.Indent)return C._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===p.wU.IndentOutdent){let t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+o+"\n"+t;return i?new r.Sj(n,a,!0):new r.Uo(n,a,-1,o.length-t.length,!0)}if(s.indentAction===p.wU.Outdent){let t=C.unshiftIndent(e,s.indentation);return C._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}let a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){let s=(0,_.UF)(e.autoIndent,t,n,{unshiftIndent:t=>C.unshiftIndent(e,t),shiftIndent:t=>C.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(s){let a=e.visibleColumnFromColumn(t,n.getEndPosition()),l=n.endColumn,h=t.getLineContent(n.endLineNumber),d=o.LC(h);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new r.Sj(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new r.Uo(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return C._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eC.shiftIndent(e,t),unshiftIndent:t=>C.unshiftIndent(e,t)},e.languageConfigurationService);if(null===r)return null;if(r!==e.normalizeIndentation(o)){let o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?C._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):C._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=i.length;r2?l.charCodeAt(a.column-2):0;if(92===c&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open)),s=o.some(e=>t.startsWith(e.close));return!r&&s}static _findAutoClosingPairOpen(e,t,i,n){let o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(let e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(let r of i){let i=t.getValueInRange(new a.e(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column));if(i+n!==e.open){o=!1;break}}o&&(r=e)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[],o=null;for(let e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){let r=(0,u.LN)(n),s=r?e.autoClosingQuotes:e.autoClosingBrackets,a=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===s)return null;for(let e of i)if(!e.isEmpty())return null;let l=i.map(e=>{let t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}}),h=this._findAutoClosingPairOpen(e,t,l.map(e=>new g.L(e.lineNumber,e.beforeColumn)),n);if(!h)return null;let d=this._findContainedAutoClosingPair(e,h),p=d?d.close:"",m=!0;for(let i of l){let{lineNumber:o,beforeColumn:r,afterColumn:l}=i,d=t.getLineContent(o),u=d.substring(0,r-1),g=d.substring(l-1);if(g.startsWith(p)||(m=!1),g.length>0){let t=g.charAt(0),i=C._isBeforeClosingBrace(e,g);if(!i&&!a(t))return null}if(1===h.open.length&&("'"===n||'"'===n)&&"always"!==s){let t=(0,c.u)(e.wordSeparators);if(u.length>0){let e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);let _=t.tokenization.getLineTokens(o),v=(0,f.wH)(_,r-1);if(!h.shouldAutoClose(v,r-v.firstCharOffset))return null;let b=h.findNeutralCharacter();if(b){let e=t.tokenization.getTokenTypeIfInsertingCharacter(o,r,b);if(!h.isOK(e))return null}}return m?h.close.substring(0,h.close.length-p.length):h.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){let a=[];for(let e=0,t=n.length;enew r.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new u.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}let g=this._getAutoClosingPairClose(t,i,o,h,!0);return null!==g?this._runAutoClosingOpenCharType(e,t,i,o,h,!0,g):null}static typeWithInterceptors(e,t,i,n,o,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,r=o.length;t=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let r=n;r=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(1===r||1===i&&2===r||2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=h._findPreviousWordOnLine(e,t,new a.L(o,r));if(0===n)return new a.L(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1));return new a.L(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){let i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;let r=e.getLineContent(i);for(let e=t.column-1;e>1;e--){let t=r.charCodeAt(e-2),s=r.charCodeAt(e-1);if(95===t&&95!==s||(n.mK(t)||n.T5(t))&&n.df(s))return new a.L(i,e);if(n.df(t)&&n.df(s)&&e+1=l.start+1&&(l=h._findNextWordOnLine(e,t,new a.L(o,l.end+1))),r=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,r)}static _moveWordPartRight(e,t){let i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?c=1:(u--,c=n.getLineMaxColumn(u)):(g&&c<=g.end+1&&(g=h._findPreviousWordOnLine(i,n,new a.L(u,g.start+1))),g?c=g.end+1:c>1?c=1:(u--,c=n.getLineMaxColumn(u))),new l.e(u,c,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;let n=new a.L(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(t,n);return o||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){let i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){let i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;r+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),s=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},a=h._findPreviousWordOnLine(e,t,i);if(a&&a.start+1<=i.column&&i.column<=a.end+1)return s(a);let d=h._findNextWordOnLine(e,t,i);return d&&d.start+1<=i.column&&i.column<=d.end+1?s(d):a&&d?r(a.end+1,d.start+1):a?r(a.start+1,a.end+1):d?r(d.start+1,d.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let i=t.getPosition(),n=h._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=p.start+1&&(p=h._findNextWordOnLine(i,n,new a.L(d,p.end+1))),p?u=p.start+1:u!!e)}},55343:function(e,t,i){"use strict";i.d(t,{LM:function(){return c},LN:function(){return v},Tp:function(){return _},Vi:function(){return g},rS:function(){return f}});var n=i(50187),o=i(24314),r=i(3860),s=i(19111),a=i(7988),l=i(83158);let h=()=>!0,d=()=>!1,u=e=>" "===e||" "===e;class c{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;let o=i.options,r=o.get(133);this.readOnly=o.get(83),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(106),this.lineHeight=o.get(61),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=o.get(118),this.wordSeparators=o.get(119),this.emptySelectionClipboard=o.get(33),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(71),this.multiCursorPaste=o.get(73),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();let s=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(s)for(let e of s)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(133)||e.hasChanged(119)||e.hasChanged(33)||e.hasChanged(71)||e.hasChanged(73)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(118)||e.hasChanged(61)||e.hasChanged(83)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};let t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(let e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){let n=(0,s.wH)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return u;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return h;case"never":return d}}_getLanguageDefinedShouldAutoClose(e){let t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){let n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(nr?r:n}}class g{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){let t=r.Y.liftSelection(e),i=new f(o.e.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),8&n&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){let i=this.getForeground(e),n=this.getFontStyle(e),o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let r="";return 4&n&&(r+=" underline"),8&n&&(r+=" line-through"),r&&(o+=`text-decoration:${r};`),o}static getPresentationFromMetadata(e){let t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(1&i),bold:!!(2&i),underline:!!(4&i),strikethrough:!!(8&i)}}}},43155:function(e,t,i){"use strict";i.d(t,{mY:function(){return c},gX:function(){return a},MY:function(){return d},DI:function(){return S},AD:function(){return k},gl:function(){return g},bw:function(){return l},WW:function(){return h},uZ:function(){return u},WU:function(){return w},RW:function(){return N},hG:function(){return y},vx:function(){return L}});var n,o,r,s,a,l,h,d,u,c,g,p=i(73046),m=i(70666),f=i(24314),_=i(4669),v=i(9917),C=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};class b extends v.JT{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return C(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return C(this,void 0,void 0,function*(){let e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}class w{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class y{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class S{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}function L(e){return e&&m.o.isUri(e.uri)&&f.e.isIRange(e.range)&&(f.e.isIRange(e.originSelectionRange)||f.e.isIRange(e.targetSelectionRange))}!function(e){let t=new Map;t.set(0,p.lA.symbolMethod),t.set(1,p.lA.symbolFunction),t.set(2,p.lA.symbolConstructor),t.set(3,p.lA.symbolField),t.set(4,p.lA.symbolVariable),t.set(5,p.lA.symbolClass),t.set(6,p.lA.symbolStruct),t.set(7,p.lA.symbolInterface),t.set(8,p.lA.symbolModule),t.set(9,p.lA.symbolProperty),t.set(10,p.lA.symbolEvent),t.set(11,p.lA.symbolOperator),t.set(12,p.lA.symbolUnit),t.set(13,p.lA.symbolValue),t.set(15,p.lA.symbolEnum),t.set(14,p.lA.symbolConstant),t.set(15,p.lA.symbolEnum),t.set(16,p.lA.symbolEnumMember),t.set(17,p.lA.symbolKeyword),t.set(27,p.lA.symbolSnippet),t.set(18,p.lA.symbolText),t.set(19,p.lA.symbolColor),t.set(20,p.lA.symbolFile),t.set(21,p.lA.symbolReference),t.set(22,p.lA.symbolCustomColor),t.set(23,p.lA.symbolFolder),t.set(24,p.lA.symbolTypeParameter),t.set(25,p.lA.account),t.set(26,p.lA.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=p.lA.symbolProperty),i};let i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(a||(a={})),(n=l||(l={}))[n.Automatic=0]="Automatic",n[n.Explicit=1]="Explicit",(o=h||(h={}))[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",(r=d||(d={}))[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write",function(e){let t=new Map;t.set(0,p.lA.symbolFile),t.set(1,p.lA.symbolModule),t.set(2,p.lA.symbolNamespace),t.set(3,p.lA.symbolPackage),t.set(4,p.lA.symbolClass),t.set(5,p.lA.symbolMethod),t.set(6,p.lA.symbolProperty),t.set(7,p.lA.symbolField),t.set(8,p.lA.symbolConstructor),t.set(9,p.lA.symbolEnum),t.set(10,p.lA.symbolInterface),t.set(11,p.lA.symbolFunction),t.set(12,p.lA.symbolVariable),t.set(13,p.lA.symbolConstant),t.set(14,p.lA.symbolString),t.set(15,p.lA.symbolNumber),t.set(16,p.lA.symbolBoolean),t.set(17,p.lA.symbolArray),t.set(18,p.lA.symbolObject),t.set(19,p.lA.symbolKey),t.set(20,p.lA.symbolNull),t.set(21,p.lA.symbolEnumMember),t.set(22,p.lA.symbolStruct),t.set(23,p.lA.symbolEvent),t.set(24,p.lA.symbolOperator),t.set(25,p.lA.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=p.lA.symbolProperty),i}}(u||(u={}));class k{constructor(e){this.value=e}}k.Comment=new k("comment"),k.Imports=new k("imports"),k.Region=new k("region"),(c||(c={})).is=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.title},(s=g||(g={}))[s.Type=1]="Type",s[s.Parameter=2]="Parameter";let N=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new _.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,v.OF)(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();let n=new b(this,e,t);return this._factories.set(e,n),(0,v.OF)(()=>{let t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())})}getOrCreate(e){return C(this,void 0,void 0,function*(){let t=this.get(e);if(t)return t;let i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))})}get(e){return this._map.get(e)||null}isResolved(e){let t=this.get(e);if(t)return!0;let i=this._factories.get(e);return!i||!!i.isResolved}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},75383:function(e,t,i){"use strict";i.d(t,{$9:function(){return d},UF:function(){return h},n8:function(){return l},r7:function(){return a},tI:function(){return u}});var n=i(97295),o=i(49119),r=i(19111),s=i(4256);function a(e,t,i,r=!0,s){if(e<4)return null;let a=s.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!a)return null;if(i<=1)return{indentation:"",action:null};let l=function(e,t,i){let n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o;let r=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return r;let t=e.getLineContent(o);if(i.shouldIgnore(t)||/^\s+$/.test(t)||""===t){r=o;continue}return o}}return -1}(t,i,a);if(l<0)return null;if(l<1)return{indentation:"",action:null};let h=t.getLineContent(l);if(a.shouldIncrease(h)||a.shouldIndentNextLine(h))return{indentation:n.V8(h),action:o.wU.Indent,line:l};if(a.shouldDecrease(h))return{indentation:n.V8(h),action:null,line:l};{if(1===l)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};let e=l-1,i=a.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(r)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};for(let e=l;e>0;e--){let i=t.getLineContent(e);if(a.shouldIncrease(i))return{indentation:n.V8(i),action:o.wU.Indent,line:e};if(a.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(a.shouldDecrease(i))return{indentation:n.V8(i),action:null,line:e}}return{indentation:n.V8(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,r,s,l){if(e<4)return null;let h=l.getLanguageConfiguration(i);if(!h)return null;let d=l.getLanguageConfiguration(i).indentRulesSupport;if(!d)return null;let u=a(e,t,r,void 0,l),c=t.getLineContent(r);if(u){let i=u.line;if(void 0!==i){let r=h.onEnter(e,"",t.getLineContent(i),"");if(r){let e=n.V8(t.getLineContent(i));return r.removeText&&(e=e.substring(0,e.length-r.removeText)),r.indentAction===o.wU.Indent||r.indentAction===o.wU.IndentOutdent?e=s.shiftIndent(e):r.indentAction===o.wU.Outdent&&(e=s.unshiftIndent(e)),d.shouldDecrease(c)&&(e=s.unshiftIndent(e)),r.appendText&&(e+=r.appendText),n.V8(e)}}return d.shouldDecrease(c)?u.action===o.wU.Indent?u.indentation:s.unshiftIndent(u.indentation):u.action===o.wU.Indent?s.shiftIndent(u.indentation):u.indentation}return null}function h(e,t,i,l,h){let d,u;if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);let c=t.tokenization.getLineTokens(i.startLineNumber),g=(0,r.wH)(c,i.startColumn-1),p=g.getLineContent(),m=!1;if(g.firstCharOffset>0&&c.getLanguageId(0)!==g.languageId?(m=!0,d=p.substr(0,i.startColumn-1-g.firstCharOffset)):d=c.getLineContent().substring(0,i.startColumn-1),i.isEmpty())u=p.substr(i.startColumn-1-g.firstCharOffset);else{let e=(0,s.n2)(t,i.endLineNumber,i.endColumn);u=e.getLineContent().substr(i.endColumn-1-g.firstCharOffset)}let f=h.getLanguageConfiguration(g.languageId).indentRulesSupport;if(!f)return null;let _=d,v=n.V8(d),C=n.V8(c.getLineContent()),b=a(e,{tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?_:t.getLineContent(e)},i.startLineNumber+1,void 0,h);if(!b){let e=m?C:v;return{beforeEnter:e,afterEnter:e}}let w=m?C:b.indentation;return b.action===o.wU.Indent&&(w=l.shiftIndent(w)),f.shouldDecrease(u)&&(w=l.unshiftIndent(w)),{beforeEnter:m?C:v,afterEnter:w}}function d(e,t,i,n,r,l){let h;if(e<4)return null;let d=(0,s.n2)(t,i.startLineNumber,i.startColumn);if(d.firstCharOffset)return null;let u=l.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!u)return null;let c=d.getLineContent(),g=c.substr(0,i.startColumn-1-d.firstCharOffset);if(i.isEmpty())h=c.substr(i.startColumn-1-d.firstCharOffset);else{let e=(0,s.n2)(t,i.endLineNumber,i.endColumn);h=e.getLineContent().substr(i.endColumn-1-d.firstCharOffset)}if(!u.shouldDecrease(g+h)&&u.shouldDecrease(g+n+h)){let n=a(e,t,i.startLineNumber,!1,l);if(!n)return null;let s=n.indentation;return n.action!==o.wU.Indent&&(s=r.unshiftIndent(s)),s}return null}function u(e,t,i){let n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return!n||t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t))}},1615:function(e,t,i){"use strict";i.d(t,{A:function(){return r}});var n=i(49119),o=i(4256);function r(e,t,i,r){let s;let a=(0,o.n2)(t,i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a.languageId);if(!l)return null;let h=a.getLineContent(),d=h.substr(0,i.startColumn-1-a.firstCharOffset);if(i.isEmpty())s=h.substr(i.startColumn-1-a.firstCharOffset);else{let e=(0,o.n2)(t,i.endLineNumber,i.endColumn);s=e.getLineContent().substr(i.endColumn-1-a.firstCharOffset)}let u="";if(i.startLineNumber>1&&0===a.firstCharOffset){let e=(0,o.n2)(t,i.startLineNumber-1);e.languageId===a.languageId&&(u=e.getLineContent())}let c=l.onEnter(e,u,d,s);if(!c)return null;let g=c.indentAction,p=c.appendText,m=c.removeText||0;p?g===n.wU.Indent&&(p=" "+p):p=g===n.wU.Indent||g===n.wU.IndentOutdent?" ":"";let f=(0,o.u0)(t,i.startLineNumber,i.startColumn);return m&&(f=f.substring(0,f.length-m)),{indentAction:g,appendText:p,removeText:m,indentation:f}}},72042:function(e,t,i){"use strict";i.d(t,{O:function(){return o}});var n=i(72065);let o=(0,n.yh)("languageService")},49119:function(e,t,i){"use strict";var n,o;i.d(t,{V6:function(){return r},c$:function(){return s},wU:function(){return n}}),(o=n||(n={}))[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent";class r{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;tnew a.V6(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.V6({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}}h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n ";var d=i(9488),u=i(34302);class c{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let i of t.close){let t=i.charAt(i.length-1);e.push(t)}return(0,d.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;let n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;let o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=u.Vr.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;let a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),h=this._richEditBrackets.textIsOpenBracket[a];if(h)return null;let d=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(17301);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{let t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)));if(r)return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e[e[0],e[1]])):t.brackets?L(t.brackets.map(e=>[e[0],e[1]]).filter(e=>!("<"===e[0]&&">"===e[1]))):[];let n=new y.b(e=>{let t=new Set;return{info:new N(this,e,t),closing:t}}),o=new y.b(e=>{let t=new Set;return{info:new D(this,e,t),opening:t}});for(let[e,t]of i){let i=n.get(e),r=o.get(t);i.closing.add(r.info),r.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...o.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function L(e){return e.filter(([e,t])=>""!==e&&""!==t)}class k{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class N extends k{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends k{constructor(e,t,i){super(e,t),this.closedBrackets=i,this.isOpeningBracket=!1}closes(e){if(e.languageId===this.languageId&&e.config!==this.config)throw new m.he("Brackets from different language configuration cannot be used.");return this.closedBrackets.has(e)}getClosedBrackets(){return[...this.closedBrackets]}}var x=function(e,t){return function(i,n){t(i,n,e)}};class I{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}let E=(0,_.yh)("languageConfigurationService"),T=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let i=new Set(Object.values(M));this._register(this.configurationService.onDidChangeConfiguration(e=>{let t=e.change.keys.some(e=>i.has(e)),n=e.change.overrides.filter(([e,t])=>t.some(e=>i.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new I(void 0));else for(let e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new I(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new I(e.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))throw Error(`Language id "${e}" is not configured nor known`);o=new H(e,{})}let r=function(e,t){let i=t.getValue(M.brackets,{overrideIdentifier:e}),n=t.getValue(M.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:A(i),colorizedBracketPairs:A(n)}}(o.languageId,i),s=F([o.underlyingConfig,r]),a=new H(o.languageId,s);return a}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([x(0,v.Ui),x(1,C.O)],T);let M={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function A(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}function R(e,t,i){let n=e.getLineContent(t),o=r.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}function O(e,t,i){e.tokenization.forceTokenization(t);let n=e.tokenization.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let i=new B(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)(()=>{for(let e=0;ee.configuration)))}}function F(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class B{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class V{constructor(e){this.languageId=e}}class W extends o.JT{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._register(this.register(w.bd,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));let r=n.register(t,i);return this._onDidChange.fire(new V(e)),(0,o.OF)(()=>{r.dispose(),this._onDidChange.fire(new V(e))})}getLanguageConfiguration(e){let t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new h(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||s.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,s.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new c(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,b.z)(E,T)},68801:function(e,t,i){"use strict";i.d(t,{bd:function(){return h},dQ:function(){return l}});var n=i(63580),o=i(4669),r=i(89872),s=i(81170),a=i(23193);let l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t>>0,new n.DI(i,null===t?o:t)}},19111:function(e,t,i){"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;for(;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}i.d(t,{Bu:function(){return r},wH:function(){return n}});class o{constructor(e,t,i,n,o,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){let e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){let t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function r(e){return(3&e)!=0}},34302:function(e,t,i){"use strict";let n,o;i.d(t,{EA:function(){return h},Vr:function(){return f}});var r=i(97295),s=i(50072),a=i(24314);class l{constructor(e,t,i,n,o,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=l._toSet(this.open),this._closeSet=l._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let i of e)t.add(i);return t}}class h{constructor(e,t){this._richEditBracketsBrand=void 0;let i=function(e){let t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);let i=[];for(let e=0;e{let[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{let o=Math.min(e,n),r=Math.max(e,n);for(let e=0;e0&&r.push({open:o,close:s})}return r}(t);for(let t of(this.brackets=i.map((t,n)=>new l(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=(o=o.concat(e)).concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(let t of r.close)t.indexOf(e)>=0&&n.push(t)}}function u(e,t){return e.length-t.length}function c(e){if(e.length<=1)return e;let t=[],i=new Set;for(let n of e)i.has(n)||(t.push(n),i.add(n));return t}function g(e){let t=/^[\w ]+$/.test(e);return e=r.ec(e),t?`\\b${e}\\b`:e}function p(e){let t=`(${e.map(g).join(")|(")})`;return r.GF(t,!0)}let m=(n=null,o=null,function(e){return n!==e&&(o=function(e){if(s.lZ){let t=new Uint16Array(e.length),i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s.oe().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(n=e)),o});class f{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=i.length-(o.index||0),s=o[0].length,l=n+r;return new a.e(t,l-s+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){let r=m(i),s=r.substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=o.index||0,s=o[0].length;if(0===s)return null;let l=n+r;return new a.e(t,l+1,t,l+1+s)}static findNextBracketInRange(e,t,i,n,o){let r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}},81947:function(e,t,i){"use strict";i.d(t,{C2:function(){return l},Fq:function(){return h}});var n=i(97295),o=i(77378),r=i(43155),s=i(276);let a={getInitialState:()=>s.TJ,tokenizeEncoded:(e,t,i)=>(0,s.Dy)(0,i)};function l(e,t,i){var n,o,s,l;return n=this,o=void 0,s=void 0,l=function*(){if(!i)return d(t,e.languageIdCodec,a);let n=yield r.RW.getOrCreate(i);return d(t,e.languageIdCodec,n||a)},new(s||(s=Promise))(function(e,t){function i(e){try{a(l.next(e))}catch(e){t(e)}}function r(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof s?n:new s(function(e){e(n)})).then(i,r)}a((l=l.apply(n,o||[])).next())})}function h(e,t,i,n,o,r,s){let a="
",l=n,h=0,d=!0;for(let u=0,c=t.getCount();u0;)s&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:s&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,c>o||l>=o)break}return a+"
"}function d(e,t,i){let r='
',s=n.uq(e),a=i.getInitialState();for(let e=0,l=s.length;e0&&(r+="
");let h=i.tokenizeEncoded(l,!0,a);o.A.convertToEndOffset(h.tokens,l.length);let d=new o.A(h.tokens,l,t),u=d.inflate(),c=0;for(let e=0,t=u.getCount();e${n.YU(l.substring(c,i))}`,c=i}a=h.endState}return r+"
"}},84973:function(e,t,i){"use strict";i.d(t,{F5:function(){return a},Hf:function(){return c},Qi:function(){return g},RM:function(){return l},Tx:function(){return p},dJ:function(){return d},je:function(){return m},pt:function(){return f},sh:function(){return s},tk:function(){return u}});var n,o,r,s,a,l,h=i(36248);(n=s||(s={}))[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full",(o=a||(a={}))[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter",(r=l||(l={}))[r.Both=0]="Both",r[r.Right=1]="Right",r[r.Left=2]="Left",r[r.None=3]="None";class d{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=!!e.insertSpaces,this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,h.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class u{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class g{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class p{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class m{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function f(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},66381:function(e,t,i){"use strict";i.d(t,{BH:function(){return m},Dm:function(){return _},Kd:function(){return a},Y0:function(){return l},n2:function(){return f}});var n=i(7988),o=i(45035),r=i(61761);class s{constructor(e){this._length=e}get length(){return this._length}}class a extends s{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=(0,o.Ii)(n,t.length)),i&&(n=(0,o.Ii)(n,i.length)),new a(n,e,t,i,t?t.missingOpeningBracketIds:r.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return!(null===this.closingBracket||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new a(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class l extends s{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw Error("Invalid list heights");if(r=(0,o.Ii)(r,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw Error("Invalid list heights");r=(0,o.Ii)(r,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new d(r,e.listHeight+1,e,t,i,s):new h(r,e.listHeight+1,e,t,i,s)}static getEmpty(){return new c(o.xl,0,[],r.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(0),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e){let t;if(e.intersects(this.missingOpeningBracketIds))return!1;let i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;ns.from(e))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):this.documentLength;return(0,n.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=(0,n.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{let t;return t=(0,n.ec)(e),/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class h{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},45035:function(e,t,i){"use strict";i.d(t,{BE:function(){return p},By:function(){return f},F_:function(){return c},Hg:function(){return h},Hw:function(){return d},Ii:function(){return g},PZ:function(){return v},Qw:function(){return C},VR:function(){return m},W9:function(){return u},Zq:function(){return _},av:function(){return s},oR:function(){return b},xd:function(){return l},xl:function(){return a}});var n=i(97295),o=i(24314);class r{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function s(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}r.zero=new r(0,0);let a=0;function l(e){return 0===e}function h(e,t){return 67108864*e+t}function d(e){let t=Math.floor(e/67108864),i=e-67108864*t;return new r(t,i)}function u(e){return Math.floor(e/67108864)}function c(e){return e}function g(e,t){return t<67108864?e+t:e-e%67108864+t}function p(e,t){if(t-e<=0)return a;let i=Math.floor(e/67108864),n=Math.floor(t/67108864),o=t-67108864*n;if(i!==n)return h(n-i,o);{let t=e-67108864*i;return h(0,o-t)}}function m(e,t){return e=t}function v(e){return h(e.lineNumber-1,e.column-1)}function C(e,t){let i=Math.floor(e/67108864),n=e-67108864*i,r=Math.floor(t/67108864),s=t-67108864*r;return new o.e(i+1,n+1,r+1,s+1)}function b(e){let t=(0,n.uq)(e);return h(t.length-1,t[t.length-1].length)}},64837:function(e,t,i){"use strict";i.d(t,{w:function(){return g}});var n=i(66381),o=i(2442),r=i(61761),s=i(45035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){let o=i>>1;for(let r=0;r=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function h(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i;let o=e=e.toMutable(),r=[];for(;;){if(t.listHeight===o.listHeight){i=t;break}if(4!==o.kind)throw Error("unexpected");r.push(o),o=o.makeLastElementMutable()}for(let e=r.length-1;e>=0;e--){let t=r[e];i?t.childrenLength>=3?i=n.Y0.create23(t.unappendChild(),i,null,!1):(t.appendChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?n.Y0.create23(e,i,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable(),o=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let r=t;for(let e=o.length-1;e>=0;e--){let t=o[e];r?t.childrenLength>=3?r=n.Y0.create23(r,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?n.Y0.create23(r,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=s.xl,this.nextNodes=[e],this.offsets=[s.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,s.VR)(e,this.lastOffset))throw Error("Invalid offset");for(this.lastOffset=e;;){let i=c(this.nextNodes);if(!i)return;let n=c(this.offsets);if((0,s.VR)(e,n))return;if((0,s.VR)(n,e)){if((0,s.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{let e=u(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}}else{if(t(i))return this.nextNodeAfterCurrent(),i;{let e=u(i);if(-1===e){this.nextNodeAfterCurrent();return}this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){let e=c(this.offsets),t=c(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;let i=c(this.nextNodes),n=u(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,s.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function u(e,t=-1){for(;;){if(++t>=e.childrenLength)return -1;if(e.getChild(t))return t}}function c(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){let o=new p(e,t,i,n);return o.parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new o.Y(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(r.tS.getEmpty());return e||(e=n.Y0.getEmpty()),e}parseList(e){let t=[];for(;;){let i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;let n=this.parseChild(e);(4!==n.kind||0!==n.childrenLength)&&t.push(n)}let i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;let i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())l(n,o)<=l(o,e)?(n=h(n,o),o=e):o=h(o,e);let r=h(n,o);return r}(t):a(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,s.xd)(t)){let i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>{if(!(0,s.VR)(i.length,t))return!1;let n=i.canBeReused(e);return n});if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;let t=this.tokenizer.read();switch(t.kind){case 2:return new n.Dm(t.bracketIds,t.length);case 0:return t.astNode;case 1:{let i=e.merge(t.bracketIds),o=this.parseList(i),r=this.tokenizer.peek();if(r&&2===r.kind&&(r.bracketId===t.bracketId||r.bracketIds.intersects(t.bracketIds)))return this.tokenizer.read(),n.Kd.create(t.astNode,o,r.astNode);return n.Kd.create(t.astNode,o,null)}default:throw Error("unexpected")}}}},61761:function(e,t,i){"use strict";i.d(t,{FE:function(){return s},Qw:function(){return r},tS:function(){return o}});let n=[];class o{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static getEmpty(){return this.empty}add(e,t){let i=t.getKey(e),n=i>>5;if(0===n){let e=1<e};class s{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:function(e,t,i){"use strict";i.d(t,{WU:function(){return l},g:function(){return u},xH:function(){return h}});var n=i(17301),o=i(45797),r=i(66381),s=i(45035),a=i(61761);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=s.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,s.Hg)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,s.Ii)(this._offset,e);let t=(0,s.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,s.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,s.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,i=0;for(;;){let n=this.lineTokens,r=n.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}let n=(0,s.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new r.BH(n))}}class u{constructor(e,t){let i;this.text=e,this._offset=s.xl,this.idx=0;let n=t.getRegExpStr(),o=n?RegExp(n+"|\n","gi"):null,h=[],d=0,u=0,c=0,g=0,p=[];for(let e=0;e<60;e++)p.push(new l((0,s.Hg)(0,e),0,-1,a.tS.getEmpty(),new r.BH((0,s.Hg)(0,e))));let m=[];for(let e=0;e<60;e++)m.push(new l((0,s.Hg)(1,e),0,-1,a.tS.getEmpty(),new r.BH((0,s.Hg)(1,e))));if(o)for(o.lastIndex=0;null!==(i=o.exec(e));){let e=i.index,n=i[0];if("\n"===n)d++,u=e+1;else{if(c!==e){let t;if(g===d){let i=e-c;if(i0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(let n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){let n=l.Ag(e,t);t+=4;for(let o=0;oe.toString()).join(", ")}matchesResource(e){let t=s.o.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,o){this._data instanceof u&&this._data.append(e,t,i,n,o)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{constructor(e,t,i){for(let n of(this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map,this._editStackElementsArr)){let e=d(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=d(e);return this._editStackElementsMap.has(t)}setModel(e){let t=d(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=d(e.uri);if(this._editStackElementsMap.has(t)){let i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,o){let r=d(e.uri),s=this._editStackElementsMap.get(r);s.append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){for(let e of(this._isOpen=!1,this._editStackElementsArr))e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=d(e);if(this._editStackElementsMap.has(t)){let e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${(0,h.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){let t=e.getEOL();return"\n"===t?0:1}function m(e){return!!e&&(e instanceof c||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){let t=this._undoRedoService.getLastElement(this._model.uri);if(m(t)&&t.canAppend(this._model))return t;let i=new c(n.NC("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){let t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){let n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=f._computeCursorState(i,o),s=o.map((e,t)=>({index:t,textChange:e.textChange}));return s.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),n.append(this._model,s.map(e=>e.textChange),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},1516:function(e,t,i){"use strict";i.d(t,{W:function(){return u},l:function(){return d}});var n=i(9488),o=i(97295),r=i(7988),s=i(24314),a=i(94954),l=i(59616),h=i(65094);class d extends a.U{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw Error("Illegal value for lineNumber");let o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(o&&o.offSide),s=-2,a=-1,l=-2,h=-1,d=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t=0){l=t,h=e;break}}}},u=-2,c=-1,g=-2,p=-1,m=e=>{if(-2===u){u=-1,c=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,c=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}},f=0,_=!0,v=0,C=!0,b=0,w=0;for(let o=0;_||C;o++){let s=e-o,g=e+o;o>1&&(s<1||s1&&(g>n||g>i)&&(C=!1),o>5e4&&(_=!1,C=!1);let y=-1;if(_&&s>=1){let e=this._computeIndentLevel(s-1);e>=0?(l=s-1,h=e,y=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(s),y=this._getIndentLevelForWhitespaceLine(r,a,h))}let S=-1;if(C&&g<=n){let e=this._computeIndentLevel(g-1);e>=0?(u=g-1,c=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(r,c,p))}if(0===o){w=y;continue}if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,f=g,v=g,b=S;continue}if(s>=1&&y>=0&&y-1===w){C=!1,f=s,v=s,b=y;continue}if(f=e,v=e,0===(b=w))break}_&&(y>=b?f=s:_=!1),C&&(S>=b?v=g:C=!1)}return{startLineNumber:f,endLineNumber:v,indent:b}}getLinesBracketGuides(e,t,i,r){var a;let l;let d=[];for(let i=e;i<=t;i++)d.push([]);let c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new s.e(e,1,t,this.textModel.getLineMaxColumn(t)));if(i&&c.length>0){let o=(e<=i.lineNumber&&i.lineNumber<=t?c:this.textModel.bracketPairs.getBracketPairsInRange(s.e.fromPositions(i))).filter(e=>s.e.strictContainsPosition(e.range,i));l=null===(a=(0,n.dF)(o,e=>!0))||void 0===a?void 0:a.range}let g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new u;for(let i of c){if(!i.closingBracketRange)continue;let n=l&&i.range.equalsRange(l);if(!n&&!r.includeInactive)continue;let s=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(r.highlightActive&&n?" "+p.activeClassName:""),a=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),c=r.horizontalGuides===h.s6.Enabled||r.horizontalGuides===h.s6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){c&&d[i.range.startLineNumber-e].push(new h.UO(-1,i.openingBracketRange.getEndPosition().column,s,new h.vW(!1,u.column),-1,-1));continue}let m=this.getVisibleColumnFromPosition(u),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1),v=!1,C=o.LC(this.textModel.getLineContent(i.closingBracketRange.startLineNumber)),b=C=e&&f>_&&d[a.lineNumber-e].push(new h.UO(_,-1,s,new h.vW(!1,a.column),-1,-1)),u.lineNumber<=t&&m>_&&d[u.lineNumber-e].push(new h.UO(_,-1,s,new h.vW(!v,u.column),-1,-1)))}for(let e of d)e.sort((e,t)=>e.visibleColumn-t.visibleColumn);return d}getVisibleColumnFromPosition(e){return r.i.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let i=this.textModel.getLineCount();if(e<1||e>i)throw Error("Illegal value for startLineNumber");if(t<1||t>i)throw Error("Illegal value for endLineNumber");let n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(o&&o.offSide),s=Array(t-e+1),a=-2,l=-1,h=-2,d=-1;for(let o=e;o<=t;o++){let t=o-e,u=this._computeIndentLevel(o-1);if(u>=0){a=o-1,l=u,s[t]=Math.ceil(u/n.indentSize);continue}if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,d=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(r,l,d)}return s}_getIndentLevelForWhitespaceLine(e,t,i){let n=this.textModel.getOptions();return -1===t||-1===i?0:t=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.A)(e),t=(0,o.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;let r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,e<(r=(o=this.prefixSum[n])-this.values[n]))i=n-1;else if(e>=o)t=n+1;else break;return new a(n,e-r)}}class s{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return(this._ensureValid(),0===e)?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nnew y.Q((0,L.Hg)(e.fromLineNumber-1,0),(0,L.Hg)(e.toLineNumber,0),(0,L.Hg)(e.toLineNumber-e.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=e.changes.map(e=>{let t=g.e.lift(e.range);return new y.Q((0,L.PZ)(t.getStartPosition()),(0,L.PZ)(t.getEndPosition()),(0,L.oR)(e.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){let n=new D.xH(this.textModel,this.brackets),o=(0,k.w)(n,e,t,i);return o}getBracketsInRange(e){let t=(0,L.Hg)(e.startLineNumber-1,e.startColumn-1),i=(0,L.Hg)(e.endLineNumber-1,e.endColumn-1),n=[],o=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o,r,s,a,l){if(!(a>200)){if(4===t.kind)for(let h of t.children)n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a,l),i=n;else if(2===t.kind){let h=0;if(l){let e=l.get(t.openingBracket.text);void 0===e&&(e=0),h=e,e++,l.set(t.openingBracket.text,e)}{let e=t.openingBracket;if(n=(0,L.Ii)(i,e.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)){let e=(0,L.Qw)(i,n);s.push(new C(e,a,h,!t.closingBracket))}i=n}if(t.child){let h=t.child;n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a+1,l),i=n}if(t.closingBracket){let e=t.closingBracket;if(n=(0,L.Ii)(i,e.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)){let e=(0,L.Qw)(i,n);s.push(new C(e,a,h,!1))}i=n}null==l||l.set(t.openingBracket.text,h)}else if(3===t.kind){let e=(0,L.Qw)(i,n);s.push(new C(e,a-1,0,!0))}else if(1===t.kind){let e=(0,L.Qw)(i,n);s.push(new C(e,a-1,0,!1))}}}(o,L.xl,o.length,t,i,n,0,new Map),n}getBracketPairsInRange(e,t){let i=[],n=(0,L.PZ)(e.getStartPosition()),o=(0,L.PZ)(e.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,s=new I(i,t,this.textModel);return function e(t,i,n,o,r,s,a,l){var h;if(!(a>200)){if(2===t.kind){let d=0;if(l){let e=l.get(t.openingBracket.text);void 0===e&&(e=0),d=e,e++,l.set(t.openingBracket.text,e)}let u=(0,L.Ii)(i,t.openingBracket.length),c=-1;if(s.includeMinIndentation&&(c=t.computeMinIndentation(i,s.textModel)),s.result.push(new w((0,L.Qw)(i,n),(0,L.Qw)(i,u),t.closingBracket?(0,L.Qw)((0,L.Ii)(u,(null===(h=t.child)||void 0===h?void 0:h.length)||L.xl),n):void 0,a,d,t,c)),i=u,t.child){let h=t.child;n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a+1,l)}null==l||l.set(t.openingBracket.text,d)}else{let n=i;for(let i of t.children){let t=n;n=(0,L.Ii)(n,i.length),(0,L.By)(t,r)&&(0,L.By)(o,n)&&e(i,t,n,o,r,s,a,l)}}}}(r,L.xl,r.length,n,o,s,0,new Map),i}getFirstBracketAfter(e){let t=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o){if(4===t.kind||2===t.kind)for(let r of t.children){if(n=(0,L.Ii)(i,r.length),(0,L.VR)(o,n)){let t=e(r,i,n,o);if(t)return t}i=n}else if(3===t.kind);else if(1===t.kind){let e=(0,L.Qw)(i,n);return{bracketInfo:t.bracketInfo,range:e}}return null}(t,L.xl,t.length,(0,L.PZ)(e))}getFirstBracketBefore(e){let t=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o){if(4===t.kind||2===t.kind){let r=[];for(let e of t.children)n=(0,L.Ii)(i,e.length),r.push({nodeOffsetStart:i,nodeOffsetEnd:n}),i=n;for(let i=r.length-1;i>=0;i--){let{nodeOffsetStart:n,nodeOffsetEnd:s}=r[i];if((0,L.VR)(n,o)){let r=e(t.children[i],n,s,o);if(r)return r}}}else if(3===t.kind);else if(1===t.kind){let e=(0,L.Qw)(i,n);return{bracketInfo:t.bracketInfo,range:e}}return null}(t,L.xl,t.length,(0,L.PZ)(e))}}class I{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}var E=i(19111),T=i(34302);class M extends a.JT{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(e=>{var t;(!e.languageId||(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId)))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get canBuildAST(){return 5e6>=this.textModel.getValueLength()}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new a.SL;this.bracketPairsTree.value={object:e.add(new x(this.textModel,e=>this.languageConfigurationService.getLanguageConfiguration(e))),dispose:()=>null==e?void 0:e.dispose()},e.add(this.bracketPairsTree.value.object.onDidChange(e=>this.onDidChangeEmitter.fire(e))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){let o=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){let i=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!i)return null;let o=(0,n.dF)(this.getBracketPairsInRange(g.e.fromPositions(t,t))||[],e=>i.closes(e.openingBracketInfo));return o?o.openingBracketRange:null}{let t=e.toLowerCase(),n=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!n)return null;let s=n.textIsBracket[t];return s?O(this._findMatchingBracketUp(s,o,A(i))):null}}matchBracket(e,t){if(this.canBuildAST){let t=(0,n.jV)(this.getBracketPairsInRange(g.e.fromPositions(e,e)).filter(t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e))),(0,n.tT)(t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange,g.e.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{let i=A(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){let o=t.getCount(),r=t.getLanguageId(n),s=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){let i=t.getEndOffset(e);if(i<=s)break;if((0,E.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,E.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e,t){let i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;let s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(s&&!(0,E.Bu)(n.getStandardTokenType(r))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,s,r),h=null;for(;;){let n=T.Vr.findNextBracketInRange(s.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){let e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,s.textIsBracket[e],s.textIsOpenBracket[e],t);if(i){if(i instanceof R)return null;h=i}}a=n.endColumn-1}if(h)return h}if(r>0&&n.getStartOffset(r)===e.column-1){let s=r-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(a&&!(0,E.Bu)(n.getStandardTokenType(s))){let{searchStartOffset:r,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,s),h=T.Vr.findPrevBracketInRange(a.reversedRegex,i,o,r,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let e=o.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),i=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof R?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;let o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof R?o:[e,o]:null}_findMatchingBracketUp(e,t,i){let n=e.languageId,o=e.reversedRegex,r=-1,s=0,a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return R.INSTANCE;let h=T.Vr.findPrevBracketInRange(o,t,n,a,l);if(!h)break;let d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return h;l=h.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){let i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e),s=o-1,l=r.length,h=r.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let d=!0;for(;s>=0;s--){let t=i.getLanguageId(s)===n&&!(0,E.Bu)(i.getStandardTokenType(s));if(t)d?l=i.getStartOffset(s):(l=i.getStartOffset(s),h=i.getEndOffset(s));else if(d&&l!==h){let t=a(e,r,l,h);if(t)return t}d=t}if(d&&l!==h){let t=a(e,r,l,h);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){let n=e.languageId,o=e.forwardRegex,r=1,s=0,a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return R.INSTANCE;let h=T.Vr.findNextBracketInRange(o,t,n,a,l);if(!h)break;let d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){let i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e),s=0,l=0,h=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let d=!0;for(;s=1;e--){let t=this.textModel.tokenization.getLineTokens(e),s=t.getCount(),a=this.textModel.getLineContent(e),l=s-1,h=a.length,d=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;let e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){let i=t.getLanguageId(l);if(n!==i){if(o&&r&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t);u=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}let s=!!o&&!(0,E.Bu)(t.getStandardTokenType(l));if(s)u?h=t.getStartOffset(l):(h=t.getStartOffset(l),d=t.getEndOffset(l));else if(r&&o&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t)}u=s}if(r&&o&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t)}}return null}findNextBracket(e){var t;let i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;let n=this.textModel.getLineCount(),o=null,r=null,s=null;for(let e=i.lineNumber;e<=n;e++){let t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e),l=0,h=0,d=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;let e=t.getLanguageId(l);o!==e&&(o=e,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e));return t?[t.openingBracketRange,t.closingBracketRange]:null}let o=A(t),r=this.textModel.getLineCount(),s=new Map,a=[],l=(e,t)=>{if(!s.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(o&&++h%100==0&&!o())return R.INSTANCE;let s=T.Vr.findNextBracketInRange(e.forwardRegex,t,i,n,r);if(!s)break;let l=i.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),d=e.textIsBracket[l];if(d&&(d.isOpen(l)?a[d.index]++:d.isClose(l)&&a[d.index]--,-1===a[d.index]))return this._matchFoundBracket(s,d,!1,o);n=s.endColumn-1}return null},u=null,c=null;for(let e=i.lineNumber;e<=r;e++){let t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e),r=0,s=0,a=0;if(e===i.lineNumber){r=t.findTokenIndexAtOffset(i.column-1),s=i.column-1,a=i.column-1;let e=t.getLanguageId(r);u!==e&&(u=e,c=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,c))}let h=!0;for(;r!0;{let t=Date.now();return()=>Date.now()-t<=e}}class R{constructor(){this._searchCanceledBrand=void 0}}function O(e){return e instanceof R?null:e}R.INSTANCE=new R;var P=i(51945),F=i(97781);class B extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new V,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(e=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i){if(void 0===t||!this.colorizationOptions.enabled)return[];let n=[],o=this.textModel.bracketPairs.getBracketsInRange(e);for(let e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0!==e&&this.colorizationOptions.enabled?this.getDecorationsInRange(new g.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class V{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}(0,F.Ic)((e,t)=>{let i=[P.zJ,P.Vs,P.CE,P.UP,P.r0,P.m1],n=new V;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(P.ts)}; }`);let o=i.map(t=>e.getColor(t)).filter(e=>!!e).filter(e=>!e.isTransparent());for(let e=0;e<30;e++){let i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}});var W=i(95215),H=i(1516);class z{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function K(e,t,i){let n=Math.min(e.getLineCount(),1e4),o=0,r=0,s="",a=0,l=[0,0,0,0,0,0,0,0,0],h=new z;for(let d=1;d<=n;d++){let n=e.getLineLength(d),u=e.getLineContent(d),c=n<=65536,g=!1,p=0,m=0,f=0;for(let t=0;t0?o++:m>1&&r++,!function(e,t,i,n,o){let r;for(r=0,o.spacesDiff=0,o.looksLikeAlignment=!1;r0&&a>0||l>0&&h>0)return;let d=Math.abs(a-h),u=Math.abs(s-l);if(0===d){o.spacesDiff=u,u>0&&0<=l-1&&l-1{let i=l[t];i>e&&(e=i,u=t)}),4===u&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(u=2)}return{insertSpaces:d,tabSize:u}}function U(e){return(1&e.metadata)>>>0}function $(e,t){e.metadata=254&e.metadata|t<<0}function j(e){return(2&e.metadata)>>>1==1}function q(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function G(e){return(4&e.metadata)>>>2==1}function Q(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function Z(e,t){e.metadata=231&e.metadata|t<<3}function Y(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class J{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,$(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,Q(this,!1),Z(this,1),Y(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,q(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;Q(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Z(this,this.options.stickiness),Y(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}let X=new J(null,0,0);X.parent=X,X.left=X,X.right=X,$(X,0);class ee{constructor(){this.root=X,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===X?[]:function(e,t,i,n,o,r){let s=e.root,a=0,l=0,h=0,d=[],u=0;for(;s!==X;){if(j(s)){q(s.left,!1),q(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;continue}if(!j(s.left)){if(a+s.maxEndi){q(s,!0);continue}if((h=a+s.end)>=t){s.setCachedOffsets(l,h,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&G(s)&&(e=!1),e&&(d[u++]=s)}if(q(s,!0),s.right!==X&&!j(s.right)){a+=s.delta,s=s.right;continue}}return q(e.root,!1),d}(this,e,t,i,n,o)}search(e,t,i){return this.root===X?[]:function(e,t,i,n){let o=e.root,r=0,s=0,a=0,l=[],h=0;for(;o!==X;){if(j(o)){q(o.left,!1),q(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==X&&!j(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;if(t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&G(o)&&(e=!1),e&&(l[h++]=o),q(o,!0),o.right!==X&&!j(o.right)){r+=o.delta,o=o.right;continue}}return q(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root,n=[],o=0;for(;i!==X;){if(j(i)){q(i.left,!1),q(i.right,!1),i=i.parent;continue}if(i.left!==X&&!j(i.left)){i=i.left;continue}if(i.ownerId===t&&(n[o++]=i),q(i,!0),i.right!==X&&!j(i.right)){i=i.right;continue}}return q(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,i=[],n=0;for(;t!==X;){if(j(t)){q(t.left,!1),q(t.right,!1),t=t.parent;continue}if(t.left!==X&&!j(t.left)){t=t.left;continue}if(t.right!==X&&!j(t.right)){t=t.right;continue}i[n++]=t,q(t,!0)}return q(e.root,!1),i}(this)}insert(e){ei(this,e),this._normalizeDeltaIfNecessary()}delete(e){en(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let i=e,n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;let o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){let o=function(e,t,i){let n=e.root,o=0,r=0,s=0,a=[],l=0;for(;n!==X;){if(j(n)){q(n.left,!1),q(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;continue}if(!j(n.left)){if(o+n.maxEndi){q(n,!0);continue}if((s=o+n.end)>=t&&(n.setCachedOffsets(r,s,0),a[l++]=n),q(n,!0),n.right!==X&&!j(n.right)){o+=n.delta,n=n.right;continue}}return q(e.root,!1),a}(this,e,e+t);for(let e=0,t=o.length;ei){o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),q(o,!0);continue}if(q(o,!0),o.right!==X&&!j(o.right)){r+=o.delta,o=o.right;continue}}q(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;r>>3,s=0===r||2===r,a=1===r||2===r,l=i-t,h=Math.min(l,n),d=e.start,u=!1,c=e.end,g=!1;t<=d&&c<=i&&(32&e.metadata)>>>5==1&&(e.start=t,u=!0,e.end=t,g=!0);{let e=o?1:l>0?2:0;!u&&et(d,s,t,e)&&(u=!0),!g&&et(c,a,t,e)&&(g=!0)}if(h>0&&!o){let e=l>n?2:0;!u&&et(d,s,t+h,e)&&(u=!0),!g&&et(c,a,t+h,e)&&(g=!0)}{let r=o?1:0;!u&&et(d,s,i,r)&&(e.start=t+n,u=!0),!g&&et(c,a,i,r)&&(e.end=t+n,g=!0)}let p=n-l;u||(e.start=Math.max(0,d+p)),g||(e.end=Math.max(0,c+p)),e.start>e.end&&(e.end=e.start)}(s,e,e+t,i,n),s.maxEnd=s.end,ei(this,s)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==X;){if(t.left!==X&&!j(t.left)){t=t.left;continue}if(t.right!==X&&!j(t.right)){i+=t.delta,t=t.right;continue}t.start=i+t.start,t.end=i+t.end,t.delta=0,el(t),q(t,!0),q(t.left,!1),q(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent}q(e.root,!1)}(this))}}function et(e,t,i,n){return ei)&&1!==n&&(2===n||t)}function ei(e,t){if(e.root===X)return t.parent=X,t.left=X,t.right=X,$(t,0),e.root=t,e.root;(function(e,t){let i=0,n=e.root,o=t.start,r=t.end;for(;;){var s,a;let e=(s=n.start+i,a=n.end+i,o===s?r-a:o-s);if(e<0){if(n.left===X){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===X){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=X,t.right=X,$(t,1)})(e,t),eh(t.parent);let i=t;for(;i!==e.root&&1===U(i.parent);)if(i.parent===i.parent.parent.left){let t=i.parent.parent.right;1===U(t)?($(i.parent,0),$(t,0),$(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&er(e,i=i.parent),$(i.parent,0),$(i.parent.parent,1),es(e,i.parent.parent))}else{let t=i.parent.parent.left;1===U(t)?($(i.parent,0),$(t,0),$(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&es(e,i=i.parent),$(i.parent,0),$(i.parent.parent,1),er(e,i.parent.parent))}return $(e.root,0),t}function en(e,t){let i,n,o;if(t.left===X?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===X?(i=t.left,n=t):(i=(n=function(e){for(;e.left!==X;)e=e.left;return e}(t.right)).right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root){e.root=i,$(i,0),t.detach(),eo(),el(i),e.root.parent=X;return}let r=1===U(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,$(n,U(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==X&&(n.left.parent=n),n.right!==X&&(n.right.parent=n)),t.detach(),r){eh(i.parent),n!==t&&(eh(n),eh(n.parent)),eo();return}for(eh(i),eh(i.parent),n!==t&&(eh(n),eh(n.parent));i!==e.root&&0===U(i);)i===i.parent.left?(1===U(o=i.parent.right)&&($(o,0),$(i.parent,1),er(e,i.parent),o=i.parent.right),0===U(o.left)&&0===U(o.right)?($(o,1),i=i.parent):(0===U(o.right)&&($(o.left,0),$(o,1),es(e,o),o=i.parent.right),$(o,U(i.parent)),$(i.parent,0),$(o.right,0),er(e,i.parent),i=e.root)):(1===U(o=i.parent.left)&&($(o,0),$(i.parent,1),es(e,i.parent),o=i.parent.left),0===U(o.left)&&0===U(o.right)?($(o,1),i=i.parent):(0===U(o.left)&&($(o.right,0),$(o,1),er(e,o),o=i.parent.left),$(o,U(i.parent)),$(i.parent,0),$(o.left,0),es(e,i.parent),i=e.root));$(i,0),eo()}function eo(){X.parent=X,X.delta=0,X.start=0,X.end=0}function er(e,t){let i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==X&&(i.left.parent=t),i.parent=t.parent,t.parent===X?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,el(t),el(i)}function es(e,t){let i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==X&&(i.right.parent=t),i.parent=t.parent,t.parent===X?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,el(t),el(i)}function ea(e){let t=e.end;if(e.left!==X){let i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==X){let i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function el(e){e.maxEnd=ea(e)}function eh(e){for(;e!==X;){let t=ea(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class ed{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==eu)return ec(this.right);let e=this;for(;e.parent!==eu&&e.parent.left!==e;)e=e.parent;return e.parent===eu?eu:e.parent}prev(){if(this.left!==eu)return eg(this.left);let e=this;for(;e.parent!==eu&&e.parent.right!==e;)e=e.parent;return e.parent===eu?eu:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}let eu=new ed(null,0);function ec(e){for(;e.left!==eu;)e=e.left;return e}function eg(e){for(;e.right!==eu;)e=e.right;return e}function ep(e){return e===eu?0:e.size_left+e.piece.length+ep(e.right)}function em(e){return e===eu?0:e.lf_left+e.piece.lineFeedCnt+em(e.right)}function ef(){eu.parent=eu}function e_(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==eu&&(i.left.parent=t),i.parent=t.parent,t.parent===eu?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function ev(e,t){let i=t.left;t.left=i.right,i.right!==eu&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===eu?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function eC(e,t){let i,n,o;if(i=t.left===eu?(n=t).right:t.right===eu?(n=t).left:(n=ec(t.right)).right,n===e.root){e.root=i,i.color=0,t.detach(),ef(),e.root.parent=eu;return}let r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,ey(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,ey(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==eu&&(n.left.parent=n),n.right!==eu&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,ey(e,n)),t.detach(),i.parent.left===i){let t=ep(i),n=em(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,ew(e,i.parent,o,r)}}if(ey(e,i.parent),r){ef();return}for(;i!==e.root&&0===i.color;)i===i.parent.left?(1===(o=i.parent.right).color&&(o.color=0,i.parent.color=1,e_(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,ev(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,e_(e,i.parent),i=e.root)):(1===(o=i.parent.left).color&&(o.color=0,i.parent.color=1,ev(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,e_(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,ev(e,i.parent),i=e.root));i.color=0,ef()}function eb(e,t){for(ey(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){let i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&e_(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ev(e,t.parent.parent))}else{let i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&ev(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,e_(e,t.parent.parent))}e.root.color=0}function ew(e,t,i,n){for(;t!==e.root&&t!==eu;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function ey(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=ep((t=t.parent).left)-t.size_left,n=em(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}eu.parent=eu,eu.left=eu,eu.right=eu,eu.color=0;var eS=i(77277);function eL(e){let t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}class ek{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function eN(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t(e!==eu&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class eE{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){let e=[];for(let t of i)null!==t&&e.push(t);this._cache=e}}}class eT{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new ex("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=eu,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=eN(e[t].buffer));let i=new eD(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new eE(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),i=2*t,n="",o=0,r=[];if(this.iterate(this.root,s=>{let a=this.getNodeContent(s),l=a.length;if(o<=t||o+l0){let t=n.replace(/\r\n|\r|\n/g,e);r.push(new ex(t,eN(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new eI(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==eu;)if(n.left!==eu&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;let o=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(o+t-1)}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.max(0,e=Math.floor(e));let t=this.root,i=0,n=e;for(;t!==eu;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=this.getOffsetAt(i+1,1),t=n-e;return new c.L(i+1,t+1)}return new c.L(i+1,o.remainder+1)}else{if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===eu){let t=this.getOffsetAt(i+1,1),o=n-e-t;return new c.L(i+1,o+1)}t=t.right}return new c.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==eu;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,o=>{if(o===eu)return!0;let r=o.piece,s=r.length;if(0===s)return!0;let a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,h=r.start.line,d=r.end.line,u=l[h]+r.start.column;if(n&&(10===a.charCodeAt(u)&&(u++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(h===d)return this._EOLNormalized||13!==a.charCodeAt(u+s-1)?i+=a.substr(u,s):(n=!0,i+=a.substr(u,s-1)),!0;i+=this._EOLNormalized?a.substring(u,Math.max(u,l[h+1]-this._EOLLength)):a.substring(u,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;ne+_,t.reset(0)):(c=m.buffer,p=e=>e,t.reset(_));do if(u=t.next(c)){if(p(u.index)>=v)return h;this.positionInBuffer(e,p(u.index)-f,C);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,C),r=C.line===o.line?C.column-o.column+n:C.column+1,s=r+u[0].length;if(d[h++]=(0,eS.iE)(new g.e(i+t,r,i+t,s),u,a),p(u.index)+u[0].length>=v)return h;if(h>=l)break}while(u);return h}findMatchesLineByLine(e,t,i,n){let o=[],r=0,s=new eS.sz(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder),d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,h,d,t,i,n,r,o),o;let u=e.startLineNumber,c=a.node;for(;c!==l.node;){let l=this.getLineFeedCnt(c.piece.bufferIndex,h,c.piece.end);if(l>=1){let a=this._buffers[c.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start),g=a[h.line+l],p=u===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(c,s,u,p,h,this.positionInBuffer(c,g-d),t,i,n,r,o))>=n)return o;u+=l}let d=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){let a=this.getLineContent(u).substring(d,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,d,r,o,i,n),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(u).substr(d),u,d,r,o,i,n))>=n)return o;u++,c=(a=this.nodeAt2(u,1)).node,h=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){let a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}let g=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,u,g,h,d,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){let h;let d=e.wordSeparators;if(!a&&e.simpleSearch){let t=e.simpleSearch,a=t.length,h=i.length,u=-a;for(;-1!==(u=i.indexOf(t,u+a))&&(!(!d||(0,eS.cM)(d,i,h,u,a))||(s[r++]=new v.tk(new g.e(n,u+1+o,n,u+1+a+o),null),!(r>=l))););return r}t.reset(0);do if((h=t.next(i))&&(s[r++]=(0,eS.iE)(new g.e(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),r>=l))break;while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==eu){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.length<65535){this.appendToNode(i,t),this.computeBufferMetadata();return}if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){let e=[],o=new eD(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=this.nodeCharCodeAt(i,n);if(10===e){let e={line:o.start.line+1,column:0};o=new eD(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){let o=this.nodeCharCodeAt(i,n-1);if(13===o){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let h=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e=u)l=d+1;else break;return i?(i.line=d,i.column=a-c,null):{line:d,column:a-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;let s=this._buffers[e].buffer;return 13===s.charCodeAt(r-1)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){let i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;t65535){let t=[];for(;e.length>65535;){let i;let n=e.charCodeAt(65534);13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));let o=eN(i);t.push(new eD(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new ex(i,o))}let i=eN(e);return t.push(new eD(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new ex(e,i)),t}let t=this._buffers[0].buffer.length,i=eN(e,!1),n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==eu;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substring(r,r+o-t);break}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==eu;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){let i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=this.offsetInBuffer(i.bufferIndex,t),s=this.getLineFeedCnt(i.bufferIndex,i.start,t),a=s-n,l=r-o,h=i.length+l;e.piece=new eD(i.bufferIndex,i.start,t,s,h),ew(this,e,l,a)}deleteNodeHead(e,t){let i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=this.getLineFeedCnt(i.bufferIndex,t,i.end),s=this.offsetInBuffer(i.bufferIndex,t),a=r-n,l=o-s,h=i.length+l;e.piece=new eD(i.bufferIndex,t,i.end,r,h),ew(this,e,l,a)}shrinkNode(e,t,i){let n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=this.getLineFeedCnt(n.bufferIndex,n.start,t),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new eD(n.bufferIndex,n.start,t,l,h),ew(this,e,h-s,l-a);let d=new eD(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");let i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let o=eN(t,!1);for(let e=0;ee)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==eu;)if(i.left!==eu&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==eu;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){let e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return -1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===eu||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;let r=i[n+1];return!(r>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==eu&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i;let n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};let r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new eD(e.piece.bufferIndex,e.piece.start,i,s,r),ew(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new eD(t.piece.bufferIndex,a,t.piece.end,h,l),ew(this,t,-1,-1),0===t.piece.length&&n.push(t);let d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;let p=this._doApplyEdits(a),m=null;if(t&&c.length>0){c.sort((e,t)=>t.lineNumber-e.lineNumber),m=[];for(let e=0,t=c.length;e0&&c[e-1].lineNumber===t)continue;let i=c[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.LC(n)&&m.push(t)}}return this._onDidChangeContent.fire(),new v.je(g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,i=e[0].range,n=e[e.length-1].range,o=new g.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn),r=i.startLineNumber,s=i.startColumn,a=[];for(let i=0,n=e.length;i0&&a.push(n.text),r=o.endLineNumber,s=o.endColumn}let l=a.join(""),[h,u,c]=(0,d.Q)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:h,firstLineLength:u,lastLineLength:c,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(eA._sortOpsDescending);let t=[];for(let i=0;i0){let e=h.eolCount+1;l=1===e?new g.e(s,a,s,a+h.firstLineLength):new g.e(s,a,s+e-1,h.lastLineLength+1)}else l=new g.e(s,a,s,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=h}return t}static _sortOpsAscending(e,t){let i=g.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=g.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class eR{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){let t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){let t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,r=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}let a=new ek(eL(e),n,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new ex(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=l.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.ab(e))}finish(e=!0){return this._finish(),new eR(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=eN(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var eP=i(270),eF=i(94954),eB=i(77378),eV=i(43155),eW=i(276),eH=i(84013);class ez{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class eK{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new ez(e,[t]))}finalize(){return this._tokens}}var eU=i(15393),e$=i(1432);class ej{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;let i=[];for(let e=0;e{let t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;let n=this._tokenizeOneInvalidLine(t);if(n>=e)break}while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}tokenizeViewport(e,t){let i=new eK;this._tokenizeViewport(i,e,t),this._tokenizationPart.setTokens(i.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(e){let t=new eK;this._updateTokensUntilLine(t,e),this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);let i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;let n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),r=o.substring(0,e.column-1)+t+o.substring(e.column-1),s=eQ(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),a=new eB.A(s.tokens,r,this._languageIdCodec);if(0===a.getCount())return 0;let l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){let n=e.lineNumber,o=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);let r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;let s=this._textModel.getLineContent(n),a=s.substring(0,o-1)+i+s.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),h=eQ(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,r),d=new eB.A(h.tokens,a,this._languageIdCodec);return d}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;let t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&!!(ethis._textModel.getLineLength(e))}_hasLinesToTokenize(){return!!this._tokenizationStateStore&&this._tokenizationStateStore.invalidLineStartIndex=this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;let t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;let i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),o=t-1;for(let t=this._tokenizationStateStore.invalidLineStartIndex;t<=o;t++){let o=this._textModel.getLineContent(t+1),r=this._tokenizationStateStore.getBeginState(t),s=eQ(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,o,!0,r);e.add(t+1,s.tokens),this._tokenizationStateStore.setEndState(n,t,s.endState),t=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t),o=[],r=null;for(let e=t-1;n>1&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--){let t=eQ(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a);a=t.endState}for(let n=t;n<=i;n++){let t=this._textModel.getLineContent(n),i=eQ(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function eQ(e,t,i,n,o,s){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,s.clone())}catch(e){(0,r.dL)(e)}return a||(a=(0,eW.Dy)(e.encodeLanguageId(t),s)),eB.A.convertToEndOffset(a.tokens,n.length),a}let eZ=new Uint32Array(0).buffer;class eY{static deleteBeginning(e,t){return null===e||e===eZ?e:eY.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===eZ)return e;let i=eJ(e),n=i[i.length-2];return eY.delete(e,t,n)}static delete(e,t,i){let n,o;if(null===e||e===eZ||t===i)return e;let r=eJ(e),s=r.length>>>1;if(0===t&&r[r.length-2]===i)return eZ;let a=eB.A.findIndexInTokensArray(r,t),l=a>0?r[a-1<<1]:0,h=r[a<<1];if(io&&(r[n++]=t,r[n++]=r[(e<<1)+1],o=t)}if(n===r.length)return e;let u=new Uint32Array(n);return u.set(r.subarray(0,n),0),u.buffer}static append(e,t){if(t===eZ)return e;if(e===eZ)return t;if(null===e)return e;if(null===t)return null;let i=eJ(e),n=eJ(t),o=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length,a=i[i.length-2];for(let e=0;e>>1,r=eB.A.findIndexInTokensArray(n,t);if(r>0){let e=n[r-1<<1];e===t&&r--}for(let e=r;e1&&(t=eX.N.getLanguageId(n[1])!==e),!t)return eZ}if(!n||0===n.length){let i=new Uint32Array(2);return i[0]=t,i[1]=e1(e),i.buffer}return(n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength)?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=eY.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=eY.deleteEnding(this._lineTokens[t],e.startColumn-1);let i=e.endLineNumber-1,n=null;i=this._len)){if(0===t){this._lineTokens[n]=eY.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=eY.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=eY.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}}function e1(e){return(e<<0|33588224)>>>0}class e2{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){let n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}let[r,s]=n.split(i);if(r.isEmpty()){o=o||{index:e};continue}s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;let i=this._pieces;if(0===i.length)return t;let n=e2._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;let r=t.getCount(),s=o.getCount(),a=0,l=[],h=0,d=0,u=(e,t)=>{e!==d&&(d=e,l[h++]=e,l[h++]=t)};for(let e=0;e>>0,h=~l>>>0;for(;at)n=o-1;else{for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}}return i}acceptEdit(e,t,i,n,o){for(let r of this._pieces)r.acceptEdit(e,t,i,n,o)}}class e5 extends eF.U{constructor(e,t,i,n,o){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this.bracketPairsTextModelPart=n,this._languageId=o,this._onDidChangeLanguage=this._register(new s.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new s.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new s.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new s.Q5),this._tokens=new e0(this._languageService.languageIdCodec),this._semanticTokens=new e2(this._languageService.languageIdCodec),this._tokenization=new eG(i,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}acceptEdit(e,t,i,n,o){this._tokens.acceptEdit(e,i,n),this._semanticTokens.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(e){this._tokenization.handleDidChangeContent(e)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;let t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(e,t=!1){if(0!==e.length){let t=[];for(let i=0,n=e.length;i0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._textModel.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this._textModel.getLineCount())throw Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this._textModel.getLineCount())throw Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){let t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getTokenTypeIfInsertingCharacter(e,t,i){let n=this._textModel.validatePosition(new c.L(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){let n=this._textModel.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[r,s]=e5._findLanguageBoundaries(n,o),a=(0,eP.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){let[r,s]=e5._findLanguageBoundaries(n,o-1),a=(0,eP.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){let i=e.getLanguageId(t),n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,r=e.getCount();n0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}let te=()=>{throw Error("Invalid change accessor")},tt=class e extends a.JT{constructor(t,i,n,o=null,r,a,d){super(),this._undoRedoService=r,this._languageService=a,this._languageConfigurationService=d,this._onWillDispose=this._register(new s.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new tg(e=>this.handleBeforeFireDecorationsChangedEvent(e))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new s.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new s.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new s.Q5),this._eventEmitter=this._register(new tp),this._deltaDecorationCallCnt=0,e6++,this.id="$model"+e6,this.isForSimpleWidget=n.isForSimpleWidget,null==o?this._associatedResource=h.o.parse("inmemory://model/"+e6):this._associatedResource=o,this._attachedEditorCount=0;let{textBuffer:u,disposable:c}=e7(t,n.defaultEOL);this._buffer=u,this._bufferDisposable=c,this._options=e.resolveOptions(this._buffer,n),this._bracketPairs=this._register(new M(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new H.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new B(this)),this._tokenizationTextModelPart=new e5(this._languageService,this._languageConfigurationService,this,this._bracketPairs,i);let p=this._buffer.getLineCount(),m=this._buffer.getValueLengthInRange(new g.e(1,1,p,this._buffer.getLineLength(p)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=m>e.LARGE_FILE_SIZE_THRESHOLD||p>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=m>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.PJ(e6),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new to,this._commandManager=new W.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){let i=K(e,t.tabSize,t.insertSpaces);return new v.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new eA([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new e4.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;let{textBuffer:t,disposable:i}=e7(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new to,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new e4.dQ([new e4.Jx],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();let t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;let i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new e4.dQ([new e4.CZ],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,i=this._buffer.getLineCount();for(let n=1;n<=i;n++){let i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,s=new v.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:r});if(this._options.equals(s))return;let a=this._options.createChangeEvent(s);this._options=s,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();let i=K(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,u.x)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(l.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(e=>({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new e8(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn,o=Math.floor("number"!=typeof i||isNaN(i)?1:i),r=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{let e=this.getLineMaxColumn(o);r>=e&&(r=e)}let s=e.endLineNumber,a=e.endColumn,l=Math.floor("number"!=typeof s||isNaN(s)?1:s),h=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{let e=this.getLineMaxColumn(l);h>=e&&(h=e)}return i===o&&n===r&&s===l&&a===h&&e instanceof g.e&&!(e instanceof p.Y)?e:new g.e(o,r,l,h)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t||isNaN(e)||isNaN(t)||e<1||t<1||(0|e)!==e||(0|t)!==t)return!1;let n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;let o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===i){let i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){let n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new c.L(1,1);if(n>r)return new c.L(r,this.getLineMaxColumn(r));if(o<=1)return new c.L(n,1);let s=this.getLineMaxColumn(n);if(o>=s)return new c.L(n,s);if(1===i){let e=this._buffer.getLineCharCode(n,o-2);if(l.ZG(e))return new c.L(n,o-1)}return new c.L(n,o)}validatePosition(e){return(this._assertNotDisposed(),e instanceof c.L&&this._isValidPosition(e.lineNumber,e.column,1))?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(o,r,0))return!1;if(1===t){let e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,s=l.ZG(e),a=l.ZG(t);return!s&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof g.e&&!(e instanceof p.Y)&&this._isValidRange(e,1))return e;let t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,r=i.lineNumber,s=i.column;{let e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===r&&o===s?new g.e(n,o-1,r,s-1):i&&a?new g.e(n,o-1,r,s+1):i?new g.e(n,o-1,r,s):new g.e(n,o,r,s+1):new g.e(n,o,r,s)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new g.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,s=999){let a;this._assertNotDisposed();let l=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>g.e.isIRange(e))&&(l=t.map(e=>this.validateRange(e)))),null===l&&(l=[this.getFullModelRange()]),l=l.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);let h=[];if(h.push(l.reduce((e,t)=>g.e.areIntersecting(e,t)?e.plusRange(t):(h.push(e),t))),!i&&0>e.indexOf("\n")){let t=new eS.bc(e,i,n,o),l=t.parseSearchRequest();if(!l)return[];a=e=>this.findMatchesLineByLine(e,l,r,s)}else a=t=>eS.pM.findMatches(this,new eS.bc(e,i,n,o),t,r,s);return h.map(a).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();let s=this.validatePosition(t);if(!i&&0>e.indexOf("\n")){let t=new eS.bc(e,i,n,o),a=t.parseSearchRequest();if(!a)return null;let l=this.getLineCount(),h=new g.e(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(h,a,r,1);return(eS.pM.findNextMatch(this,new eS.bc(e,i,n,o),s,r),d.length>0)?d[0]:(h=new g.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(h,a,r,1)).length>0)?d[0]:null}return eS.pM.findNextMatch(this,new eS.bc(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();let s=this.validatePosition(t);return eS.pM.findPreviousMatch(this,new eS.bc(e,i,n,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){let t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Qi?e:new v.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})),n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){let e=new g.e(n,1,n,o);t.push(new v.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){let o=e.map(e=>{let t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){let o=e.map(e=>{let t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}});this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){let i=l+t,n=m+t;C.takeFromEndWhile(e=>e.lineNumber>n);let o=C.takeFromEndWhile(e=>e.lineNumber===n);e.push(new e4.rU(i,this.getLineContent(n),o))}if(ge.lineNumbere.lineNumber===t)}e.push(new e4.Tx(o+1,l+a,u,d))}t+=p}this._emitContentChangedEvent(new e4.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;let t=Array.from(e),i=t.map(e=>new e4.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e)));this._onDidChangeInjectedText.fire(new e4.D8(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,tc(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},n=null;try{n=t(i)}catch(e){(0,r.dL)(e)}return i.addDecoration=te,i.changeDecoration=te,i.changeDecorationOptions=te,i.removeDecoration=te,i.deltaDecorations=te,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,r.dL)(Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){let n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:tu[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;let o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions(tu[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1){let r=this.getLineCount(),s=Math.min(r,Math.max(1,t)),a=this.getLineMaxColumn(s),l=new g.e(Math.min(r,Math.max(1,e)),1,s,a),h=this._getDecorationsInRange(l,i,o);return(0,n.vA)(h,this._decorationProvider.getDecorationsInRange(l,i,o)),h}getDecorationsInRange(e,t=0,i=!1){let o=this.validateRange(e),r=this._getDecorationsInRange(o,t,i);return(0,n.vA)(r,this._decorationProvider.getDecorationsInRange(o,t,i)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return e4.gk.fromDecorations(n).filter(t=>t.lineNumber===e)}getAllDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!1).concat(this._decorationProvider.getAllDecorations(e,t))}_getDecorationsInRange(e,t,i){let n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let i=this._decorations[e];if(!i)return;if(i.options.after){let t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){let t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}let n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){let i=this._decorations[e];if(!i)return;let n=!!i.options.overviewRuler&&!!i.options.overviewRuler.color,o=!!t.overviewRuler&&!!t.overviewRuler.color;if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){let e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){let e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){let n=this.getVersionId(),o=t.length,r=0,s=i.length,a=0,l=Array(s);for(;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([e9(4,e3.tJ),e9(5,f.O),e9(6,_.c_)],tt);class to{constructor(){this._decorationsTree0=new ee,this._decorationsTree1=new ee,this._injectedTextDecorationsTree=new ee}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(let i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o){let r=e.getVersionId(),s=this._intervalSearch(t,i,n,o,r);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,i,n,o){let r=this._decorationsTree0.intervalSearch(e,t,i,n,o),s=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return r.concat(s).concat(a)}getInjectedTextInInterval(e,t,i,n){let o=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);return this._ensureNodesHaveRanges(e,r).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAllInjectedText(e,t){let i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAll(e,t,i,n){let o=e.getVersionId(),r=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{let i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),r=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(r)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){tn(e)?this._injectedTextDecorationsTree.insert(e):ti(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){tn(e)?this._injectedTextDecorationsTree.delete(e):ti(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){tn(e)?this._injectedTextDecorationsTree.resolveNode(e,t):ti(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function tr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class ts{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class ta extends ts{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:v.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class tl extends ts{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?o.Il.fromHex(e):t.getColor(e.id)}}class th{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof th?e:new th(e)}}class td{constructor(e){var t,i;this.description=e.description,this.blockClassName=e.blockClassName?tr(e.blockClassName):null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?tr(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new ta(e.overviewRuler):null,this.minimap=e.minimap?new tl(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?tr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?tr(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?tr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?tr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?tr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?tr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?tr(e.afterContentClassName):null,this.after=e.after?th.from(e.after):null,this.before=e.before?th.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new td(e)}static createDynamic(e){return new td(e)}}td.EMPTY=td.register({description:"empty"});let tu=[td.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),td.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),td.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),td.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function tc(e){return e instanceof td?e:td.createDynamic(e)}class tg extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new s.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!e.minimap&&!!e.minimap.position),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!e.overviewRuler&&!!e.overviewRuler.color),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class tp extends a.JT{constructor(){super(),this._fastEmitter=this._register(new s.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new s.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}},94954:function(e,t,i){"use strict";i.d(t,{U:function(){return o}});var n=i(9917);class o extends n.JT{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw Error("TextModelPart is disposed!")}}},77277:function(e,t,i){"use strict";i.d(t,{bc:function(){return l},cM:function(){return c},iE:function(){return h},pM:function(){return u},sz:function(){return g}});var n=i(97295),o=i(24929),r=i(50187),s=i(24314),a=i(84973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){let e;if(""===this.searchString)return null;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;let n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}function h(e,t,i){if(!i)return new a.tk(e,null);let n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class u{static findMatches(e,t,i,n,o){let r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new g(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l;let h=0;if(n?(h=n.findLineFeedCountBeforeOffset(o),a=t+o+h):a=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length),t=e-h;l=a+r.length+t}else l=a+r.length;let d=e.getPositionAt(a),u=e.getPositionAt(l);return new s.e(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,o){let r;let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new d(a):null,u=[],c=0;for(i.reset(0);(r=i.next(a))&&(u[c++]=h(this._getMultilineMatchRange(e,s,a,l,r.index,r[0]),r,n),!(c>=o)););return u}static _doFindMatchesLineByLine(e,t,i,n,o){let r=[],s=0;if(t.startLineNumber===t.endLineNumber){let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let a=t.startLineNumber+1;a=d))););return o}let m=new g(e.wordSeparators,e.regex);m.reset(0);do if((u=m.next(t))&&(r[o++]=h(new s.e(i,u.index+1+n,i,u.index+1+u[0].length+n),u,l),o>=d))break;while(u);return o}static findNextMatch(e,t,i,n){let o=t.parseSearchRequest();if(!o)return null;let r=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){let o=new r.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),u=e.getValueInRange(new s.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),c="\r\n"===e.getEOL()?new d(u):null;i.reset(t.column-1);let g=i.next(u);return g?h(this._getMultilineMatchRange(e,a,u,c,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new r.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){let o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let t=1;t<=o;t++){let s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);let r=e.next(t);return r?h(new s.e(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){let o=t.parseSearchRequest();if(!o)return null;let r=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){let o=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];let a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new r.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){let o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let t=1;t<=o;t++){let s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=h(new s.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function c(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;let r=t.charCodeAt(n-1);if(0!==e.get(r)||13===r||10===r)return!0;if(o>0){let i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;let r=t.charCodeAt(n+o);if(0!==e.get(r)||13===r||10===r)return!0;if(o>0){let i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t;let i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||!(t=this._searchRegex.exec(e)))break;let o=t.index,r=t[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){n.ZH(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}break}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||c(this._wordSeparators,e,i,o,r))return t}while(t);return null}}},59616:function(e,t,i){"use strict";function n(e,t){let i=0,n=0,o=e.length;for(;n0?i[0]:[]}(e,t),s=yield Promise.all(r.map(e=>p(this,void 0,void 0,function*(){let r;let s=null;try{r=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){s=e,r=null}return r&&(m(r)||f(r))||(r=null),new _(e,r,s)})));for(let e of s){if(e.error)throw e.error;if(e.tokens)return e}return s.length>0?s[0]:null})}class b{constructor(e,t){this.provider=e,this.tokens=t}}function w(e,t){return e.has(t)}function y(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}function S(e,t,i,n){return p(this,void 0,void 0,function*(){let r=y(e,t),s=yield Promise.all(r.map(e=>p(this,void 0,void 0,function*(){let r;try{r=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.Cp)(e),r=null}return r&&m(r)||(r=null),new b(e,r)})));for(let e of s)if(e.tokens)return e;return s.length>0?s[0]:null})}a.P0.registerCommand("_provideDocumentSemanticTokensLegend",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i]=t;(0,l.p_)(i instanceof r.o);let n=e.get(s.q).getModel(i);if(!n)return;let{documentSemanticTokensProvider:o}=e.get(g.p),h=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return h?h[0].getLegend():e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.P0.registerCommand("_provideDocumentSemanticTokens",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i]=t;(0,l.p_)(i instanceof r.o);let o=e.get(s.q).getModel(i);if(!o)return;let{documentSemanticTokensProvider:h}=e.get(g.p);if(!v(h,o))return e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());let d=yield C(h,o,null,null,n.T.None);if(!d)return;let{provider:c,tokens:p}=d;if(!p||!m(p))return;let f=u({id:0,type:"full",data:p.data});return p.resultId&&c.releaseDocumentSemanticTokens(p.resultId),f})),a.P0.registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i,o]=t;(0,l.p_)(i instanceof r.o);let a=e.get(s.q).getModel(i);if(!a)return;let{documentRangeSemanticTokensProvider:h}=e.get(g.p),d=y(h,a);if(0===d.length)return;if(1===d.length)return d[0].getLegend();if(!o||!c.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),d[0].getLegend();let u=yield S(h,a,c.e.lift(o),n.T.None);if(u)return u.provider.getLegend()})),a.P0.registerCommand("_provideDocumentRangeSemanticTokens",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i,o]=t;(0,l.p_)(i instanceof r.o),(0,l.p_)(c.e.isIRange(o));let a=e.get(s.q).getModel(i);if(!a)return;let{documentRangeSemanticTokensProvider:h}=e.get(g.p),d=yield S(h,a,c.e.lift(o),n.T.None);if(d&&d.tokens)return u({id:0,type:"full",data:d.tokens.data})}))},88191:function(e,t,i){"use strict";i.d(t,{A:function(){return c}});var n,o,r=i(89954),s=i(43702),a=i(59870),l=i(65026),h=i(72065),d=i(43557),u=i(50988);let c=(0,h.yh)("ILanguageFeatureDebounceService");!function(e){let t=new WeakMap,i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(o||(o={}));class g{constructor(e,t,i,n,o,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=r,this._cache=new s.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((e,t)=>(0,r.SP)(o.of(t),e),0)}get(e){let t=this._key(e),i=this._cache.get(t);return i?(0,a.uZ)(i.value,this._min,this._max):this.default()}update(e,t){let i=this._key(e),n=this._cache.get(i);n||(n=new a.N(6),this._cache.set(i,n));let o=(0,a.uZ)(n.update(t),this._min,this._max);return(0,u.xn)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){let e=new a.nM;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=0|this._overall()||this._default;return(0,a.uZ)(e,this._min,this._max)}}let p=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,r,s;let a=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,l=null!==(r=null==i?void 0:i.max)&&void 0!==r?r:Math.pow(a,2),h=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${o.of(e)},${a}${h?","+h:""}`,u=this._data.get(d);return u||(u=new g(this._logService,t,e,0|this._overallAverage()||1.5*a,a,l),this._data.set(d,u)),u}_overallAverage(){let e=new a.nM;for(let t of this._data.values())e.update(t.default());return e.value}};p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=d.VZ,function(e,t){n(e,t,0)})],p),(0,l.z)(c,p,!0)},71922:function(e,t,i){"use strict";i.d(t,{p:function(){return o}});var n=i(72065);let o=(0,n.yh)("ILanguageFeaturesService")},36357:function(e,t,i){"use strict";i.d(t,{i:function(){return o}});var n=i(72065);let o=(0,n.yh)("markerDecorationsService")},73733:function(e,t,i){"use strict";i.d(t,{q:function(){return o}});var n=i(72065);let o=(0,n.yh)("modelService")},51200:function(e,t,i){"use strict";i.d(t,{b$:function(){return P},e3:function(){return F},tw:function(){return B}});var n=i(4669),o=i(9917),r=i(1432),s=i(17301),a=i(22529),l=i(22075),h=i(68801),d=i(72042),u=i(73733),c=i(71765),g=i(33108),p=i(15393),m=i(71050),f=i(97781),_=i(43557),v=i(64862),C=i(89954),b=i(95215),w=i(66663),y=i(68997),S=i(32670),L=i(36248),k=i(4256),N=i(88191),D=i(84013),x=i(71922),I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},E=function(e,t){return function(i,n){t(i,n,e)}};function T(e){return e.toString()}function M(e){let t;let i=new C.yP,n=e.createSnapshot();for(;t=n.read();)i.update(t);return i.digest()}class A{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>i(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}let R=r.IJ||r.dz?1:2;class O{constructor(e,t,i,n,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let P=class e extends o.JT{constructor(e,t,i,o,r,s,a,l,h){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new W(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new V(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,h))}static _readModelOptions(e,t){var i;let n=l.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){let t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){let t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let r=l.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&!!e.editor.insertSpaces);let s=R,a=e.eol;"\r\n"===a?s=2:"\n"===a&&(s=1);let h=l.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(h="false"!==e.editor.trimAutoWhitespace&&!!e.editor.trimAutoWhitespace);let d=l.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&!!e.editor.detectIndentation);let u=l.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(u="false"!==e.editor.largeFileOptimizations&&!!e.editor.largeFileOptimizations);let c=l.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:r,detectIndentation:d,defaultEOL:s,trimAutoWhitespace:h,largeFileOptimizations:u,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){let r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let i=Object.keys(this._models);for(let n=0,o=i.length;ne){let t=[];for(this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);t.length>0&&this._disposedModelsHeapSize>e;){let e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){let o=this.getCreationOptions(t,i,n),r=new a.yO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(T(i))){let e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=M(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(let e of t.past)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);for(let e of t.future)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,e=>(0,b.e9)(e)&&e.matchesResource(i)),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}let s=T(r.uri);if(this._models[s])throw Error("ModelService: Cannot add model because it already exists!");let l=new A(r,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[s]=l,l}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,h.bd,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;let i=this._models[T(e.uri)];i&&i.setLanguage(t)}getModels(){let e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(let i of e.past)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(let i of e.future)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}let a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r){if(!o&&s>a){let e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,e=>(0,b.e9)(e)&&e.matchesResource(t.uri)),this._insertDisposedModel(new O(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,M(t),t.getVersionId(),t.getAlternativeVersionId()))}else if(!o){let e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){let n=i.oldLanguage,o=t.getLanguageId(),r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};P.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,P=I([E(0,g.Ui),E(1,c.y),E(2,f.XE),E(3,_.VZ),E(4,v.tJ),E(5,d.O),E(6,k.c_),E(7,N.A),E(8,x.p)],P);let F="editor.semanticHighlighting";function B(e,t,i){var n;let o=null===(n=i.getValue(F,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let V=class extends o.JT{constructor(e,t,i,n,o,r){super(),this._watchers=Object.create(null),this._semanticStyling=e;let s=e=>{this._watchers[e.uri.toString()]=new z(e,this._semanticStyling,i,o,r)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(let e of t.getModels()){let t=this._watchers[e.uri.toString()];B(e,i,n)?t||s(e):t&&a(e,t)}};this._register(t.onModelAdded(e=>{B(e,i,n)&&s(e)})),this._register(t.onModelRemoved(e=>{let t=this._watchers[e.uri.toString()];t&&a(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(F)&&l()})),this._register(i.onDidColorThemeChange(l))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};V=I([E(1,u.q),E(2,f.XE),E(3,g.Ui),E(4,N.A),E(5,x.p)],V);class W extends o.JT{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new y.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class H{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let z=class e extends o.JT{constructor(t,i,n,r,s){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new p.pY(()=>this._fetchDocumentSemanticTokensNow(),e.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let a=()=>{for(let e of((0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._provider.all(t)))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};a(),this._register(this._provider.onDidChange(()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.Jc)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}let e=new m.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,S.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;let o=[],r=this._model.onDidChangeContent(e=>{o.push(e)}),a=new D.G(!1);n.then(e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){let{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)},e=>{let t=e&&(s.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"));t||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let r=0;r{o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){t&&i&&t.releaseDocumentSemanticTokens(i.resultId);return}if(!t||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!i){this._model.tokenization.setSemanticTokens(null,!0),s();return}if((0,S.Vj)(i)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(0===i.edits.length)i={resultId:i.resultId,data:r.data};else{let t=0;for(let e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;let o=r.data,s=new Uint32Array(o.length+t),a=o.length,l=s.length;for(let t=i.edits.length-1;t>=0;t--){let h=i.edits[t];if(h.start>o.length){n.warnInvalidEditStart(r.resultId,i.resultId,t,h.start,o.length),this._model.tokenization.setSemanticTokens(null,!0);return}let d=a-(h.start+h.deleteCount);d>0&&(e._copy(o,a-d,s,l-d,d),l-=d),h.data&&(e._copy(h.data,0,s,l-h.data.length,h.data.length),l-=h.data.length),a=h.start}a>0&&e._copy(o,0,s,0,a),i={resultId:i.resultId,data:s}}}if((0,S.Vl)(i)){this._currentDocumentResponse=new H(t,i.resultId,i.data);let e=(0,y.h)(i,n,this._model.getLanguageId());if(o.length>0)for(let t of o)for(let i of e)for(let e of t.changes)i.applyEdit(e.range,e.text);this._model.tokenization.setSemanticTokens(e,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};z.REQUEST_MIN_DELAY=300,z.REQUEST_MAX_DELAY=2e3,z=I([E(2,f.XE),E(3,N.A),E(4,x.p)],z)},88216:function(e,t,i){"use strict";i.d(t,{S:function(){return o}});var n=i(72065);let o=(0,n.yh)("textModelService")},68997:function(e,t,i){"use strict";i.d(t,{$:function(){return p},h:function(){return m}});var n=i(45797),o=i(97781),r=i(43557),s=i(50187),a=i(24314),l=i(23795);class h{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new h(e,new d(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e?new a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new h(this._startLineNumber,n),new h(this._startLineNumber+r,o)]}applyEdit(e,t){let[i,n,o]=(0,l.Q)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new s.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){let e=i-t;this._startLineNumber-=e;return}let n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;let r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}let s=this._tokens.getMaxDeltaLine();r>=s+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;ie)i=n-1;else{let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=n;for(;re||d===e&&c>=t)&&(de||d===e&&g>=t){if(do?p-=o-i:p=i;else if(c===t&&g===i){if(c===n&&p>o)p-=o-i;else{h=!0;continue}}else if(co)p=c===t?(g=i)+(p-o):(g=0)+(p-o);else{h=!0;continue}}else if(c>n){if(0===a&&!h){l=s;break}c-=a}else if(c===n&&g>=o)e&&0===c&&(g+=e,p+=e),c-=a,g-=o-i,p-=o-i;else throw Error("Not possible!");let f=4*l;r[f]=c,r[f+1]=g,r[f+2]=p,r[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){let s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r0&&t>=1;e>0&&this._logService.getLevel()===r.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let n=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(void 0===n)o=2147483647;else{if(o=0,void 0!==n.italic){let e=(n.italic?1:0)<<11;o|=1|e}if(void 0!==n.bold){let e=(n.bold?2:0)<<11;o|=2|e}if(void 0!==n.underline){let e=(n.underline?4:0)<<11;o|=4|e}if(void 0!==n.strikethrough){let e=(n.strikethrough?8:0)<<11;o|=8|e}if(n.foreground){let e=n.foreground<<15;o|=16|e}0===o&&(o=2147483647)}}else this._logService.getLevel()===r.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,a="not-in-legend";this._hashTable.add(e,t,s,o),this._logService.getLevel()===r.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${n.N.getForeground(o)}, fontStyle ${n.N.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function m(e,t,i){let n=e.data,o=e.data.length/5|0,r=Math.max(Math.ceil(o/1024),400),s=[],a=0,l=1,d=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=u;for(;e+1h)t.warnOverlappingSemanticTokens(s,h+1);else{let e=t.getMetadata(v,C,i);2147483647!==e&&(0===p&&(p=s),c[g]=s-p,c[g+1]=h,c[g+2]=_,c[g+3]=e,g+=4,m=s,f=_)}l=s,d=h,a++}g!==c.length&&(c=c.subarray(0,g));let _=h.create(p,c);s.push(_)}return s}p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,o.XE),g(2,c.O),g(3,r.VZ)],p);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class _{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i=this._growCount){let e=this._elements;for(let t of(this._currentLengthIndex++,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength),e)){let e=t;for(;e;){let t=e.next;e.next=null,this._add(e),e=t}}}this._add(new f(e,t,i,n))}_add(e){let t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}_._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},71765:function(e,t,i){"use strict";i.d(t,{V:function(){return o},y:function(){return r}});var n=i(72065);let o=(0,n.yh)("textResourceConfigurationService"),r=(0,n.yh)("textResourcePropertiesService")},31446:function(e,t,i){"use strict";i.d(t,{a:function(){return l}});var n=i(24314),o=i(77277),r=i(97295),s=i(98401),a=i(270);class l{static computeUnicodeHighlights(e,t,i){let l,d;let u=i?i.startLineNumber:1,c=i?i.endLineNumber:e.getLineCount(),g=new h(t),p=g.getCandidateCodePoints();l="allNonBasicAscii"===p?RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):RegExp(`${function(e,t){let i=`[${r.ec(e.map(e=>String.fromCodePoint(e)).join(""))}]`;return i}(Array.from(p))}`,"g");let m=new o.sz(null,l),f=[],_=!1,v=0,C=0,b=0;t:for(let t=u;t<=c;t++){let i=e.getLineContent(t),o=i.length;m.reset(0);do if(d=m.next(i)){let e=d.index,l=d.index+d[0].length;if(e>0){let t=i.charCodeAt(e-1);r.ZG(t)&&e--}if(l+1=1e3){_=!0;break t}f.push(new n.e(t,e+1,t,l+1))}}while(d)}return{ranges:f,hasMore:_,ambiguousCharacterCount:v,invisibleCharacterCount:C,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,t){let i=new h(t),n=i.shouldHighlightNonBasicASCII(e,null);switch(n){case 0:return null;case 2:return{kind:1};case 3:{let n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),s=r.ZK.getLocales().filter(e=>!r.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class h{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=r.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of r.vU.codePoints)d(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(let e of t){let t=e.codePointAt(0),i=r.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||r.vU.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!d(e)&&r.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function d(e){return" "===e||"\n"===e||" "===e}},70902:function(e,t,i){"use strict";var n,o,r,s,a,l,h,d,u,c,g,p,m,f,_,v,C,b,w,y,S,L,k,N,D,x,I,E,T,M,A,R,O,P,F,B,V,W,H,z,K,U,$,j,q,G,Q,Z,Y,J,X,ee,et,ei,en,eo,er,es,ea,el,eh,ed,eu,ec,eg,ep,em,ef,e_,ev,eC,eb,ew,ey,eS,eL;i.d(t,{E$:function(){return N},F5:function(){return L},Ij:function(){return l},In:function(){return F},Lu:function(){return I},MG:function(){return k},MY:function(){return c},OI:function(){return V},RM:function(){return v},VD:function(){return w},Vi:function(){return d},WW:function(){return R},ZL:function(){return y},_x:function(){return u},a$:function(){return A},a7:function(){return r},ao:function(){return n},bw:function(){return b},cR:function(){return O},cm:function(){return s},d2:function(){return B},eB:function(){return S},g4:function(){return T},g_:function(){return M},gl:function(){return C},gm:function(){return m},jl:function(){return f},np:function(){return o},py:function(){return x},r3:function(){return h},r4:function(){return P},rf:function(){return g},sh:function(){return D},up:function(){return W},vQ:function(){return E},wT:function(){return p},wU:function(){return _},we:function(){return a}}),(H=n||(n={}))[H.Unknown=0]="Unknown",H[H.Disabled=1]="Disabled",H[H.Enabled=2]="Enabled",(z=o||(o={}))[z.Invoke=1]="Invoke",z[z.Auto=2]="Auto",(K=r||(r={}))[K.KeepWhitespace=1]="KeepWhitespace",K[K.InsertAsSnippet=4]="InsertAsSnippet",(U=s||(s={}))[U.Method=0]="Method",U[U.Function=1]="Function",U[U.Constructor=2]="Constructor",U[U.Field=3]="Field",U[U.Variable=4]="Variable",U[U.Class=5]="Class",U[U.Struct=6]="Struct",U[U.Interface=7]="Interface",U[U.Module=8]="Module",U[U.Property=9]="Property",U[U.Event=10]="Event",U[U.Operator=11]="Operator",U[U.Unit=12]="Unit",U[U.Value=13]="Value",U[U.Constant=14]="Constant",U[U.Enum=15]="Enum",U[U.EnumMember=16]="EnumMember",U[U.Keyword=17]="Keyword",U[U.Text=18]="Text",U[U.Color=19]="Color",U[U.File=20]="File",U[U.Reference=21]="Reference",U[U.Customcolor=22]="Customcolor",U[U.Folder=23]="Folder",U[U.TypeParameter=24]="TypeParameter",U[U.User=25]="User",U[U.Issue=26]="Issue",U[U.Snippet=27]="Snippet",($=a||(a={}))[$.Deprecated=1]="Deprecated",(j=l||(l={}))[j.Invoke=0]="Invoke",j[j.TriggerCharacter=1]="TriggerCharacter",j[j.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions",(q=h||(h={}))[q.EXACT=0]="EXACT",q[q.ABOVE=1]="ABOVE",q[q.BELOW=2]="BELOW",(G=d||(d={}))[G.NotSet=0]="NotSet",G[G.ContentFlush=1]="ContentFlush",G[G.RecoverFromMarkers=2]="RecoverFromMarkers",G[G.Explicit=3]="Explicit",G[G.Paste=4]="Paste",G[G.Undo=5]="Undo",G[G.Redo=6]="Redo",(Q=u||(u={}))[Q.LF=1]="LF",Q[Q.CRLF=2]="CRLF",(Z=c||(c={}))[Z.Text=0]="Text",Z[Z.Read=1]="Read",Z[Z.Write=2]="Write",(Y=g||(g={}))[Y.None=0]="None",Y[Y.Keep=1]="Keep",Y[Y.Brackets=2]="Brackets",Y[Y.Advanced=3]="Advanced",Y[Y.Full=4]="Full",(J=p||(p={}))[J.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",J[J.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",J[J.accessibilitySupport=2]="accessibilitySupport",J[J.accessibilityPageSize=3]="accessibilityPageSize",J[J.ariaLabel=4]="ariaLabel",J[J.autoClosingBrackets=5]="autoClosingBrackets",J[J.autoClosingDelete=6]="autoClosingDelete",J[J.autoClosingOvertype=7]="autoClosingOvertype",J[J.autoClosingQuotes=8]="autoClosingQuotes",J[J.autoIndent=9]="autoIndent",J[J.automaticLayout=10]="automaticLayout",J[J.autoSurround=11]="autoSurround",J[J.bracketPairColorization=12]="bracketPairColorization",J[J.guides=13]="guides",J[J.codeLens=14]="codeLens",J[J.codeLensFontFamily=15]="codeLensFontFamily",J[J.codeLensFontSize=16]="codeLensFontSize",J[J.colorDecorators=17]="colorDecorators",J[J.columnSelection=18]="columnSelection",J[J.comments=19]="comments",J[J.contextmenu=20]="contextmenu",J[J.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",J[J.cursorBlinking=22]="cursorBlinking",J[J.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",J[J.cursorStyle=24]="cursorStyle",J[J.cursorSurroundingLines=25]="cursorSurroundingLines",J[J.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",J[J.cursorWidth=27]="cursorWidth",J[J.disableLayerHinting=28]="disableLayerHinting",J[J.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",J[J.domReadOnly=30]="domReadOnly",J[J.dragAndDrop=31]="dragAndDrop",J[J.dropIntoEditor=32]="dropIntoEditor",J[J.emptySelectionClipboard=33]="emptySelectionClipboard",J[J.experimental=34]="experimental",J[J.extraEditorClassName=35]="extraEditorClassName",J[J.fastScrollSensitivity=36]="fastScrollSensitivity",J[J.find=37]="find",J[J.fixedOverflowWidgets=38]="fixedOverflowWidgets",J[J.folding=39]="folding",J[J.foldingStrategy=40]="foldingStrategy",J[J.foldingHighlight=41]="foldingHighlight",J[J.foldingImportsByDefault=42]="foldingImportsByDefault",J[J.foldingMaximumRegions=43]="foldingMaximumRegions",J[J.unfoldOnClickAfterEndOfLine=44]="unfoldOnClickAfterEndOfLine",J[J.fontFamily=45]="fontFamily",J[J.fontInfo=46]="fontInfo",J[J.fontLigatures=47]="fontLigatures",J[J.fontSize=48]="fontSize",J[J.fontWeight=49]="fontWeight",J[J.formatOnPaste=50]="formatOnPaste",J[J.formatOnType=51]="formatOnType",J[J.glyphMargin=52]="glyphMargin",J[J.gotoLocation=53]="gotoLocation",J[J.hideCursorInOverviewRuler=54]="hideCursorInOverviewRuler",J[J.hover=55]="hover",J[J.inDiffEditor=56]="inDiffEditor",J[J.inlineSuggest=57]="inlineSuggest",J[J.letterSpacing=58]="letterSpacing",J[J.lightbulb=59]="lightbulb",J[J.lineDecorationsWidth=60]="lineDecorationsWidth",J[J.lineHeight=61]="lineHeight",J[J.lineNumbers=62]="lineNumbers",J[J.lineNumbersMinChars=63]="lineNumbersMinChars",J[J.linkedEditing=64]="linkedEditing",J[J.links=65]="links",J[J.matchBrackets=66]="matchBrackets",J[J.minimap=67]="minimap",J[J.mouseStyle=68]="mouseStyle",J[J.mouseWheelScrollSensitivity=69]="mouseWheelScrollSensitivity",J[J.mouseWheelZoom=70]="mouseWheelZoom",J[J.multiCursorMergeOverlapping=71]="multiCursorMergeOverlapping",J[J.multiCursorModifier=72]="multiCursorModifier",J[J.multiCursorPaste=73]="multiCursorPaste",J[J.occurrencesHighlight=74]="occurrencesHighlight",J[J.overviewRulerBorder=75]="overviewRulerBorder",J[J.overviewRulerLanes=76]="overviewRulerLanes",J[J.padding=77]="padding",J[J.parameterHints=78]="parameterHints",J[J.peekWidgetDefaultFocus=79]="peekWidgetDefaultFocus",J[J.definitionLinkOpensInPeek=80]="definitionLinkOpensInPeek",J[J.quickSuggestions=81]="quickSuggestions",J[J.quickSuggestionsDelay=82]="quickSuggestionsDelay",J[J.readOnly=83]="readOnly",J[J.renameOnType=84]="renameOnType",J[J.renderControlCharacters=85]="renderControlCharacters",J[J.renderFinalNewline=86]="renderFinalNewline",J[J.renderLineHighlight=87]="renderLineHighlight",J[J.renderLineHighlightOnlyWhenFocus=88]="renderLineHighlightOnlyWhenFocus",J[J.renderValidationDecorations=89]="renderValidationDecorations",J[J.renderWhitespace=90]="renderWhitespace",J[J.revealHorizontalRightPadding=91]="revealHorizontalRightPadding",J[J.roundedSelection=92]="roundedSelection",J[J.rulers=93]="rulers",J[J.scrollbar=94]="scrollbar",J[J.scrollBeyondLastColumn=95]="scrollBeyondLastColumn",J[J.scrollBeyondLastLine=96]="scrollBeyondLastLine",J[J.scrollPredominantAxis=97]="scrollPredominantAxis",J[J.selectionClipboard=98]="selectionClipboard",J[J.selectionHighlight=99]="selectionHighlight",J[J.selectOnLineNumbers=100]="selectOnLineNumbers",J[J.showFoldingControls=101]="showFoldingControls",J[J.showUnused=102]="showUnused",J[J.snippetSuggestions=103]="snippetSuggestions",J[J.smartSelect=104]="smartSelect",J[J.smoothScrolling=105]="smoothScrolling",J[J.stickyTabStops=106]="stickyTabStops",J[J.stopRenderingLineAfter=107]="stopRenderingLineAfter",J[J.suggest=108]="suggest",J[J.suggestFontSize=109]="suggestFontSize",J[J.suggestLineHeight=110]="suggestLineHeight",J[J.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",J[J.suggestSelection=112]="suggestSelection",J[J.tabCompletion=113]="tabCompletion",J[J.tabIndex=114]="tabIndex",J[J.unicodeHighlighting=115]="unicodeHighlighting",J[J.unusualLineTerminators=116]="unusualLineTerminators",J[J.useShadowDOM=117]="useShadowDOM",J[J.useTabStops=118]="useTabStops",J[J.wordSeparators=119]="wordSeparators",J[J.wordWrap=120]="wordWrap",J[J.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",J[J.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",J[J.wordWrapColumn=123]="wordWrapColumn",J[J.wordWrapOverride1=124]="wordWrapOverride1",J[J.wordWrapOverride2=125]="wordWrapOverride2",J[J.wrappingIndent=126]="wrappingIndent",J[J.wrappingStrategy=127]="wrappingStrategy",J[J.showDeprecated=128]="showDeprecated",J[J.inlayHints=129]="inlayHints",J[J.editorClassName=130]="editorClassName",J[J.pixelRatio=131]="pixelRatio",J[J.tabFocusMode=132]="tabFocusMode",J[J.layoutInfo=133]="layoutInfo",J[J.wrappingInfo=134]="wrappingInfo",(X=m||(m={}))[X.TextDefined=0]="TextDefined",X[X.LF=1]="LF",X[X.CRLF=2]="CRLF",(ee=f||(f={}))[ee.LF=0]="LF",ee[ee.CRLF=1]="CRLF",(et=_||(_={}))[et.None=0]="None",et[et.Indent=1]="Indent",et[et.IndentOutdent=2]="IndentOutdent",et[et.Outdent=3]="Outdent",(ei=v||(v={}))[ei.Both=0]="Both",ei[ei.Right=1]="Right",ei[ei.Left=2]="Left",ei[ei.None=3]="None",(en=C||(C={}))[en.Type=1]="Type",en[en.Parameter=2]="Parameter",(eo=b||(b={}))[eo.Automatic=0]="Automatic",eo[eo.Explicit=1]="Explicit",(er=w||(w={}))[er.DependsOnKbLayout=-1]="DependsOnKbLayout",er[er.Unknown=0]="Unknown",er[er.Backspace=1]="Backspace",er[er.Tab=2]="Tab",er[er.Enter=3]="Enter",er[er.Shift=4]="Shift",er[er.Ctrl=5]="Ctrl",er[er.Alt=6]="Alt",er[er.PauseBreak=7]="PauseBreak",er[er.CapsLock=8]="CapsLock",er[er.Escape=9]="Escape",er[er.Space=10]="Space",er[er.PageUp=11]="PageUp",er[er.PageDown=12]="PageDown",er[er.End=13]="End",er[er.Home=14]="Home",er[er.LeftArrow=15]="LeftArrow",er[er.UpArrow=16]="UpArrow",er[er.RightArrow=17]="RightArrow",er[er.DownArrow=18]="DownArrow",er[er.Insert=19]="Insert",er[er.Delete=20]="Delete",er[er.Digit0=21]="Digit0",er[er.Digit1=22]="Digit1",er[er.Digit2=23]="Digit2",er[er.Digit3=24]="Digit3",er[er.Digit4=25]="Digit4",er[er.Digit5=26]="Digit5",er[er.Digit6=27]="Digit6",er[er.Digit7=28]="Digit7",er[er.Digit8=29]="Digit8",er[er.Digit9=30]="Digit9",er[er.KeyA=31]="KeyA",er[er.KeyB=32]="KeyB",er[er.KeyC=33]="KeyC",er[er.KeyD=34]="KeyD",er[er.KeyE=35]="KeyE",er[er.KeyF=36]="KeyF",er[er.KeyG=37]="KeyG",er[er.KeyH=38]="KeyH",er[er.KeyI=39]="KeyI",er[er.KeyJ=40]="KeyJ",er[er.KeyK=41]="KeyK",er[er.KeyL=42]="KeyL",er[er.KeyM=43]="KeyM",er[er.KeyN=44]="KeyN",er[er.KeyO=45]="KeyO",er[er.KeyP=46]="KeyP",er[er.KeyQ=47]="KeyQ",er[er.KeyR=48]="KeyR",er[er.KeyS=49]="KeyS",er[er.KeyT=50]="KeyT",er[er.KeyU=51]="KeyU",er[er.KeyV=52]="KeyV",er[er.KeyW=53]="KeyW",er[er.KeyX=54]="KeyX",er[er.KeyY=55]="KeyY",er[er.KeyZ=56]="KeyZ",er[er.Meta=57]="Meta",er[er.ContextMenu=58]="ContextMenu",er[er.F1=59]="F1",er[er.F2=60]="F2",er[er.F3=61]="F3",er[er.F4=62]="F4",er[er.F5=63]="F5",er[er.F6=64]="F6",er[er.F7=65]="F7",er[er.F8=66]="F8",er[er.F9=67]="F9",er[er.F10=68]="F10",er[er.F11=69]="F11",er[er.F12=70]="F12",er[er.F13=71]="F13",er[er.F14=72]="F14",er[er.F15=73]="F15",er[er.F16=74]="F16",er[er.F17=75]="F17",er[er.F18=76]="F18",er[er.F19=77]="F19",er[er.NumLock=78]="NumLock",er[er.ScrollLock=79]="ScrollLock",er[er.Semicolon=80]="Semicolon",er[er.Equal=81]="Equal",er[er.Comma=82]="Comma",er[er.Minus=83]="Minus",er[er.Period=84]="Period",er[er.Slash=85]="Slash",er[er.Backquote=86]="Backquote",er[er.BracketLeft=87]="BracketLeft",er[er.Backslash=88]="Backslash",er[er.BracketRight=89]="BracketRight",er[er.Quote=90]="Quote",er[er.OEM_8=91]="OEM_8",er[er.IntlBackslash=92]="IntlBackslash",er[er.Numpad0=93]="Numpad0",er[er.Numpad1=94]="Numpad1",er[er.Numpad2=95]="Numpad2",er[er.Numpad3=96]="Numpad3",er[er.Numpad4=97]="Numpad4",er[er.Numpad5=98]="Numpad5",er[er.Numpad6=99]="Numpad6",er[er.Numpad7=100]="Numpad7",er[er.Numpad8=101]="Numpad8",er[er.Numpad9=102]="Numpad9",er[er.NumpadMultiply=103]="NumpadMultiply",er[er.NumpadAdd=104]="NumpadAdd",er[er.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",er[er.NumpadSubtract=106]="NumpadSubtract",er[er.NumpadDecimal=107]="NumpadDecimal",er[er.NumpadDivide=108]="NumpadDivide",er[er.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",er[er.ABNT_C1=110]="ABNT_C1",er[er.ABNT_C2=111]="ABNT_C2",er[er.AudioVolumeMute=112]="AudioVolumeMute",er[er.AudioVolumeUp=113]="AudioVolumeUp",er[er.AudioVolumeDown=114]="AudioVolumeDown",er[er.BrowserSearch=115]="BrowserSearch",er[er.BrowserHome=116]="BrowserHome",er[er.BrowserBack=117]="BrowserBack",er[er.BrowserForward=118]="BrowserForward",er[er.MediaTrackNext=119]="MediaTrackNext",er[er.MediaTrackPrevious=120]="MediaTrackPrevious",er[er.MediaStop=121]="MediaStop",er[er.MediaPlayPause=122]="MediaPlayPause",er[er.LaunchMediaPlayer=123]="LaunchMediaPlayer",er[er.LaunchMail=124]="LaunchMail",er[er.LaunchApp2=125]="LaunchApp2",er[er.Clear=126]="Clear",er[er.MAX_VALUE=127]="MAX_VALUE",(es=y||(y={}))[es.Hint=1]="Hint",es[es.Info=2]="Info",es[es.Warning=4]="Warning",es[es.Error=8]="Error",(ea=S||(S={}))[ea.Unnecessary=1]="Unnecessary",ea[ea.Deprecated=2]="Deprecated",(el=L||(L={}))[el.Inline=1]="Inline",el[el.Gutter=2]="Gutter",(eh=k||(k={}))[eh.UNKNOWN=0]="UNKNOWN",eh[eh.TEXTAREA=1]="TEXTAREA",eh[eh.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",eh[eh.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",eh[eh.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",eh[eh.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",eh[eh.CONTENT_TEXT=6]="CONTENT_TEXT",eh[eh.CONTENT_EMPTY=7]="CONTENT_EMPTY",eh[eh.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",eh[eh.CONTENT_WIDGET=9]="CONTENT_WIDGET",eh[eh.OVERVIEW_RULER=10]="OVERVIEW_RULER",eh[eh.SCROLLBAR=11]="SCROLLBAR",eh[eh.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",eh[eh.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR",(ed=N||(N={}))[ed.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",ed[ed.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",ed[ed.TOP_CENTER=2]="TOP_CENTER",(eu=D||(D={}))[eu.Left=1]="Left",eu[eu.Center=2]="Center",eu[eu.Right=4]="Right",eu[eu.Full=7]="Full",(ec=x||(x={}))[ec.Left=0]="Left",ec[ec.Right=1]="Right",ec[ec.None=2]="None",ec[ec.LeftOfInjectedText=3]="LeftOfInjectedText",ec[ec.RightOfInjectedText=4]="RightOfInjectedText",(eg=I||(I={}))[eg.Off=0]="Off",eg[eg.On=1]="On",eg[eg.Relative=2]="Relative",eg[eg.Interval=3]="Interval",eg[eg.Custom=4]="Custom",(ep=E||(E={}))[ep.None=0]="None",ep[ep.Text=1]="Text",ep[ep.Blocks=2]="Blocks",(em=T||(T={}))[em.Smooth=0]="Smooth",em[em.Immediate=1]="Immediate",(ef=M||(M={}))[ef.Auto=1]="Auto",ef[ef.Hidden=2]="Hidden",ef[ef.Visible=3]="Visible",(e_=A||(A={}))[e_.LTR=0]="LTR",e_[e_.RTL=1]="RTL",(ev=R||(R={}))[ev.Invoke=1]="Invoke",ev[ev.TriggerCharacter=2]="TriggerCharacter",ev[ev.ContentChange=3]="ContentChange",(eC=O||(O={}))[eC.File=0]="File",eC[eC.Module=1]="Module",eC[eC.Namespace=2]="Namespace",eC[eC.Package=3]="Package",eC[eC.Class=4]="Class",eC[eC.Method=5]="Method",eC[eC.Property=6]="Property",eC[eC.Field=7]="Field",eC[eC.Constructor=8]="Constructor",eC[eC.Enum=9]="Enum",eC[eC.Interface=10]="Interface",eC[eC.Function=11]="Function",eC[eC.Variable=12]="Variable",eC[eC.Constant=13]="Constant",eC[eC.String=14]="String",eC[eC.Number=15]="Number",eC[eC.Boolean=16]="Boolean",eC[eC.Array=17]="Array",eC[eC.Object=18]="Object",eC[eC.Key=19]="Key",eC[eC.Null=20]="Null",eC[eC.EnumMember=21]="EnumMember",eC[eC.Struct=22]="Struct",eC[eC.Event=23]="Event",eC[eC.Operator=24]="Operator",eC[eC.TypeParameter=25]="TypeParameter",(eb=P||(P={}))[eb.Deprecated=1]="Deprecated",(ew=F||(F={}))[ew.Hidden=0]="Hidden",ew[ew.Blink=1]="Blink",ew[ew.Smooth=2]="Smooth",ew[ew.Phase=3]="Phase",ew[ew.Expand=4]="Expand",ew[ew.Solid=5]="Solid",(ey=B||(B={}))[ey.Line=1]="Line",ey[ey.Block=2]="Block",ey[ey.Underline=3]="Underline",ey[ey.LineThin=4]="LineThin",ey[ey.BlockOutline=5]="BlockOutline",ey[ey.UnderlineThin=6]="UnderlineThin",(eS=V||(V={}))[eS.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",eS[eS.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",eS[eS.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",eS[eS.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter",(eL=W||(W={}))[eL.None=0]="None",eL[eL.Same=1]="Same",eL[eL.Indent=2]="Indent",eL[eL.DeepIndent=3]="DeepIndent"},20913:function(e,t,i){"use strict";i.d(t,{B8:function(){return g},Oe:function(){return a},UX:function(){return u},aq:function(){return c},iN:function(){return m},ld:function(){return d},qq:function(){return h},ug:function(){return l},xi:function(){return p}});var n,o,r,s,a,l,h,d,u,c,g,p,m,f=i(63580);(n=a||(a={})).noSelection=f.NC("noSelection","No selection"),n.singleSelectionRange=f.NC("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),n.singleSelection=f.NC("singleSelection","Line {0}, Column {1}"),n.multiSelectionRange=f.NC("multiSelectionRange","{0} selections ({1} characters selected)"),n.multiSelection=f.NC("multiSelection","{0} selections"),n.emergencyConfOn=f.NC("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),n.openingDocs=f.NC("openingDocs","Now opening the Editor Accessibility documentation page."),n.readonlyDiffEditor=f.NC("readonlyDiffEditor"," in a read-only pane of a diff editor."),n.editableDiffEditor=f.NC("editableDiffEditor"," in a pane of a diff editor."),n.readonlyEditor=f.NC("readonlyEditor"," in a read-only code editor"),n.editableEditor=f.NC("editableEditor"," in a code editor"),n.changeConfigToOnMac=f.NC("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),n.changeConfigToOnWinLinux=f.NC("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),n.auto_on=f.NC("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),n.auto_off=f.NC("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),n.tabFocusModeOnMsg=f.NC("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),n.tabFocusModeOnMsgNoKb=f.NC("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),n.tabFocusModeOffMsg=f.NC("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),n.tabFocusModeOffMsgNoKb=f.NC("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),n.openDocMac=f.NC("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),n.openDocWinLinux=f.NC("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),n.outroMsg=f.NC("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),n.showAccessibilityHelpAction=f.NC("showAccessibilityHelpAction","Show Accessibility Help"),(l||(l={})).inspectTokensAction=f.NC("inspectTokens","Developer: Inspect Tokens"),(h||(h={})).gotoLineActionLabel=f.NC("gotoLineActionLabel","Go to Line/Column..."),(d||(d={})).helpQuickAccessActionLabel=f.NC("helpQuickAccess","Show all Quick Access Providers"),(o=u||(u={})).quickCommandActionLabel=f.NC("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=f.NC("quickCommandActionHelp","Show And Run Commands"),(r=c||(c={})).quickOutlineActionLabel=f.NC("quickOutlineActionLabel","Go to Symbol..."),r.quickOutlineByCategoryActionLabel=f.NC("quickOutlineByCategoryActionLabel","Go to Symbol by Category..."),(s=g||(g={})).editorViewAccessibleLabel=f.NC("editorViewAccessibleLabel","Editor content"),s.accessibilityHelpMessage=f.NC("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options."),(p||(p={})).toggleHighContrast=f.NC("toggleHighContrast","Toggle High Contrast Theme"),(m||(m={})).bulkEditServiceSummary=f.NC("bulkEditServiceSummary","Made {0} edits in {1} files")},14706:function(e,t,i){"use strict";i.d(t,{CZ:function(){return l},D8:function(){return d},Jx:function(){return n},Tx:function(){return a},dQ:function(){return h},fV:function(){return u},gk:function(){return o},lN:function(){return s},rU:function(){return r}});class n{constructor(){this.changeType=1}}class o{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(let o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+e.substring(n)}static fromDecorations(e){let t=[];for(let i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber),t}}class r{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class s{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class h{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){let i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){let t=this._tokens[(e<<1)+1];return t}getLanguageId(e){let t=this._tokens[(e<<1)+1],i=n.N.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return n.N.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return n.N.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return n.N.getClassNameFromMetadata(t)}getInlineStyle(e,t){let i=this._tokens[(e<<1)+1];return n.N.getInlineStyleFromMetadata(i,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return n.N.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new r(this,e,t,i)}static convertToEndOffset(e,t){let i=e.length>>>1,n=i-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="",r=[],s=0;for(;;){let o=ts){n+=this._text.substring(s,a.offset);let e=this._tokens[(t<<1)+1];r.push(n.length,e),s=a.offset}n+=a.text,r.push(n.length,a.tokenMetadata),i++}else break}return new o(new Uint32Array(r),n,this._languageIdCodec)}}o.defaultTokenMetadata=33587200;class r{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof r&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){let t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},92550:function(e,t,i){"use strict";i.d(t,{Kp:function(){return o},k:function(){return a}});var n=i(97295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let i=e.length,n=t.length;if(i!==n)return!1;for(let n=0;n=r||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let r=[],s=0;for(let a=0,l=e.length;at||h.isEmpty()&&(0===l.type||3===l.type))continue;let d=h.startLineNumber===t?h.startColumn:i,u=h.endLineNumber===t?h.endColumn:n;r[s++]=new o(d,u,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){let i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[],o=new s,r=0;for(let s=0,a=t.length;s1){let t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(h>1){let t=e.charCodeAt(h-2);n.ZG(t)&&h--}let c=l-1,g=h-2;r=o.consumeLowerThan(c,r,i),0===o.count&&(r=c),o.insert(g,d,u)}return o.consumeLowerThan(1073741824,r,i),i}}},72202:function(e,t,i){"use strict";i.d(t,{Nd:function(){return h},zG:function(){return a},IJ:function(){return l},d1:function(){return c},tF:function(){return p}});var n=i(97295),o=i(50072),r=i(92550);class s{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,o,s,a,l,h,d,u,c,g,p,m,f,_,v,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(r.Kp.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=c,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=C&&C.sort((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){this._data[e-1]=(t<<16|i<<0)>>>0,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1),i=d.getPartIndex(t),n=d.getCharIndex(t);return new h(i,n)}getColumn(e,t){let i=this.partDataToCharOffset(e.partIndex,t,e.charIndex);return i+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,r=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;let l=d.getPartIndex(s),h=d.getCharIndex(s),u=d.getPartIndex(a);return i-h<=(l!==u?t:d.getCharIndex(a))-i?o:r}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function c(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(let r of e.lineDecorations)(1===r.type||2===r.type)&&(t.appendASCIIString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("");let r=new d(1,i+n);return r.setColumnInfo(1,i,0,0),new u(r,!1,o)}return t.appendASCIIString(""),new u(new d(0,0),!1,0)}return function(e,t){let i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,h=e.parts,c=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,_=e.spaceWidth,v=e.renderSpaceCharCode,C=e.renderWhitespace,b=e.renderControlCharacters,w=new d(a+1,h.length),y=!1,S=0,L=p,k=0,N=0,D=0;m?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=h.length;e=c&&(t+=o)}}for(x&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(_*i)),t.appendASCIIString('px"')),t.appendASCII(62);S1?t.write1(8594):t.write1(65515);for(let e=2;e<=n;e++)t.write1(160)}else i=2,n=1,t.write1(v),t.write1(8204);k+=i,N+=n,S>=c&&(L+=n)}}else for(t.appendASCII(62);S=c&&(L+=r)}I?D++:D=0,S>=a&&!y&&l.isPseudoAfter()&&(y=!0,w.setColumnInfo(S+1,e,k,N)),t.appendASCIIString("")}return y||w.setColumnInfo(a+1,h.length-1,k,N),l&&t.appendASCIIString(""),t.appendASCIIString(""),new u(w,m,r)}(function(e){let t,i;let o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(a[l++]=new s(o,"",0,!1));let h=o;for(let d=0,u=i.getCount();d=r){let i=!!t&&n.Ut(e.substring(h,r));a[l++]=new s(r,c,0,i);break}let g=!!t&&n.Ut(e.substring(h,u));a[l++]=new s(u,c,0,g),h=u}return a}(o,e.containsRTL,e.lineTokens,e.fauxIndentLength,i);e.renderControlCharacters&&!e.isBasicASCII&&(a=function(e,t){let i=[],n=new s(0,"",0,!1),o=0;for(let r of t){let t=r.endIndex;for(;on.endIndex&&(n=new s(o,r.type,r.metadata,r.containsRTL),i.push(n)),n=new s(o+1,"mtkcontrol",r.metadata,!1),i.push(n))}o>n.endIndex&&(n=new s(t,r.type,r.metadata,r.containsRTL),i.push(n))}return i}(o,a)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,o){let r;let a=e.continuesWithWrappedLine,l=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,u=e.useMonospaceOptimizations,c=e.selectionsOnLine,g=1===e.renderWhitespace,p=3===e.renderWhitespace,m=e.renderSpaceWidth!==e.spaceWidth,f=[],_=0,v=0,C=o[0].type,b=o[v].containsRTL,w=o[v].endIndex,y=o.length,S=!1,L=n.LC(t);-1===L?(S=!0,L=i,r=i):r=n.ow(t);let k=!1,N=0,D=c&&c[N],x=d%h;for(let e=l;e=D.endOffset&&(N++,D=c&&c[N]),er)a=!0;else if(9===d)a=!0;else if(32===d){if(g){if(k)a=!0;else{let n=e+1e),a&&p&&(a=S||e>r),a&&b&&e>=L&&e<=r&&(a=!1),k){if(!a||!u&&x>=h){if(m){let t=_>0?f[_-1].endIndex:l;for(let i=t+1;i<=e;i++)f[_++]=new s(i,"mtkw",1,!1)}else f[_++]=new s(e,"mtkw",1,!1);x%=h}}else(e===w||a&&e>l)&&(f[_++]=new s(e,C,0,b),x%=h);for(9===d?x=h:n.K7(d)?x+=2:x++,k=a;e===w;)if(++v0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(I=!0)}else I=!0}if(I){if(m){let e=_>0?f[_-1].endIndex:l;for(let t=e+1;t<=i;t++)f[_++]=new s(t,"mtkw",1,!1)}else f[_++]=new s(i,"mtkw",1,!1)}else f[_++]=new s(i,C,0,b);return f}(e,o,i,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;tu&&(u=e.startOffset,h[d++]=new s(u,r,c,g)),e.endOffset+1<=n)u=e.endOffset+1,h[d++]=new s(u,r+" "+e.className,c|e.metadata,g),l++;else{u=n,h[d++]=new s(u,r+" "+e.className,c|e.metadata,g);break}}n>u&&(u=n,h[d++]=new s(u,r,c,g))}let c=i[i.length-1].endIndex;if(l=50&&(o[r++]=new s(d+1,t,i,h),u=d+1,d=-1);u!==l&&(o[r++]=new s(l,t,i,h))}else o[r++]=a;n=l}else for(let e=0,i=t.length;e50){let e=i.type,t=i.metadata,h=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:function(e,t,i){"use strict";i.d(t,{$l:function(){return u},$t:function(){return h},IP:function(){return a},SQ:function(){return c},Wx:function(){return d},l_:function(){return r},ud:function(){return s},wA:function(){return l}});var n=i(97295),o=i(24314);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class s{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,o,r,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r,this.inlineDecorations=s}}class l{constructor(e,t,i,n,o,r,s,a,h,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,r),this.containsRTL=l.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=h,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!t&&!!i&&n.Ut(e)}}class h{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class d{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new h(new o.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class u{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class c{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}},30665:function(e,t,i){"use strict";i.d(t,{EY:function(){return o},Tj:function(){return r}});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);let m=l.color,f=this._color2Id[m];f||(f=++this._lastAssignedId,this._color2Id[m]=f,this._id2Color[f]=m);let _=new n(g-p,g+p,f);l.setColorZone(_),a.push(_)}return this._colorZonesInvalid=!1,a.sort(n.compare),a}}},30168:function(e,t,i){"use strict";i.d(t,{$t:function(){return h},CU:function(){return a},Fd:function(){return l},zg:function(){return d}});var n=i(50187),o=i(24314),r=i(1118),s=i(64141);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,i=this._decorationsCache[t];if(!i){let s;let a=e.range,l=e.options;if(l.isWholeLine){let e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(a.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber)),1);s=new o.e(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(a,1);i=new r.$l(s,l),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e){let t=new o.e(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(t).inlineDecorations[0]}_getDecorationsInRange(e){let t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,s.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,a=[],h=0,d=[];for(let e=i;e<=n;e++)d[e-i]=[];for(let e=0,s=t.length;e1===e)}function d(e,t){return u(e,t.range,e=>2===e)}function u(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let o=e.tokenization.getLineTokens(n),r=n===t.startLineNumber,s=n===t.endLineNumber,a=r?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}let e=i(o.getStandardTokenType(a));if(!e)return!1;a++}}return!0}},90236:function(e,t,i){"use strict";var n,o=i(85152),r=i(59365),s=i(22258);i(41459);var a=i(16830),l=i(3860),h=i(29102),d=i(63580),u=i(38819),c=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let g=new u.uy("selectionAnchorSet",!1),p=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=g.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.Y.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new r.W5().appendText((0,d.NC)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,o.Z9)((0,d.NC)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(l.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};p.ID="editor.contrib.selectionAnchorController",p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=u.i6,function(e,t){n(e,t,1)})],p);class m extends a.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.NC)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,s.gx)(2089,2080),weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.setSelectionAnchor()})}}class f extends a.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.NC)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:g})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.goToSelectionAnchor()})}}class _ extends a.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.NC)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:g,kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,s.gx)(2089,2089),weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.selectFromAnchorToCursor()})}}class v extends a.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.NC)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:g,kbOpts:{kbExpr:h.u.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.cancelSelectionAnchor()})}}(0,a._K)(p.ID,p),(0,a.Qr)(m),(0,a.Qr)(f),(0,a.Qr)(_),(0,a.Qr)(v)},71387:function(e,t,i){"use strict";var n=i(15393),o=i(9917);i(64287);var r=i(16830),s=i(50187),a=i(24314),l=i(3860),h=i(29102),d=i(84973),u=i(22529),c=i(51945),g=i(63580),p=i(84144),m=i(73910),f=i(97781);let _=(0,m.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g.NC("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class v extends r.R6{constructor(){super({id:"editor.action.jumpToBracket",label:g.NC("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;null===(i=w.get(t))||void 0===i||i.jumpToBracket()}}class C extends r.R6{constructor(){super({id:"editor.action.selectToBracket",label:g.NC("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let o=!0;i&&!1===i.selectBrackets&&(o=!1),null===(n=w.get(t))||void 0===n||n.selectToBracket(o)}}class b{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends o.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.pY(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(66),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(66)&&(this._matchBrackets=this._editor.getOption(66),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(w.ID)}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{let i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i),o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{let t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{let t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.Y(o.lineNumber,o.column,o.lineNumber,o.column):new l.Y(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{let o=n.getStartPosition(),r=t.bracketPairs.matchBracket(o);if(!r&&!(r=t.bracketPairs.findEnclosingBrackets(o))){let e=t.bracketPairs.findNextBracket(o);e&&e.range&&(r=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let s=null,h=null;if(r){r.sort(a.e.compareRangesUsingStarts);let[t,i]=r;if(s=e?t.getStartPosition():t.getEndPosition(),h=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){let e=s;s=h,h=e}}s&&h&&i.push(new l.Y(s.lineNumber,s.column,h.lineNumber,h.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(let i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),i=t.getVersionId(),n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let t=0,i=e.length;t1&&o.sort(s.L.compare);let a=[],l=0,h=0,d=n.length;for(let e=0,i=o.length;e{let i=e.getColor(c.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);let n=e.getColor(c.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)}),p.BH.appendMenuItem(p.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:g.NC({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},24336:function(e,t,i){"use strict";var n=i(16830),o=i(29102),r=i(24314),s=i(3860);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i))){if(this._isMovingLeft){let s=new r.e(i,n-1,i,n),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new r.e(i,o,i,o),a)}else{let s=new r.e(i,o,i,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new r.e(i,n,i,n),a)}}}computeCursorState(e,t){return this._isMovingLeft?new s.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new s.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(63580);class h extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(let e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends h{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.NC("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.u.writable})}}),(0,n.Qr)(class extends h{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.NC("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.u.writable})}})},72102:function(e,t,i){"use strict";var n=i(16830),o=i(61329),r=i(10839),s=i(24314),a=i(29102),l=i(63580);class h extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.NC("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],a=t.getSelections();for(let e of a){if(!e.isEmpty())continue;let t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;let h=a===l?e.getPosition():r.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),d=r.o.leftPosition(i,h),u=r.o.leftPosition(i,d),c=i.getValueInRange(s.e.fromPositions(u,d)),g=i.getValueInRange(s.e.fromPositions(d,h)),p=s.e.fromPositions(u,h);n.push(new o.T4(p,g+c))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(h)},55833:function(e,t,i){"use strict";var n=i(16268),o=i(1432),r=i(35715),s=i(16830),a=i(11640),l=i(29102),h=i(63580),d=i(84144),u=i(84972);let c="9_cutcopypaste",g=o.tY||document.queryCommandSupported("cut"),p=o.tY||document.queryCommandSupported("copy"),m=void 0!==navigator.clipboard&&!n.isFirefox||document.queryCommandSupported("paste");function f(e){return e.register(),e}let _=g?f(new s.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.cutLabel","Cut"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1}]})):void 0,v=p?f(new s.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.copyLabel","Copy"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;d.BH.appendMenuItem(d.eH.MenubarEditMenu,{submenu:d.eH.MenubarCopy,title:{value:h.NC("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),d.BH.appendMenuItem(d.eH.EditorContext,{submenu:d.eH.EditorContextCopy,title:{value:h.NC("copy as","Copy As"),original:"Copy As"},group:c,order:3}),d.BH.appendMenuItem(d.eH.EditorContext,{submenu:d.eH.EditorContextShare,title:{value:h.NC("share","Share"),original:"Share"},group:"11_share",order:-1});let C=m?f(new s.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4}]})):void 0;class b extends s.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:h.NC("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getOption(33);!i&&t.getSelection().isEmpty()||(r.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),r.RA.forceCopyWithSyntaxHighlighting=!1)}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",(e,i)=>{let n=e.get(a.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){let e=n.getOption(33),i=n.getSelection();return!!(i&&i.isEmpty())&&!e||(document.execCommand(t),!0)}return!1}),e.addImplementation(0,"generic-dom",(e,i)=>(document.execCommand(t),!0)))}w(_,"cut"),w(v,"copy"),C&&(C.addImplementation(1e4,"code-editor",(e,t)=>{let i=e.get(a.$),n=e.get(u.p),s=i.getFocusedCodeEditor();if(s&&s.hasTextFocus()){let e=document.execCommand("paste");if(!e&&o.$L){var l,h,d,c;return l=void 0,h=void 0,d=void 0,c=function*(){let e=yield n.readText();if(""!==e){let t=r.Nl.INSTANCE.get(e),i=!1,n=null,o=null;t&&(i=s.getOption(33)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}},new(d||(d=Promise))(function(e,t){function i(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):((o=t.value)instanceof d?o:new d(function(e){e(o)})).then(i,n)}o((c=c.apply(l,h||[])).next())})}return!0}return!1}),C.addImplementation(0,"generic-dom",(e,t)=>(document.execCommand("paste"),!0))),p&&(0,s.Qr)(b)},75396:function(e,t,i){"use strict";i.d(t,{Bb:function(){return v},MN:function(){return b},RB:function(){return _},TM:function(){return y},aI:function(){return N},bA:function(){return S},sh:function(){return C},uH:function(){return w}});var n=i(9488),o=i(71050),r=i(17301),s=i(9917),a=i(70666),l=i(14410),h=i(24314),d=i(3860),u=i(73733),c=i(94565),g=i(90535),p=i(76014),m=i(71922),f=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let _="editor.action.codeAction",v="editor.action.refactor",C="editor.action.refactor.preview",b="editor.action.sourceAction",w="editor.action.organizeImports",y="editor.action.fixAll";class S{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return f(this,void 0,void 0,function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,r.Cp)(e)}t&&(this.action.edit=t.edit)}return this})}}class L extends s.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(L.codeActionsComparator),this.validActions=this.allActions.filter(({action:e})=>!e.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,n.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&p.yN.QuickFix.contains(new p.yN(e.kind))&&!!e.isPreferred)}}let k={actions:[],documentation:void 0};function N(e,t,i,o,a,h){var d;let u=o.filter||{},c={only:null===(d=u.include)||void 0===d?void 0:d.value,trigger:o.type},g=new l.YQ(t,h),m=e.all(t).filter(e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some(e=>(0,p.EU)(u,new p.yN(e)))),_=new s.SL,v=m.map(e=>f(this,void 0,void 0,function*(){try{a.report(e);let n=yield e.provideCodeActions(t,i,c,g.token);if(n&&_.add(n),g.token.isCancellationRequested)return k;let o=((null==n?void 0:n.actions)||[]).filter(e=>e&&(0,p.Yl)(u,e)),r=function(e,t,i){if(!e.documentation)return;let n=e.documentation.map(e=>({kind:new p.yN(e.kind),command:e.command}));if(i){let e;for(let t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(let e of t)if(e.kind){for(let t of n)if(t.kind.contains(new p.yN(e.kind)))return t.command}}(e,o,u.include);return{actions:o.map(t=>new S(t,e)),documentation:r}}catch(e){if((0,r.n2)(e))throw e;return(0,r.Cp)(e),k}})),C=e.onDidChange(()=>{let i=e.all(t);(0,n.fS)(i,m)||g.cancel()});return Promise.all(v).then(e=>{let t=e.map(e=>e.actions).flat(),i=(0,n.kX)(e.map(e=>e.documentation));return new L(t,i,_)}).finally(()=>{C.dispose(),g.dispose()})}c.P0.registerCommand("_executeCodeActionProvider",function(e,t,i,n,s){return f(this,void 0,void 0,function*(){if(!(t instanceof a.o))throw(0,r.b1)();let{codeActionProvider:l}=e.get(m.p),c=e.get(u.q).getModel(t);if(!c)throw(0,r.b1)();let f=d.Y.isISelection(i)?d.Y.liftSelection(i):h.e.isIRange(i)?c.validateRange(i):void 0;if(!f)throw(0,r.b1)();let _="string"==typeof n?new p.yN(n):void 0,v=yield N(l,c,f,{type:1,triggerAction:p.aQ.Default,filter:{includeSourceActions:!0,include:_}},g.Ex.None,o.T.None),C=[],b=Math.min(v.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action)}finally{setTimeout(()=>v.dispose(),100)}})})},93412:function(e,t,i){"use strict";i.d(t,{S5:function(){return ex},dW:function(){return ey},Hv:function(){return eD},o$:function(){return eN},E7:function(){return ew},pY:function(){return ev},Eb:function(){return eS},UG:function(){return eL},VQ:function(){return ek}});var n,o,r,s,a,l,h,d,u,c,g=i(71050),p=i(79579),m=i(9917),f=i(97295),_=i(16830),v=i(66007),C=i(29102),b=i(71922),w=i(75396),y=i(17301),S=i(27753),L=i(72065),k=i(65321),N=i(69047),D=i(74741);i(10721);var x=i(50187),I=i(76014),E=i(63580),T=i(33108),M=i(38819),A=i(5606),R=i(91847),O=i(10829),P=i(97781),F=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},B=function(e,t){return function(i,n){t(i,n,e)}};let V={Visible:new M.uy("CodeActionMenuVisible",!1,(0,E.NC)("CodeActionMenuVisible","Whether the code action list widget is visible"))};class W extends D.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let H=class{constructor(e,t){this.acceptKeybindings=e,this.keybindingService=t}get templateId(){return"codeActionWidget"}renderTemplate(e){let t=Object.create(null);return t.disposables=[],t.root=e,t.text=document.createElement("span"),e.append(t.text),t}renderElement(e,t,i){let n=e.title,o=e.isEnabled,r=e.isSeparator,s=e.isDocumentation;i.text.textContent=n,o?i.root.classList.remove("option-disabled"):(i.root.classList.add("option-disabled"),i.root.style.backgroundColor="transparent !important"),r&&(i.root.classList.add("separator"),i.root.style.height="10px"),s||(()=>{var e,t;let[n,o]=this.acceptKeybindings;i.root.title=(0,E.NC)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Refactor, Shift+F2 to Preview"']},"{0} to Refactor, {1} to Preview",null===(e=this.keybindingService.lookupKeybinding(n))||void 0===e?void 0:e.getLabel(),null===(t=this.keybindingService.lookupKeybinding(o))||void 0===t?void 0:t.getLabel())})()}disposeTemplate(e){e.disposables=(0,m.B9)(e.disposables)}};H=F([B(1,R.d)],H);let z=class e extends m.JT{constructor(e,t,i,n,o,r,s,a,l,h){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=o,this._telemetryService=r,this._configurationService=a,this._contextViewService=l,this._contextKeyService=h,this._showingActions=this._register(new m.XK),this.codeActionList=this._register(new m.XK),this.options=[],this._visible=!1,this.viewItems=[],this.hasSeperator=!1,this._keybindingResolver=new K({getKeybindings:()=>n.getKeybindings()}),this._ctxMenuWidgetVisible=V.Visible.bindTo(this._contextKeyService),this.listRenderer=new H(["onEnterSelectCodeAction","onEnterSelectCodeActionWithPreview"],n)}get isVisible(){return this._visible}isCodeActionWidgetEnabled(e){return this._configurationService.getValue("editor.experimental.useCustomCodeActionMenu",{resource:e.uri})}_onListSelection(e){e.elements.length&&e.elements.forEach(e=>{e.isEnabled&&(e.action.run(),this.hideCodeActionWidget())})}_onListHover(e){var t,i,n,o;e.element?(null===(i=e.element)||void 0===i?void 0:i.isEnabled)?(null===(n=this.codeActionList.value)||void 0===n||n.setFocus([e.element.index]),this.focusedEnabledItem=this.viewItems.indexOf(e.element),this.currSelectedItem=e.element.index):(this.currSelectedItem=void 0,null===(o=this.codeActionList.value)||void 0===o||o.setFocus([e.element.index])):(this.currSelectedItem=void 0,null===(t=this.codeActionList.value)||void 0===t||t.setFocus([]))}renderCodeActionMenuList(t,i){var n;let o=new m.SL,r=document.createElement("div"),s=document.createElement("div");this.block=t.appendChild(s),this.block.classList.add("context-view-block"),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",o.add(k.nm(this.block,k.tw.MOUSE_DOWN,e=>e.stopPropagation())),r.id="codeActionMenuWidget",r.classList.add("codeActionMenuWidget"),t.appendChild(r),this.codeActionList.value=new N.aV("codeActionWidget",r,{getHeight:e=>e.isSeparator?10:26,getTemplateId:e=>"codeActionWidget"},[this.listRenderer],{keyboardSupport:!1}),o.add(this.codeActionList.value.onMouseOver(e=>this._onListHover(e))),o.add(this.codeActionList.value.onDidChangeFocus(e=>{var t;return null===(t=this.codeActionList.value)||void 0===t?void 0:t.domFocus()})),o.add(this.codeActionList.value.onDidChangeSelection(e=>this._onListSelection(e))),o.add(this._editor.onDidLayoutChange(e=>this.hideCodeActionWidget())),i.forEach((t,n)=>{let o="separator"===t.class,r=!1;t instanceof W&&(r=t.action.kind===e.documentationID),o&&(this.hasSeperator=!0);let s={title:t.label,detail:t.tooltip,action:i[n],isEnabled:t.enabled,isSeparator:o,index:n,isDocumentation:r};t.enabled&&this.viewItems.push(s),this.options.push(s)}),this.codeActionList.value.splice(0,this.codeActionList.value.length,this.options);let a=this.hasSeperator?(i.length-1)*26+10:26*i.length;r.style.height=String(a)+"px",this.codeActionList.value.layout(a);let l=[];this.options.forEach((e,t)=>{var i,n;if(!this.codeActionList.value)return;let o=null===(n=document.getElementById(null===(i=this.codeActionList.value)||void 0===i?void 0:i.getElementID(t)))||void 0===n?void 0:n.getElementsByTagName("span")[0].offsetWidth;l.push(Number(o))});let h=Math.max(...l);r.style.width=h+52+"px",null===(n=this.codeActionList.value)||void 0===n||n.layout(a,h),this.viewItems.length<1||this.viewItems.every(e=>e.isDocumentation)?this.currSelectedItem=void 0:(this.focusedEnabledItem=0,this.currSelectedItem=this.viewItems[0].index,this.codeActionList.value.setFocus([this.currSelectedItem])),this.codeActionList.value.domFocus();let d=k.go(t),u=d.onDidBlur(()=>{this.hideCodeActionWidget()});return o.add(u),o.add(d),this._ctxMenuWidgetVisible.set(!0),o}focusPrevious(){var e;let t;if(void 0===this.focusedEnabledItem)this.focusedEnabledItem=this.viewItems[0].index;else if(this.viewItems.length<1)return!1;let i=this.focusedEnabledItem;do this.focusedEnabledItem=this.focusedEnabledItem-1,this.focusedEnabledItem<0&&(this.focusedEnabledItem=this.viewItems.length-1),t=this.viewItems[this.focusedEnabledItem],null===(e=this.codeActionList.value)||void 0===e||e.setFocus([t.index]),this.currSelectedItem=t.index;while(this.focusedEnabledItem!==i&&(!t.isEnabled||t.action.id===D.Z0.ID));return!0}focusNext(){var e;let t;if(void 0===this.focusedEnabledItem)this.focusedEnabledItem=this.viewItems.length-1;else if(this.viewItems.length<1)return!1;let i=this.focusedEnabledItem;do this.focusedEnabledItem=(this.focusedEnabledItem+1)%this.viewItems.length,t=this.viewItems[this.focusedEnabledItem],null===(e=this.codeActionList.value)||void 0===e||e.setFocus([t.index]),this.currSelectedItem=t.index;while(this.focusedEnabledItem!==i&&(!t.isEnabled||t.action.id===D.Z0.ID));return!0}navigateListWithKeysUp(){this.focusPrevious()}navigateListWithKeysDown(){this.focusNext()}onEnterSet(){var e;"number"==typeof this.currSelectedItem&&(null===(e=this.codeActionList.value)||void 0===e||e.setSelection([this.currSelectedItem]))}dispose(){super.dispose()}hideCodeActionWidget(){this._ctxMenuWidgetVisible.reset(),this.options=[],this.viewItems=[],this.focusedEnabledItem=0,this.currSelectedItem=void 0,this.hasSeperator=!1,this._contextViewService.hideContextView({source:this})}codeActionTelemetry(e,t,i){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:e,validCodeActions:i.validActions.length,cancelled:t})}show(e,t,i,n){var o,r,s,a;return o=this,r=void 0,s=void 0,a=function*(){let o=this._editor.getModel();if(!o)return;let r=n.includeDisabledActions?t.allActions:t.validActions;if(!r.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,y.F0)();this._visible=!0,this._showingActions.value=t;let s=this.getMenuActions(e,r,t.documentation),a=x.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),h=this._editor.getOption(117);this.isCodeActionWidgetEnabled(o)?this._contextViewService.showContextView({getAnchor:()=>a,render:e=>this.renderCodeActionMenuList(e,s),onHide:i=>{let o=n.fromLightbulb?I.aQ.Lightbulb:e.triggerAction;this.codeActionTelemetry(o,i,t),this._visible=!1,this._editor.focus()}},this._editor.getDomNode(),!1):this._contextMenuService.showContextMenu({domForShadowRoot:h?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>s,onHide:i=>{let o=n.fromLightbulb?I.aQ.Lightbulb:e.triggerAction;this.codeActionTelemetry(o,i,t),this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof W?l(e.action):void 0})},new(s||(s=Promise))(function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):((o=t.value)instanceof s?o:new s(function(e){e(o)})).then(i,n)}l((a=a.apply(o,r||[])).next())})}getMenuActions(t,i,n){var o,r;let s=e=>new W(e.action,()=>this._delegate.onSelectCodeAction(e,t)),a=i.map(s),l=[...n],h=this._editor.getModel();if(h&&a.length)for(let e of this._languageFeaturesService.codeActionProvider.all(h))e._getAdditionalMenuItems&&l.push(...e._getAdditionalMenuItems({trigger:t.type,only:null===(r=null===(o=t.filter)||void 0===o?void 0:o.include)||void 0===r?void 0:r.value},i.map(e=>e.action)));return l.length&&a.push(new D.Z0,...l.map(t=>s(new w.bA({title:t.title,command:t,kind:e.documentationID},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),i=k.i(this._editor.getDomNode()),n=i.left+t.left,o=i.top+t.top+t.height;return{x:n,y:o}}};z.documentationID="_documentation",z=F([B(2,A.i),B(3,R.d),B(4,b.p),B(5,O.b),B(6,P.XE),B(7,T.Ui),B(8,A.u),B(9,M.i6)],z);class K{constructor(e){this._keybindingProvider=e}getResolver(){let e=new p.o(()=>this._keybindingProvider.getKeybindings().filter(e=>K.codeActionCommands.indexOf(e.command)>=0).filter(e=>e.resolvedKeybinding).map(e=>{let t=e.commandArgs;return e.command===w.uH?t={kind:I.yN.SourceOrganizeImports.value}:e.command===w.TM&&(t={kind:I.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},I.wZ.fromUser(t,{kind:I.yN.None,apply:"never"}))}));return t=>{if(t.kind){let i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let i=new I.yN(e.kind);return t.filter(e=>e.kind.contains(i)).filter(t=>!t.preferred||e.isPreferred).reduceRight((e,t)=>e?e.kind.contains(t.kind)?t:e:t,void 0)}}K.codeActionCommands=[w.Bb,w.RB,w.MN,w.uH,w.TM];var U=i(10553),$=i(73046),j=i(4669);i(36053);var q=i(59616),G=i(73910);(n=l||(l={})).Hidden={type:0},n.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}};let Q=class e extends m.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new j.Q5),this.onClick=this._onClick.event,this._state=l.Hidden,this._domNode=document.createElement("div"),this._domNode.className=$.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(e=>{let t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()})),U.o.ignoreTarget(this._domNode),this._register(k.GQ(this._domNode,e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();let{top:t,height:i}=k.i(this._domNode),n=this._editor.getOption(61),o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{(1&e.buttons)==1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&!this._editor.getOption(59).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();let o=this._editor.getOptions();if(!o.get(59).enabled)return this.hide();let r=this._editor.getModel();if(!r)return this.hide();let{lineNumber:s,column:a}=r.validatePosition(n),h=r.getOptions().tabSize,d=o.get(46),u=r.getLineContent(s),c=(0,q.q)(u,h),g=d.spaceWidth*c>22,p=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),m=s;if(!g){if(s>1&&!p(s-1))m-=1;else if(p(s+1)){if(a*d.spaceWidth<22)return this.hide()}else m+=1}this.state=new l.Showing(t,i,n,{position:{lineNumber:m,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=l.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...$.lA.lightBulb.classNamesArray),this._domNode.classList.add(...$.lA.lightbulbAutofix.classNamesArray);let e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e){this.title=E.NC("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel());return}}this._domNode.classList.remove(...$.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...$.lA.lightBulb.classNamesArray);let e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=E.NC("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=E.NC("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Q._posPref=[0],Q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(o=R.d,function(e,t){o(e,t,3)})],Q),(0,P.Ic)((e,t)=>{var i;let n=null===(i=e.getColor(G.cvW))||void 0===i?void 0:i.transparent(.7),o=e.getColor(G.Fu1);o&&t.addRule(` + `,constraint:function(e){return!!r.Kn(e)&&!!(r.HD(e.to)&&(r.o8(e.select)||r.jn(e.select))&&(r.o8(e.by)||r.HD(e.by))&&(r.o8(e.value)||r.hj(e.value)))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},n.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},n.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},n.parse=function(e){let t;if(!e.to)return null;switch(e.to){case n.RawDirection.Left:t=0;break;case n.RawDirection.Right:t=1;break;case n.RawDirection.Up:t=2;break;case n.RawDirection.Down:t=3;break;case n.RawDirection.PrevBlankLine:t=4;break;case n.RawDirection.NextBlankLine:t=5;break;case n.RawDirection.WrappedLineStart:t=6;break;case n.RawDirection.WrappedLineFirstNonWhitespaceCharacter:t=7;break;case n.RawDirection.WrappedLineColumnCenter:t=8;break;case n.RawDirection.WrappedLineEnd:t=9;break;case n.RawDirection.WrappedLineLastNonWhitespaceCharacter:t=10;break;case n.RawDirection.ViewPortTop:t=11;break;case n.RawDirection.ViewPortBottom:t=13;break;case n.RawDirection.ViewPortCenter:t=12;break;case n.RawDirection.ViewPortIfOutside:t=14;break;default:return null}let i=0;switch(e.by){case n.RawUnit.Line:i=1;break;case n.RawUnit.WrappedLine:i=2;break;case n.RawUnit.Character:i=3;break;case n.RawUnit.HalfLine:i=4}return{direction:t,unit:i,select:!!e.select,value:e.value||1}}},10839:function(e,t,i){"use strict";i.d(t,{o:function(){return d}});var n=i(55343),o=i(7988),r=i(50187),s=i(24314),a=i(97295),l=i(47128);class h{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-a.HO(e.getLineContent(t.lineNumber),t.column-1));if(!(t.lineNumber>1))return t;{let i=t.lineNumber-1;return new r.L(i,e.getLineMaxColumn(i))}}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),s=l.l.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new r.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){let n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new h(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{let n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static clipPositionColumn(e,t){return new r.L(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ic?(i=c,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,u),s=m?0:u-o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){let e=new r.L(i,n),o=t.normalizePosition(e,d);s+=n-o.column,i=o.lineNumber,n=o.column}return new h(i,n,s)}static down(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i+r,s,4)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);let a=d.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let o=i.selection,a=d.down(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.down(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i-r,s,3)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);let a=d.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let o=i.selection,a=d.up(e,t,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.up(e,t,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){let o=t.getLineCount(),r=i.position.lineNumber;for(;r1){let n;for(n=i-1;n>=1;n--){let e=t.getLineContent(n),i=o.ow(e);if(i>=0)break}if(n<1)return null;let s=t.getLineMaxColumn(n),l=(0,v.A)(e.autoIndent,t,new a.e(n,s,n,s),e.languageConfigurationService);l&&(r=l.indentation+l.appendText)}return(n&&(n===p.wU.Indent&&(r=C.shiftIndent(e,r)),n===p.wU.Outdent&&(r=C.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r)?r:null}static _replaceJumpToNextIndent(e,t,i,n){let o="",s=i.getStartPosition();if(e.insertSpaces){let i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,r,s,a));return new u.Tp(4,l,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;let l=t.getPosition(),h=Math.max(1,l.column-n),d=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),u=new a.e(l.lineNumber,h,l.lineNumber,d),c=e.getValueInRange(u);return c===i&&0===s?null:new r.Uo(u,i,0,s)}static _typeCommand(e,t,i){return i?new r.Sj(e,t,!0):new r.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return C._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let r=t.getLineContent(n.startLineNumber),s=o.V8(r).substring(0,n.startColumn-1);return C._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}let s=(0,v.A)(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===p.wU.None||s.indentAction===p.wU.Indent)return C._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===p.wU.IndentOutdent){let t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+o+"\n"+t;return i?new r.Sj(n,a,!0):new r.Uo(n,a,-1,o.length-t.length,!0)}if(s.indentAction===p.wU.Outdent){let t=C.unshiftIndent(e,s.indentation);return C._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}let a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){let s=(0,_.UF)(e.autoIndent,t,n,{unshiftIndent:t=>C.unshiftIndent(e,t),shiftIndent:t=>C.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(s){let a=e.visibleColumnFromColumn(t,n.getEndPosition()),l=n.endColumn,h=t.getLineContent(n.endLineNumber),d=o.LC(h);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new r.Sj(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new r.Uo(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return C._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eC.shiftIndent(e,t),unshiftIndent:t=>C.unshiftIndent(e,t)},e.languageConfigurationService);if(null===r)return null;if(r!==e.normalizeIndentation(o)){let o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?C._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):C._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=i.length;r2?l.charCodeAt(a.column-2):0;if(92===c&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open)),s=o.some(e=>t.startsWith(e.close));return!r&&s}static _findAutoClosingPairOpen(e,t,i,n){let o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(let e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(let r of i){let i=t.getValueInRange(new a.e(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column));if(i+n!==e.open){o=!1;break}}o&&(r=e)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[],o=null;for(let e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){let r=(0,u.LN)(n),s=r?e.autoClosingQuotes:e.autoClosingBrackets,a=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===s)return null;for(let e of i)if(!e.isEmpty())return null;let l=i.map(e=>{let t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}}),h=this._findAutoClosingPairOpen(e,t,l.map(e=>new g.L(e.lineNumber,e.beforeColumn)),n);if(!h)return null;let d=this._findContainedAutoClosingPair(e,h),p=d?d.close:"",m=!0;for(let i of l){let{lineNumber:o,beforeColumn:r,afterColumn:l}=i,d=t.getLineContent(o),u=d.substring(0,r-1),g=d.substring(l-1);if(g.startsWith(p)||(m=!1),g.length>0){let t=g.charAt(0),i=C._isBeforeClosingBrace(e,g);if(!i&&!a(t))return null}if(1===h.open.length&&("'"===n||'"'===n)&&"always"!==s){let t=(0,c.u)(e.wordSeparators);if(u.length>0){let e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);let _=t.tokenization.getLineTokens(o),v=(0,f.wH)(_,r-1);if(!h.shouldAutoClose(v,r-v.firstCharOffset))return null;let b=h.findNeutralCharacter();if(b){let e=t.tokenization.getTokenTypeIfInsertingCharacter(o,r,b);if(!h.isOK(e))return null}}return m?h.close.substring(0,h.close.length-p.length):h.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){let a=[];for(let e=0,t=n.length;enew r.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new u.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}let g=this._getAutoClosingPairClose(t,i,o,h,!0);return null!==g?this._runAutoClosingOpenCharType(e,t,i,o,h,!0,g):null}static typeWithInterceptors(e,t,i,n,o,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,r=o.length;t=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let r=n;r=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(1===r||1===i&&2===r||2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=h._findPreviousWordOnLine(e,t,new a.L(o,r));if(0===n)return new a.L(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1));return new a.L(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=h._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){let i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;let r=e.getLineContent(i);for(let e=t.column-1;e>1;e--){let t=r.charCodeAt(e-2),s=r.charCodeAt(e-1);if(95===t&&95!==s||(n.mK(t)||n.T5(t))&&n.df(s))return new a.L(i,e);if(n.df(t)&&n.df(s)&&e+1=l.start+1&&(l=h._findNextWordOnLine(e,t,new a.L(o,l.end+1))),r=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,r)}static _moveWordPartRight(e,t){let i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?c=1:(u--,c=n.getLineMaxColumn(u)):(g&&c<=g.end+1&&(g=h._findPreviousWordOnLine(i,n,new a.L(u,g.start+1))),g?c=g.end+1:c>1?c=1:(u--,c=n.getLineMaxColumn(u))),new l.e(u,c,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;let n=new a.L(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(t,n);return o||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){let i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){let i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;r+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),s=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},a=h._findPreviousWordOnLine(e,t,i);if(a&&a.start+1<=i.column&&i.column<=a.end+1)return s(a);let d=h._findNextWordOnLine(e,t,i);return d&&d.start+1<=i.column&&i.column<=d.end+1?s(d):a&&d?r(a.end+1,d.start+1):a?r(a.start+1,a.end+1):d?r(d.start+1,d.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;let i=t.getPosition(),n=h._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=p.start+1&&(p=h._findNextWordOnLine(i,n,new a.L(d,p.end+1))),p?u=p.start+1:u!!e)}},30653:function(e,t,i){"use strict";i.d(t,{p:function(){return n}});class n{constructor(e,t,i,n,o,r){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},96518:function(e,t,i){"use strict";i.d(t,{g:function(){return n}});let n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},29102:function(e,t,i){"use strict";i.d(t,{u:function(){return o}});var n,o,r=i(63580),s=i(38819);(n=o||(o={})).editorSimpleInput=new s.uy("editorSimpleInput",!1,!0),n.editorTextFocus=new s.uy("editorTextFocus",!1,r.NC("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),n.focus=new s.uy("editorFocus",!1,r.NC("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),n.textInputFocus=new s.uy("textInputFocus",!1,r.NC("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),n.readOnly=new s.uy("editorReadonly",!1,r.NC("editorReadonly","Whether the editor is read only")),n.inDiffEditor=new s.uy("inDiffEditor",!1,r.NC("inDiffEditor","Whether the context is a diff editor")),n.columnSelection=new s.uy("editorColumnSelection",!1,r.NC("editorColumnSelection","Whether `editor.columnSelection` is enabled")),n.writable=n.readOnly.toNegated(),n.hasNonEmptySelection=new s.uy("editorHasSelection",!1,r.NC("editorHasSelection","Whether the editor has text selected")),n.hasOnlyEmptySelection=n.hasNonEmptySelection.toNegated(),n.hasMultipleSelections=new s.uy("editorHasMultipleSelections",!1,r.NC("editorHasMultipleSelections","Whether the editor has multiple selections")),n.hasSingleSelection=n.hasMultipleSelections.toNegated(),n.tabMovesFocus=new s.uy("editorTabMovesFocus",!1,r.NC("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),n.tabDoesNotMoveFocus=n.tabMovesFocus.toNegated(),n.isInWalkThroughSnippet=new s.uy("isInEmbeddedEditor",!1,!0),n.canUndo=new s.uy("canUndo",!1,!0),n.canRedo=new s.uy("canRedo",!1,!0),n.hoverVisible=new s.uy("editorHoverVisible",!1,r.NC("editorHoverVisible","Whether the editor hover is visible")),n.inCompositeEditor=new s.uy("inCompositeEditor",void 0,r.NC("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),n.notInCompositeEditor=n.inCompositeEditor.toNegated(),n.languageId=new s.uy("editorLangId","",r.NC("editorLangId","The language identifier of the editor")),n.hasCompletionItemProvider=new s.uy("editorHasCompletionItemProvider",!1,r.NC("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),n.hasCodeActionsProvider=new s.uy("editorHasCodeActionsProvider",!1,r.NC("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),n.hasCodeLensProvider=new s.uy("editorHasCodeLensProvider",!1,r.NC("editorHasCodeLensProvider","Whether the editor has a code lens provider")),n.hasDefinitionProvider=new s.uy("editorHasDefinitionProvider",!1,r.NC("editorHasDefinitionProvider","Whether the editor has a definition provider")),n.hasDeclarationProvider=new s.uy("editorHasDeclarationProvider",!1,r.NC("editorHasDeclarationProvider","Whether the editor has a declaration provider")),n.hasImplementationProvider=new s.uy("editorHasImplementationProvider",!1,r.NC("editorHasImplementationProvider","Whether the editor has an implementation provider")),n.hasTypeDefinitionProvider=new s.uy("editorHasTypeDefinitionProvider",!1,r.NC("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),n.hasHoverProvider=new s.uy("editorHasHoverProvider",!1,r.NC("editorHasHoverProvider","Whether the editor has a hover provider")),n.hasDocumentHighlightProvider=new s.uy("editorHasDocumentHighlightProvider",!1,r.NC("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),n.hasDocumentSymbolProvider=new s.uy("editorHasDocumentSymbolProvider",!1,r.NC("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),n.hasReferenceProvider=new s.uy("editorHasReferenceProvider",!1,r.NC("editorHasReferenceProvider","Whether the editor has a reference provider")),n.hasRenameProvider=new s.uy("editorHasRenameProvider",!1,r.NC("editorHasRenameProvider","Whether the editor has a rename provider")),n.hasSignatureHelpProvider=new s.uy("editorHasSignatureHelpProvider",!1,r.NC("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),n.hasInlayHintsProvider=new s.uy("editorHasInlayHintsProvider",!1,r.NC("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),n.hasDocumentFormattingProvider=new s.uy("editorHasDocumentFormattingProvider",!1,r.NC("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),n.hasDocumentSelectionFormattingProvider=new s.uy("editorHasDocumentSelectionFormattingProvider",!1,r.NC("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),n.hasMultipleDocumentFormattingProvider=new s.uy("editorHasMultipleDocumentFormattingProvider",!1,r.NC("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),n.hasMultipleDocumentSelectionFormattingProvider=new s.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,r.NC("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))},45797:function(e,t,i){"use strict";i.d(t,{N:function(){return n}});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),8&n&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){let i=this.getForeground(e),n=this.getFontStyle(e),o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let r="";return 4&n&&(r+=" underline"),8&n&&(r+=" line-through"),r&&(o+=`text-decoration:${r};`),o}static getPresentationFromMetadata(e){let t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(1&i),bold:!!(2&i),underline:!!(4&i),strikethrough:!!(8&i)}}}},43155:function(e,t,i){"use strict";i.d(t,{mY:function(){return c},gX:function(){return a},MY:function(){return d},DI:function(){return S},AD:function(){return k},gl:function(){return g},bw:function(){return l},WW:function(){return h},uZ:function(){return u},WU:function(){return w},RW:function(){return N},hG:function(){return y},vx:function(){return L}});var n,o,r,s,a,l,h,d,u,c,g,p=i(73046),m=i(70666),f=i(24314),_=i(4669),v=i(9917),C=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};class b extends v.JT{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return C(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return C(this,void 0,void 0,function*(){let e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}class w{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class y{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class S{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}function L(e){return e&&m.o.isUri(e.uri)&&f.e.isIRange(e.range)&&(f.e.isIRange(e.originSelectionRange)||f.e.isIRange(e.targetSelectionRange))}!function(e){let t=new Map;t.set(0,p.lA.symbolMethod),t.set(1,p.lA.symbolFunction),t.set(2,p.lA.symbolConstructor),t.set(3,p.lA.symbolField),t.set(4,p.lA.symbolVariable),t.set(5,p.lA.symbolClass),t.set(6,p.lA.symbolStruct),t.set(7,p.lA.symbolInterface),t.set(8,p.lA.symbolModule),t.set(9,p.lA.symbolProperty),t.set(10,p.lA.symbolEvent),t.set(11,p.lA.symbolOperator),t.set(12,p.lA.symbolUnit),t.set(13,p.lA.symbolValue),t.set(15,p.lA.symbolEnum),t.set(14,p.lA.symbolConstant),t.set(15,p.lA.symbolEnum),t.set(16,p.lA.symbolEnumMember),t.set(17,p.lA.symbolKeyword),t.set(27,p.lA.symbolSnippet),t.set(18,p.lA.symbolText),t.set(19,p.lA.symbolColor),t.set(20,p.lA.symbolFile),t.set(21,p.lA.symbolReference),t.set(22,p.lA.symbolCustomColor),t.set(23,p.lA.symbolFolder),t.set(24,p.lA.symbolTypeParameter),t.set(25,p.lA.account),t.set(26,p.lA.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=p.lA.symbolProperty),i};let i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(a||(a={})),(n=l||(l={}))[n.Automatic=0]="Automatic",n[n.Explicit=1]="Explicit",(o=h||(h={}))[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",(r=d||(d={}))[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write",function(e){let t=new Map;t.set(0,p.lA.symbolFile),t.set(1,p.lA.symbolModule),t.set(2,p.lA.symbolNamespace),t.set(3,p.lA.symbolPackage),t.set(4,p.lA.symbolClass),t.set(5,p.lA.symbolMethod),t.set(6,p.lA.symbolProperty),t.set(7,p.lA.symbolField),t.set(8,p.lA.symbolConstructor),t.set(9,p.lA.symbolEnum),t.set(10,p.lA.symbolInterface),t.set(11,p.lA.symbolFunction),t.set(12,p.lA.symbolVariable),t.set(13,p.lA.symbolConstant),t.set(14,p.lA.symbolString),t.set(15,p.lA.symbolNumber),t.set(16,p.lA.symbolBoolean),t.set(17,p.lA.symbolArray),t.set(18,p.lA.symbolObject),t.set(19,p.lA.symbolKey),t.set(20,p.lA.symbolNull),t.set(21,p.lA.symbolEnumMember),t.set(22,p.lA.symbolStruct),t.set(23,p.lA.symbolEvent),t.set(24,p.lA.symbolOperator),t.set(25,p.lA.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=p.lA.symbolProperty),i}}(u||(u={}));class k{constructor(e){this.value=e}}k.Comment=new k("comment"),k.Imports=new k("imports"),k.Region=new k("region"),(c||(c={})).is=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.title},(s=g||(g={}))[s.Type=1]="Type",s[s.Parameter=2]="Parameter";let N=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new _.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,v.OF)(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();let n=new b(this,e,t);return this._factories.set(e,n),(0,v.OF)(()=>{let t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())})}getOrCreate(e){return C(this,void 0,void 0,function*(){let t=this.get(e);if(t)return t;let i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))})}get(e){return this._map.get(e)||null}isResolved(e){let t=this.get(e);if(t)return!0;let i=this._factories.get(e);return!i||!!i.isResolved}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},75383:function(e,t,i){"use strict";i.d(t,{$9:function(){return d},UF:function(){return h},n8:function(){return l},r7:function(){return a},tI:function(){return u}});var n=i(97295),o=i(49119),r=i(19111),s=i(4256);function a(e,t,i,r=!0,s){if(e<4)return null;let a=s.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!a)return null;if(i<=1)return{indentation:"",action:null};let l=function(e,t,i){let n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o;let r=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return r;let t=e.getLineContent(o);if(i.shouldIgnore(t)||/^\s+$/.test(t)||""===t){r=o;continue}return o}}return -1}(t,i,a);if(l<0)return null;if(l<1)return{indentation:"",action:null};let h=t.getLineContent(l);if(a.shouldIncrease(h)||a.shouldIndentNextLine(h))return{indentation:n.V8(h),action:o.wU.Indent,line:l};if(a.shouldDecrease(h))return{indentation:n.V8(h),action:null,line:l};{if(1===l)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};let e=l-1,i=a.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(r)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};for(let e=l;e>0;e--){let i=t.getLineContent(e);if(a.shouldIncrease(i))return{indentation:n.V8(i),action:o.wU.Indent,line:e};if(a.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(a.shouldDecrease(i))return{indentation:n.V8(i),action:null,line:e}}return{indentation:n.V8(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,r,s,l){if(e<4)return null;let h=l.getLanguageConfiguration(i);if(!h)return null;let d=l.getLanguageConfiguration(i).indentRulesSupport;if(!d)return null;let u=a(e,t,r,void 0,l),c=t.getLineContent(r);if(u){let i=u.line;if(void 0!==i){let r=h.onEnter(e,"",t.getLineContent(i),"");if(r){let e=n.V8(t.getLineContent(i));return r.removeText&&(e=e.substring(0,e.length-r.removeText)),r.indentAction===o.wU.Indent||r.indentAction===o.wU.IndentOutdent?e=s.shiftIndent(e):r.indentAction===o.wU.Outdent&&(e=s.unshiftIndent(e)),d.shouldDecrease(c)&&(e=s.unshiftIndent(e)),r.appendText&&(e+=r.appendText),n.V8(e)}}return d.shouldDecrease(c)?u.action===o.wU.Indent?u.indentation:s.unshiftIndent(u.indentation):u.action===o.wU.Indent?s.shiftIndent(u.indentation):u.indentation}return null}function h(e,t,i,l,h){let d,u;if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);let c=t.tokenization.getLineTokens(i.startLineNumber),g=(0,r.wH)(c,i.startColumn-1),p=g.getLineContent(),m=!1;if(g.firstCharOffset>0&&c.getLanguageId(0)!==g.languageId?(m=!0,d=p.substr(0,i.startColumn-1-g.firstCharOffset)):d=c.getLineContent().substring(0,i.startColumn-1),i.isEmpty())u=p.substr(i.startColumn-1-g.firstCharOffset);else{let e=(0,s.n2)(t,i.endLineNumber,i.endColumn);u=e.getLineContent().substr(i.endColumn-1-g.firstCharOffset)}let f=h.getLanguageConfiguration(g.languageId).indentRulesSupport;if(!f)return null;let _=d,v=n.V8(d),C=n.V8(c.getLineContent()),b=a(e,{tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?_:t.getLineContent(e)},i.startLineNumber+1,void 0,h);if(!b){let e=m?C:v;return{beforeEnter:e,afterEnter:e}}let w=m?C:b.indentation;return b.action===o.wU.Indent&&(w=l.shiftIndent(w)),f.shouldDecrease(u)&&(w=l.unshiftIndent(w)),{beforeEnter:m?C:v,afterEnter:w}}function d(e,t,i,n,r,l){let h;if(e<4)return null;let d=(0,s.n2)(t,i.startLineNumber,i.startColumn);if(d.firstCharOffset)return null;let u=l.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!u)return null;let c=d.getLineContent(),g=c.substr(0,i.startColumn-1-d.firstCharOffset);if(i.isEmpty())h=c.substr(i.startColumn-1-d.firstCharOffset);else{let e=(0,s.n2)(t,i.endLineNumber,i.endColumn);h=e.getLineContent().substr(i.endColumn-1-d.firstCharOffset)}if(!u.shouldDecrease(g+h)&&u.shouldDecrease(g+n+h)){let n=a(e,t,i.startLineNumber,!1,l);if(!n)return null;let s=n.indentation;return n.action!==o.wU.Indent&&(s=r.unshiftIndent(s)),s}return null}function u(e,t,i){let n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return!n||t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t))}},1615:function(e,t,i){"use strict";i.d(t,{A:function(){return r}});var n=i(49119),o=i(4256);function r(e,t,i,r){let s;let a=(0,o.n2)(t,i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a.languageId);if(!l)return null;let h=a.getLineContent(),d=h.substr(0,i.startColumn-1-a.firstCharOffset);if(i.isEmpty())s=h.substr(i.startColumn-1-a.firstCharOffset);else{let e=(0,o.n2)(t,i.endLineNumber,i.endColumn);s=e.getLineContent().substr(i.endColumn-1-a.firstCharOffset)}let u="";if(i.startLineNumber>1&&0===a.firstCharOffset){let e=(0,o.n2)(t,i.startLineNumber-1);e.languageId===a.languageId&&(u=e.getLineContent())}let c=l.onEnter(e,u,d,s);if(!c)return null;let g=c.indentAction,p=c.appendText,m=c.removeText||0;p?g===n.wU.Indent&&(p=" "+p):p=g===n.wU.Indent||g===n.wU.IndentOutdent?" ":"";let f=(0,o.u0)(t,i.startLineNumber,i.startColumn);return m&&(f=f.substring(0,f.length-m)),{indentAction:g,appendText:p,removeText:m,indentation:f}}},72042:function(e,t,i){"use strict";i.d(t,{O:function(){return o}});var n=i(72065);let o=(0,n.yh)("languageService")},49119:function(e,t,i){"use strict";var n,o;i.d(t,{V6:function(){return r},c$:function(){return s},wU:function(){return n}}),(o=n||(n={}))[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent";class r{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;tnew a.V6(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.V6({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}}h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n ";var d=i(9488),u=i(34302);class c{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let i of t.close){let t=i.charAt(i.length-1);e.push(t)}return(0,d.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;let n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;let o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=u.Vr.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;let a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),h=this._richEditBrackets.textIsOpenBracket[a];if(h)return null;let d=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(17301);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{let t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)));if(r)return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e[e[0],e[1]])):t.brackets?L(t.brackets.map(e=>[e[0],e[1]]).filter(e=>!("<"===e[0]&&">"===e[1]))):[];let n=new y.b(e=>{let t=new Set;return{info:new N(this,e,t),closing:t}}),o=new y.b(e=>{let t=new Set;return{info:new D(this,e,t),opening:t}});for(let[e,t]of i){let i=n.get(e),r=o.get(t);i.closing.add(r.info),r.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...o.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function L(e){return e.filter(([e,t])=>""!==e&&""!==t)}class k{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class N extends k{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends k{constructor(e,t,i){super(e,t),this.closedBrackets=i,this.isOpeningBracket=!1}closes(e){if(e.languageId===this.languageId&&e.config!==this.config)throw new m.he("Brackets from different language configuration cannot be used.");return this.closedBrackets.has(e)}getClosedBrackets(){return[...this.closedBrackets]}}var x=function(e,t){return function(i,n){t(i,n,e)}};class I{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}let E=(0,_.yh)("languageConfigurationService"),T=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let i=new Set(Object.values(M));this._register(this.configurationService.onDidChangeConfiguration(e=>{let t=e.change.keys.some(e=>i.has(e)),n=e.change.overrides.filter(([e,t])=>t.some(e=>i.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new I(void 0));else for(let e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new I(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new I(e.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))throw Error(`Language id "${e}" is not configured nor known`);o=new H(e,{})}let r=function(e,t){let i=t.getValue(M.brackets,{overrideIdentifier:e}),n=t.getValue(M.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:A(i),colorizedBracketPairs:A(n)}}(o.languageId,i),s=F([o.underlyingConfig,r]),a=new H(o.languageId,s);return a}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([x(0,v.Ui),x(1,C.O)],T);let M={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function A(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}function R(e,t,i){let n=e.getLineContent(t),o=r.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}function O(e,t,i){e.tokenization.forceTokenization(t);let n=e.tokenization.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let i=new B(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)(()=>{for(let e=0;ee.configuration)))}}function F(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class B{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class V{constructor(e){this.languageId=e}}class W extends o.JT{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._register(this.register(w.bd,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));let r=n.register(t,i);return this._onDidChange.fire(new V(e)),(0,o.OF)(()=>{r.dispose(),this._onDidChange.fire(new V(e))})}getLanguageConfiguration(e){let t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new h(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||s.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,s.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new c(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,b.z)(E,T)},68801:function(e,t,i){"use strict";i.d(t,{bd:function(){return h},dQ:function(){return l}});var n=i(63580),o=i(4669),r=i(89872),s=i(81170),a=i(23193);let l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t>>0,new n.DI(i,null===t?o:t)}},19111:function(e,t,i){"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;for(;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}i.d(t,{Bu:function(){return r},wH:function(){return n}});class o{constructor(e,t,i,n,o,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){let e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){let t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function r(e){return(3&e)!=0}},34302:function(e,t,i){"use strict";let n,o;i.d(t,{EA:function(){return h},Vr:function(){return f}});var r=i(97295),s=i(50072),a=i(24314);class l{constructor(e,t,i,n,o,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=l._toSet(this.open),this._closeSet=l._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let i of e)t.add(i);return t}}class h{constructor(e,t){this._richEditBracketsBrand=void 0;let i=function(e){let t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);let i=[];for(let e=0;e{let[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{let o=Math.min(e,n),r=Math.max(e,n);for(let e=0;e0&&r.push({open:o,close:s})}return r}(t);for(let t of(this.brackets=i.map((t,n)=>new l(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=(o=o.concat(e)).concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(let t of r.close)t.indexOf(e)>=0&&n.push(t)}}function u(e,t){return e.length-t.length}function c(e){if(e.length<=1)return e;let t=[],i=new Set;for(let n of e)i.has(n)||(t.push(n),i.add(n));return t}function g(e){let t=/^[\w ]+$/.test(e);return e=r.ec(e),t?`\\b${e}\\b`:e}function p(e){let t=`(${e.map(g).join(")|(")})`;return r.GF(t,!0)}let m=(n=null,o=null,function(e){return n!==e&&(o=function(e){if(s.lZ){let t=new Uint16Array(e.length),i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s.oe().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(n=e)),o});class f{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=i.length-(o.index||0),s=o[0].length,l=n+r;return new a.e(t,l-s+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){let r=m(i),s=r.substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=o.index||0,s=o[0].length;if(0===s)return null;let l=n+r;return new a.e(t,l+1,t,l+1+s)}static findNextBracketInRange(e,t,i,n,o){let r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}},81947:function(e,t,i){"use strict";i.d(t,{C2:function(){return l},Fq:function(){return h}});var n=i(97295),o=i(77378),r=i(43155),s=i(276);let a={getInitialState:()=>s.TJ,tokenizeEncoded:(e,t,i)=>(0,s.Dy)(0,i)};function l(e,t,i){var n,o,s,l;return n=this,o=void 0,s=void 0,l=function*(){if(!i)return d(t,e.languageIdCodec,a);let n=yield r.RW.getOrCreate(i);return d(t,e.languageIdCodec,n||a)},new(s||(s=Promise))(function(e,t){function i(e){try{a(l.next(e))}catch(e){t(e)}}function r(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof s?n:new s(function(e){e(n)})).then(i,r)}a((l=l.apply(n,o||[])).next())})}function h(e,t,i,n,o,r,s){let a="
",l=n,h=0,d=!0;for(let u=0,c=t.getCount();u0;)s&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:s&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,c>o||l>=o)break}return a+"
"}function d(e,t,i){let r='
',s=n.uq(e),a=i.getInitialState();for(let e=0,l=s.length;e0&&(r+="
");let h=i.tokenizeEncoded(l,!0,a);o.A.convertToEndOffset(h.tokens,l.length);let d=new o.A(h.tokens,l,t),u=d.inflate(),c=0;for(let e=0,t=u.getCount();e${n.YU(l.substring(c,i))}`,c=i}a=h.endState}return r+"
"}},84973:function(e,t,i){"use strict";i.d(t,{F5:function(){return a},Hf:function(){return c},Qi:function(){return g},RM:function(){return l},Tx:function(){return p},dJ:function(){return d},je:function(){return m},pt:function(){return f},sh:function(){return s},tk:function(){return u}});var n,o,r,s,a,l,h=i(36248);(n=s||(s={}))[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full",(o=a||(a={}))[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter",(r=l||(l={}))[r.Both=0]="Both",r[r.Right=1]="Right",r[r.Left=2]="Left",r[r.None=3]="None";class d{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=!!e.insertSpaces,this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,h.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class u{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class g{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class p{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class m{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function f(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},66381:function(e,t,i){"use strict";i.d(t,{BH:function(){return m},Dm:function(){return _},Kd:function(){return a},Y0:function(){return l},n2:function(){return f}});var n=i(7988),o=i(45035),r=i(61761);class s{constructor(e){this._length=e}get length(){return this._length}}class a extends s{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=(0,o.Ii)(n,t.length)),i&&(n=(0,o.Ii)(n,i.length)),new a(n,e,t,i,t?t.missingOpeningBracketIds:r.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return!(null===this.closingBracket||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new a(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class l extends s{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let r=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw Error("Invalid list heights");if(r=(0,o.Ii)(r,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw Error("Invalid list heights");r=(0,o.Ii)(r,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new d(r,e.listHeight+1,e,t,i,s):new h(r,e.listHeight+1,e,t,i,s)}static getEmpty(){return new c(o.xl,0,[],r.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(0),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e){let t;if(e.intersects(this.missingOpeningBracketIds))return!1;let i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;ns.from(e))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):this.documentLength;return(0,n.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=(0,n.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{let t;return t=(0,n.ec)(e),/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class h{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},45035:function(e,t,i){"use strict";i.d(t,{BE:function(){return p},By:function(){return f},F_:function(){return c},Hg:function(){return h},Hw:function(){return d},Ii:function(){return g},PZ:function(){return v},Qw:function(){return C},VR:function(){return m},W9:function(){return u},Zq:function(){return _},av:function(){return s},oR:function(){return b},xd:function(){return l},xl:function(){return a}});var n=i(97295),o=i(24314);class r{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function s(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}r.zero=new r(0,0);let a=0;function l(e){return 0===e}function h(e,t){return 67108864*e+t}function d(e){let t=Math.floor(e/67108864),i=e-67108864*t;return new r(t,i)}function u(e){return Math.floor(e/67108864)}function c(e){return e}function g(e,t){return t<67108864?e+t:e-e%67108864+t}function p(e,t){if(t-e<=0)return a;let i=Math.floor(e/67108864),n=Math.floor(t/67108864),o=t-67108864*n;if(i!==n)return h(n-i,o);{let t=e-67108864*i;return h(0,o-t)}}function m(e,t){return e=t}function v(e){return h(e.lineNumber-1,e.column-1)}function C(e,t){let i=Math.floor(e/67108864),n=e-67108864*i,r=Math.floor(t/67108864),s=t-67108864*r;return new o.e(i+1,n+1,r+1,s+1)}function b(e){let t=(0,n.uq)(e);return h(t.length-1,t[t.length-1].length)}},64837:function(e,t,i){"use strict";i.d(t,{w:function(){return g}});var n=i(66381),o=i(2442),r=i(61761),s=i(45035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){let o=i>>1;for(let r=0;r=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function h(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i;let o=e=e.toMutable(),r=[];for(;;){if(t.listHeight===o.listHeight){i=t;break}if(4!==o.kind)throw Error("unexpected");r.push(o),o=o.makeLastElementMutable()}for(let e=r.length-1;e>=0;e--){let t=r[e];i?t.childrenLength>=3?i=n.Y0.create23(t.unappendChild(),i,null,!1):(t.appendChildOfSameHeight(i),i=void 0):t.handleChildrenChanged()}return i?n.Y0.create23(e,i,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable(),o=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let r=t;for(let e=o.length-1;e>=0;e--){let t=o[e];r?t.childrenLength>=3?r=n.Y0.create23(r,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?n.Y0.create23(r,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=s.xl,this.nextNodes=[e],this.offsets=[s.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,s.VR)(e,this.lastOffset))throw Error("Invalid offset");for(this.lastOffset=e;;){let i=c(this.nextNodes);if(!i)return;let n=c(this.offsets);if((0,s.VR)(e,n))return;if((0,s.VR)(n,e)){if((0,s.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{let e=u(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}}else{if(t(i))return this.nextNodeAfterCurrent(),i;{let e=u(i);if(-1===e){this.nextNodeAfterCurrent();return}this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){let e=c(this.offsets),t=c(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;let i=c(this.nextNodes),n=u(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,s.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function u(e,t=-1){for(;;){if(++t>=e.childrenLength)return -1;if(e.getChild(t))return t}}function c(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){let o=new p(e,t,i,n);return o.parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new o.Y(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(r.tS.getEmpty());return e||(e=n.Y0.getEmpty()),e}parseList(e){let t=[];for(;;){let i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;let n=this.parseChild(e);(4!==n.kind||0!==n.childrenLength)&&t.push(n)}let i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;let i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())l(n,o)<=l(o,e)?(n=h(n,o),o=e):o=h(o,e);let r=h(n,o);return r}(t):a(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){let t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,s.xd)(t)){let i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>{if(!(0,s.VR)(i.length,t))return!1;let n=i.canBeReused(e);return n});if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;let t=this.tokenizer.read();switch(t.kind){case 2:return new n.Dm(t.bracketIds,t.length);case 0:return t.astNode;case 1:{let i=e.merge(t.bracketIds),o=this.parseList(i),r=this.tokenizer.peek();if(r&&2===r.kind&&(r.bracketId===t.bracketId||r.bracketIds.intersects(t.bracketIds)))return this.tokenizer.read(),n.Kd.create(t.astNode,o,r.astNode);return n.Kd.create(t.astNode,o,null)}default:throw Error("unexpected")}}}},61761:function(e,t,i){"use strict";i.d(t,{FE:function(){return s},Qw:function(){return r},tS:function(){return o}});let n=[];class o{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static getEmpty(){return this.empty}add(e,t){let i=t.getKey(e),n=i>>5;if(0===n){let e=1<e};class s{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:function(e,t,i){"use strict";i.d(t,{WU:function(){return l},g:function(){return u},xH:function(){return h}});var n=i(17301),o=i(45797),r=i(66381),s=i(45035),a=i(61761);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=s.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,s.Hg)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,s.Ii)(this._offset,e);let t=(0,s.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,s.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,s.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,i=0;for(;;){let n=this.lineTokens,r=n.getCount(),a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}let n=(0,s.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new r.BH(n))}}class u{constructor(e,t){let i;this.text=e,this._offset=s.xl,this.idx=0;let n=t.getRegExpStr(),o=n?RegExp(n+"|\n","gi"):null,h=[],d=0,u=0,c=0,g=0,p=[];for(let e=0;e<60;e++)p.push(new l((0,s.Hg)(0,e),0,-1,a.tS.getEmpty(),new r.BH((0,s.Hg)(0,e))));let m=[];for(let e=0;e<60;e++)m.push(new l((0,s.Hg)(1,e),0,-1,a.tS.getEmpty(),new r.BH((0,s.Hg)(1,e))));if(o)for(o.lastIndex=0;null!==(i=o.exec(e));){let e=i.index,n=i[0];if("\n"===n)d++,u=e+1;else{if(c!==e){let t;if(g===d){let i=e-c;if(i0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(let n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){let n=l.Ag(e,t);t+=4;for(let o=0;oe.toString()).join(", ")}matchesResource(e){let t=s.o.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,o){this._data instanceof u&&this._data.append(e,t,i,n,o)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());let e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{constructor(e,t,i){for(let n of(this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map,this._editStackElementsArr)){let e=d(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){let t=d(e);return this._editStackElementsMap.has(t)}setModel(e){let t=d(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;let t=d(e.uri);if(this._editStackElementsMap.has(t)){let i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,o){let r=d(e.uri),s=this._editStackElementsMap.get(r);s.append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){for(let e of(this._isOpen=!1,this._editStackElementsArr))e.undo()}redo(){for(let e of this._editStackElementsArr)e.redo()}heapSize(e){let t=d(e);if(this._editStackElementsMap.has(t)){let e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(let t of this._editStackElementsArr)e.push(`${(0,h.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){let t=e.getEOL();return"\n"===t?0:1}function m(e){return!!e&&(e instanceof c||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){let e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){let t=this._undoRedoService.getLastElement(this._model.uri);if(m(t)&&t.canAppend(this._model))return t;let i=new c(n.NC("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){let t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){let n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=f._computeCursorState(i,o),s=o.map((e,t)=>({index:t,textChange:e.textChange}));return s.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),n.append(this._model,s.map(e=>e.textChange),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},1516:function(e,t,i){"use strict";i.d(t,{W:function(){return u},l:function(){return d}});var n=i(9488),o=i(97295),r=i(7988),s=i(24314),a=i(94954),l=i(59616),h=i(65094);class d extends a.U{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();let n=this.textModel.getLineCount();if(e<1||e>n)throw Error("Illegal value for lineNumber");let o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(o&&o.offSide),s=-2,a=-1,l=-2,h=-1,d=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t=0){l=t,h=e;break}}}},u=-2,c=-1,g=-2,p=-1,m=e=>{if(-2===u){u=-1,c=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,c=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}},f=0,_=!0,v=0,C=!0,b=0,w=0;for(let o=0;_||C;o++){let s=e-o,g=e+o;o>1&&(s<1||s1&&(g>n||g>i)&&(C=!1),o>5e4&&(_=!1,C=!1);let y=-1;if(_&&s>=1){let e=this._computeIndentLevel(s-1);e>=0?(l=s-1,h=e,y=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(s),y=this._getIndentLevelForWhitespaceLine(r,a,h))}let S=-1;if(C&&g<=n){let e=this._computeIndentLevel(g-1);e>=0?(u=g-1,c=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(r,c,p))}if(0===o){w=y;continue}if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,f=g,v=g,b=S;continue}if(s>=1&&y>=0&&y-1===w){C=!1,f=s,v=s,b=y;continue}if(f=e,v=e,0===(b=w))break}_&&(y>=b?f=s:_=!1),C&&(S>=b?v=g:C=!1)}return{startLineNumber:f,endLineNumber:v,indent:b}}getLinesBracketGuides(e,t,i,r){var a;let l;let d=[];for(let i=e;i<=t;i++)d.push([]);let c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new s.e(e,1,t,this.textModel.getLineMaxColumn(t)));if(i&&c.length>0){let o=(e<=i.lineNumber&&i.lineNumber<=t?c:this.textModel.bracketPairs.getBracketPairsInRange(s.e.fromPositions(i))).filter(e=>s.e.strictContainsPosition(e.range,i));l=null===(a=(0,n.dF)(o,e=>!0))||void 0===a?void 0:a.range}let g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new u;for(let i of c){if(!i.closingBracketRange)continue;let n=l&&i.range.equalsRange(l);if(!n&&!r.includeInactive)continue;let s=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(r.highlightActive&&n?" "+p.activeClassName:""),a=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),c=r.horizontalGuides===h.s6.Enabled||r.horizontalGuides===h.s6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){c&&d[i.range.startLineNumber-e].push(new h.UO(-1,i.openingBracketRange.getEndPosition().column,s,new h.vW(!1,u.column),-1,-1));continue}let m=this.getVisibleColumnFromPosition(u),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1),v=!1,C=o.LC(this.textModel.getLineContent(i.closingBracketRange.startLineNumber)),b=C=e&&f>_&&d[a.lineNumber-e].push(new h.UO(_,-1,s,new h.vW(!1,a.column),-1,-1)),u.lineNumber<=t&&m>_&&d[u.lineNumber-e].push(new h.UO(_,-1,s,new h.vW(!v,u.column),-1,-1)))}for(let e of d)e.sort((e,t)=>e.visibleColumn-t.visibleColumn);return d}getVisibleColumnFromPosition(e){return r.i.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();let i=this.textModel.getLineCount();if(e<1||e>i)throw Error("Illegal value for startLineNumber");if(t<1||t>i)throw Error("Illegal value for endLineNumber");let n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(o&&o.offSide),s=Array(t-e+1),a=-2,l=-1,h=-2,d=-1;for(let o=e;o<=t;o++){let t=o-e,u=this._computeIndentLevel(o-1);if(u>=0){a=o-1,l=u,s[t]=Math.ceil(u/n.indentSize);continue}if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,d=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(r,l,d)}return s}_getIndentLevelForWhitespaceLine(e,t,i){let n=this.textModel.getOptions();return -1===t||-1===i?0:t=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.A)(e),t=(0,o.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;let r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,e<(r=(o=this.prefixSum[n])-this.values[n]))i=n-1;else if(e>=o)t=n+1;else break;return new a(n,e-r)}}class s{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return(this._ensureValid(),0===e)?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nnew y.Q((0,L.Hg)(e.fromLineNumber-1,0),(0,L.Hg)(e.toLineNumber,0),(0,L.Hg)(e.toLineNumber-e.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){let t=e.changes.map(e=>{let t=g.e.lift(e.range);return new y.Q((0,L.PZ)(t.getStartPosition()),(0,L.PZ)(t.getEndPosition()),(0,L.oR)(e.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){let n=new D.xH(this.textModel,this.brackets),o=(0,k.w)(n,e,t,i);return o}getBracketsInRange(e){let t=(0,L.Hg)(e.startLineNumber-1,e.startColumn-1),i=(0,L.Hg)(e.endLineNumber-1,e.endColumn-1),n=[],o=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o,r,s,a,l){if(!(a>200)){if(4===t.kind)for(let h of t.children)n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a,l),i=n;else if(2===t.kind){let h=0;if(l){let e=l.get(t.openingBracket.text);void 0===e&&(e=0),h=e,e++,l.set(t.openingBracket.text,e)}{let e=t.openingBracket;if(n=(0,L.Ii)(i,e.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)){let e=(0,L.Qw)(i,n);s.push(new C(e,a,h,!t.closingBracket))}i=n}if(t.child){let h=t.child;n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a+1,l),i=n}if(t.closingBracket){let e=t.closingBracket;if(n=(0,L.Ii)(i,e.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)){let e=(0,L.Qw)(i,n);s.push(new C(e,a,h,!1))}i=n}null==l||l.set(t.openingBracket.text,h)}else if(3===t.kind){let e=(0,L.Qw)(i,n);s.push(new C(e,a-1,0,!0))}else if(1===t.kind){let e=(0,L.Qw)(i,n);s.push(new C(e,a-1,0,!1))}}}(o,L.xl,o.length,t,i,n,0,new Map),n}getBracketPairsInRange(e,t){let i=[],n=(0,L.PZ)(e.getStartPosition()),o=(0,L.PZ)(e.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,s=new I(i,t,this.textModel);return function e(t,i,n,o,r,s,a,l){var h;if(!(a>200)){if(2===t.kind){let d=0;if(l){let e=l.get(t.openingBracket.text);void 0===e&&(e=0),d=e,e++,l.set(t.openingBracket.text,e)}let u=(0,L.Ii)(i,t.openingBracket.length),c=-1;if(s.includeMinIndentation&&(c=t.computeMinIndentation(i,s.textModel)),s.result.push(new w((0,L.Qw)(i,n),(0,L.Qw)(i,u),t.closingBracket?(0,L.Qw)((0,L.Ii)(u,(null===(h=t.child)||void 0===h?void 0:h.length)||L.xl),n):void 0,a,d,t,c)),i=u,t.child){let h=t.child;n=(0,L.Ii)(i,h.length),(0,L.By)(i,r)&&(0,L.Zq)(n,o)&&e(h,i,n,o,r,s,a+1,l)}null==l||l.set(t.openingBracket.text,d)}else{let n=i;for(let i of t.children){let t=n;n=(0,L.Ii)(n,i.length),(0,L.By)(t,r)&&(0,L.By)(o,n)&&e(i,t,n,o,r,s,a,l)}}}}(r,L.xl,r.length,n,o,s,0,new Map),i}getFirstBracketAfter(e){let t=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o){if(4===t.kind||2===t.kind)for(let r of t.children){if(n=(0,L.Ii)(i,r.length),(0,L.VR)(o,n)){let t=e(r,i,n,o);if(t)return t}i=n}else if(3===t.kind);else if(1===t.kind){let e=(0,L.Qw)(i,n);return{bracketInfo:t.bracketInfo,range:e}}return null}(t,L.xl,t.length,(0,L.PZ)(e))}getFirstBracketBefore(e){let t=this.initialAstWithoutTokens||this.astWithTokens;return function e(t,i,n,o){if(4===t.kind||2===t.kind){let r=[];for(let e of t.children)n=(0,L.Ii)(i,e.length),r.push({nodeOffsetStart:i,nodeOffsetEnd:n}),i=n;for(let i=r.length-1;i>=0;i--){let{nodeOffsetStart:n,nodeOffsetEnd:s}=r[i];if((0,L.VR)(n,o)){let r=e(t.children[i],n,s,o);if(r)return r}}}else if(3===t.kind);else if(1===t.kind){let e=(0,L.Qw)(i,n);return{bracketInfo:t.bracketInfo,range:e}}return null}(t,L.xl,t.length,(0,L.PZ)(e))}}class I{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}var E=i(19111),T=i(34302);class M extends a.JT{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(e=>{var t;(!e.languageId||(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId)))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get canBuildAST(){return 5e6>=this.textModel.getValueLength()}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){let e=new a.SL;this.bracketPairsTree.value={object:e.add(new x(this.textModel,e=>this.languageConfigurationService.getLanguageConfiguration(e))),dispose:()=>null==e?void 0:e.dispose()},e.add(this.bracketPairsTree.value.object.onDidChange(e=>this.onDidChangeEmitter.fire(e))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){let o=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column);if(this.canBuildAST){let i=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!i)return null;let o=(0,n.dF)(this.getBracketPairsInRange(g.e.fromPositions(t,t))||[],e=>i.closes(e.openingBracketInfo));return o?o.openingBracketRange:null}{let t=e.toLowerCase(),n=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!n)return null;let s=n.textIsBracket[t];return s?O(this._findMatchingBracketUp(s,o,A(i))):null}}matchBracket(e,t){if(this.canBuildAST){let t=(0,n.jV)(this.getBracketPairsInRange(g.e.fromPositions(e,e)).filter(t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e))),(0,n.tT)(t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange,g.e.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{let i=A(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){let o=t.getCount(),r=t.getLanguageId(n),s=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){let i=t.getEndOffset(e);if(i<=s)break;if((0,E.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,E.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e,t){let i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;let s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(s&&!(0,E.Bu)(n.getStandardTokenType(r))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,s,r),h=null;for(;;){let n=T.Vr.findNextBracketInRange(s.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){let e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,s.textIsBracket[e],s.textIsOpenBracket[e],t);if(i){if(i instanceof R)return null;h=i}}a=n.endColumn-1}if(h)return h}if(r>0&&n.getStartOffset(r)===e.column-1){let s=r-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(a&&!(0,E.Bu)(n.getStandardTokenType(s))){let{searchStartOffset:r,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,s),h=T.Vr.findPrevBracketInRange(a.reversedRegex,i,o,r,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){let e=o.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),i=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof R?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;let o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof R?o:[e,o]:null}_findMatchingBracketUp(e,t,i){let n=e.languageId,o=e.reversedRegex,r=-1,s=0,a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return R.INSTANCE;let h=T.Vr.findPrevBracketInRange(o,t,n,a,l);if(!h)break;let d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return h;l=h.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){let i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e),s=o-1,l=r.length,h=r.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let d=!0;for(;s>=0;s--){let t=i.getLanguageId(s)===n&&!(0,E.Bu)(i.getStandardTokenType(s));if(t)d?l=i.getStartOffset(s):(l=i.getStartOffset(s),h=i.getEndOffset(s));else if(d&&l!==h){let t=a(e,r,l,h);if(t)return t}d=t}if(d&&l!==h){let t=a(e,r,l,h);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){let n=e.languageId,o=e.forwardRegex,r=1,s=0,a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return R.INSTANCE;let h=T.Vr.findNextBracketInRange(o,t,n,a,l);if(!h)break;let d=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){let i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e),s=0,l=0,h=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let d=!0;for(;s=1;e--){let t=this.textModel.tokenization.getLineTokens(e),s=t.getCount(),a=this.textModel.getLineContent(e),l=s-1,h=a.length,d=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;let e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){let i=t.getLanguageId(l);if(n!==i){if(o&&r&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t);u=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}let s=!!o&&!(0,E.Bu)(t.getStandardTokenType(l));if(s)u?h=t.getStartOffset(l):(h=t.getStartOffset(l),d=t.getEndOffset(l));else if(r&&o&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t)}u=s}if(r&&o&&u&&h!==d){let t=T.Vr.findPrevBracketInRange(o.reversedRegex,e,a,h,d);if(t)return this._toFoundBracket(r,t)}}return null}findNextBracket(e){var t;let i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;let n=this.textModel.getLineCount(),o=null,r=null,s=null;for(let e=i.lineNumber;e<=n;e++){let t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e),l=0,h=0,d=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),h=i.column-1,d=i.column-1;let e=t.getLanguageId(l);o!==e&&(o=e,r=this.languageConfigurationService.getLanguageConfiguration(o).brackets,s=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e));return t?[t.openingBracketRange,t.closingBracketRange]:null}let o=A(t),r=this.textModel.getLineCount(),s=new Map,a=[],l=(e,t)=>{if(!s.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(o&&++h%100==0&&!o())return R.INSTANCE;let s=T.Vr.findNextBracketInRange(e.forwardRegex,t,i,n,r);if(!s)break;let l=i.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),d=e.textIsBracket[l];if(d&&(d.isOpen(l)?a[d.index]++:d.isClose(l)&&a[d.index]--,-1===a[d.index]))return this._matchFoundBracket(s,d,!1,o);n=s.endColumn-1}return null},u=null,c=null;for(let e=i.lineNumber;e<=r;e++){let t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e),r=0,s=0,a=0;if(e===i.lineNumber){r=t.findTokenIndexAtOffset(i.column-1),s=i.column-1,a=i.column-1;let e=t.getLanguageId(r);u!==e&&(u=e,c=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,c))}let h=!0;for(;r!0;{let t=Date.now();return()=>Date.now()-t<=e}}class R{constructor(){this._searchCanceledBrand=void 0}}function O(e){return e instanceof R?null:e}R.INSTANCE=new R;var P=i(51945),F=i(97781);class B extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new V,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(e=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i){if(void 0===t||!this.colorizationOptions.enabled)return[];let n=[],o=this.textModel.bracketPairs.getBracketsInRange(e);for(let e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0!==e&&this.colorizationOptions.enabled?this.getDecorationsInRange(new g.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class V{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}(0,F.Ic)((e,t)=>{let i=[P.zJ,P.Vs,P.CE,P.UP,P.r0,P.m1],n=new V;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(P.ts)}; }`);let o=i.map(t=>e.getColor(t)).filter(e=>!!e).filter(e=>!e.isTransparent());for(let e=0;e<30;e++){let i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}});var W=i(95215),H=i(1516);class z{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function K(e,t,i){let n=Math.min(e.getLineCount(),1e4),o=0,r=0,s="",a=0,l=[0,0,0,0,0,0,0,0,0],h=new z;for(let d=1;d<=n;d++){let n=e.getLineLength(d),u=e.getLineContent(d),c=n<=65536,g=!1,p=0,m=0,f=0;for(let t=0;t0?o++:m>1&&r++,!function(e,t,i,n,o){let r;for(r=0,o.spacesDiff=0,o.looksLikeAlignment=!1;r0&&a>0||l>0&&h>0)return;let d=Math.abs(a-h),u=Math.abs(s-l);if(0===d){o.spacesDiff=u,u>0&&0<=l-1&&l-1{let i=l[t];i>e&&(e=i,u=t)}),4===u&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(u=2)}return{insertSpaces:d,tabSize:u}}function U(e){return(1&e.metadata)>>>0}function $(e,t){e.metadata=254&e.metadata|t<<0}function j(e){return(2&e.metadata)>>>1==1}function q(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function G(e){return(4&e.metadata)>>>2==1}function Q(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function Z(e,t){e.metadata=231&e.metadata|t<<3}function Y(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class J{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,$(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,Q(this,!1),Z(this,1),Y(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,q(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;Q(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Z(this,this.options.stickiness),Y(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}let X=new J(null,0,0);X.parent=X,X.left=X,X.right=X,$(X,0);class ee{constructor(){this.root=X,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===X?[]:function(e,t,i,n,o,r){let s=e.root,a=0,l=0,h=0,d=[],u=0;for(;s!==X;){if(j(s)){q(s.left,!1),q(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;continue}if(!j(s.left)){if(a+s.maxEndi){q(s,!0);continue}if((h=a+s.end)>=t){s.setCachedOffsets(l,h,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&G(s)&&(e=!1),e&&(d[u++]=s)}if(q(s,!0),s.right!==X&&!j(s.right)){a+=s.delta,s=s.right;continue}}return q(e.root,!1),d}(this,e,t,i,n,o)}search(e,t,i){return this.root===X?[]:function(e,t,i,n){let o=e.root,r=0,s=0,a=0,l=[],h=0;for(;o!==X;){if(j(o)){q(o.left,!1),q(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==X&&!j(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;if(t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&G(o)&&(e=!1),e&&(l[h++]=o),q(o,!0),o.right!==X&&!j(o.right)){r+=o.delta,o=o.right;continue}}return q(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root,n=[],o=0;for(;i!==X;){if(j(i)){q(i.left,!1),q(i.right,!1),i=i.parent;continue}if(i.left!==X&&!j(i.left)){i=i.left;continue}if(i.ownerId===t&&(n[o++]=i),q(i,!0),i.right!==X&&!j(i.right)){i=i.right;continue}}return q(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,i=[],n=0;for(;t!==X;){if(j(t)){q(t.left,!1),q(t.right,!1),t=t.parent;continue}if(t.left!==X&&!j(t.left)){t=t.left;continue}if(t.right!==X&&!j(t.right)){t=t.right;continue}i[n++]=t,q(t,!0)}return q(e.root,!1),i}(this)}insert(e){ei(this,e),this._normalizeDeltaIfNecessary()}delete(e){en(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){let i=e,n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;let o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){let o=function(e,t,i){let n=e.root,o=0,r=0,s=0,a=[],l=0;for(;n!==X;){if(j(n)){q(n.left,!1),q(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;continue}if(!j(n.left)){if(o+n.maxEndi){q(n,!0);continue}if((s=o+n.end)>=t&&(n.setCachedOffsets(r,s,0),a[l++]=n),q(n,!0),n.right!==X&&!j(n.right)){o+=n.delta,n=n.right;continue}}return q(e.root,!1),a}(this,e,e+t);for(let e=0,t=o.length;ei){o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),q(o,!0);continue}if(q(o,!0),o.right!==X&&!j(o.right)){r+=o.delta,o=o.right;continue}}q(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;r>>3,s=0===r||2===r,a=1===r||2===r,l=i-t,h=Math.min(l,n),d=e.start,u=!1,c=e.end,g=!1;t<=d&&c<=i&&(32&e.metadata)>>>5==1&&(e.start=t,u=!0,e.end=t,g=!0);{let e=o?1:l>0?2:0;!u&&et(d,s,t,e)&&(u=!0),!g&&et(c,a,t,e)&&(g=!0)}if(h>0&&!o){let e=l>n?2:0;!u&&et(d,s,t+h,e)&&(u=!0),!g&&et(c,a,t+h,e)&&(g=!0)}{let r=o?1:0;!u&&et(d,s,i,r)&&(e.start=t+n,u=!0),!g&&et(c,a,i,r)&&(e.end=t+n,g=!0)}let p=n-l;u||(e.start=Math.max(0,d+p)),g||(e.end=Math.max(0,c+p)),e.start>e.end&&(e.end=e.start)}(s,e,e+t,i,n),s.maxEnd=s.end,ei(this,s)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==X;){if(t.left!==X&&!j(t.left)){t=t.left;continue}if(t.right!==X&&!j(t.right)){i+=t.delta,t=t.right;continue}t.start=i+t.start,t.end=i+t.end,t.delta=0,el(t),q(t,!0),q(t.left,!1),q(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent}q(e.root,!1)}(this))}}function et(e,t,i,n){return ei)&&1!==n&&(2===n||t)}function ei(e,t){if(e.root===X)return t.parent=X,t.left=X,t.right=X,$(t,0),e.root=t,e.root;(function(e,t){let i=0,n=e.root,o=t.start,r=t.end;for(;;){var s,a;let e=(s=n.start+i,a=n.end+i,o===s?r-a:o-s);if(e<0){if(n.left===X){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===X){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=X,t.right=X,$(t,1)})(e,t),eh(t.parent);let i=t;for(;i!==e.root&&1===U(i.parent);)if(i.parent===i.parent.parent.left){let t=i.parent.parent.right;1===U(t)?($(i.parent,0),$(t,0),$(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&er(e,i=i.parent),$(i.parent,0),$(i.parent.parent,1),es(e,i.parent.parent))}else{let t=i.parent.parent.left;1===U(t)?($(i.parent,0),$(t,0),$(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&es(e,i=i.parent),$(i.parent,0),$(i.parent.parent,1),er(e,i.parent.parent))}return $(e.root,0),t}function en(e,t){let i,n,o;if(t.left===X?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===X?(i=t.left,n=t):(i=(n=function(e){for(;e.left!==X;)e=e.left;return e}(t.right)).right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root){e.root=i,$(i,0),t.detach(),eo(),el(i),e.root.parent=X;return}let r=1===U(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,$(n,U(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==X&&(n.left.parent=n),n.right!==X&&(n.right.parent=n)),t.detach(),r){eh(i.parent),n!==t&&(eh(n),eh(n.parent)),eo();return}for(eh(i),eh(i.parent),n!==t&&(eh(n),eh(n.parent));i!==e.root&&0===U(i);)i===i.parent.left?(1===U(o=i.parent.right)&&($(o,0),$(i.parent,1),er(e,i.parent),o=i.parent.right),0===U(o.left)&&0===U(o.right)?($(o,1),i=i.parent):(0===U(o.right)&&($(o.left,0),$(o,1),es(e,o),o=i.parent.right),$(o,U(i.parent)),$(i.parent,0),$(o.right,0),er(e,i.parent),i=e.root)):(1===U(o=i.parent.left)&&($(o,0),$(i.parent,1),es(e,i.parent),o=i.parent.left),0===U(o.left)&&0===U(o.right)?($(o,1),i=i.parent):(0===U(o.left)&&($(o.right,0),$(o,1),er(e,o),o=i.parent.left),$(o,U(i.parent)),$(i.parent,0),$(o.left,0),es(e,i.parent),i=e.root));$(i,0),eo()}function eo(){X.parent=X,X.delta=0,X.start=0,X.end=0}function er(e,t){let i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==X&&(i.left.parent=t),i.parent=t.parent,t.parent===X?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,el(t),el(i)}function es(e,t){let i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==X&&(i.right.parent=t),i.parent=t.parent,t.parent===X?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,el(t),el(i)}function ea(e){let t=e.end;if(e.left!==X){let i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==X){let i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function el(e){e.maxEnd=ea(e)}function eh(e){for(;e!==X;){let t=ea(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class ed{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==eu)return ec(this.right);let e=this;for(;e.parent!==eu&&e.parent.left!==e;)e=e.parent;return e.parent===eu?eu:e.parent}prev(){if(this.left!==eu)return eg(this.left);let e=this;for(;e.parent!==eu&&e.parent.right!==e;)e=e.parent;return e.parent===eu?eu:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}let eu=new ed(null,0);function ec(e){for(;e.left!==eu;)e=e.left;return e}function eg(e){for(;e.right!==eu;)e=e.right;return e}function ep(e){return e===eu?0:e.size_left+e.piece.length+ep(e.right)}function em(e){return e===eu?0:e.lf_left+e.piece.lineFeedCnt+em(e.right)}function ef(){eu.parent=eu}function e_(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==eu&&(i.left.parent=t),i.parent=t.parent,t.parent===eu?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function ev(e,t){let i=t.left;t.left=i.right,i.right!==eu&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===eu?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function eC(e,t){let i,n,o;if(i=t.left===eu?(n=t).right:t.right===eu?(n=t).left:(n=ec(t.right)).right,n===e.root){e.root=i,i.color=0,t.detach(),ef(),e.root.parent=eu;return}let r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,ey(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,ey(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==eu&&(n.left.parent=n),n.right!==eu&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,ey(e,n)),t.detach(),i.parent.left===i){let t=ep(i),n=em(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,ew(e,i.parent,o,r)}}if(ey(e,i.parent),r){ef();return}for(;i!==e.root&&0===i.color;)i===i.parent.left?(1===(o=i.parent.right).color&&(o.color=0,i.parent.color=1,e_(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,ev(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,e_(e,i.parent),i=e.root)):(1===(o=i.parent.left).color&&(o.color=0,i.parent.color=1,ev(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,e_(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,ev(e,i.parent),i=e.root));i.color=0,ef()}function eb(e,t){for(ey(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){let i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&e_(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ev(e,t.parent.parent))}else{let i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&ev(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,e_(e,t.parent.parent))}e.root.color=0}function ew(e,t,i,n){for(;t!==e.root&&t!==eu;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function ey(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=ep((t=t.parent).left)-t.size_left,n=em(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}eu.parent=eu,eu.left=eu,eu.right=eu,eu.color=0;var eS=i(77277);function eL(e){let t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}class ek{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function eN(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t(e!==eu&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class eE{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){let e=[];for(let t of i)null!==t&&e.push(t);this._cache=e}}}class eT{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new ex("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=eu,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=eN(e[t].buffer));let i=new eD(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new eE(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),i=2*t,n="",o=0,r=[];if(this.iterate(this.root,s=>{let a=this.getNodeContent(s),l=a.length;if(o<=t||o+l0){let t=n.replace(/\r\n|\r|\n/g,e);r.push(new ex(t,eN(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new eI(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==eu;)if(n.left!==eu&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;let o=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(o+t-1)}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.max(0,e=Math.floor(e));let t=this.root,i=0,n=e;for(;t!==eu;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=this.getOffsetAt(i+1,1),t=n-e;return new c.L(i+1,t+1)}return new c.L(i+1,o.remainder+1)}else{if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===eu){let t=this.getOffsetAt(i+1,1),o=n-e-t;return new c.L(i+1,o+1)}t=t.right}return new c.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==eu;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,o=>{if(o===eu)return!0;let r=o.piece,s=r.length;if(0===s)return!0;let a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,h=r.start.line,d=r.end.line,u=l[h]+r.start.column;if(n&&(10===a.charCodeAt(u)&&(u++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(h===d)return this._EOLNormalized||13!==a.charCodeAt(u+s-1)?i+=a.substr(u,s):(n=!0,i+=a.substr(u,s-1)),!0;i+=this._EOLNormalized?a.substring(u,Math.max(u,l[h+1]-this._EOLLength)):a.substring(u,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;ne+_,t.reset(0)):(c=m.buffer,p=e=>e,t.reset(_));do if(u=t.next(c)){if(p(u.index)>=v)return h;this.positionInBuffer(e,p(u.index)-f,C);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,C),r=C.line===o.line?C.column-o.column+n:C.column+1,s=r+u[0].length;if(d[h++]=(0,eS.iE)(new g.e(i+t,r,i+t,s),u,a),p(u.index)+u[0].length>=v)return h;if(h>=l)break}while(u);return h}findMatchesLineByLine(e,t,i,n){let o=[],r=0,s=new eS.sz(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder),d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,h,d,t,i,n,r,o),o;let u=e.startLineNumber,c=a.node;for(;c!==l.node;){let l=this.getLineFeedCnt(c.piece.bufferIndex,h,c.piece.end);if(l>=1){let a=this._buffers[c.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start),g=a[h.line+l],p=u===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(c,s,u,p,h,this.positionInBuffer(c,g-d),t,i,n,r,o))>=n)return o;u+=l}let d=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){let a=this.getLineContent(u).substring(d,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,d,r,o,i,n),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(u).substr(d),u,d,r,o,i,n))>=n)return o;u++,c=(a=this.nodeAt2(u,1)).node,h=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){let a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}let g=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,u,g,h,d,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){let h;let d=e.wordSeparators;if(!a&&e.simpleSearch){let t=e.simpleSearch,a=t.length,h=i.length,u=-a;for(;-1!==(u=i.indexOf(t,u+a))&&(!(!d||(0,eS.cM)(d,i,h,u,a))||(s[r++]=new v.tk(new g.e(n,u+1+o,n,u+1+a+o),null),!(r>=l))););return r}t.reset(0);do if((h=t.next(i))&&(s[r++]=(0,eS.iE)(new g.e(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),r>=l))break;while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==eu){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.length<65535){this.appendToNode(i,t),this.computeBufferMetadata();return}if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){let e=[],o=new eD(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=this.nodeCharCodeAt(i,n);if(10===e){let e={line:o.start.line+1,column:0};o=new eD(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){let o=this.nodeCharCodeAt(i,n-1);if(13===o){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let h=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e=u)l=d+1;else break;return i?(i.line=d,i.column=a-c,null):{line:d,column:a-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;let s=this._buffers[e].buffer;return 13===s.charCodeAt(r-1)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){let i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;t65535){let t=[];for(;e.length>65535;){let i;let n=e.charCodeAt(65534);13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));let o=eN(i);t.push(new eD(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new ex(i,o))}let i=eN(e);return t.push(new eD(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new ex(e,i)),t}let t=this._buffers[0].buffer.length,i=eN(e,!1),n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==eu;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substring(r,r+o-t);break}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==eu;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){let i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=this.offsetInBuffer(i.bufferIndex,t),s=this.getLineFeedCnt(i.bufferIndex,i.start,t),a=s-n,l=r-o,h=i.length+l;e.piece=new eD(i.bufferIndex,i.start,t,s,h),ew(this,e,l,a)}deleteNodeHead(e,t){let i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=this.getLineFeedCnt(i.bufferIndex,t,i.end),s=this.offsetInBuffer(i.bufferIndex,t),a=r-n,l=o-s,h=i.length+l;e.piece=new eD(i.bufferIndex,t,i.end,r,h),ew(this,e,l,a)}shrinkNode(e,t,i){let n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=this.getLineFeedCnt(n.bufferIndex,n.start,t),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new eD(n.bufferIndex,n.start,t,l,h),ew(this,e,h-s,l-a);let d=new eD(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");let i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let o=eN(t,!1);for(let e=0;ee)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==eu;)if(i.left!==eu&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==eu;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){let e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return -1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===eu||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;let r=i[n+1];return!(r>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==eu&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i;let n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};let r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new eD(e.piece.bufferIndex,e.piece.start,i,s,r),ew(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new eD(t.piece.bufferIndex,a,t.piece.end,h,l),ew(this,t,-1,-1),0===t.piece.length&&n.push(t);let d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;let p=this._doApplyEdits(a),m=null;if(t&&c.length>0){c.sort((e,t)=>t.lineNumber-e.lineNumber),m=[];for(let e=0,t=c.length;e0&&c[e-1].lineNumber===t)continue;let i=c[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.LC(n)&&m.push(t)}}return this._onDidChangeContent.fire(),new v.je(g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1,i=e[0].range,n=e[e.length-1].range,o=new g.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn),r=i.startLineNumber,s=i.startColumn,a=[];for(let i=0,n=e.length;i0&&a.push(n.text),r=o.endLineNumber,s=o.endColumn}let l=a.join(""),[h,u,c]=(0,d.Q)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:h,firstLineLength:u,lastLineLength:c,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(eA._sortOpsDescending);let t=[];for(let i=0;i0){let e=h.eolCount+1;l=1===e?new g.e(s,a,s,a+h.firstLineLength):new g.e(s,a,s+e-1,h.lastLineLength+1)}else l=new g.e(s,a,s,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=h}return t}static _sortOpsAscending(e,t){let i=g.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=g.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class eR{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){let t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){let t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,r=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}let a=new ek(eL(e),n,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new ex(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=l.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.ab(e))}finish(e=!0){return this._finish(),new eR(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=eN(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var eP=i(270),eF=i(94954),eB=i(77378),eV=i(43155),eW=i(276),eH=i(84013);class ez{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class eK{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){let i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new ez(e,[t]))}finalize(){return this._tokens}}var eU=i(15393),e$=i(1432);class ej{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;let i=[];for(let e=0;e{let t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){let t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;let n=this._tokenizeOneInvalidLine(t);if(n>=e)break}while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}tokenizeViewport(e,t){let i=new eK;this._tokenizeViewport(i,e,t),this._tokenizationPart.setTokens(i.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(e){let t=new eK;this._updateTokensUntilLine(t,e),this._tokenizationPart.setTokens(t.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);let i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;let n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),r=o.substring(0,e.column-1)+t+o.substring(e.column-1),s=eQ(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),a=new eB.A(s.tokens,r,this._languageIdCodec);if(0===a.getCount())return 0;let l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){let n=e.lineNumber,o=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);let r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;let s=this._textModel.getLineContent(n),a=s.substring(0,o-1)+i+s.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),h=eQ(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,r),d=new eB.A(h.tokens,a,this._languageIdCodec);return d}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;let t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&!!(ethis._textModel.getLineLength(e))}_hasLinesToTokenize(){return!!this._tokenizationStateStore&&this._tokenizationStateStore.invalidLineStartIndex=this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;let t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;let i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),o=t-1;for(let t=this._tokenizationStateStore.invalidLineStartIndex;t<=o;t++){let o=this._textModel.getLineContent(t+1),r=this._tokenizationStateStore.getBeginState(t),s=eQ(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,o,!0,r);e.add(t+1,s.tokens),this._tokenizationStateStore.setEndState(n,t,s.endState),t=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t),o=[],r=null;for(let e=t-1;n>1&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--){let t=eQ(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a);a=t.endState}for(let n=t;n<=i;n++){let t=this._textModel.getLineContent(n),i=eQ(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function eQ(e,t,i,n,o,s){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,s.clone())}catch(e){(0,r.dL)(e)}return a||(a=(0,eW.Dy)(e.encodeLanguageId(t),s)),eB.A.convertToEndOffset(a.tokens,n.length),a}let eZ=new Uint32Array(0).buffer;class eY{static deleteBeginning(e,t){return null===e||e===eZ?e:eY.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===eZ)return e;let i=eJ(e),n=i[i.length-2];return eY.delete(e,t,n)}static delete(e,t,i){let n,o;if(null===e||e===eZ||t===i)return e;let r=eJ(e),s=r.length>>>1;if(0===t&&r[r.length-2]===i)return eZ;let a=eB.A.findIndexInTokensArray(r,t),l=a>0?r[a-1<<1]:0,h=r[a<<1];if(io&&(r[n++]=t,r[n++]=r[(e<<1)+1],o=t)}if(n===r.length)return e;let u=new Uint32Array(n);return u.set(r.subarray(0,n),0),u.buffer}static append(e,t){if(t===eZ)return e;if(e===eZ)return t;if(null===e)return e;if(null===t)return null;let i=eJ(e),n=eJ(t),o=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length,a=i[i.length-2];for(let e=0;e>>1,r=eB.A.findIndexInTokensArray(n,t);if(r>0){let e=n[r-1<<1];e===t&&r--}for(let e=r;e1&&(t=eX.N.getLanguageId(n[1])!==e),!t)return eZ}if(!n||0===n.length){let i=new Uint32Array(2);return i[0]=t,i[1]=e1(e),i.buffer}return(n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength)?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=eY.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=eY.deleteEnding(this._lineTokens[t],e.startColumn-1);let i=e.endLineNumber-1,n=null;i=this._len)){if(0===t){this._lineTokens[n]=eY.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=eY.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=eY.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}}function e1(e){return(e<<0|33588224)>>>0}class e2{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){let n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}let[r,s]=n.split(i);if(r.isEmpty()){o=o||{index:e};continue}s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;let i=this._pieces;if(0===i.length)return t;let n=e2._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;let r=t.getCount(),s=o.getCount(),a=0,l=[],h=0,d=0,u=(e,t)=>{e!==d&&(d=e,l[h++]=e,l[h++]=t)};for(let e=0;e>>0,h=~l>>>0;for(;at)n=o-1;else{for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}}return i}acceptEdit(e,t,i,n,o){for(let r of this._pieces)r.acceptEdit(e,t,i,n,o)}}class e5 extends eF.U{constructor(e,t,i,n,o){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this.bracketPairsTextModelPart=n,this._languageId=o,this._onDidChangeLanguage=this._register(new s.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new s.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new s.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new s.Q5),this._tokens=new e0(this._languageService.languageIdCodec),this._semanticTokens=new e2(this._languageService.languageIdCodec),this._tokenization=new eG(i,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}acceptEdit(e,t,i,n,o){this._tokens.acceptEdit(e,i,n),this._semanticTokens.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(e){this._tokenization.handleDidChangeContent(e)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;let t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setTokens(e,t=!1){if(0!==e.length){let t=[];for(let i=0,n=e.length;i0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;let i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._textModel.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this._textModel.getLineCount())throw Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this._textModel.getLineCount())throw Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){let t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getTokenTypeIfInsertingCharacter(e,t,i){let n=this._textModel.validatePosition(new c.L(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){let n=this._textModel.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(e){this.assertNotDisposed();let t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[r,s]=e5._findLanguageBoundaries(n,o),a=(0,eP.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){let[r,s]=e5._findLanguageBoundaries(n,o-1),a=(0,eP.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){let i=e.getLanguageId(t),n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,r=e.getCount();n0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}let te=()=>{throw Error("Invalid change accessor")},tt=class e extends a.JT{constructor(t,i,n,o=null,r,a,d){super(),this._undoRedoService=r,this._languageService=a,this._languageConfigurationService=d,this._onWillDispose=this._register(new s.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new tg(e=>this.handleBeforeFireDecorationsChangedEvent(e))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new s.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new s.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new s.Q5),this._eventEmitter=this._register(new tp),this._deltaDecorationCallCnt=0,e6++,this.id="$model"+e6,this.isForSimpleWidget=n.isForSimpleWidget,null==o?this._associatedResource=h.o.parse("inmemory://model/"+e6):this._associatedResource=o,this._attachedEditorCount=0;let{textBuffer:u,disposable:c}=e7(t,n.defaultEOL);this._buffer=u,this._bufferDisposable=c,this._options=e.resolveOptions(this._buffer,n),this._bracketPairs=this._register(new M(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new H.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new B(this)),this._tokenizationTextModelPart=new e5(this._languageService,this._languageConfigurationService,this,this._bracketPairs,i);let p=this._buffer.getLineCount(),m=this._buffer.getValueLengthInRange(new g.e(1,1,p,this._buffer.getLineLength(p)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=m>e.LARGE_FILE_SIZE_THRESHOLD||p>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=m>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.PJ(e6),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new to,this._commandManager=new W.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){let i=K(e,t.tabSize,t.insertSpaces);return new v.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;let e=new eA([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new e4.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;let{textBuffer:t,disposable:i}=e7(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new to,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new e4.dQ([new e4.Jx],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();let t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;let i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new e4.dQ([new e4.CZ],this._versionId,!1,!1),this._createContentChanged2(new g.e(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){let e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0,i=this._buffer.getLineCount();for(let n=1;n<=i;n++){let i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,s=new v.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:r});if(this._options.equals(s))return;let a=this._options.createChangeEvent(s);this._options=s,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();let i=K(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,u.x)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){let t=this.findMatches(l.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(e=>({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new e8(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();let i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){let t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn,o=Math.floor("number"!=typeof i||isNaN(i)?1:i),r=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{let e=this.getLineMaxColumn(o);r>=e&&(r=e)}let s=e.endLineNumber,a=e.endColumn,l=Math.floor("number"!=typeof s||isNaN(s)?1:s),h=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{let e=this.getLineMaxColumn(l);h>=e&&(h=e)}return i===o&&n===r&&s===l&&a===h&&e instanceof g.e&&!(e instanceof p.Y)?e:new g.e(o,r,l,h)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t||isNaN(e)||isNaN(t)||e<1||t<1||(0|e)!==e||(0|t)!==t)return!1;let n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;let o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===i){let i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){let n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new c.L(1,1);if(n>r)return new c.L(r,this.getLineMaxColumn(r));if(o<=1)return new c.L(n,1);let s=this.getLineMaxColumn(n);if(o>=s)return new c.L(n,s);if(1===i){let e=this._buffer.getLineCharCode(n,o-2);if(l.ZG(e))return new c.L(n,o-1)}return new c.L(n,o)}validatePosition(e){return(this._assertNotDisposed(),e instanceof c.L&&this._isValidPosition(e.lineNumber,e.column,1))?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(o,r,0))return!1;if(1===t){let e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,s=l.ZG(e),a=l.ZG(t);return!s&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof g.e&&!(e instanceof p.Y)&&this._isValidRange(e,1))return e;let t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,r=i.lineNumber,s=i.column;{let e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===r&&o===s?new g.e(n,o-1,r,s-1):i&&a?new g.e(n,o-1,r,s+1):i?new g.e(n,o-1,r,s):new g.e(n,o,r,s+1):new g.e(n,o,r,s)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();let e=this.getLineCount();return new g.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,s=999){let a;this._assertNotDisposed();let l=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>g.e.isIRange(e))&&(l=t.map(e=>this.validateRange(e)))),null===l&&(l=[this.getFullModelRange()]),l=l.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);let h=[];if(h.push(l.reduce((e,t)=>g.e.areIntersecting(e,t)?e.plusRange(t):(h.push(e),t))),!i&&0>e.indexOf("\n")){let t=new eS.bc(e,i,n,o),l=t.parseSearchRequest();if(!l)return[];a=e=>this.findMatchesLineByLine(e,l,r,s)}else a=t=>eS.pM.findMatches(this,new eS.bc(e,i,n,o),t,r,s);return h.map(a).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();let s=this.validatePosition(t);if(!i&&0>e.indexOf("\n")){let t=new eS.bc(e,i,n,o),a=t.parseSearchRequest();if(!a)return null;let l=this.getLineCount(),h=new g.e(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(h,a,r,1);return(eS.pM.findNextMatch(this,new eS.bc(e,i,n,o),s,r),d.length>0)?d[0]:(h=new g.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(h,a,r,1)).length>0)?d[0]:null}return eS.pM.findNextMatch(this,new eS.bc(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();let s=this.validatePosition(t);return eS.pM.findPreviousMatch(this,new eS.bc(e,i,n,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){let t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Qi?e:new v.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){let t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})),n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){let e=new g.e(n,1,n,o);t.push(new v.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){let o=e.map(e=>{let t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){let o=e.map(e=>{let t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}});this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();let i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){let i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){let i=l+t,n=m+t;C.takeFromEndWhile(e=>e.lineNumber>n);let o=C.takeFromEndWhile(e=>e.lineNumber===n);e.push(new e4.rU(i,this.getLineContent(n),o))}if(ge.lineNumbere.lineNumber===t)}e.push(new e4.Tx(o+1,l+a,u,d))}t+=p}this._emitContentChangedEvent(new e4.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;let t=Array.from(e),i=t.map(e=>new e4.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e)));this._onDidChangeInjectedText.fire(new e4.D8(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,tc(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},n=null;try{n=t(i)}catch(e){(0,r.dL)(e)}return i.addDecoration=te,i.changeDecoration=te,i.changeDecorationOptions=te,i.removeDecoration=te,i.deltaDecorations=te,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,r.dL)(Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){let n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:tu[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;let o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions(tu[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;let t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1){let r=this.getLineCount(),s=Math.min(r,Math.max(1,t)),a=this.getLineMaxColumn(s),l=new g.e(Math.min(r,Math.max(1,e)),1,s,a),h=this._getDecorationsInRange(l,i,o);return(0,n.vA)(h,this._decorationProvider.getDecorationsInRange(l,i,o)),h}getDecorationsInRange(e,t=0,i=!1){let o=this.validateRange(e),r=this._getDecorationsInRange(o,t,i);return(0,n.vA)(r,this._decorationProvider.getDecorationsInRange(o,t,i)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){let t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return e4.gk.fromDecorations(n).filter(t=>t.lineNumber===e)}getAllDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!1).concat(this._decorationProvider.getAllDecorations(e,t))}_getDecorationsInRange(e,t,i){let n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){let i=this._decorations[e];if(!i)return;if(i.options.after){let t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){let t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}let n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){let i=this._decorations[e];if(!i)return;let n=!!i.options.overviewRuler&&!!i.options.overviewRuler.color,o=!!t.overviewRuler&&!!t.overviewRuler.color;if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){let e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){let e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){let n=this.getVersionId(),o=t.length,r=0,s=i.length,a=0,l=Array(s);for(;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([e9(4,e3.tJ),e9(5,f.O),e9(6,_.c_)],tt);class to{constructor(){this._decorationsTree0=new ee,this._decorationsTree1=new ee,this._injectedTextDecorationsTree=new ee}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(let i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o){let r=e.getVersionId(),s=this._intervalSearch(t,i,n,o,r);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,i,n,o){let r=this._decorationsTree0.intervalSearch(e,t,i,n,o),s=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return r.concat(s).concat(a)}getInjectedTextInInterval(e,t,i,n){let o=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);return this._ensureNodesHaveRanges(e,r).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAllInjectedText(e,t){let i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAll(e,t,i,n){let o=e.getVersionId(),r=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{let i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),r=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(r)}}collectNodesFromOwner(e){let t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){let e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){tn(e)?this._injectedTextDecorationsTree.insert(e):ti(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){tn(e)?this._injectedTextDecorationsTree.delete(e):ti(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){let i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){tn(e)?this._injectedTextDecorationsTree.resolveNode(e,t):ti(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function tr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class ts{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class ta extends ts{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:v.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class tl extends ts{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?o.Il.fromHex(e):t.getColor(e.id)}}class th{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof th?e:new th(e)}}class td{constructor(e){var t,i;this.description=e.description,this.blockClassName=e.blockClassName?tr(e.blockClassName):null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?tr(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new ta(e.overviewRuler):null,this.minimap=e.minimap?new tl(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?tr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?tr(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?tr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?tr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?tr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?tr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?tr(e.afterContentClassName):null,this.after=e.after?th.from(e.after):null,this.before=e.before?th.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new td(e)}static createDynamic(e){return new td(e)}}td.EMPTY=td.register({description:"empty"});let tu=[td.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),td.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),td.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),td.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function tc(e){return e instanceof td?e:td.createDynamic(e)}class tg extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new s.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);let e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!e.minimap&&!!e.minimap.position),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!e.overviewRuler&&!!e.overviewRuler.color),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class tp extends a.JT{constructor(){super(),this._fastEmitter=this._register(new s.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new s.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;let t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}},94954:function(e,t,i){"use strict";i.d(t,{U:function(){return o}});var n=i(9917);class o extends n.JT{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw Error("TextModelPart is disposed!")}}},77277:function(e,t,i){"use strict";i.d(t,{bc:function(){return l},cM:function(){return c},iE:function(){return h},pM:function(){return u},sz:function(){return g}});var n=i(97295),o=i(24929),r=i(50187),s=i(24314),a=i(84973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){let e;if(""===this.searchString)return null;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;let n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}function h(e,t,i){if(!i)return new a.tk(e,null);let n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class u{static findMatches(e,t,i,n,o){let r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new g(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l;let h=0;if(n?(h=n.findLineFeedCountBeforeOffset(o),a=t+o+h):a=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length),t=e-h;l=a+r.length+t}else l=a+r.length;let d=e.getPositionAt(a),u=e.getPositionAt(l);return new s.e(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,o){let r;let s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new d(a):null,u=[],c=0;for(i.reset(0);(r=i.next(a))&&(u[c++]=h(this._getMultilineMatchRange(e,s,a,l,r.index,r[0]),r,n),!(c>=o)););return u}static _doFindMatchesLineByLine(e,t,i,n,o){let r=[],s=0;if(t.startLineNumber===t.endLineNumber){let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let a=t.startLineNumber+1;a=d))););return o}let m=new g(e.wordSeparators,e.regex);m.reset(0);do if((u=m.next(t))&&(r[o++]=h(new s.e(i,u.index+1+n,i,u.index+1+u[0].length+n),u,l),o>=d))break;while(u);return o}static findNextMatch(e,t,i,n){let o=t.parseSearchRequest();if(!o)return null;let r=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){let o=new r.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),u=e.getValueInRange(new s.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),c="\r\n"===e.getEOL()?new d(u):null;i.reset(t.column-1);let g=i.next(u);return g?h(this._getMultilineMatchRange(e,a,u,c,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new r.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){let o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let t=1;t<=o;t++){let s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);let r=e.next(t);return r?h(new s.e(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){let o=t.parseSearchRequest();if(!o)return null;let r=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){let o=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];let a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new r.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){let o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let t=1;t<=o;t++){let s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=h(new s.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function c(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;let r=t.charCodeAt(n-1);if(0!==e.get(r)||13===r||10===r)return!0;if(o>0){let i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;let r=t.charCodeAt(n+o);if(0!==e.get(r)||13===r||10===r)return!0;if(o>0){let i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t;let i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||!(t=this._searchRegex.exec(e)))break;let o=t.index,r=t[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){n.ZH(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}break}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||c(this._wordSeparators,e,i,o,r))return t}while(t);return null}}},59616:function(e,t,i){"use strict";function n(e,t){let i=0,n=0,o=e.length;for(;n0?i[0]:[]}(e,t),s=yield Promise.all(r.map(e=>p(this,void 0,void 0,function*(){let r;let s=null;try{r=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){s=e,r=null}return r&&(m(r)||f(r))||(r=null),new _(e,r,s)})));for(let e of s){if(e.error)throw e.error;if(e.tokens)return e}return s.length>0?s[0]:null})}class b{constructor(e,t){this.provider=e,this.tokens=t}}function w(e,t){return e.has(t)}function y(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}function S(e,t,i,n){return p(this,void 0,void 0,function*(){let r=y(e,t),s=yield Promise.all(r.map(e=>p(this,void 0,void 0,function*(){let r;try{r=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.Cp)(e),r=null}return r&&m(r)||(r=null),new b(e,r)})));for(let e of s)if(e.tokens)return e;return s.length>0?s[0]:null})}a.P0.registerCommand("_provideDocumentSemanticTokensLegend",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i]=t;(0,l.p_)(i instanceof r.o);let n=e.get(s.q).getModel(i);if(!n)return;let{documentSemanticTokensProvider:o}=e.get(g.p),h=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return h?h[0].getLegend():e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.P0.registerCommand("_provideDocumentSemanticTokens",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i]=t;(0,l.p_)(i instanceof r.o);let o=e.get(s.q).getModel(i);if(!o)return;let{documentSemanticTokensProvider:h}=e.get(g.p);if(!v(h,o))return e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());let d=yield C(h,o,null,null,n.T.None);if(!d)return;let{provider:c,tokens:p}=d;if(!p||!m(p))return;let f=u({id:0,type:"full",data:p.data});return p.resultId&&c.releaseDocumentSemanticTokens(p.resultId),f})),a.P0.registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i,o]=t;(0,l.p_)(i instanceof r.o);let a=e.get(s.q).getModel(i);if(!a)return;let{documentRangeSemanticTokensProvider:h}=e.get(g.p),d=y(h,a);if(0===d.length)return;if(1===d.length)return d[0].getLegend();if(!o||!c.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),d[0].getLegend();let u=yield S(h,a,c.e.lift(o),n.T.None);if(u)return u.provider.getLegend()})),a.P0.registerCommand("_provideDocumentRangeSemanticTokens",(e,...t)=>p(void 0,void 0,void 0,function*(){let[i,o]=t;(0,l.p_)(i instanceof r.o),(0,l.p_)(c.e.isIRange(o));let a=e.get(s.q).getModel(i);if(!a)return;let{documentRangeSemanticTokensProvider:h}=e.get(g.p),d=yield S(h,a,c.e.lift(o),n.T.None);if(d&&d.tokens)return u({id:0,type:"full",data:d.tokens.data})}))},88191:function(e,t,i){"use strict";i.d(t,{A:function(){return c}});var n,o,r=i(89954),s=i(43702),a=i(59870),l=i(65026),h=i(72065),d=i(43557),u=i(50988);let c=(0,h.yh)("ILanguageFeatureDebounceService");!function(e){let t=new WeakMap,i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(o||(o={}));class g{constructor(e,t,i,n,o,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=r,this._cache=new s.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((e,t)=>(0,r.SP)(o.of(t),e),0)}get(e){let t=this._key(e),i=this._cache.get(t);return i?(0,a.uZ)(i.value,this._min,this._max):this.default()}update(e,t){let i=this._key(e),n=this._cache.get(i);n||(n=new a.N(6),this._cache.set(i,n));let o=(0,a.uZ)(n.update(t),this._min,this._max);return(0,u.xn)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){let e=new a.nM;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=0|this._overall()||this._default;return(0,a.uZ)(e,this._min,this._max)}}let p=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,r,s;let a=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,l=null!==(r=null==i?void 0:i.max)&&void 0!==r?r:Math.pow(a,2),h=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${o.of(e)},${a}${h?","+h:""}`,u=this._data.get(d);return u||(u=new g(this._logService,t,e,0|this._overallAverage()||1.5*a,a,l),this._data.set(d,u)),u}_overallAverage(){let e=new a.nM;for(let t of this._data.values())e.update(t.default());return e.value}};p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=d.VZ,function(e,t){n(e,t,0)})],p),(0,l.z)(c,p,!0)},71922:function(e,t,i){"use strict";i.d(t,{p:function(){return o}});var n=i(72065);let o=(0,n.yh)("ILanguageFeaturesService")},36357:function(e,t,i){"use strict";i.d(t,{i:function(){return o}});var n=i(72065);let o=(0,n.yh)("markerDecorationsService")},73733:function(e,t,i){"use strict";i.d(t,{q:function(){return o}});var n=i(72065);let o=(0,n.yh)("modelService")},51200:function(e,t,i){"use strict";i.d(t,{b$:function(){return P},e3:function(){return F},tw:function(){return B}});var n=i(4669),o=i(9917),r=i(1432),s=i(17301),a=i(22529),l=i(22075),h=i(68801),d=i(72042),u=i(73733),c=i(71765),g=i(33108),p=i(15393),m=i(71050),f=i(97781),_=i(43557),v=i(64862),C=i(89954),b=i(95215),w=i(66663),y=i(68997),S=i(32670),L=i(36248),k=i(4256),N=i(88191),D=i(84013),x=i(71922),I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},E=function(e,t){return function(i,n){t(i,n,e)}};function T(e){return e.toString()}function M(e){let t;let i=new C.yP,n=e.createSnapshot();for(;t=n.read();)i.update(t);return i.digest()}class A{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>i(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageId)),this.model.setMode(e.languageId)}}let R=r.IJ||r.dz?1:2;class O{constructor(e,t,i,n,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let P=class e extends o.JT{constructor(e,t,i,o,r,s,a,l,h){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new W(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new V(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,h))}static _readModelOptions(e,t){var i;let n=l.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){let t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){let t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let r=l.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&!!e.editor.insertSpaces);let s=R,a=e.eol;"\r\n"===a?s=2:"\n"===a&&(s=1);let h=l.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(h="false"!==e.editor.trimAutoWhitespace&&!!e.editor.trimAutoWhitespace);let d=l.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&!!e.editor.detectIndentation);let u=l.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(u="false"!==e.editor.largeFileOptimizations&&!!e.editor.largeFileOptimizations);let c=l.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:r,detectIndentation:d,defaultEOL:s,trimAutoWhitespace:h,largeFileOptimizations:u,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);let i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){let e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){let r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){let t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);let i=Object.keys(this._models);for(let n=0,o=i.length;ne){let t=[];for(this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);t.length>0&&this._disposedModelsHeapSize>e;){let e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){let o=this.getCreationOptions(t,i,n),r=new a.yO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(T(i))){let e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=M(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(let e of t.past)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);for(let e of t.future)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,e=>(0,b.e9)(e)&&e.matchesResource(i)),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}let s=T(r.uri);if(this._models[s])throw Error("ModelService: Cannot add model because it already exists!");let l=new A(r,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[s]=l,l}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,h.bd,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;let i=this._models[T(e.uri)];i&&i.setLanguage(t)}getModels(){let e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(let i of e.past)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(let i of e.future)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}let a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r){if(!o&&s>a){let e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,e=>(0,b.e9)(e)&&e.matchesResource(t.uri)),this._insertDisposedModel(new O(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,M(t),t.getVersionId(),t.getAlternativeVersionId()))}else if(!o){let e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){let n=i.oldLanguage,o=t.getLanguageId(),r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};P.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,P=I([E(0,g.Ui),E(1,c.y),E(2,f.XE),E(3,_.VZ),E(4,v.tJ),E(5,d.O),E(6,k.c_),E(7,N.A),E(8,x.p)],P);let F="editor.semanticHighlighting";function B(e,t,i){var n;let o=null===(n=i.getValue(F,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let V=class extends o.JT{constructor(e,t,i,n,o,r){super(),this._watchers=Object.create(null),this._semanticStyling=e;let s=e=>{this._watchers[e.uri.toString()]=new z(e,this._semanticStyling,i,o,r)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(let e of t.getModels()){let t=this._watchers[e.uri.toString()];B(e,i,n)?t||s(e):t&&a(e,t)}};this._register(t.onModelAdded(e=>{B(e,i,n)&&s(e)})),this._register(t.onModelRemoved(e=>{let t=this._watchers[e.uri.toString()];t&&a(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(F)&&l()})),this._register(i.onDidColorThemeChange(l))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};V=I([E(1,u.q),E(2,f.XE),E(3,g.Ui),E(4,N.A),E(5,x.p)],V);class W extends o.JT{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new y.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class H{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let z=class e extends o.JT{constructor(t,i,n,r,s){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new p.pY(()=>this._fetchDocumentSemanticTokensNow(),e.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let a=()=>{for(let e of((0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._provider.all(t)))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};a(),this._register(this._provider.onDidChange(()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.Jc)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}let e=new m.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,S.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;let o=[],r=this._model.onDidChangeContent(e=>{o.push(e)}),a=new D.G(!1);n.then(e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){let{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)},e=>{let t=e&&(s.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"));t||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let r=0;r{o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){t&&i&&t.releaseDocumentSemanticTokens(i.resultId);return}if(!t||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!i){this._model.tokenization.setSemanticTokens(null,!0),s();return}if((0,S.Vj)(i)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(0===i.edits.length)i={resultId:i.resultId,data:r.data};else{let t=0;for(let e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;let o=r.data,s=new Uint32Array(o.length+t),a=o.length,l=s.length;for(let t=i.edits.length-1;t>=0;t--){let h=i.edits[t];if(h.start>o.length){n.warnInvalidEditStart(r.resultId,i.resultId,t,h.start,o.length),this._model.tokenization.setSemanticTokens(null,!0);return}let d=a-(h.start+h.deleteCount);d>0&&(e._copy(o,a-d,s,l-d,d),l-=d),h.data&&(e._copy(h.data,0,s,l-h.data.length,h.data.length),l-=h.data.length),a=h.start}a>0&&e._copy(o,0,s,0,a),i={resultId:i.resultId,data:s}}}if((0,S.Vl)(i)){this._currentDocumentResponse=new H(t,i.resultId,i.data);let e=(0,y.h)(i,n,this._model.getLanguageId());if(o.length>0)for(let t of o)for(let i of e)for(let e of t.changes)i.applyEdit(e.range,e.text);this._model.tokenization.setSemanticTokens(e,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};z.REQUEST_MIN_DELAY=300,z.REQUEST_MAX_DELAY=2e3,z=I([E(2,f.XE),E(3,N.A),E(4,x.p)],z)},88216:function(e,t,i){"use strict";i.d(t,{S:function(){return o}});var n=i(72065);let o=(0,n.yh)("textModelService")},68997:function(e,t,i){"use strict";i.d(t,{$:function(){return p},h:function(){return m}});var n=i(45797),o=i(97781),r=i(43557),s=i(50187),a=i(24314),l=i(23795);class h{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new h(e,new d(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){let e=this._tokens.getRange();return e?new a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new h(this._startLineNumber,n),new h(this._startLineNumber+r,o)]}applyEdit(e,t){let[i,n,o]=(0,l.Q)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new s.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;let t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){let e=i-t;this._startLineNumber-=e;return}let n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){let n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;let r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}let s=this._tokens.getMaxDeltaLine();r>=s+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;ie)i=n-1;else{let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=n;for(;re||d===e&&c>=t)&&(de||d===e&&g>=t){if(do?p-=o-i:p=i;else if(c===t&&g===i){if(c===n&&p>o)p-=o-i;else{h=!0;continue}}else if(co)p=c===t?(g=i)+(p-o):(g=0)+(p-o);else{h=!0;continue}}else if(c>n){if(0===a&&!h){l=s;break}c-=a}else if(c===n&&g>=o)e&&0===c&&(g+=e,p+=e),c-=a,g-=o-i,p-=o-i;else throw Error("Not possible!");let f=4*l;r[f]=c,r[f+1]=g,r[f+2]=p,r[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){let s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r0&&t>=1;e>0&&this._logService.getLevel()===r.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));let n=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(void 0===n)o=2147483647;else{if(o=0,void 0!==n.italic){let e=(n.italic?1:0)<<11;o|=1|e}if(void 0!==n.bold){let e=(n.bold?2:0)<<11;o|=2|e}if(void 0!==n.underline){let e=(n.underline?4:0)<<11;o|=4|e}if(void 0!==n.strikethrough){let e=(n.strikethrough?8:0)<<11;o|=8|e}if(n.foreground){let e=n.foreground<<15;o|=16|e}0===o&&(o=2147483647)}}else this._logService.getLevel()===r.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,a="not-in-legend";this._hashTable.add(e,t,s,o),this._logService.getLevel()===r.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${n.N.getForeground(o)}, fontStyle ${n.N.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function m(e,t,i){let n=e.data,o=e.data.length/5|0,r=Math.max(Math.ceil(o/1024),400),s=[],a=0,l=1,d=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=u;for(;e+1h)t.warnOverlappingSemanticTokens(s,h+1);else{let e=t.getMetadata(v,C,i);2147483647!==e&&(0===p&&(p=s),c[g]=s-p,c[g+1]=h,c[g+2]=_,c[g+3]=e,g+=4,m=s,f=_)}l=s,d=h,a++}g!==c.length&&(c=c.subarray(0,g));let _=h.create(p,c);s.push(_)}return s}p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,o.XE),g(2,c.O),g(3,r.VZ)],p);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class _{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i=this._growCount){let e=this._elements;for(let t of(this._currentLengthIndex++,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength),e)){let e=t;for(;e;){let t=e.next;e.next=null,this._add(e),e=t}}}this._add(new f(e,t,i,n))}_add(e){let t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}_._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},71765:function(e,t,i){"use strict";i.d(t,{V:function(){return o},y:function(){return r}});var n=i(72065);let o=(0,n.yh)("textResourceConfigurationService"),r=(0,n.yh)("textResourcePropertiesService")},31446:function(e,t,i){"use strict";i.d(t,{a:function(){return l}});var n=i(24314),o=i(77277),r=i(97295),s=i(98401),a=i(270);class l{static computeUnicodeHighlights(e,t,i){let l,d;let u=i?i.startLineNumber:1,c=i?i.endLineNumber:e.getLineCount(),g=new h(t),p=g.getCandidateCodePoints();l="allNonBasicAscii"===p?RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):RegExp(`${function(e,t){let i=`[${r.ec(e.map(e=>String.fromCodePoint(e)).join(""))}]`;return i}(Array.from(p))}`,"g");let m=new o.sz(null,l),f=[],_=!1,v=0,C=0,b=0;t:for(let t=u;t<=c;t++){let i=e.getLineContent(t),o=i.length;m.reset(0);do if(d=m.next(i)){let e=d.index,l=d.index+d[0].length;if(e>0){let t=i.charCodeAt(e-1);r.ZG(t)&&e--}if(l+1=1e3){_=!0;break t}f.push(new n.e(t,e+1,t,l+1))}}while(d)}return{ranges:f,hasMore:_,ambiguousCharacterCount:v,invisibleCharacterCount:C,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,t){let i=new h(t),n=i.shouldHighlightNonBasicASCII(e,null);switch(n){case 0:return null;case 2:return{kind:1};case 3:{let n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),s=r.ZK.getLocales().filter(e=>!r.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class h{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=r.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let t of r.vU.codePoints)d(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(let e of t){let t=e.codePointAt(0),i=r.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||r.vU.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!d(e)&&r.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function d(e){return" "===e||"\n"===e||" "===e}},20913:function(e,t,i){"use strict";i.d(t,{B8:function(){return g},Oe:function(){return a},UX:function(){return u},aq:function(){return c},iN:function(){return m},ld:function(){return d},qq:function(){return h},ug:function(){return l},xi:function(){return p}});var n,o,r,s,a,l,h,d,u,c,g,p,m,f=i(63580);(n=a||(a={})).noSelection=f.NC("noSelection","No selection"),n.singleSelectionRange=f.NC("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),n.singleSelection=f.NC("singleSelection","Line {0}, Column {1}"),n.multiSelectionRange=f.NC("multiSelectionRange","{0} selections ({1} characters selected)"),n.multiSelection=f.NC("multiSelection","{0} selections"),n.emergencyConfOn=f.NC("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),n.openingDocs=f.NC("openingDocs","Now opening the Editor Accessibility documentation page."),n.readonlyDiffEditor=f.NC("readonlyDiffEditor"," in a read-only pane of a diff editor."),n.editableDiffEditor=f.NC("editableDiffEditor"," in a pane of a diff editor."),n.readonlyEditor=f.NC("readonlyEditor"," in a read-only code editor"),n.editableEditor=f.NC("editableEditor"," in a code editor"),n.changeConfigToOnMac=f.NC("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),n.changeConfigToOnWinLinux=f.NC("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),n.auto_on=f.NC("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),n.auto_off=f.NC("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),n.tabFocusModeOnMsg=f.NC("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),n.tabFocusModeOnMsgNoKb=f.NC("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),n.tabFocusModeOffMsg=f.NC("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),n.tabFocusModeOffMsgNoKb=f.NC("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),n.openDocMac=f.NC("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),n.openDocWinLinux=f.NC("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),n.outroMsg=f.NC("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),n.showAccessibilityHelpAction=f.NC("showAccessibilityHelpAction","Show Accessibility Help"),(l||(l={})).inspectTokensAction=f.NC("inspectTokens","Developer: Inspect Tokens"),(h||(h={})).gotoLineActionLabel=f.NC("gotoLineActionLabel","Go to Line/Column..."),(d||(d={})).helpQuickAccessActionLabel=f.NC("helpQuickAccess","Show all Quick Access Providers"),(o=u||(u={})).quickCommandActionLabel=f.NC("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=f.NC("quickCommandActionHelp","Show And Run Commands"),(r=c||(c={})).quickOutlineActionLabel=f.NC("quickOutlineActionLabel","Go to Symbol..."),r.quickOutlineByCategoryActionLabel=f.NC("quickOutlineByCategoryActionLabel","Go to Symbol by Category..."),(s=g||(g={})).editorViewAccessibleLabel=f.NC("editorViewAccessibleLabel","Editor content"),s.accessibilityHelpMessage=f.NC("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options."),(p||(p={})).toggleHighContrast=f.NC("toggleHighContrast","Toggle High Contrast Theme"),(m||(m={})).bulkEditServiceSummary=f.NC("bulkEditServiceSummary","Made {0} edits in {1} files")},70902:function(e,t,i){"use strict";var n,o,r,s,a,l,h,d,u,c,g,p,m,f,_,v,C,b,w,y,S,L,k,N,D,x,I,E,T,M,A,R,O,P,F,B,V,W,H,z,K,U,$,j,q,G,Q,Z,Y,J,X,ee,et,ei,en,eo,er,es,ea,el,eh,ed,eu,ec,eg,ep,em,ef,e_,ev,eC,eb,ew,ey,eS,eL;i.d(t,{E$:function(){return N},F5:function(){return L},Ij:function(){return l},In:function(){return F},Lu:function(){return I},MG:function(){return k},MY:function(){return c},OI:function(){return V},RM:function(){return v},VD:function(){return w},Vi:function(){return d},WW:function(){return R},ZL:function(){return y},_x:function(){return u},a$:function(){return A},a7:function(){return r},ao:function(){return n},bw:function(){return b},cR:function(){return O},cm:function(){return s},d2:function(){return B},eB:function(){return S},g4:function(){return T},g_:function(){return M},gl:function(){return C},gm:function(){return m},jl:function(){return f},np:function(){return o},py:function(){return x},r3:function(){return h},r4:function(){return P},rf:function(){return g},sh:function(){return D},up:function(){return W},vQ:function(){return E},wT:function(){return p},wU:function(){return _},we:function(){return a}}),(H=n||(n={}))[H.Unknown=0]="Unknown",H[H.Disabled=1]="Disabled",H[H.Enabled=2]="Enabled",(z=o||(o={}))[z.Invoke=1]="Invoke",z[z.Auto=2]="Auto",(K=r||(r={}))[K.KeepWhitespace=1]="KeepWhitespace",K[K.InsertAsSnippet=4]="InsertAsSnippet",(U=s||(s={}))[U.Method=0]="Method",U[U.Function=1]="Function",U[U.Constructor=2]="Constructor",U[U.Field=3]="Field",U[U.Variable=4]="Variable",U[U.Class=5]="Class",U[U.Struct=6]="Struct",U[U.Interface=7]="Interface",U[U.Module=8]="Module",U[U.Property=9]="Property",U[U.Event=10]="Event",U[U.Operator=11]="Operator",U[U.Unit=12]="Unit",U[U.Value=13]="Value",U[U.Constant=14]="Constant",U[U.Enum=15]="Enum",U[U.EnumMember=16]="EnumMember",U[U.Keyword=17]="Keyword",U[U.Text=18]="Text",U[U.Color=19]="Color",U[U.File=20]="File",U[U.Reference=21]="Reference",U[U.Customcolor=22]="Customcolor",U[U.Folder=23]="Folder",U[U.TypeParameter=24]="TypeParameter",U[U.User=25]="User",U[U.Issue=26]="Issue",U[U.Snippet=27]="Snippet",($=a||(a={}))[$.Deprecated=1]="Deprecated",(j=l||(l={}))[j.Invoke=0]="Invoke",j[j.TriggerCharacter=1]="TriggerCharacter",j[j.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions",(q=h||(h={}))[q.EXACT=0]="EXACT",q[q.ABOVE=1]="ABOVE",q[q.BELOW=2]="BELOW",(G=d||(d={}))[G.NotSet=0]="NotSet",G[G.ContentFlush=1]="ContentFlush",G[G.RecoverFromMarkers=2]="RecoverFromMarkers",G[G.Explicit=3]="Explicit",G[G.Paste=4]="Paste",G[G.Undo=5]="Undo",G[G.Redo=6]="Redo",(Q=u||(u={}))[Q.LF=1]="LF",Q[Q.CRLF=2]="CRLF",(Z=c||(c={}))[Z.Text=0]="Text",Z[Z.Read=1]="Read",Z[Z.Write=2]="Write",(Y=g||(g={}))[Y.None=0]="None",Y[Y.Keep=1]="Keep",Y[Y.Brackets=2]="Brackets",Y[Y.Advanced=3]="Advanced",Y[Y.Full=4]="Full",(J=p||(p={}))[J.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",J[J.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",J[J.accessibilitySupport=2]="accessibilitySupport",J[J.accessibilityPageSize=3]="accessibilityPageSize",J[J.ariaLabel=4]="ariaLabel",J[J.autoClosingBrackets=5]="autoClosingBrackets",J[J.autoClosingDelete=6]="autoClosingDelete",J[J.autoClosingOvertype=7]="autoClosingOvertype",J[J.autoClosingQuotes=8]="autoClosingQuotes",J[J.autoIndent=9]="autoIndent",J[J.automaticLayout=10]="automaticLayout",J[J.autoSurround=11]="autoSurround",J[J.bracketPairColorization=12]="bracketPairColorization",J[J.guides=13]="guides",J[J.codeLens=14]="codeLens",J[J.codeLensFontFamily=15]="codeLensFontFamily",J[J.codeLensFontSize=16]="codeLensFontSize",J[J.colorDecorators=17]="colorDecorators",J[J.columnSelection=18]="columnSelection",J[J.comments=19]="comments",J[J.contextmenu=20]="contextmenu",J[J.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",J[J.cursorBlinking=22]="cursorBlinking",J[J.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",J[J.cursorStyle=24]="cursorStyle",J[J.cursorSurroundingLines=25]="cursorSurroundingLines",J[J.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",J[J.cursorWidth=27]="cursorWidth",J[J.disableLayerHinting=28]="disableLayerHinting",J[J.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",J[J.domReadOnly=30]="domReadOnly",J[J.dragAndDrop=31]="dragAndDrop",J[J.dropIntoEditor=32]="dropIntoEditor",J[J.emptySelectionClipboard=33]="emptySelectionClipboard",J[J.experimental=34]="experimental",J[J.extraEditorClassName=35]="extraEditorClassName",J[J.fastScrollSensitivity=36]="fastScrollSensitivity",J[J.find=37]="find",J[J.fixedOverflowWidgets=38]="fixedOverflowWidgets",J[J.folding=39]="folding",J[J.foldingStrategy=40]="foldingStrategy",J[J.foldingHighlight=41]="foldingHighlight",J[J.foldingImportsByDefault=42]="foldingImportsByDefault",J[J.foldingMaximumRegions=43]="foldingMaximumRegions",J[J.unfoldOnClickAfterEndOfLine=44]="unfoldOnClickAfterEndOfLine",J[J.fontFamily=45]="fontFamily",J[J.fontInfo=46]="fontInfo",J[J.fontLigatures=47]="fontLigatures",J[J.fontSize=48]="fontSize",J[J.fontWeight=49]="fontWeight",J[J.formatOnPaste=50]="formatOnPaste",J[J.formatOnType=51]="formatOnType",J[J.glyphMargin=52]="glyphMargin",J[J.gotoLocation=53]="gotoLocation",J[J.hideCursorInOverviewRuler=54]="hideCursorInOverviewRuler",J[J.hover=55]="hover",J[J.inDiffEditor=56]="inDiffEditor",J[J.inlineSuggest=57]="inlineSuggest",J[J.letterSpacing=58]="letterSpacing",J[J.lightbulb=59]="lightbulb",J[J.lineDecorationsWidth=60]="lineDecorationsWidth",J[J.lineHeight=61]="lineHeight",J[J.lineNumbers=62]="lineNumbers",J[J.lineNumbersMinChars=63]="lineNumbersMinChars",J[J.linkedEditing=64]="linkedEditing",J[J.links=65]="links",J[J.matchBrackets=66]="matchBrackets",J[J.minimap=67]="minimap",J[J.mouseStyle=68]="mouseStyle",J[J.mouseWheelScrollSensitivity=69]="mouseWheelScrollSensitivity",J[J.mouseWheelZoom=70]="mouseWheelZoom",J[J.multiCursorMergeOverlapping=71]="multiCursorMergeOverlapping",J[J.multiCursorModifier=72]="multiCursorModifier",J[J.multiCursorPaste=73]="multiCursorPaste",J[J.occurrencesHighlight=74]="occurrencesHighlight",J[J.overviewRulerBorder=75]="overviewRulerBorder",J[J.overviewRulerLanes=76]="overviewRulerLanes",J[J.padding=77]="padding",J[J.parameterHints=78]="parameterHints",J[J.peekWidgetDefaultFocus=79]="peekWidgetDefaultFocus",J[J.definitionLinkOpensInPeek=80]="definitionLinkOpensInPeek",J[J.quickSuggestions=81]="quickSuggestions",J[J.quickSuggestionsDelay=82]="quickSuggestionsDelay",J[J.readOnly=83]="readOnly",J[J.renameOnType=84]="renameOnType",J[J.renderControlCharacters=85]="renderControlCharacters",J[J.renderFinalNewline=86]="renderFinalNewline",J[J.renderLineHighlight=87]="renderLineHighlight",J[J.renderLineHighlightOnlyWhenFocus=88]="renderLineHighlightOnlyWhenFocus",J[J.renderValidationDecorations=89]="renderValidationDecorations",J[J.renderWhitespace=90]="renderWhitespace",J[J.revealHorizontalRightPadding=91]="revealHorizontalRightPadding",J[J.roundedSelection=92]="roundedSelection",J[J.rulers=93]="rulers",J[J.scrollbar=94]="scrollbar",J[J.scrollBeyondLastColumn=95]="scrollBeyondLastColumn",J[J.scrollBeyondLastLine=96]="scrollBeyondLastLine",J[J.scrollPredominantAxis=97]="scrollPredominantAxis",J[J.selectionClipboard=98]="selectionClipboard",J[J.selectionHighlight=99]="selectionHighlight",J[J.selectOnLineNumbers=100]="selectOnLineNumbers",J[J.showFoldingControls=101]="showFoldingControls",J[J.showUnused=102]="showUnused",J[J.snippetSuggestions=103]="snippetSuggestions",J[J.smartSelect=104]="smartSelect",J[J.smoothScrolling=105]="smoothScrolling",J[J.stickyTabStops=106]="stickyTabStops",J[J.stopRenderingLineAfter=107]="stopRenderingLineAfter",J[J.suggest=108]="suggest",J[J.suggestFontSize=109]="suggestFontSize",J[J.suggestLineHeight=110]="suggestLineHeight",J[J.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",J[J.suggestSelection=112]="suggestSelection",J[J.tabCompletion=113]="tabCompletion",J[J.tabIndex=114]="tabIndex",J[J.unicodeHighlighting=115]="unicodeHighlighting",J[J.unusualLineTerminators=116]="unusualLineTerminators",J[J.useShadowDOM=117]="useShadowDOM",J[J.useTabStops=118]="useTabStops",J[J.wordSeparators=119]="wordSeparators",J[J.wordWrap=120]="wordWrap",J[J.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",J[J.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",J[J.wordWrapColumn=123]="wordWrapColumn",J[J.wordWrapOverride1=124]="wordWrapOverride1",J[J.wordWrapOverride2=125]="wordWrapOverride2",J[J.wrappingIndent=126]="wrappingIndent",J[J.wrappingStrategy=127]="wrappingStrategy",J[J.showDeprecated=128]="showDeprecated",J[J.inlayHints=129]="inlayHints",J[J.editorClassName=130]="editorClassName",J[J.pixelRatio=131]="pixelRatio",J[J.tabFocusMode=132]="tabFocusMode",J[J.layoutInfo=133]="layoutInfo",J[J.wrappingInfo=134]="wrappingInfo",(X=m||(m={}))[X.TextDefined=0]="TextDefined",X[X.LF=1]="LF",X[X.CRLF=2]="CRLF",(ee=f||(f={}))[ee.LF=0]="LF",ee[ee.CRLF=1]="CRLF",(et=_||(_={}))[et.None=0]="None",et[et.Indent=1]="Indent",et[et.IndentOutdent=2]="IndentOutdent",et[et.Outdent=3]="Outdent",(ei=v||(v={}))[ei.Both=0]="Both",ei[ei.Right=1]="Right",ei[ei.Left=2]="Left",ei[ei.None=3]="None",(en=C||(C={}))[en.Type=1]="Type",en[en.Parameter=2]="Parameter",(eo=b||(b={}))[eo.Automatic=0]="Automatic",eo[eo.Explicit=1]="Explicit",(er=w||(w={}))[er.DependsOnKbLayout=-1]="DependsOnKbLayout",er[er.Unknown=0]="Unknown",er[er.Backspace=1]="Backspace",er[er.Tab=2]="Tab",er[er.Enter=3]="Enter",er[er.Shift=4]="Shift",er[er.Ctrl=5]="Ctrl",er[er.Alt=6]="Alt",er[er.PauseBreak=7]="PauseBreak",er[er.CapsLock=8]="CapsLock",er[er.Escape=9]="Escape",er[er.Space=10]="Space",er[er.PageUp=11]="PageUp",er[er.PageDown=12]="PageDown",er[er.End=13]="End",er[er.Home=14]="Home",er[er.LeftArrow=15]="LeftArrow",er[er.UpArrow=16]="UpArrow",er[er.RightArrow=17]="RightArrow",er[er.DownArrow=18]="DownArrow",er[er.Insert=19]="Insert",er[er.Delete=20]="Delete",er[er.Digit0=21]="Digit0",er[er.Digit1=22]="Digit1",er[er.Digit2=23]="Digit2",er[er.Digit3=24]="Digit3",er[er.Digit4=25]="Digit4",er[er.Digit5=26]="Digit5",er[er.Digit6=27]="Digit6",er[er.Digit7=28]="Digit7",er[er.Digit8=29]="Digit8",er[er.Digit9=30]="Digit9",er[er.KeyA=31]="KeyA",er[er.KeyB=32]="KeyB",er[er.KeyC=33]="KeyC",er[er.KeyD=34]="KeyD",er[er.KeyE=35]="KeyE",er[er.KeyF=36]="KeyF",er[er.KeyG=37]="KeyG",er[er.KeyH=38]="KeyH",er[er.KeyI=39]="KeyI",er[er.KeyJ=40]="KeyJ",er[er.KeyK=41]="KeyK",er[er.KeyL=42]="KeyL",er[er.KeyM=43]="KeyM",er[er.KeyN=44]="KeyN",er[er.KeyO=45]="KeyO",er[er.KeyP=46]="KeyP",er[er.KeyQ=47]="KeyQ",er[er.KeyR=48]="KeyR",er[er.KeyS=49]="KeyS",er[er.KeyT=50]="KeyT",er[er.KeyU=51]="KeyU",er[er.KeyV=52]="KeyV",er[er.KeyW=53]="KeyW",er[er.KeyX=54]="KeyX",er[er.KeyY=55]="KeyY",er[er.KeyZ=56]="KeyZ",er[er.Meta=57]="Meta",er[er.ContextMenu=58]="ContextMenu",er[er.F1=59]="F1",er[er.F2=60]="F2",er[er.F3=61]="F3",er[er.F4=62]="F4",er[er.F5=63]="F5",er[er.F6=64]="F6",er[er.F7=65]="F7",er[er.F8=66]="F8",er[er.F9=67]="F9",er[er.F10=68]="F10",er[er.F11=69]="F11",er[er.F12=70]="F12",er[er.F13=71]="F13",er[er.F14=72]="F14",er[er.F15=73]="F15",er[er.F16=74]="F16",er[er.F17=75]="F17",er[er.F18=76]="F18",er[er.F19=77]="F19",er[er.NumLock=78]="NumLock",er[er.ScrollLock=79]="ScrollLock",er[er.Semicolon=80]="Semicolon",er[er.Equal=81]="Equal",er[er.Comma=82]="Comma",er[er.Minus=83]="Minus",er[er.Period=84]="Period",er[er.Slash=85]="Slash",er[er.Backquote=86]="Backquote",er[er.BracketLeft=87]="BracketLeft",er[er.Backslash=88]="Backslash",er[er.BracketRight=89]="BracketRight",er[er.Quote=90]="Quote",er[er.OEM_8=91]="OEM_8",er[er.IntlBackslash=92]="IntlBackslash",er[er.Numpad0=93]="Numpad0",er[er.Numpad1=94]="Numpad1",er[er.Numpad2=95]="Numpad2",er[er.Numpad3=96]="Numpad3",er[er.Numpad4=97]="Numpad4",er[er.Numpad5=98]="Numpad5",er[er.Numpad6=99]="Numpad6",er[er.Numpad7=100]="Numpad7",er[er.Numpad8=101]="Numpad8",er[er.Numpad9=102]="Numpad9",er[er.NumpadMultiply=103]="NumpadMultiply",er[er.NumpadAdd=104]="NumpadAdd",er[er.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",er[er.NumpadSubtract=106]="NumpadSubtract",er[er.NumpadDecimal=107]="NumpadDecimal",er[er.NumpadDivide=108]="NumpadDivide",er[er.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",er[er.ABNT_C1=110]="ABNT_C1",er[er.ABNT_C2=111]="ABNT_C2",er[er.AudioVolumeMute=112]="AudioVolumeMute",er[er.AudioVolumeUp=113]="AudioVolumeUp",er[er.AudioVolumeDown=114]="AudioVolumeDown",er[er.BrowserSearch=115]="BrowserSearch",er[er.BrowserHome=116]="BrowserHome",er[er.BrowserBack=117]="BrowserBack",er[er.BrowserForward=118]="BrowserForward",er[er.MediaTrackNext=119]="MediaTrackNext",er[er.MediaTrackPrevious=120]="MediaTrackPrevious",er[er.MediaStop=121]="MediaStop",er[er.MediaPlayPause=122]="MediaPlayPause",er[er.LaunchMediaPlayer=123]="LaunchMediaPlayer",er[er.LaunchMail=124]="LaunchMail",er[er.LaunchApp2=125]="LaunchApp2",er[er.Clear=126]="Clear",er[er.MAX_VALUE=127]="MAX_VALUE",(es=y||(y={}))[es.Hint=1]="Hint",es[es.Info=2]="Info",es[es.Warning=4]="Warning",es[es.Error=8]="Error",(ea=S||(S={}))[ea.Unnecessary=1]="Unnecessary",ea[ea.Deprecated=2]="Deprecated",(el=L||(L={}))[el.Inline=1]="Inline",el[el.Gutter=2]="Gutter",(eh=k||(k={}))[eh.UNKNOWN=0]="UNKNOWN",eh[eh.TEXTAREA=1]="TEXTAREA",eh[eh.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",eh[eh.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",eh[eh.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",eh[eh.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",eh[eh.CONTENT_TEXT=6]="CONTENT_TEXT",eh[eh.CONTENT_EMPTY=7]="CONTENT_EMPTY",eh[eh.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",eh[eh.CONTENT_WIDGET=9]="CONTENT_WIDGET",eh[eh.OVERVIEW_RULER=10]="OVERVIEW_RULER",eh[eh.SCROLLBAR=11]="SCROLLBAR",eh[eh.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",eh[eh.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR",(ed=N||(N={}))[ed.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",ed[ed.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",ed[ed.TOP_CENTER=2]="TOP_CENTER",(eu=D||(D={}))[eu.Left=1]="Left",eu[eu.Center=2]="Center",eu[eu.Right=4]="Right",eu[eu.Full=7]="Full",(ec=x||(x={}))[ec.Left=0]="Left",ec[ec.Right=1]="Right",ec[ec.None=2]="None",ec[ec.LeftOfInjectedText=3]="LeftOfInjectedText",ec[ec.RightOfInjectedText=4]="RightOfInjectedText",(eg=I||(I={}))[eg.Off=0]="Off",eg[eg.On=1]="On",eg[eg.Relative=2]="Relative",eg[eg.Interval=3]="Interval",eg[eg.Custom=4]="Custom",(ep=E||(E={}))[ep.None=0]="None",ep[ep.Text=1]="Text",ep[ep.Blocks=2]="Blocks",(em=T||(T={}))[em.Smooth=0]="Smooth",em[em.Immediate=1]="Immediate",(ef=M||(M={}))[ef.Auto=1]="Auto",ef[ef.Hidden=2]="Hidden",ef[ef.Visible=3]="Visible",(e_=A||(A={}))[e_.LTR=0]="LTR",e_[e_.RTL=1]="RTL",(ev=R||(R={}))[ev.Invoke=1]="Invoke",ev[ev.TriggerCharacter=2]="TriggerCharacter",ev[ev.ContentChange=3]="ContentChange",(eC=O||(O={}))[eC.File=0]="File",eC[eC.Module=1]="Module",eC[eC.Namespace=2]="Namespace",eC[eC.Package=3]="Package",eC[eC.Class=4]="Class",eC[eC.Method=5]="Method",eC[eC.Property=6]="Property",eC[eC.Field=7]="Field",eC[eC.Constructor=8]="Constructor",eC[eC.Enum=9]="Enum",eC[eC.Interface=10]="Interface",eC[eC.Function=11]="Function",eC[eC.Variable=12]="Variable",eC[eC.Constant=13]="Constant",eC[eC.String=14]="String",eC[eC.Number=15]="Number",eC[eC.Boolean=16]="Boolean",eC[eC.Array=17]="Array",eC[eC.Object=18]="Object",eC[eC.Key=19]="Key",eC[eC.Null=20]="Null",eC[eC.EnumMember=21]="EnumMember",eC[eC.Struct=22]="Struct",eC[eC.Event=23]="Event",eC[eC.Operator=24]="Operator",eC[eC.TypeParameter=25]="TypeParameter",(eb=P||(P={}))[eb.Deprecated=1]="Deprecated",(ew=F||(F={}))[ew.Hidden=0]="Hidden",ew[ew.Blink=1]="Blink",ew[ew.Smooth=2]="Smooth",ew[ew.Phase=3]="Phase",ew[ew.Expand=4]="Expand",ew[ew.Solid=5]="Solid",(ey=B||(B={}))[ey.Line=1]="Line",ey[ey.Block=2]="Block",ey[ey.Underline=3]="Underline",ey[ey.LineThin=4]="LineThin",ey[ey.BlockOutline=5]="BlockOutline",ey[ey.UnderlineThin=6]="UnderlineThin",(eS=V||(V={}))[eS.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",eS[eS.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",eS[eS.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",eS[eS.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter",(eL=W||(W={}))[eL.None=0]="None",eL[eL.Same=1]="Same",eL[eL.Indent=2]="Indent",eL[eL.DeepIndent=3]="DeepIndent"},14706:function(e,t,i){"use strict";i.d(t,{CZ:function(){return l},D8:function(){return d},Jx:function(){return n},Tx:function(){return a},dQ:function(){return h},fV:function(){return u},gk:function(){return o},lN:function(){return s},rU:function(){return r}});class n{constructor(){this.changeType=1}}class o{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(let o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+e.substring(n)}static fromDecorations(e){let t=[];for(let i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber),t}}class r{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class s{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class h{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){let i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){let t=this._tokens[(e<<1)+1];return t}getLanguageId(e){let t=this._tokens[(e<<1)+1],i=n.N.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return n.N.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return n.N.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return n.N.getClassNameFromMetadata(t)}getInlineStyle(e,t){let i=this._tokens[(e<<1)+1];return n.N.getInlineStyleFromMetadata(i,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return n.N.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new r(this,e,t,i)}static convertToEndOffset(e,t){let i=e.length>>>1,n=i-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="",r=[],s=0;for(;;){let o=ts){n+=this._text.substring(s,a.offset);let e=this._tokens[(t<<1)+1];r.push(n.length,e),s=a.offset}n+=a.text,r.push(n.length,a.tokenMetadata),i++}else break}return new o(new Uint32Array(r),n,this._languageIdCodec)}}o.defaultTokenMetadata=33587200;class r{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof r&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){let t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},92550:function(e,t,i){"use strict";i.d(t,{Kp:function(){return o},k:function(){return a}});var n=i(97295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let i=e.length,n=t.length;if(i!==n)return!1;for(let n=0;n=r||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let r=[],s=0;for(let a=0,l=e.length;at||h.isEmpty()&&(0===l.type||3===l.type))continue;let d=h.startLineNumber===t?h.startColumn:i,u=h.endLineNumber===t?h.endColumn:n;r[s++]=new o(d,u,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){let i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[],o=new s,r=0;for(let s=0,a=t.length;s1){let t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(h>1){let t=e.charCodeAt(h-2);n.ZG(t)&&h--}let c=l-1,g=h-2;r=o.consumeLowerThan(c,r,i),0===o.count&&(r=c),o.insert(g,d,u)}return o.consumeLowerThan(1073741824,r,i),i}}},72202:function(e,t,i){"use strict";i.d(t,{Nd:function(){return h},zG:function(){return a},IJ:function(){return l},d1:function(){return c},tF:function(){return p}});var n=i(97295),o=i(50072),r=i(92550);class s{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,o,s,a,l,h,d,u,c,g,p,m,f,_,v,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(r.Kp.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=c,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=C&&C.sort((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){this._data[e-1]=(t<<16|i<<0)>>>0,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1),i=d.getPartIndex(t),n=d.getCharIndex(t);return new h(i,n)}getColumn(e,t){let i=this.partDataToCharOffset(e.partIndex,t,e.charIndex);return i+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,r=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;let l=d.getPartIndex(s),h=d.getCharIndex(s),u=d.getPartIndex(a);return i-h<=(l!==u?t:d.getCharIndex(a))-i?o:r}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function c(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(let r of e.lineDecorations)(1===r.type||2===r.type)&&(t.appendASCIIString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("");let r=new d(1,i+n);return r.setColumnInfo(1,i,0,0),new u(r,!1,o)}return t.appendASCIIString(""),new u(new d(0,0),!1,0)}return function(e,t){let i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,h=e.parts,c=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,_=e.spaceWidth,v=e.renderSpaceCharCode,C=e.renderWhitespace,b=e.renderControlCharacters,w=new d(a+1,h.length),y=!1,S=0,L=p,k=0,N=0,D=0;m?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=h.length;e=c&&(t+=o)}}for(x&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(_*i)),t.appendASCIIString('px"')),t.appendASCII(62);S1?t.write1(8594):t.write1(65515);for(let e=2;e<=n;e++)t.write1(160)}else i=2,n=1,t.write1(v),t.write1(8204);k+=i,N+=n,S>=c&&(L+=n)}}else for(t.appendASCII(62);S=c&&(L+=r)}I?D++:D=0,S>=a&&!y&&l.isPseudoAfter()&&(y=!0,w.setColumnInfo(S+1,e,k,N)),t.appendASCIIString("")}return y||w.setColumnInfo(a+1,h.length-1,k,N),l&&t.appendASCIIString(""),t.appendASCIIString(""),new u(w,m,r)}(function(e){let t,i;let o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(a[l++]=new s(o,"",0,!1));let h=o;for(let d=0,u=i.getCount();d=r){let i=!!t&&n.Ut(e.substring(h,r));a[l++]=new s(r,c,0,i);break}let g=!!t&&n.Ut(e.substring(h,u));a[l++]=new s(u,c,0,g),h=u}return a}(o,e.containsRTL,e.lineTokens,e.fauxIndentLength,i);e.renderControlCharacters&&!e.isBasicASCII&&(a=function(e,t){let i=[],n=new s(0,"",0,!1),o=0;for(let r of t){let t=r.endIndex;for(;on.endIndex&&(n=new s(o,r.type,r.metadata,r.containsRTL),i.push(n)),n=new s(o+1,"mtkcontrol",r.metadata,!1),i.push(n))}o>n.endIndex&&(n=new s(t,r.type,r.metadata,r.containsRTL),i.push(n))}return i}(o,a)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,o){let r;let a=e.continuesWithWrappedLine,l=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,u=e.useMonospaceOptimizations,c=e.selectionsOnLine,g=1===e.renderWhitespace,p=3===e.renderWhitespace,m=e.renderSpaceWidth!==e.spaceWidth,f=[],_=0,v=0,C=o[0].type,b=o[v].containsRTL,w=o[v].endIndex,y=o.length,S=!1,L=n.LC(t);-1===L?(S=!0,L=i,r=i):r=n.ow(t);let k=!1,N=0,D=c&&c[N],x=d%h;for(let e=l;e=D.endOffset&&(N++,D=c&&c[N]),er)a=!0;else if(9===d)a=!0;else if(32===d){if(g){if(k)a=!0;else{let n=e+1e),a&&p&&(a=S||e>r),a&&b&&e>=L&&e<=r&&(a=!1),k){if(!a||!u&&x>=h){if(m){let t=_>0?f[_-1].endIndex:l;for(let i=t+1;i<=e;i++)f[_++]=new s(i,"mtkw",1,!1)}else f[_++]=new s(e,"mtkw",1,!1);x%=h}}else(e===w||a&&e>l)&&(f[_++]=new s(e,C,0,b),x%=h);for(9===d?x=h:n.K7(d)?x+=2:x++,k=a;e===w;)if(++v0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(I=!0)}else I=!0}if(I){if(m){let e=_>0?f[_-1].endIndex:l;for(let t=e+1;t<=i;t++)f[_++]=new s(t,"mtkw",1,!1)}else f[_++]=new s(i,"mtkw",1,!1)}else f[_++]=new s(i,C,0,b);return f}(e,o,i,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;tu&&(u=e.startOffset,h[d++]=new s(u,r,c,g)),e.endOffset+1<=n)u=e.endOffset+1,h[d++]=new s(u,r+" "+e.className,c|e.metadata,g),l++;else{u=n,h[d++]=new s(u,r+" "+e.className,c|e.metadata,g);break}}n>u&&(u=n,h[d++]=new s(u,r,c,g))}let c=i[i.length-1].endIndex;if(l=50&&(o[r++]=new s(d+1,t,i,h),u=d+1,d=-1);u!==l&&(o[r++]=new s(l,t,i,h))}else o[r++]=a;n=l}else for(let e=0,i=t.length;e50){let e=i.type,t=i.metadata,h=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:function(e,t,i){"use strict";i.d(t,{$l:function(){return u},$t:function(){return h},IP:function(){return a},SQ:function(){return c},Wx:function(){return d},l_:function(){return r},ud:function(){return s},wA:function(){return l}});var n=i(97295),o=i(24314);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class s{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,o,r,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r,this.inlineDecorations=s}}class l{constructor(e,t,i,n,o,r,s,a,h,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,r),this.containsRTL=l.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=h,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!t&&!!i&&n.Ut(e)}}class h{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class d{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new h(new o.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class u{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class c{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}},30665:function(e,t,i){"use strict";i.d(t,{EY:function(){return o},Tj:function(){return r}});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);let m=l.color,f=this._color2Id[m];f||(f=++this._lastAssignedId,this._color2Id[m]=f,this._id2Color[f]=m);let _=new n(g-p,g+p,f);l.setColorZone(_),a.push(_)}return this._colorZonesInvalid=!1,a.sort(n.compare),a}}},30168:function(e,t,i){"use strict";i.d(t,{$t:function(){return h},CU:function(){return a},Fd:function(){return l},zg:function(){return d}});var n=i(50187),o=i(24314),r=i(1118),s=i(64141);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,i=this._decorationsCache[t];if(!i){let s;let a=e.range,l=e.options;if(l.isWholeLine){let e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(a.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber)),1);s=new o.e(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(a,1);i=new r.$l(s,l),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e){let t=new o.e(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(t).inlineDecorations[0]}_getDecorationsInRange(e){let t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,s.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,a=[],h=0,d=[];for(let e=i;e<=n;e++)d[e-i]=[];for(let e=0,s=t.length;e1===e)}function d(e,t){return u(e,t.range,e=>2===e)}function u(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let o=e.tokenization.getLineTokens(n),r=n===t.startLineNumber,s=n===t.endLineNumber,a=r?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}let e=i(o.getStandardTokenType(a));if(!e)return!1;a++}}return!0}},90236:function(e,t,i){"use strict";var n,o=i(85152),r=i(59365),s=i(22258);i(41459);var a=i(16830),l=i(3860),h=i(29102),d=i(63580),u=i(38819),c=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let g=new u.uy("selectionAnchorSet",!1),p=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=g.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.Y.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new r.W5().appendText((0,d.NC)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,o.Z9)((0,d.NC)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(l.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};p.ID="editor.contrib.selectionAnchorController",p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(n=u.i6,function(e,t){n(e,t,1)})],p);class m extends a.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.NC)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,s.gx)(2089,2080),weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.setSelectionAnchor()})}}class f extends a.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.NC)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:g})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.goToSelectionAnchor()})}}class _ extends a.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.NC)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:g,kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,s.gx)(2089,2089),weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.selectFromAnchorToCursor()})}}class v extends a.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.NC)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:g,kbOpts:{kbExpr:h.u.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return c(this,void 0,void 0,function*(){null===(i=p.get(t))||void 0===i||i.cancelSelectionAnchor()})}}(0,a._K)(p.ID,p),(0,a.Qr)(m),(0,a.Qr)(f),(0,a.Qr)(_),(0,a.Qr)(v)},71387:function(e,t,i){"use strict";var n=i(15393),o=i(9917);i(64287);var r=i(16830),s=i(50187),a=i(24314),l=i(3860),h=i(29102),d=i(84973),u=i(22529),c=i(51945),g=i(63580),p=i(84144),m=i(73910),f=i(97781);let _=(0,m.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g.NC("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class v extends r.R6{constructor(){super({id:"editor.action.jumpToBracket",label:g.NC("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;null===(i=w.get(t))||void 0===i||i.jumpToBracket()}}class C extends r.R6{constructor(){super({id:"editor.action.selectToBracket",label:g.NC("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let o=!0;i&&!1===i.selectBrackets&&(o=!1),null===(n=w.get(t))||void 0===n||n.selectToBracket(o)}}class b{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends o.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.pY(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(66),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(66)&&(this._matchBrackets=this._editor.getOption(66),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(w.ID)}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{let i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i),o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{let t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{let t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.Y(o.lineNumber,o.column,o.lineNumber,o.column):new l.Y(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{let o=n.getStartPosition(),r=t.bracketPairs.matchBracket(o);if(!r&&!(r=t.bracketPairs.findEnclosingBrackets(o))){let e=t.bracketPairs.findNextBracket(o);e&&e.range&&(r=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let s=null,h=null;if(r){r.sort(a.e.compareRangesUsingStarts);let[t,i]=r;if(s=e?t.getStartPosition():t.getEndPosition(),h=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){let e=s;s=h,h=e}}s&&h&&i.push(new l.Y(s.lineNumber,s.column,h.lineNumber,h.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(let i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),i=t.getVersionId(),n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let t=0,i=e.length;t1&&o.sort(s.L.compare);let a=[],l=0,h=0,d=n.length;for(let e=0,i=o.length;e{let i=e.getColor(c.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);let n=e.getColor(c.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)}),p.BH.appendMenuItem(p.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:g.NC({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},24336:function(e,t,i){"use strict";var n=i(16830),o=i(29102),r=i(24314),s=i(3860);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i))){if(this._isMovingLeft){let s=new r.e(i,n-1,i,n),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new r.e(i,o,i,o),a)}else{let s=new r.e(i,o,i,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new r.e(i,n,i,n),a)}}}computeCursorState(e,t){return this._isMovingLeft?new s.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new s.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(63580);class h extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(let e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends h{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.NC("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.u.writable})}}),(0,n.Qr)(class extends h{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.NC("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.u.writable})}})},72102:function(e,t,i){"use strict";var n=i(16830),o=i(61329),r=i(10839),s=i(24314),a=i(29102),l=i(63580);class h extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.NC("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],a=t.getSelections();for(let e of a){if(!e.isEmpty())continue;let t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;let h=a===l?e.getPosition():r.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),d=r.o.leftPosition(i,h),u=r.o.leftPosition(i,d),c=i.getValueInRange(s.e.fromPositions(u,d)),g=i.getValueInRange(s.e.fromPositions(d,h)),p=s.e.fromPositions(u,h);n.push(new o.T4(p,g+c))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(h)},55833:function(e,t,i){"use strict";var n=i(16268),o=i(1432),r=i(35715),s=i(16830),a=i(11640),l=i(29102),h=i(63580),d=i(84144),u=i(84972);let c="9_cutcopypaste",g=o.tY||document.queryCommandSupported("cut"),p=o.tY||document.queryCommandSupported("copy"),m=void 0!==navigator.clipboard&&!n.isFirefox||document.queryCommandSupported("paste");function f(e){return e.register(),e}let _=g?f(new s.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.cutLabel","Cut"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1}]})):void 0,v=p?f(new s.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.copyLabel","Copy"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;d.BH.appendMenuItem(d.eH.MenubarEditMenu,{submenu:d.eH.MenubarCopy,title:{value:h.NC("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),d.BH.appendMenuItem(d.eH.EditorContext,{submenu:d.eH.EditorContextCopy,title:{value:h.NC("copy as","Copy As"),original:"Copy As"},group:c,order:3}),d.BH.appendMenuItem(d.eH.EditorContext,{submenu:d.eH.EditorContextShare,title:{value:h.NC("share","Share"),original:"Share"},group:"11_share",order:-1});let C=m?f(new s.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:d.eH.MenubarEditMenu,group:"2_ccp",title:h.NC({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:d.eH.EditorContext,group:c,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4},{menuId:d.eH.CommandPalette,group:"",title:h.NC("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:d.eH.SimpleEditorContext,group:c,title:h.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4}]})):void 0;class b extends s.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:h.NC("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getOption(33);!i&&t.getSelection().isEmpty()||(r.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),r.RA.forceCopyWithSyntaxHighlighting=!1)}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",(e,i)=>{let n=e.get(a.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){let e=n.getOption(33),i=n.getSelection();return!!(i&&i.isEmpty())&&!e||(document.execCommand(t),!0)}return!1}),e.addImplementation(0,"generic-dom",(e,i)=>(document.execCommand(t),!0)))}w(_,"cut"),w(v,"copy"),C&&(C.addImplementation(1e4,"code-editor",(e,t)=>{let i=e.get(a.$),n=e.get(u.p),s=i.getFocusedCodeEditor();if(s&&s.hasTextFocus()){let e=document.execCommand("paste");if(!e&&o.$L){var l,h,d,c;return l=void 0,h=void 0,d=void 0,c=function*(){let e=yield n.readText();if(""!==e){let t=r.Nl.INSTANCE.get(e),i=!1,n=null,o=null;t&&(i=s.getOption(33)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}},new(d||(d=Promise))(function(e,t){function i(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):((o=t.value)instanceof d?o:new d(function(e){e(o)})).then(i,n)}o((c=c.apply(l,h||[])).next())})}return!0}return!1}),C.addImplementation(0,"generic-dom",(e,t)=>(document.execCommand("paste"),!0))),p&&(0,s.Qr)(b)},75396:function(e,t,i){"use strict";i.d(t,{Bb:function(){return v},MN:function(){return b},RB:function(){return _},TM:function(){return y},aI:function(){return N},bA:function(){return S},sh:function(){return C},uH:function(){return w}});var n=i(9488),o=i(71050),r=i(17301),s=i(9917),a=i(70666),l=i(14410),h=i(24314),d=i(3860),u=i(73733),c=i(94565),g=i(90535),p=i(76014),m=i(71922),f=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let _="editor.action.codeAction",v="editor.action.refactor",C="editor.action.refactor.preview",b="editor.action.sourceAction",w="editor.action.organizeImports",y="editor.action.fixAll";class S{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return f(this,void 0,void 0,function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,r.Cp)(e)}t&&(this.action.edit=t.edit)}return this})}}class L extends s.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(L.codeActionsComparator),this.validActions=this.allActions.filter(({action:e})=>!e.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,n.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&p.yN.QuickFix.contains(new p.yN(e.kind))&&!!e.isPreferred)}}let k={actions:[],documentation:void 0};function N(e,t,i,o,a,h){var d;let u=o.filter||{},c={only:null===(d=u.include)||void 0===d?void 0:d.value,trigger:o.type},g=new l.YQ(t,h),m=e.all(t).filter(e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some(e=>(0,p.EU)(u,new p.yN(e)))),_=new s.SL,v=m.map(e=>f(this,void 0,void 0,function*(){try{a.report(e);let n=yield e.provideCodeActions(t,i,c,g.token);if(n&&_.add(n),g.token.isCancellationRequested)return k;let o=((null==n?void 0:n.actions)||[]).filter(e=>e&&(0,p.Yl)(u,e)),r=function(e,t,i){if(!e.documentation)return;let n=e.documentation.map(e=>({kind:new p.yN(e.kind),command:e.command}));if(i){let e;for(let t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(let e of t)if(e.kind){for(let t of n)if(t.kind.contains(new p.yN(e.kind)))return t.command}}(e,o,u.include);return{actions:o.map(t=>new S(t,e)),documentation:r}}catch(e){if((0,r.n2)(e))throw e;return(0,r.Cp)(e),k}})),C=e.onDidChange(()=>{let i=e.all(t);(0,n.fS)(i,m)||g.cancel()});return Promise.all(v).then(e=>{let t=e.map(e=>e.actions).flat(),i=(0,n.kX)(e.map(e=>e.documentation));return new L(t,i,_)}).finally(()=>{C.dispose(),g.dispose()})}c.P0.registerCommand("_executeCodeActionProvider",function(e,t,i,n,s){return f(this,void 0,void 0,function*(){if(!(t instanceof a.o))throw(0,r.b1)();let{codeActionProvider:l}=e.get(m.p),c=e.get(u.q).getModel(t);if(!c)throw(0,r.b1)();let f=d.Y.isISelection(i)?d.Y.liftSelection(i):h.e.isIRange(i)?c.validateRange(i):void 0;if(!f)throw(0,r.b1)();let _="string"==typeof n?new p.yN(n):void 0,v=yield N(l,c,f,{type:1,triggerAction:p.aQ.Default,filter:{includeSourceActions:!0,include:_}},g.Ex.None,o.T.None),C=[],b=Math.min(v.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action)}finally{setTimeout(()=>v.dispose(),100)}})})},93412:function(e,t,i){"use strict";i.d(t,{S5:function(){return ex},dW:function(){return ey},Hv:function(){return eD},o$:function(){return eN},E7:function(){return ew},pY:function(){return ev},Eb:function(){return eS},UG:function(){return eL},VQ:function(){return ek}});var n,o,r,s,a,l,h,d,u,c,g=i(71050),p=i(79579),m=i(9917),f=i(97295),_=i(16830),v=i(66007),C=i(29102),b=i(71922),w=i(75396),y=i(17301),S=i(27753),L=i(72065),k=i(65321),N=i(69047),D=i(74741);i(10721);var x=i(50187),I=i(76014),E=i(63580),T=i(33108),M=i(38819),A=i(5606),R=i(91847),O=i(10829),P=i(97781),F=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},B=function(e,t){return function(i,n){t(i,n,e)}};let V={Visible:new M.uy("CodeActionMenuVisible",!1,(0,E.NC)("CodeActionMenuVisible","Whether the code action list widget is visible"))};class W extends D.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let H=class{constructor(e,t){this.acceptKeybindings=e,this.keybindingService=t}get templateId(){return"codeActionWidget"}renderTemplate(e){let t=Object.create(null);return t.disposables=[],t.root=e,t.text=document.createElement("span"),e.append(t.text),t}renderElement(e,t,i){let n=e.title,o=e.isEnabled,r=e.isSeparator,s=e.isDocumentation;i.text.textContent=n,o?i.root.classList.remove("option-disabled"):(i.root.classList.add("option-disabled"),i.root.style.backgroundColor="transparent !important"),r&&(i.root.classList.add("separator"),i.root.style.height="10px"),s||(()=>{var e,t;let[n,o]=this.acceptKeybindings;i.root.title=(0,E.NC)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Refactor, Shift+F2 to Preview"']},"{0} to Refactor, {1} to Preview",null===(e=this.keybindingService.lookupKeybinding(n))||void 0===e?void 0:e.getLabel(),null===(t=this.keybindingService.lookupKeybinding(o))||void 0===t?void 0:t.getLabel())})()}disposeTemplate(e){e.disposables=(0,m.B9)(e.disposables)}};H=F([B(1,R.d)],H);let z=class e extends m.JT{constructor(e,t,i,n,o,r,s,a,l,h){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=o,this._telemetryService=r,this._configurationService=a,this._contextViewService=l,this._contextKeyService=h,this._showingActions=this._register(new m.XK),this.codeActionList=this._register(new m.XK),this.options=[],this._visible=!1,this.viewItems=[],this.hasSeperator=!1,this._keybindingResolver=new K({getKeybindings:()=>n.getKeybindings()}),this._ctxMenuWidgetVisible=V.Visible.bindTo(this._contextKeyService),this.listRenderer=new H(["onEnterSelectCodeAction","onEnterSelectCodeActionWithPreview"],n)}get isVisible(){return this._visible}isCodeActionWidgetEnabled(e){return this._configurationService.getValue("editor.experimental.useCustomCodeActionMenu",{resource:e.uri})}_onListSelection(e){e.elements.length&&e.elements.forEach(e=>{e.isEnabled&&(e.action.run(),this.hideCodeActionWidget())})}_onListHover(e){var t,i,n,o;e.element?(null===(i=e.element)||void 0===i?void 0:i.isEnabled)?(null===(n=this.codeActionList.value)||void 0===n||n.setFocus([e.element.index]),this.focusedEnabledItem=this.viewItems.indexOf(e.element),this.currSelectedItem=e.element.index):(this.currSelectedItem=void 0,null===(o=this.codeActionList.value)||void 0===o||o.setFocus([e.element.index])):(this.currSelectedItem=void 0,null===(t=this.codeActionList.value)||void 0===t||t.setFocus([]))}renderCodeActionMenuList(t,i){var n;let o=new m.SL,r=document.createElement("div"),s=document.createElement("div");this.block=t.appendChild(s),this.block.classList.add("context-view-block"),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",o.add(k.nm(this.block,k.tw.MOUSE_DOWN,e=>e.stopPropagation())),r.id="codeActionMenuWidget",r.classList.add("codeActionMenuWidget"),t.appendChild(r),this.codeActionList.value=new N.aV("codeActionWidget",r,{getHeight:e=>e.isSeparator?10:26,getTemplateId:e=>"codeActionWidget"},[this.listRenderer],{keyboardSupport:!1}),o.add(this.codeActionList.value.onMouseOver(e=>this._onListHover(e))),o.add(this.codeActionList.value.onDidChangeFocus(e=>{var t;return null===(t=this.codeActionList.value)||void 0===t?void 0:t.domFocus()})),o.add(this.codeActionList.value.onDidChangeSelection(e=>this._onListSelection(e))),o.add(this._editor.onDidLayoutChange(e=>this.hideCodeActionWidget())),i.forEach((t,n)=>{let o="separator"===t.class,r=!1;t instanceof W&&(r=t.action.kind===e.documentationID),o&&(this.hasSeperator=!0);let s={title:t.label,detail:t.tooltip,action:i[n],isEnabled:t.enabled,isSeparator:o,index:n,isDocumentation:r};t.enabled&&this.viewItems.push(s),this.options.push(s)}),this.codeActionList.value.splice(0,this.codeActionList.value.length,this.options);let a=this.hasSeperator?(i.length-1)*26+10:26*i.length;r.style.height=String(a)+"px",this.codeActionList.value.layout(a);let l=[];this.options.forEach((e,t)=>{var i,n;if(!this.codeActionList.value)return;let o=null===(n=document.getElementById(null===(i=this.codeActionList.value)||void 0===i?void 0:i.getElementID(t)))||void 0===n?void 0:n.getElementsByTagName("span")[0].offsetWidth;l.push(Number(o))});let h=Math.max(...l);r.style.width=h+52+"px",null===(n=this.codeActionList.value)||void 0===n||n.layout(a,h),this.viewItems.length<1||this.viewItems.every(e=>e.isDocumentation)?this.currSelectedItem=void 0:(this.focusedEnabledItem=0,this.currSelectedItem=this.viewItems[0].index,this.codeActionList.value.setFocus([this.currSelectedItem])),this.codeActionList.value.domFocus();let d=k.go(t),u=d.onDidBlur(()=>{this.hideCodeActionWidget()});return o.add(u),o.add(d),this._ctxMenuWidgetVisible.set(!0),o}focusPrevious(){var e;let t;if(void 0===this.focusedEnabledItem)this.focusedEnabledItem=this.viewItems[0].index;else if(this.viewItems.length<1)return!1;let i=this.focusedEnabledItem;do this.focusedEnabledItem=this.focusedEnabledItem-1,this.focusedEnabledItem<0&&(this.focusedEnabledItem=this.viewItems.length-1),t=this.viewItems[this.focusedEnabledItem],null===(e=this.codeActionList.value)||void 0===e||e.setFocus([t.index]),this.currSelectedItem=t.index;while(this.focusedEnabledItem!==i&&(!t.isEnabled||t.action.id===D.Z0.ID));return!0}focusNext(){var e;let t;if(void 0===this.focusedEnabledItem)this.focusedEnabledItem=this.viewItems.length-1;else if(this.viewItems.length<1)return!1;let i=this.focusedEnabledItem;do this.focusedEnabledItem=(this.focusedEnabledItem+1)%this.viewItems.length,t=this.viewItems[this.focusedEnabledItem],null===(e=this.codeActionList.value)||void 0===e||e.setFocus([t.index]),this.currSelectedItem=t.index;while(this.focusedEnabledItem!==i&&(!t.isEnabled||t.action.id===D.Z0.ID));return!0}navigateListWithKeysUp(){this.focusPrevious()}navigateListWithKeysDown(){this.focusNext()}onEnterSet(){var e;"number"==typeof this.currSelectedItem&&(null===(e=this.codeActionList.value)||void 0===e||e.setSelection([this.currSelectedItem]))}dispose(){super.dispose()}hideCodeActionWidget(){this._ctxMenuWidgetVisible.reset(),this.options=[],this.viewItems=[],this.focusedEnabledItem=0,this.currSelectedItem=void 0,this.hasSeperator=!1,this._contextViewService.hideContextView({source:this})}codeActionTelemetry(e,t,i){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:e,validCodeActions:i.validActions.length,cancelled:t})}show(e,t,i,n){var o,r,s,a;return o=this,r=void 0,s=void 0,a=function*(){let o=this._editor.getModel();if(!o)return;let r=n.includeDisabledActions?t.allActions:t.validActions;if(!r.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,y.F0)();this._visible=!0,this._showingActions.value=t;let s=this.getMenuActions(e,r,t.documentation),a=x.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),h=this._editor.getOption(117);this.isCodeActionWidgetEnabled(o)?this._contextViewService.showContextView({getAnchor:()=>a,render:e=>this.renderCodeActionMenuList(e,s),onHide:i=>{let o=n.fromLightbulb?I.aQ.Lightbulb:e.triggerAction;this.codeActionTelemetry(o,i,t),this._visible=!1,this._editor.focus()}},this._editor.getDomNode(),!1):this._contextMenuService.showContextMenu({domForShadowRoot:h?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>s,onHide:i=>{let o=n.fromLightbulb?I.aQ.Lightbulb:e.triggerAction;this.codeActionTelemetry(o,i,t),this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof W?l(e.action):void 0})},new(s||(s=Promise))(function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):((o=t.value)instanceof s?o:new s(function(e){e(o)})).then(i,n)}l((a=a.apply(o,r||[])).next())})}getMenuActions(t,i,n){var o,r;let s=e=>new W(e.action,()=>this._delegate.onSelectCodeAction(e,t)),a=i.map(s),l=[...n],h=this._editor.getModel();if(h&&a.length)for(let e of this._languageFeaturesService.codeActionProvider.all(h))e._getAdditionalMenuItems&&l.push(...e._getAdditionalMenuItems({trigger:t.type,only:null===(r=null===(o=t.filter)||void 0===o?void 0:o.include)||void 0===r?void 0:r.value},i.map(e=>e.action)));return l.length&&a.push(new D.Z0,...l.map(t=>s(new w.bA({title:t.title,command:t,kind:e.documentationID},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),i=k.i(this._editor.getDomNode()),n=i.left+t.left,o=i.top+t.top+t.height;return{x:n,y:o}}};z.documentationID="_documentation",z=F([B(2,A.i),B(3,R.d),B(4,b.p),B(5,O.b),B(6,P.XE),B(7,T.Ui),B(8,A.u),B(9,M.i6)],z);class K{constructor(e){this._keybindingProvider=e}getResolver(){let e=new p.o(()=>this._keybindingProvider.getKeybindings().filter(e=>K.codeActionCommands.indexOf(e.command)>=0).filter(e=>e.resolvedKeybinding).map(e=>{let t=e.commandArgs;return e.command===w.uH?t={kind:I.yN.SourceOrganizeImports.value}:e.command===w.TM&&(t={kind:I.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},I.wZ.fromUser(t,{kind:I.yN.None,apply:"never"}))}));return t=>{if(t.kind){let i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let i=new I.yN(e.kind);return t.filter(e=>e.kind.contains(i)).filter(t=>!t.preferred||e.isPreferred).reduceRight((e,t)=>e?e.kind.contains(t.kind)?t:e:t,void 0)}}K.codeActionCommands=[w.Bb,w.RB,w.MN,w.uH,w.TM];var U=i(10553),$=i(73046),j=i(4669);i(36053);var q=i(59616),G=i(73910);(n=l||(l={})).Hidden={type:0},n.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}};let Q=class e extends m.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new j.Q5),this.onClick=this._onClick.event,this._state=l.Hidden,this._domNode=document.createElement("div"),this._domNode.className=$.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(e=>{let t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()})),U.o.ignoreTarget(this._domNode),this._register(k.GQ(this._domNode,e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();let{top:t,height:i}=k.i(this._domNode),n=this._editor.getOption(61),o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{(1&e.buttons)==1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&!this._editor.getOption(59).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();let o=this._editor.getOptions();if(!o.get(59).enabled)return this.hide();let r=this._editor.getModel();if(!r)return this.hide();let{lineNumber:s,column:a}=r.validatePosition(n),h=r.getOptions().tabSize,d=o.get(46),u=r.getLineContent(s),c=(0,q.q)(u,h),g=d.spaceWidth*c>22,p=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),m=s;if(!g){if(s>1&&!p(s-1))m-=1;else if(p(s+1)){if(a*d.spaceWidth<22)return this.hide()}else m+=1}this.state=new l.Showing(t,i,n,{position:{lineNumber:m,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=l.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...$.lA.lightBulb.classNamesArray),this._domNode.classList.add(...$.lA.lightbulbAutofix.classNamesArray);let e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e){this.title=E.NC("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel());return}}this._domNode.classList.remove(...$.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...$.lA.lightBulb.classNamesArray);let e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=E.NC("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=E.NC("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Q._posPref=[0],Q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(o=R.d,function(e,t){o(e,t,3)})],Q),(0,P.Ic)((e,t)=>{var i;let n=null===(i=e.getColor(G.cvW))||void 0===i?void 0:i.transparent(.7),o=e.getColor(G.Fu1);o&&t.addRule(` .monaco-editor .contentWidgets ${$.lA.lightBulb.cssSelector} { color: ${o}; background-color: ${n}; @@ -588,4 +588,4 @@ ${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._co ${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},15662:function(e,t,i){"use strict";var n=i(16830),o=i(44156),r=i(20913),s=i(92321),a=i(88542);class l extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:r.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let i=e.get(o.Z),n=i.getColorTheme();(0,s.c3)(n.type)?(i.setTheme(this._originalThemeName||((0,s._T)(n.type)?a.rW:a.TG)),this._originalThemeName=null):(i.setTheme((0,s._T)(n.type)?a.kR:a.MU),this._originalThemeName=n.themeName)}}(0,n.Qr)(l)},44156:function(e,t,i){"use strict";i.d(t,{Z:function(){return o}});var n=i(72065);let o=(0,n.yh)("themeService")},63580:function(e,t,i){"use strict";i.d(t,{NC:function(){return o},aj:function(){return r}});let n="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t,...i){let r;return r=0===i.length?t:t.replace(/\{(\d+)\}/g,(e,t)=>{let n=t[0],o=i[n],r=e;return"string"==typeof o?r=o:("number"==typeof o||"boolean"==typeof o||null==o)&&(r=String(o)),r}),n&&(r="["+r.replace(/[aouei]/g,"$&$&")+"]"),r}function r(e){}},31106:function(e,t,i){"use strict";i.d(t,{F:function(){return r},U:function(){return s}});var n=i(38819),o=i(72065);let r=(0,o.yh)("accessibilityService"),s=new n.uy("accessibilityModeEnabled",!1)},84167:function(e,t,i){"use strict";i.d(t,{Mm:function(){return E},Id:function(){return A},vr:function(){return I}});var n=i(65321),o=i(59069),r=i(76033),s=i(10553),a=i(74741),l=i(4669);i(63513);class h extends a.Wi{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;for(let e of(i||(i=e=>(e.textContent=t.label||"",null)),[n.tw.CLICK,n.tw.MOUSE_DOWN,s.t.Tap]))this._register((0,n.nm)(this.element,e,e=>n.zB.stop(e,!0)));for(let e of[n.tw.MOUSE_DOWN,s.t.Tap])this._register((0,n.nm)(this._label,e,e=>{e instanceof MouseEvent&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())}));this._register((0,n.nm)(this._label,n.tw.KEY_UP,e=>{let t=new o.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())}));let r=i(this._label);r&&this._register(r),this._register(s.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class d extends h{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class u extends r.Y{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.Q5),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;let t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter(e=>!!e):this.options.classNames&&(t=this.options.classNames),t.find(e=>"icon"===e)||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new d(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility(e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){let e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.getAction().tooltip?e=this.getAction().tooltip:this.getAction().label&&(e=this.getAction().label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;let i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var c=i(8030),g=i(9917),p=i(1432);i(45778);var m=i(63580),f=i(84144),_=i(38819),v=i(5606),C=i(72065),b=i(91847),w=i(59422),y=i(87060),S=i(97781),L=i(92321),k=i(98401),N=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},D=function(e,t){return function(i,n){t(i,n,e)}},x=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};function I(e,t,i,n,o,r,s){let l=e.getActions(t),h="string"==typeof n?e=>e===n:n;return function(e,t,i,n=e=>"navigation"===e,o=Number.MAX_SAFE_INTEGER,r=()=>!1,s=!1){let l,h;Array.isArray(t)?(l=t,h=t):(l=t.primary,h=t.secondary);let d=new Set;for(let[t,o]of e){let e;for(let r of(n(t)?(e=l).length>0&&s&&e.push(new a.Z0):(e=h).length>0&&e.push(new a.Z0),o)){i&&(r=r instanceof f.U8&&r.alt?r.alt:r);let n=e.push(r);r instanceof a.wY&&d.add({group:t,action:r,index:n-1})}}for(let{group:e,action:t,index:i}of d){let s=n(e)?l:h,a=t.actions;(a.length<=1||s.length+a.length-2<=o)&&r(t,e,s.length)&&s.splice(i,1,...a)}if(l!==h&&l.length>o){let e=l.splice(o,l.length-o);h.unshift(...e,new a.Z0)}}(l,i,!1,h,o,r,s),function(e){let t=new g.SL;for(let[,i]of e)for(let e of i)t.add(e);return t}(l)}let E=class extends r.g{constructor(e,t,i,o,r,s,a){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=o,this._contextKeyService=r,this._themeService=s,this._contextMenuService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new g.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return x(this,void 0,void 0,function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}})}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(p.ED||p.IJ)&&this._altKey.keyStatus.shiftKey,o=()=>{var e;let n=t&&i&&!!(null===(e=this._commandAction.alt)||void 0===e?void 0:e.enabled);n!==this._wantsAltCommand&&(this._wantsAltCommand=n,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(e=>{i=e.altKey||(p.ED||p.IJ)&&e.shiftKey,o()})),this._register((0,n.nm)(e,"mouseleave",e=>{t=!1,o()})),this._register((0,n.nm)(e,"mouseenter",e=>{t=!0,o()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;let t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label,o=i?(0,m.NC)("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){let e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?(0,m.NC)("titleAndKb","{0} ({1})",e,i):e;o=(0,m.NC)("titleAndKbAndAlt","{0}\n[{1}] {2}",o,c.xo.modifierLabels[p.OS].altKey,n)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;let{element:i,label:o}=this;if(!i||!o)return;let r=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(r){if(S.kS.isThemeIcon(r)){let e=S.kS.asClassNameArray(r);o.classList.add(...e),this._itemClassDispose.value=(0,g.OF)(()=>{o.classList.remove(...e)})}else o.style.backgroundImage=(0,L._T)(this._themeService.getColorTheme().type)?(0,n.wY)(r.dark):(0,n.wY)(r.light),o.classList.add("icon"),this._itemClassDispose.value=(0,g.F8)((0,g.OF)(()=>{o.style.backgroundImage="",o.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}}};E=N([D(2,b.d),D(3,w.lT),D(4,_.i6),D(5,S.XE),D(6,v.i)],E);let T=class extends u{constructor(e,t,i,n){var o,r;let s=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(o=null==t?void 0:t.menuAsChild)&&void 0!==o&&o,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:S.kS.isThemeIcon(e.item.icon)?S.kS.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,s),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),(0,k.p_)(this.element),e.classList.add("menu-entry");let t=this._action,{icon:i}=t.item;if(i&&!S.kS.isThemeIcon(i)){this.element.classList.add("icon");let e=()=>{this.element&&(this.element.style.backgroundImage=(0,L._T)(this._themeService.getColorTheme().type)?(0,n.wY)(i.dark):(0,n.wY)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange(()=>{e()}))}}};T=N([D(2,v.i),D(3,S.XE)],T);let M=class extends r.Y{constructor(e,t,i,n,o,r,s,l){var h,d,c;let g;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=r,this._instaService=s,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let p=l.get(this._storageKey,1);p&&(g=e.actions.find(e=>p===e.id)),g||(g=e.actions[0]),this._defaultAction=this._instaService.createInstance(E,g,{keybinding:this._getDefaultActionKeybindingLabel(g)});let m=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(h=null==t?void 0:t.menuAsChild)||void 0===h||h,classNames:null!==(d=null==t?void 0:t.classNames)&&void 0!==d?d:["codicon","codicon-chevron-down"],actionRunner:null!==(c=null==t?void 0:t.actionRunner)&&void 0!==c?c:new a.Wi});this._dropdown=new u(e,e.actions,this._contextMenuService,m),this._dropdown.actionRunner.onDidRun(e=>{e.action instanceof f.U8&&this.update(e.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(E,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.Wi{runAction(e,t){return x(this,void 0,void 0,function*(){yield e.run(void 0)})}},this._container&&this._defaultAction.render((0,n.Ce)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){let t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let t=(0,n.$)(".action-container");this._defaultAction.render((0,n.R3)(this._container,t)),this._register((0,n.nm)(t,n.tw.KEY_DOWN,e=>{let t=new o.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())}));let i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.R3)(this._container,i)),this._register((0,n.nm)(i,n.tw.KEY_DOWN,e=>{var t;let i=new o.y(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};function A(e,t,i){return t instanceof f.U8?e.createInstance(E,t,i):t instanceof f.NZ?t.item.rememberDefaultAction?e.createInstance(M,t,i):e.createInstance(T,t,i):void 0}M=N([D(2,b.d),D(3,w.lT),D(4,v.i),D(5,f.co),D(6,C.TG),D(7,y.Uy)],M)},84144:function(e,t,i){"use strict";i.d(t,{BH:function(){return _},NZ:function(){return v},U8:function(){return C},co:function(){return f},eH:function(){return m},vr:function(){return p}});var n=i(74741),o=i(73046),r=i(4669),s=i(53725),a=i(9917),l=i(91741),h=i(94565),d=i(38819),u=i(72065),c=i(97781),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}class m{constructor(e){if(m._instances.has(e))throw TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);m._instances.set(e,this),this.id=e}}m._instances=new Map,m.CommandPalette=new m("CommandPalette"),m.DebugBreakpointsContext=new m("DebugBreakpointsContext"),m.DebugCallStackContext=new m("DebugCallStackContext"),m.DebugConsoleContext=new m("DebugConsoleContext"),m.DebugVariablesContext=new m("DebugVariablesContext"),m.DebugWatchContext=new m("DebugWatchContext"),m.DebugToolBar=new m("DebugToolBar"),m.DebugToolBarStop=new m("DebugToolBarStop"),m.EditorContext=new m("EditorContext"),m.SimpleEditorContext=new m("SimpleEditorContext"),m.EditorContextCopy=new m("EditorContextCopy"),m.EditorContextPeek=new m("EditorContextPeek"),m.EditorContextShare=new m("EditorContextShare"),m.EditorTitle=new m("EditorTitle"),m.EditorTitleRun=new m("EditorTitleRun"),m.EditorTitleContext=new m("EditorTitleContext"),m.EmptyEditorGroup=new m("EmptyEditorGroup"),m.EmptyEditorGroupContext=new m("EmptyEditorGroupContext"),m.ExplorerContext=new m("ExplorerContext"),m.ExtensionContext=new m("ExtensionContext"),m.GlobalActivity=new m("GlobalActivity"),m.CommandCenter=new m("CommandCenter"),m.LayoutControlMenuSubmenu=new m("LayoutControlMenuSubmenu"),m.LayoutControlMenu=new m("LayoutControlMenu"),m.MenubarMainMenu=new m("MenubarMainMenu"),m.MenubarAppearanceMenu=new m("MenubarAppearanceMenu"),m.MenubarDebugMenu=new m("MenubarDebugMenu"),m.MenubarEditMenu=new m("MenubarEditMenu"),m.MenubarCopy=new m("MenubarCopy"),m.MenubarFileMenu=new m("MenubarFileMenu"),m.MenubarGoMenu=new m("MenubarGoMenu"),m.MenubarHelpMenu=new m("MenubarHelpMenu"),m.MenubarLayoutMenu=new m("MenubarLayoutMenu"),m.MenubarNewBreakpointMenu=new m("MenubarNewBreakpointMenu"),m.MenubarPanelAlignmentMenu=new m("MenubarPanelAlignmentMenu"),m.MenubarPanelPositionMenu=new m("MenubarPanelPositionMenu"),m.MenubarPreferencesMenu=new m("MenubarPreferencesMenu"),m.MenubarRecentMenu=new m("MenubarRecentMenu"),m.MenubarSelectionMenu=new m("MenubarSelectionMenu"),m.MenubarShare=new m("MenubarShare"),m.MenubarSwitchEditorMenu=new m("MenubarSwitchEditorMenu"),m.MenubarSwitchGroupMenu=new m("MenubarSwitchGroupMenu"),m.MenubarTerminalMenu=new m("MenubarTerminalMenu"),m.MenubarViewMenu=new m("MenubarViewMenu"),m.MenubarHomeMenu=new m("MenubarHomeMenu"),m.OpenEditorsContext=new m("OpenEditorsContext"),m.ProblemsPanelContext=new m("ProblemsPanelContext"),m.SCMChangeContext=new m("SCMChangeContext"),m.SCMResourceContext=new m("SCMResourceContext"),m.SCMResourceFolderContext=new m("SCMResourceFolderContext"),m.SCMResourceGroupContext=new m("SCMResourceGroupContext"),m.SCMSourceControl=new m("SCMSourceControl"),m.SCMTitle=new m("SCMTitle"),m.SearchContext=new m("SearchContext"),m.StatusBarWindowIndicatorMenu=new m("StatusBarWindowIndicatorMenu"),m.StatusBarRemoteIndicatorMenu=new m("StatusBarRemoteIndicatorMenu"),m.TestItem=new m("TestItem"),m.TestItemGutter=new m("TestItemGutter"),m.TestPeekElement=new m("TestPeekElement"),m.TestPeekTitle=new m("TestPeekTitle"),m.TouchBarContext=new m("TouchBarContext"),m.TitleBarContext=new m("TitleBarContext"),m.TitleBarTitleContext=new m("TitleBarTitleContext"),m.TunnelContext=new m("TunnelContext"),m.TunnelPrivacy=new m("TunnelPrivacy"),m.TunnelProtocol=new m("TunnelProtocol"),m.TunnelPortInline=new m("TunnelInline"),m.TunnelTitle=new m("TunnelTitle"),m.TunnelLocalAddressInline=new m("TunnelLocalAddressInline"),m.TunnelOriginInline=new m("TunnelOriginInline"),m.ViewItemContext=new m("ViewItemContext"),m.ViewContainerTitle=new m("ViewContainerTitle"),m.ViewContainerTitleContext=new m("ViewContainerTitleContext"),m.ViewTitle=new m("ViewTitle"),m.ViewTitleContext=new m("ViewTitleContext"),m.CommentThreadTitle=new m("CommentThreadTitle"),m.CommentThreadActions=new m("CommentThreadActions"),m.CommentTitle=new m("CommentTitle"),m.CommentActions=new m("CommentActions"),m.InteractiveToolbar=new m("InteractiveToolbar"),m.InteractiveCellTitle=new m("InteractiveCellTitle"),m.InteractiveCellDelete=new m("InteractiveCellDelete"),m.InteractiveCellExecute=new m("InteractiveCellExecute"),m.InteractiveInputExecute=new m("InteractiveInputExecute"),m.NotebookToolbar=new m("NotebookToolbar"),m.NotebookCellTitle=new m("NotebookCellTitle"),m.NotebookCellDelete=new m("NotebookCellDelete"),m.NotebookCellInsert=new m("NotebookCellInsert"),m.NotebookCellBetween=new m("NotebookCellBetween"),m.NotebookCellListTop=new m("NotebookCellTop"),m.NotebookCellExecute=new m("NotebookCellExecute"),m.NotebookCellExecutePrimary=new m("NotebookCellExecutePrimary"),m.NotebookDiffCellInputTitle=new m("NotebookDiffCellInputTitle"),m.NotebookDiffCellMetadataTitle=new m("NotebookDiffCellMetadataTitle"),m.NotebookDiffCellOutputsTitle=new m("NotebookDiffCellOutputsTitle"),m.NotebookOutputToolbar=new m("NotebookOutputToolbar"),m.NotebookEditorLayoutConfigure=new m("NotebookEditorLayoutConfigure"),m.NotebookKernelSource=new m("NotebookKernelSource"),m.BulkEditTitle=new m("BulkEditTitle"),m.BulkEditContext=new m("BulkEditContext"),m.TimelineItemContext=new m("TimelineItemContext"),m.TimelineTitle=new m("TimelineTitle"),m.TimelineTitleContext=new m("TimelineTitleContext"),m.TimelineFilterSubMenu=new m("TimelineFilterSubMenu"),m.AccountsContext=new m("AccountsContext"),m.PanelTitle=new m("PanelTitle"),m.AuxiliaryBarTitle=new m("AuxiliaryBarTitle"),m.TerminalInstanceContext=new m("TerminalInstanceContext"),m.TerminalEditorInstanceContext=new m("TerminalEditorInstanceContext"),m.TerminalNewDropdownContext=new m("TerminalNewDropdownContext"),m.TerminalTabContext=new m("TerminalTabContext"),m.TerminalTabEmptyAreaContext=new m("TerminalTabEmptyAreaContext"),m.TerminalInlineTabContext=new m("TerminalInlineTabContext"),m.WebviewContext=new m("WebviewContext"),m.InlineCompletionsActions=new m("InlineCompletionsActions"),m.NewFile=new m("NewFile"),m.MergeToolbar=new m("MergeToolbar"),m.MergeInput1Toolbar=new m("MergeToolbar1Toolbar"),m.MergeInput2Toolbar=new m("MergeToolbar2Toolbar");let f=(0,u.yh)("menuService"),_=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===m.CommandPalette}}addCommand(e){return this.addCommands(s.$.single(e))}addCommands(e){for(let t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,a.OF)(()=>{let t=!1;for(let i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){return this.appendMenuItems(s.$.single({id:e,item:t}))}appendMenuItems(e){let t=new Set,i=new l.S;for(let{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new l.S,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),(0,a.OF)(()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){let t=new Set;for(let i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};class v extends n.wY{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){let e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);for(let[,o]of(t.dispose(),i))o.length>0&&(e.push(...o),e.push(new n.Z0));return e.length&&e.pop(),e}}let C=class e{constructor(t,i,n,r,s,a){var l,h;if(this.hideActions=r,this._commandService=a,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(h="string"==typeof t.tooltip?t.tooltip:null===(l=t.tooltip)||void 0===l?void 0:l.value)&&void 0!==h?h:"",this.enabled=!t.precondition||s.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){let e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=s.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,r,s,a):void 0,this._options=n,c.kS.isThemeIcon(t.icon)&&(this.class=o.dT.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(4,d.i6),g(5,h.Hy)],C)},84972:function(e,t,i){"use strict";i.d(t,{p:function(){return o}});var n=i(72065);let o=(0,n.yh)("clipboardService")},94565:function(e,t,i){"use strict";i.d(t,{Hy:function(){return h},P0:function(){return d}});var n=i(4669),o=i(53725),r=i(9917),s=i(91741),a=i(98401),l=i(72065);let h=(0,l.yh)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw Error("invalid command");if("string"==typeof e){if(!t)throw Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){let t=[];for(let i of e.description.args)t.push(i.constraint);let i=e.handler;e.handler=function(e,...n){return(0,a.D8)(n,t),i(e,...n)}}let{id:i}=e,n=this._commands.get(i);n||(n=new s.S,this._commands.set(i,n));let o=n.unshift(e),l=(0,r.OF)(()=>{o();let e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,(e,...i)=>e.get(h).executeCommand(t,...i))}getCommand(e){let t=this._commands.get(e);if(!(!t||t.isEmpty()))return o.$.first(t)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",()=>{})},33108:function(e,t,i){"use strict";i.d(t,{KV:function(){return s},Mt:function(){return l},Od:function(){return r},UI:function(){return h},Ui:function(){return o},xL:function(){return a}});var n=i(72065);let o=(0,n.yh)("configurationService");function r(e,t){let i=Object.create(null);for(let n in e)s(i,n,e[n],t);return i}function s(e,t,i,n){let o=t.split("."),r=o.pop(),s=e;for(let e=0;e{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),i}validateAndRegisterProperties(e,t=!0,i,n,o=3){var a;o=r.Jp(e.scope)?o:e.scope;let l=[],h=e.properties;if(h)for(let e in h){let d=h[e];if(t&&function(e,t){var i,n,o,r;return e.trim()?y.test(e)?s.NC("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==L.getConfigurationProperties()[e]?s.NC("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==L.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?s.NC("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(o=t.policy)||void 0===o?void 0:o.name,L.getPolicyConfigurations().get(null===(r=t.policy)||void 0===r?void 0:r.name)):null:s.NC("config.property.empty","Cannot register an empty property")}(e,d)){delete h[e];continue}if(d.source=i,d.defaultDefaultValue=h[e].default,this.updatePropertyDefaultValue(e,d),y.test(e)?d.scope=void 0:(d.scope=r.Jp(d.scope)?o:d.scope,d.restricted=r.Jp(d.restricted)?!!(null==n?void 0:n.includes(e)):d.restricted),h[e].hasOwnProperty("included")&&!h[e].included){this.excludedConfigurationProperties[e]=h[e],delete h[e];continue}this.configurationProperties[e]=h[e],(null===(a=h[e].policy)||void 0===a?void 0:a.name)&&this.policyConfigurations.set(h[e].policy.name,e),!h[e].deprecationMessage&&h[e].markdownDeprecationMessage&&(h[e].deprecationMessage=h[e].markdownDeprecationMessage),l.push(e)}let d=e.allOf;if(d)for(let e of d)l.push(...this.validateAndRegisterProperties(e,t,i,n,o));return l}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){let t=e=>{let i=e.properties;if(i)for(let e in i)this.updateSchema(e,i[e]);let n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:c.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,i={type:"object",description:s.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:s.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),u.properties[t]=i,c.properties[t]=i,g.properties[t]=i,p.properties[t]=i,m.properties[t]=i,f.properties[t]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){let e={type:"object",description:s.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:s.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};u.patternProperties[w]=e,c.patternProperties[w]=e,g.patternProperties[w]=e,p.patternProperties[w]=e,m.patternProperties[w]=e,f.patternProperties[w]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.configurationDefaultsOverrides.get(e),n=null==i?void 0:i.value,o=null==i?void 0:i.source;r.o8(n)&&(n=t.defaultDefaultValue,o=void 0),r.o8(n)&&(n=function(e){let t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};h.B.add(d.Configuration,L)},38819:function(e,t,i){"use strict";i.d(t,{Ao:function(){return l},Eq:function(){return T},Fb:function(){return h},K8:function(){return A},i6:function(){return E},uy:function(){return I}});var n=i(1432),o=i(97295),r=i(72065);let s=new Map;s.set("false",!1),s.set("true",!0),s.set("isMac",n.dz),s.set("isLinux",n.IJ),s.set("isWindows",n.ED),s.set("isWeb",n.$L),s.set("isMacNative",n.dz&&!n.$L),s.set("isEdge",n.un),s.set("isFirefox",n.vU),s.set("isChrome",n.i7),s.set("isSafari",n.G6);let a=Object.prototype.hasOwnProperty;class l{static has(e){return g.create(e)}static equals(e,t){return p.create(e,t)}static regex(e,t){return L.create(e,t)}static not(e){return v.create(e)}static and(...e){return D.create(e,null)}static or(...e){return x.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return x.create(i.map(e=>this._deserializeAndExpression(e,t)),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return D.create(i.map(e=>this._deserializeOne(e,t)),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return _.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return p.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return L.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" not in ")>=0){let t=e.split(" not in ");return f.create(t[0].trim(),t[1].trim())}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return m.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){let t=e.split(">=");return w.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){let t=e.split(">");return b.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){let t=e.split("<=");return S.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){let t=e.split("<");return y.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?v.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if((0,o.m5)(e)){if(t)throw Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let r=e.slice(i+1,n),s="i"===e[n+1]?"i":"";try{return new RegExp(r,s)}catch(i){if(t)throw Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function h(e,t){let i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!!i&&!!n&&i.equals(n)}function d(e,t){return e.cmp(t)}class u{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return c.INSTANCE}}u.INSTANCE=new u;class c{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return u.INSTANCE}}c.INSTANCE=new c;class g{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){let i=s.get(e);return"boolean"==typeof i?i?c.INSTANCE:u.INSTANCE:new g(e,t)}cmp(e){var t,i;return e.type!==this.type?this.type-e.type:(t=this.key,t<(i=e.key)?-1:t>i?1:0)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){let e=s.get(this.key);return"boolean"==typeof e?e?c.INSTANCE:u.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}class p{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if("boolean"==typeof t)return t?g.create(e,i):v.create(e,i);let n=s.get(e);return"boolean"==typeof n?t===(n?"true":"false")?c.INSTANCE:u.INSTANCE:new p(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){let e=s.get(this.key);return"boolean"==typeof e?this.value===(e?"true":"false")?c.INSTANCE:u.INSTANCE:this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class m{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new m(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&a.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=f.create(this.key,this.valueKey)),this.negated}}class f{constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=m.create(e,t)}static create(e,t){return new f(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class _{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if("boolean"==typeof t)return t?v.create(e,i):g.create(e,i);let n=s.get(e);return"boolean"==typeof n?t===(n?"true":"false")?u.INSTANCE:c.INSTANCE:new _(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){let e=s.get(this.key);return"boolean"==typeof e?this.value===(e?"true":"false")?u.INSTANCE:c.INSTANCE:this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class v{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){let i=s.get(e);return"boolean"==typeof i?i?u.INSTANCE:c.INSTANCE:new v(e,t)}cmp(e){var t,i;return e.type!==this.type?this.type-e.type:(t=this.key,t<(i=e.key)?-1:t>i?1:0)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){let e=s.get(this.key);return"boolean"==typeof e?e?u.INSTANCE:c.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this)),this.negated}}function C(e,t){if("string"==typeof e){let t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):u.INSTANCE}class b{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return C(t,t=>new b(e,t,i))}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class w{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return C(t,t=>new w(e,t,i))}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class y{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return C(t,t=>new y(e,t,i))}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new S(e,t,i))}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class L{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new L(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;let t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(e){this._actual=e,this.type=8}static create(e){return new k(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function N(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){let e=i[i.length-1];if(9!==e.type)break;i.pop();let t=i.pop(),n=0===i.length,o=x.create(e.expr.map(e=>D.create([e,t],null)),null,n);o&&(i.push(o),i.sort(d))}return 1===i.length?i[0]:new D(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=x.create(e,this,!0)}return this.negated}}class x{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return x._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),i=e.shift(),n=[];for(let e of R(t))for(let t of R(i))n.push(D.create([e,t],null));let o=0===e.length;e.unshift(x.create(n,null,o))}this.negated=e[0]}return this.negated}}class I extends g{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?I._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&I._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return I._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return p.create(this.key,e)}}I._info=[];let E=(0,r.yh)("contextKeyService"),T="setContext";function M(e,t,i,n){return ei?1:tn?1:0}function A(e,t){if(6===t.type&&9!==e.type&&6!==e.type){for(let i of t.expr)if(e.equals(i))return!0}let i=e.negate(),n=R(i).concat(R(t));n.sort(d);for(let e=0;e{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(e=>{this._onPreserveCaseKeyDown.fire(e)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let g=[this.preserveCase.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=g.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?(g[t].blur(),this.inputBox.focus()):i>=0&&g[i].focus(),r.zB.stop(e,!0)}}});let m=document.createElement("div");m.className="controls",m.style.display=this._showOptionButtons?"block":"none",m.appendChild(this.preserveCase.domNode),this.domNode.appendChild(m),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){let e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);let t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var f=i(38819),_=i(49989),v=i(9917),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},b=function(e,t){return function(i,n){t(i,n,e)}};let w=new f.uy("suggestWidgetVisible",!1,(0,u.NC)("suggestWidgetVisible","Whether suggestion are visible")),y="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",L="historyNavigationBackwardsEnabled",k=[];function N(e,t){if(k.includes(t))throw Error("Cannot register the same widget multiple times");k.push(t);let i=new v.SL,o=i.add(e.createScoped(t.element)),r=new f.uy(y,!1).bindTo(o),s=new f.uy(S,!0).bindTo(o),a=new f.uy(L,!0).bindTo(o),l=()=>{r.set(!0),n=t},h=()=>{r.set(!1),n===t&&(n=void 0)};return t.element===document.activeElement&&l(),i.add(t.onDidFocus(()=>l())),i.add(t.onDidBlur(()=>h())),i.add((0,v.OF)(()=>{k.splice(k.indexOf(t),1),h()})),{scopedContextKeyService:o,historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:a,dispose(){i.dispose()}}}let D=class extends o.V{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(N(n,this.inputBox))}};D=C([b(3,f.i6)],D);let x=class extends m{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(N(n,this.inputBox))}};x=C([b(3,f.i6)],x),_.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:f.Ao.and(f.Ao.has(y),f.Ao.equals(L,!0),w.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{n&&n.showPreviousValue()}}),_.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:f.Ao.and(f.Ao.has(y),f.Ao.equals(S,!0),w.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{n&&n.showNextValue()}})},97108:function(e,t,i){"use strict";i.d(t,{M:function(){return n}});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},65026:function(e,t,i){"use strict";i.d(t,{d:function(){return s},z:function(){return r}});var n=i(97108);let o=[];function r(e,t,i){t instanceof n.M||(t=new n.M(t,[],i)),o.push([e,t])}function s(){return o}},72065:function(e,t,i){"use strict";var n,o;i.d(t,{I8:function(){return n},TG:function(){return r},yh:function(){return s}}),(o=n||(n={})).serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies",o.getServiceDependencies=function(e){return e[o.DI_DEPENDENCIES]||[]};let r=s("instantiationService");function s(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);let t=function(e,i,o){if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");e[n.DI_TARGET]===e?e[n.DI_DEPENDENCIES].push({id:t,index:o}):(e[n.DI_DEPENDENCIES]=[{id:t,index:o}],e[n.DI_TARGET]=e)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},60972:function(e,t,i){"use strict";i.d(t,{y:function(){return n}});class n{constructor(...e){for(let[t,i]of(this._entries=new Map,e))this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},81294:function(e,t,i){"use strict";i.d(t,{I:function(){return r}});var n=i(4669),o=i(89872);let r={JSONContribution:"base.contributions.json"},s=new class{constructor(){this._onDidChangeSchema=new n.Q5,this.schemasById={}}registerSchema(e,t){this.schemasById[e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};o.B.add(r.JSONContribution,s)},91847:function(e,t,i){"use strict";i.d(t,{d:function(){return o}});var n=i(72065);let o=(0,n.yh)("keybindingService")},49989:function(e,t,i){"use strict";i.d(t,{W:function(){return l}});var n=i(8313),o=i(1432),r=i(94565),s=i(89872);class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){let t=a.bindToCurrentPlatform(e);if(t&&t.primary){let i=(0,n.gm)(t.primary,o.OS);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,r=t.secondary.length;i=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,r,s){1===o.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:s,weight1:n,weight2:r,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}let l=new a;function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}s.B.add("platform.keybindingsRegistry",l)},44349:function(e,t,i){"use strict";i.d(t,{e:function(){return o}});var n=i(72065);let o=(0,n.yh)("labelService")},74615:function(e,t,i){"use strict";i.d(t,{Lw:function(){return ez},XN:function(){return eK},ls:function(){return tb},ev:function(){return td},CQ:function(){return ej},PS:function(){return eJ},uJ:function(){return e0}});var n,o,r,s,a,l,h=i(65321),d=i(9488),u=i(71050),c=i(4669),g=i(9917);i(50203);var p=i(69047);class m{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{data:t,disposable:g.JT.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;let o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);let r=new u.A,s=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),s.then(t=>this.renderer.renderElement(t,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class f{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){let t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class _{constructor(e,t,i,n,o={}){let r=()=>this.model,s=n.map(e=>new m(e,r));this.list=new p.aV(e,t,i,s,Object.assign(Object.assign({},o),{accessibilityProvider:o.accessibilityProvider&&new f(r,o.accessibilityProvider)}))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return c.ju.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return c.ju.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return c.ju.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,d.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var v=i(23937);i(98524);class C{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=C.TemplateId,this.renderedTemplates=new Set;let n=new Map(t.map(e=>[e.templateId,e]));for(let t of(this.renderers=[],e)){let e=n.get(t.templateId);if(!e)throw Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){let t=(0,h.R3)(e,(0,h.$)(".monaco-table-tr")),i=[],n=[];for(let e=0;enew b(e,t)),a={size:s.reduce((e,t)=>e+t.column.weight,0),views:s.map(e=>({size:e.column.weight,view:e}))};this.splitview=this.disposables.add(new v.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;let l=new C(n,o,e=>this.splitview.getViewSize(e));this.list=this.disposables.add(new p.aV(e,this.domNode,{getHeight:e=>i.getHeight(e),getTemplateId:()=>C.TemplateId},[l],r)),c.ju.any(...s.map(e=>e.onDidLayout))(([e,t])=>l.layoutColumn(e,t),null,this.disposables),this.splitview.onDidSashReset(e=>{let t=n.reduce((e,t)=>e+t.weight,0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)},null,this.disposables),this.styleElement=(0,h.dS)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){let t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); - }`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}w.InstanceCount=0,i(4850);var y=i(59069);i(90317),i(3070);var S=i(72010);i(82900),(n=s||(s={}))[n.Unknown=0]="Unknown",n[n.Twistie=1]="Twistie",n[n.Element=2]="Element",n[n.Filter=3]="Filter";class L extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class k{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var N=i(15393),D=i(22571),x=i(53725);function I(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function E(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function T(e){return"boolean"==typeof e.collapsible}class M{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new c.E7,this._onDidChangeCollapseState=new c.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new c.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new c.Q5,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new N.vp(N.ne),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=x.$.empty(),n={}){if(0===e.length)throw new L(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,r){var s;void 0===n&&(n=x.$.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);let{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);let l=[...n],h=t[t.length-1],d=new D.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map(t=>e.getId(t.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);let u=t.slice(0,-1),c=(t,i,n)=>{if(r>0)for(let s=0;st.originalStart-e.originalStart))c(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-h,this.spliceSimple([...u,g],e.originalLength,x.$.slice(l,p,p+e.modifiedLength),o);c(g,p,g)}spliceSimple(e,t,i=x.$.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:r}){let{parentNode:s,listIndex:a,revealed:l,visible:h}=this.getParentNodeWithListIndex(e),u=[],c=x.$.map(i,e=>this.createTreeNode(e,s,s.visible?1:0,l,u,n)),g=e[e.length-1],p=s.children.length>0,m=0;for(let e=g;e>=0&&er.getId(e.element).toString())):s.lastDiffIds=s.children.map(e=>r.getId(e.element).toString()):s.lastDiffIds=void 0;let b=0;for(let e of C)e.visible&&b++;if(0!==b)for(let e=g+f.length;ee+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(s,v-e),this.list.splice(a,e,u)}if(C.length>0&&o){let e=t=>{o(t),t.children.forEach(e)};C.forEach(e)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:C});let w=s.children.length>0;p!==w&&this.setCollapsible(e.slice(0,-1),w);let y=s;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger(()=>this.refilter());break}y=y.parent}}rerender(e){if(0===e.length)throw new L(this.user,"Invalid tree location");let{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);let n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){let n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);let o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){let{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!T(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){let o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;let r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(T(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!T(t)&&t.recursive)for(let i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,r){let s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,i);s.visibility=a,n&&o.push(s);let l=e.children||x.$.empty(),h=n&&0!==a&&!s.collapsed,d=x.$.map(l,e=>this.createTreeNode(e,s,a,h,o,r)),u=0,c=1;for(let e of d)s.children.push(e),c+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=u++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=u,s.visible=2===a?u>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=c):(s.renderNodeCount=0,n&&o.pop()),null==r||r(s),s}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(0===(o=this._filterNode(e,t)))return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}let r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(let r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):I(i)?(e.filterData=i.data,E(i.visibility)):(e.filterData=void 0,E(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;let[i,...n]=e;return!(i<0)&&!(i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;let[i,...n]=e;if(i<0||i>t.children.length)throw new L(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new L(this.user,"Invalid tree location");let s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){let[r,...s]=e;if(r<0||r>t.children.length)throw new L(this.user,"Invalid tree location");for(let e=0;ee.element)),this.data=e}}function W(e){return e instanceof S.kX?new V(e):e}class H{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=g.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,W(e),t)}onDragOver(e,t,i,n,o=!0){let r=this.dnd.onDragOver(W(e),t&&t.element,i,n),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(s&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,N.Vg)(()=>{let e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback){if(!o){let e="boolean"==typeof r?r:r.accept,t="boolean"==typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[i]}}return r}if(1===r.bubble){let i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}let a=this.modelProvider(),l=a.getNodeLocation(t),h=a.getListIndex(l),u=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:(0,d.w6)(h,h+u)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(W(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}class z{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}(o=a||(a={})).None="none",o.OnHover="onHover",o.Always="always";class K{constructor(e,t=[]){this._elements=t,this.disposables=new g.SL,this.onDidChange=c.ju.forEach(e,e=>this._elements=e,this.disposables)}get elements(){return this._elements}dispose(){this.disposables.dispose()}}class U{constructor(e,t,i,n,o={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=U.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new R,this.activeIndentNodes=new Set,this.indentGuidesDisposable=g.JT.None,this.disposables=new g.SL,this.templateId=e.templateId,this.updateOptions(o),c.ju.map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),null===(r=e.onDidChangeTwistieState)||void 0===r||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,P.uZ)(e.indent,0,40)),void 0!==e.renderIndentGuides){let t=e.renderIndentGuides!==a.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){let e=new g.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=(0,h.R3)(e,(0,h.$)(".monaco-tl-row")),i=(0,h.R3)(t,(0,h.$)(".monaco-tl-indent")),n=(0,h.R3)(t,(0,h.$)(".monaco-tl-twistie")),o=(0,h.R3)(t,(0,h.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:g.JT.None,templateData:r}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));let o=U.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=`${o+this.indent-16}px`,this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,r;i.indentGuidesDisposable.dispose(),null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...A.lA.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...A.lA.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,h.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let i=new g.SL,n=this.modelProvider(),o=e;for(;;){let e=n.getNodeLocation(o),r=n.getParentNodeLocation(e);if(!r)break;let s=n.getNode(r),a=(0,h.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(s)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(s,a),i.add((0,g.OF)(()=>this.renderedIndentGuides.delete(s,a))),o=s}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,i=this.modelProvider();e.forEach(e=>{let n=i.getNodeLocation(e);try{let o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,g.B9)(this.disposables)}}U.DefaultIndent=8;class ${constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new g.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}filter(e,t){let i=1;if(this._filter){let n=this._filter.filter(e,t);if(0===(i="boolean"==typeof n?n?1:0:I(n)?E(n.visibility):n))return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:O.CL.Default,visibility:i};let n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(let e of o){let t=e&&e.toString();if(void 0===t)return{data:O.CL.Default,visibility:i};let n=(0,O.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===l.Filter?2:{data:O.CL.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,g.B9)(this.disposables)}}(r=l||(l={}))[r.Highlight=0]="Highlight",r[r.Filter=1]="Filter";class j{constructor(e,t,i,n,o){var r;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this._pattern="",this.width=0,this._onDidChangeMode=new c.Q5,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new c.Q5,this._onDidChangeOpenState=new c.Q5,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new g.SL,this.disposables=new g.SL,this._mode=null!==(r=e.options.defaultFindMode)&&void 0!==r?r:l.Highlight,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t;let i=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&i?null===(e=this.widget)||void 0===e||e.showMessage({type:2,content:(0,B.NC)("not found","No elements found.")}):null===(t=this.widget)||void 0===t||t.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===l.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1||!O.CL.isDefault(e.filterData)}style(e){var t;this.styles=e,null===(t=this.widget)||void 0===t||t.style(e)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function q(e){let t=s.Unknown;return(0,h.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=s.Twistie:(0,h.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=s.Element:(0,h.uU)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=s.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function G(e,t){t(e),e.children.forEach(e=>G(e,t))}class Q{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(null==t?void 0:t.__forceEvent)&&(0,d.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let e=this.createNodeSet(),i=t=>e.delete(t);t.forEach(e=>G(e,i)),this.set([...e.values()]);return}let i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>G(e,n));let o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>G(e,r));let s=[];for(let e of this.nodes){let t=this.identityProvider.getId(e.element).toString(),n=i.has(t);if(n){let e=o.get(t);e&&s.push(e)}else s.push(e)}if(this.nodes.length>0&&0===s.length){let e=this.getFirstViewElementWithTrait();e&&s.push(e)}this._set(s,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}}class Z extends p.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,p.iK)(e.browserEvent.target)||(0,p.cK)(e.browserEvent.target)||(0,p.hD)(e.browserEvent.target))return;let t=e.element;if(!t||this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=!1;if((o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick)&&!n&&2!==e.browserEvent.detail||!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){let i=this.tree.model,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){let t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class Y extends p.aV{constructor(e,t,i,n,o,r,s,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new Z(this,e.tree)}splice(e,t,i=[]){let n;if(super.splice(e,t,i),0===i.length)return;let o=[],r=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&o.push(e+i),this.selectionTrait.has(t)&&r.push(e+i),this.anchorTrait.has(t)&&(n=e+i)}),o.length>0&&super.setFocus((0,d.EB)([...super.getFocus(),...o])),r.length>0&&super.setSelection((0,d.EB)([...super.getSelection(),...r])),"number"==typeof n&&super.setAnchor(n)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class J{constructor(e,t,i,n,o={}){var r,s,l;let d;this._user=e,this._options=o,this.eventBufferer=new c.E7,this.onDidChangeFindOpenState=c.ju.None,this.disposables=new g.SL,this._onWillRefilter=new c.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new c.Q5;let u=new z(i),m=new c.ZD,f=new c.ZD,_=this.disposables.add(new K(f.event));for(let e of(this.renderers=n.map(e=>new U(e,()=>this.model,m.event,_,o)),this.renderers))this.disposables.add(e);o.keyboardNavigationLabelProvider&&(d=new $(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:d}),this.disposables.add(d)),this.focus=new Q(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new Q(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new Q(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new Y(e,t,u,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(s=()=>this.model,(l=o)&&Object.assign(Object.assign({},l),{identityProvider:l.identityProvider&&{getId:e=>l.identityProvider.getId(e.element)},dnd:l.dnd&&new H(s,l.dnd),multipleSelectionController:l.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>l.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>l.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:l.accessibilityProvider&&Object.assign(Object.assign({},l.accessibilityProvider),{getSetSize(e){let t=s(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i),o=t.getNode(n);return o.visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:l.accessibilityProvider&&l.accessibilityProvider.isChecked?e=>l.accessibilityProvider.isChecked(e.element):void 0,getRole:l.accessibilityProvider&&l.accessibilityProvider.getRole?e=>l.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>l.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>l.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:l.accessibilityProvider&&l.accessibilityProvider.getWidgetRole?()=>l.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:l.accessibilityProvider&&l.accessibilityProvider.getAriaLevel?e=>l.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:l.accessibilityProvider.getActiveDescendantId&&(e=>l.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:l.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},l.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>l.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})}))),{tree:this})),this.model=this.createModel(e,this.view,o),m.input=this.model.onDidChangeCollapseState;let v=c.ju.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})},this.disposables);if(v(()=>null,null,this.disposables),f.input=c.ju.chain(c.ju.any(v,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{let e=new Set;for(let t of this.focus.getNodes())e.add(t);for(let t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==o.keyboardSupport){let e=c.ju.chain(this.view.onKeyDown).filter(e=>!(0,p.cK)(e.target)).map(e=>new y.y(e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}(null===(r=o.findWidgetEnabled)||void 0===r||r)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider?(this.findController=new j(this,this.model,this.view,d,o.contextViewProvider),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=c.ju.None,this.styleElement=(0,h.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===a.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return c.ju.filter(c.ju.map(this.view.onMouseDblClick,q),e=>e.target!==s.Filter)}get onPointer(){return c.ju.map(this.view.onPointer,q)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return c.ju.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:l.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){for(let t of(this._options=Object.assign(Object.assign({},this._options),e),this.renderers))t.updateOptions(e);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===a.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),(0,F.hj)(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){var t;let i=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join("\n"),null===(t=this.findController)||void 0===t||t.style(e),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e),i=this.model.getNode(t);return i.element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){let i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){let i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!0);if(!o){let e=this.model.getParentNodeLocation(n);if(!e)return;let t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!1);if(!o){if(!i.children.some(e=>e.visible))return;let[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,g.B9)(this.disposables),this.view.dispose()}}class X{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new M(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=x.$.empty(),i={}){let n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=x.$.empty(),i){let n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null!==e.element){if(n.add(e.element),this.nodes.set(e.element,e),this.identityProvider){let t=this.identityProvider.getId(e.element).toString();o.add(t),this.nodesByIdentity.set(t,e)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,e)}},onDidDeleteNode:e=>{var t;if(null!==e.element){if(n.has(e.element)||this.nodes.delete(e.element),this.identityProvider){let t=this.identityProvider.getId(e.element).toString();o.has(t)||this.nodesByIdentity.delete(t)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,e)}}}))}preserveCollapseState(e=x.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),x.$.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){let i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});let i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new L(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);let i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),o=this.model.getNode(n);return o.element}getElementLocation(e){if(null===e)return[];let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function ee(e){let t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:x.$.map(x.$.from(e.children),ee),collapsible:e.collapsible,collapsed:e.collapsed}}function et(e){let t,i;let n=[e.element],o=e.incompressible||!1;for(;[i,t]=x.$.consume(x.$.from(e.children),2),1===i.length&&!i[0].incompressible;)n.push((e=i[0]).element);return{element:{elements:n,incompressible:o},children:x.$.map(x.$.concat(i,t),et),collapsible:e.collapsible,collapsed:e.collapsed}}function ei(e){return function e(t,i=0){let n;return(n=ie(t,0)),0===i&&t.element.incompressible)?{element:t.element.elements[i],children:n,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[i],children:n,collapsible:t.collapsible,collapsed:t.collapsed}}(e,0)}let en=e=>({getId:t=>t.elements.map(t=>e.getId(t).toString()).join("\x00")});class eo{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new X(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=x.$.empty(),i){let n=i.diffIdentityProvider&&en(i.diffIdentityProvider);if(null===e){let e=x.$.map(t,this.enabled?et:ee);this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0});return}let o=this.nodes.get(e);if(!o)throw Error("Unknown compressed tree node");let r=this.model.getNode(o),s=this.model.getParentNodeLocation(o),a=this.model.getNode(s),l=ei(r),h=function e(t,i,n){return t.element===i?Object.assign(Object.assign({},t),{children:n}):Object.assign(Object.assign({},t),{children:x.$.map(x.$.from(t.children),t=>e(t,i,n))})}(l,e,t),d=(this.enabled?et:ee)(h),u=a.children.map(e=>e===r?d:e);this._setChildren(a.element,u,{diffIdentityProvider:n,diffDepth:r.depth-a.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let t=this.model.getNode(),i=t.children,n=x.$.map(i,ei),o=x.$.map(n,e?et:ee);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){let n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(let t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(let t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return t}}let er=e=>e[e.length-1];class es{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new es(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ea{constructor(e,t,i={}){var n;this.rootRef=null,this.elementMapper=i.elementMapper||er;let o=e=>this.elementMapper(e.elements);this.nodeMapper=new k(e=>new es(o,e)),this.model=new eo(e,(n=this.nodeMapper,{splice(e,i,o){t.splice(e,i,o.map(e=>n.map(e)))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}),Object.assign(Object.assign({},i),{identityProvider:i.identityProvider&&{getId:e=>i.identityProvider.getId(o(e))},sorter:i.sorter&&{compare:(e,t)=>i.sorter.compare(e.elements[0],t.elements[0])},filter:i.filter&&{filter:(e,t)=>i.filter.filter(o(e),t)}}))}get onDidSplice(){return c.ju.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return c.ju.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return c.ju.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=x.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var el=i(49898);class eh extends J{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(void 0===e){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new X(e,t,i)}}class ed{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){let o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,r,s,a;i.compressedTreeNode?null===(r=(o=this.renderer).disposeCompressedElements)||void 0===r||r.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(s=this.renderer).disposeElement)||void 0===a||a.call(s,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([el.H],ed.prototype,"compressedTreeNodeProvider",null);class eu extends eh{constructor(e,t,i,n,o={}){let r=()=>this,s=n.map(e=>new ed(r,e));super(e,t,i,s,o&&Object.assign(Object.assign({},o),{keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(e){let t;try{t=r().getCompressedTreeNode(e)}catch(t){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e)}return 1===t.element.elements.length?o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e):o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.element.elements)}}}))}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new ea(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var ec=i(17301),eg=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};function ep(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function em(e,t){return!!t.parent&&(t.parent===e||em(e,t.parent))}class ef{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new ef(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class e_{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...A.lA.treeItemLoading.classNamesArray),!0):(t.classList.remove(...A.lA.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function ev(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function eC(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class eb extends S.kX{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function ew(e){return e instanceof S.kX?new eb(e):e}class ey{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,ew(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(ew(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(ew(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}function eS(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new ey(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function eL(e,t){t(e),e.children.forEach(e=>eL(e,t))}class ek{constructor(e,t,i,n,o,r={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new c.Q5,this._onDidChangeNodeSlowState=new c.Q5,this.nodeMapper=new k(e=>new ef(e)),this.disposables=new g.SL,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=void 0!==r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=ep({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return c.ju.map(this.tree.onDidChangeFocus,ev)}get onDidChangeSelection(){return c.ju.map(this.tree.onDidChangeSelection,ev)}get onMouseDblClick(){return c.ju.map(this.tree.onMouseDblClick,eC)}get onPointer(){return c.ju.map(this.tree.onPointer,eC)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){let r=new z(i),s=n.map(e=>new e_(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=eS(o)||{};return new eh(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return eg(this,void 0,void 0,function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;let i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return eg(this,void 0,void 0,function*(){if(void 0===this.root.element)throw new L(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event));let r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,o),i)try{this.tree.rerender(r)}catch(e){}})}rerender(e){if(void 0===e||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){let i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return eg(this,void 0,void 0,function*(){if(void 0===this.root.element)throw new L(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event));let i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;let n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event)),n})}setSelection(e,t){let i=e.map(e=>this.getDataNode(e));this.tree.setSelection(i,t)}getSelection(){let e=this.tree.getSelection();return e.map(e=>e.element)}setFocus(e,t){let i=e.map(e=>this.getDataNode(e));this.tree.setFocus(i,t)}getFocus(){let e=this.tree.getFocus();return e.map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new L(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return eg(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return eg(this,void 0,void 0,function*(){let n;if(this.subTreeRefreshPromises.forEach((o,r)=>{!n&&(r===e||em(r,e)||em(e,r))&&(n=o.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root){let t=this.tree.getNode(e);if(t.collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}}return this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return eg(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(e=>n=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield N.jT.settled(n.map(e=>this.doRefreshSubTree(e,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return eg(this,void 0,void 0,function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){let t=this.doGetChildren(e);if((0,F.TW)(t))n=Promise.resolve(t);else{let i=(0,N.Vs)(800);i.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),n=t.finally(()=>i.cancel())}}else n=Promise.resolve(x.$.empty());try{let o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,ec.n2)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let i=this.dataSource.getChildren(e.element);return(0,F.TW)(i)?this.processChildren(i):(t=(0,N.PG)(()=>eg(this,void 0,void 0,function*(){return this.processChildren((yield i))})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ec.dL))}setChildren(e,t,i,n){let o=[...t];if(0===e.children.length&&0===o.length)return[];let r=new Map,s=new Map;for(let t of e.children)if(r.set(t.element,t),this.identityProvider){let e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}let a=[],l=o.map(t=>{let o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){let i=ep({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}let l=this.identityProvider.getId(t).toString(),h=s.get(l);if(h){let e=h.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?h.collapsed?(e.children.forEach(e=>eL(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}let d=ep({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d});for(let e of r.values())eL(e,e=>this.nodes.delete(e.element));for(let e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){let n=e.children.map(e=>this.asTreeElement(e,t)),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){let i;return e.stale?{element:e,collapsible:e.hasChildren,collapsed:!0}:(i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?x.$.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:i})}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class eN{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new eN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class eD{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...A.lA.treeItemLoading.classNamesArray),!0):(t.classList.remove(...A.lA.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeCompressedElements)||void 0===r||r.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,g.B9)(this.disposables)}}class ex extends ek{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new k(e=>new eN(e)),this.filter=s.filter}createTree(e,t,i,n,o){let r=new z(i),s=n.map(e=>new eD(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=function(e){let t=e&&eS(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))})})}(o)||{};return new eu(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);let i=e=>this.identityProvider.getId(e).toString(),n=e=>{let t=new Set;for(let n of e){let e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(let n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);let s=this.getSelection(),a=!1,l=this.getFocus(),h=!1,d=e=>{let t=e.element;if(t)for(let e=0;e{let t=this.filter.filter(e,1),i="boolean"==typeof t?t?1:0:I(t)?E(t.visibility):E(t);if(2===i)throw Error("Recursive tree visibility not supported in async data compressed trees");return 1===i})),super.processChildren(e)}}class eI extends J{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new X(e,t,i)}}var eE=i(33108),eT=i(23193),eM=i(38819),eA=i(39282),eR=i(5606),eO=i(72065),eP=i(91847),eF=i(89872),eB=i(88810),eV=i(97781),eW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eH=function(e,t){return function(i,n){t(i,n,e)}};let ez=(0,eO.yh)("listService"),eK=class{constructor(e){this._themeService=e,this.disposables=new g.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;let e=new p.wD((0,h.dS)(),"");this.disposables.add((0,eB.Jl)(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw Error("Cannot register the same widget multiple times");let i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),(0,g.F8)(e.onDidFocus(()=>this.setLastFocusedList(e)),(0,g.OF)(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};eK=eW([eH(0,eV.XE)],eK);let eU=new eM.uy("listFocus",!0),e$=new eM.uy("listSupportsMultiselect",!0),ej=eM.Ao.and(eU,eM.Ao.not(eA.d0)),eq=new eM.uy("listHasSelectionOrFocus",!1),eG=new eM.uy("listDoubleSelection",!1),eQ=new eM.uy("listMultiSelection",!1),eZ=new eM.uy("listSelectionNavigation",!1),eY=new eM.uy("listSupportsFind",!0),eJ=new eM.uy("treeElementCanCollapse",!1),eX=new eM.uy("treeElementHasParent",!1),e0=new eM.uy("treeElementCanExpand",!1),e1=new eM.uy("treeElementHasChild",!1),e2=new eM.uy("treeFindOpen",!1),e5="listTypeNavigationMode",e4="listAutomaticKeyboardNavigation";function e3(e,t){let i=e.createScoped(t.getHTMLElement());return eU.bindTo(i),i}let e9="workbench.list.multiSelectModifier",e7="workbench.list.openMode",e6="workbench.list.horizontalScrolling",e8="workbench.list.defaultFindMode",te="workbench.list.keyboardNavigation",tt="workbench.tree.indent",ti="workbench.tree.renderIndentGuides",tn="workbench.list.smoothScrolling",to="workbench.list.mouseWheelScrollSensitivity",tr="workbench.list.fastScrollSensitivity",ts="workbench.tree.expandMode";function ta(e){return"alt"===e.getValue(e9)}class tl extends g.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=ta(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this.useAltAsMultipleSelectionModifier=ta(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,p.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,p.wn)(e)}}function th(e,t){var i;let n;let o=e.get(eE.Ui),r=e.get(eP.d),s=new g.SL,a=Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>r.mightProducePrintableCharacter(e)},smoothScrolling:!!o.getValue(tn),mouseWheelScrollSensitivity:o.getValue(to),fastScrollSensitivity:o.getValue(tr),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new tl(o)),keyboardNavigationEventFilter:(n=!1,e=>{if(e.toKeybinding().isModifierKey())return!1;if(n)return n=!1,!1;let t=r.softDispatch(e,e.target);return(null==t?void 0:t.enterChord)?(n=!0,!1):(n=!1,!t)})});return[a,s]}let td=class extends p.aV{constructor(e,t,i,n,o,r,s,a,l,h){let d=void 0!==o.horizontalScrolling?o.horizontalScrolling:!!l.getValue(e6),[u,c]=h.invokeFunction(th,o);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(a.getColorTheme(),eB.O2)),u),{horizontalScrolling:d})),this.disposables.add(c),this.contextKeyService=e3(r,this),this.themeService=a,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);let g=eZ.bindTo(this.contextKeyService);g.set(!!o.selectionNavigation),this.listHasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.listDoubleSelection=eG.bindTo(this.contextKeyService),this.listMultiSelection=eQ.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ta(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{let e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(l));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!l.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!l.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=l.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=l.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tp(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};td=eW([eH(5,eM.i6),eH(6,ez),eH(7,eV.XE),eH(8,eE.Ui),eH(9,eO.TG)],td);let tu=class extends _{constructor(e,t,i,n,o,r,s,a,l,h){let d=void 0!==o.horizontalScrolling?o.horizontalScrolling:!!l.getValue(e6),[u,c]=h.invokeFunction(th,o);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(a.getColorTheme(),eB.O2)),u),{horizontalScrolling:d})),this.disposables=new g.SL,this.disposables.add(c),this.contextKeyService=e3(r,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);let p=eZ.bindTo(this.contextKeyService);p.set(!!o.selectionNavigation),this._useAltAsMultipleSelectionModifier=ta(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add((0,eB.Jl)(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(l));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!l.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!l.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=l.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=l.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tp(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tu=eW([eH(5,eM.i6),eH(6,ez),eH(7,eV.XE),eH(8,eE.Ui),eH(9,eO.TG)],tu);let tc=class extends w{constructor(e,t,i,n,o,r,s,a,l,h,d){let u=void 0!==r.horizontalScrolling?r.horizontalScrolling:!!h.getValue(e6),[c,g]=d.invokeFunction(th,r);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(l.getColorTheme(),eB.O2)),c),{horizontalScrolling:u})),this.disposables.add(g),this.contextKeyService=e3(s,this),this.themeService=l,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==r.multipleSelectionSupport);let p=eZ.bindTo(this.contextKeyService);p.set(!!r.selectionNavigation),this.listHasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.listDoubleSelection=eG.bindTo(this.contextKeyService),this.listMultiSelection=eQ.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ta(h),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{let e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(h.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(h));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!h.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!h.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=h.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=h.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tm(this,Object.assign({configurationService:h},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tc=eW([eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui),eH(10,eO.TG)],tc);class tg extends g.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new c.Q5),this.onDidOpen=this._onDidOpen.event,this._register(c.ju.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.element,e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.element,e.browserEvent))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick=(null==t?void 0:t.configurationService.getValue(e7))!=="doubleClick",this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(null==t?void 0:t.configurationService.getValue(e7))!=="doubleClick"}))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;let t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;let i=2===t.detail;if(i)return;let n=1===t.button,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,n,o,t)}onMouseDblClick(e,t){if(!t)return;let i=t.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16;if(n)return;let o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,o,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class tp extends tg{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class tm extends tg{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class tf extends tg{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}let t_=class extends eh{constructor(e,t,i,n,o,r,s,a,l,h){let{options:d,getTypeNavigationMode:u,disposable:c}=r.invokeFunction(tS,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new tL(this,o,u,o.overrideStyles,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};t_=eW([eH(5,eO.TG),eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui)],t_);let tv=class extends eu{constructor(e,t,i,n,o,r,s,a,l,h){let{options:d,getTypeNavigationMode:u,disposable:c}=r.invokeFunction(tS,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new tL(this,o,u,o.overrideStyles,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tv=eW([eH(5,eO.TG),eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui)],tv);let tC=class extends eI{constructor(e,t,i,n,o,r,s,a,l,h,d){let{options:u,getTypeNavigationMode:c,disposable:g}=s.invokeFunction(tS,r);super(e,t,i,n,o,u),this.disposables.add(g),this.internals=new tL(this,r,c,r.overrideStyles,a,l,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tC=eW([eH(6,eO.TG),eH(7,eM.i6),eH(8,ez),eH(9,eV.XE),eH(10,eE.Ui)],tC);let tb=class extends ek{constructor(e,t,i,n,o,r,s,a,l,h,d){let{options:u,getTypeNavigationMode:c,disposable:g}=s.invokeFunction(tS,r);super(e,t,i,n,o,u),this.disposables.add(g),this.internals=new tL(this,r,c,r.overrideStyles,a,l,h,d),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tb=eW([eH(6,eO.TG),eH(7,eM.i6),eH(8,ez),eH(9,eV.XE),eH(10,eE.Ui)],tb);let tw=class extends ex{constructor(e,t,i,n,o,r,s,a,l,h,d,u){let{options:c,getTypeNavigationMode:g,disposable:p}=a.invokeFunction(tS,s);super(e,t,i,n,o,r,c),this.disposables.add(p),this.internals=new tL(this,s,g,s.overrideStyles,l,h,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function ty(e){let t=e.getValue(e8);if("highlight"===t)return l.Highlight;if("filter"===t)return l.Filter;let i=e.getValue(te);return"simple"===i||"highlight"===i?l.Highlight:"filter"===i?l.Filter:void 0}function tS(e,t){var i;let n=e.get(eE.Ui),o=e.get(eR.u),r=e.get(eM.i6),s=e.get(eO.TG),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:!!n.getValue(e6),[l,h]=s.invokeFunction(th,t),d=t.additionalScrollHeight;return{getTypeNavigationMode:()=>{let e=r.getContextKeyValue(e5);if("automatic"===e)return p.AA.Automatic;if("trigger"===e)return p.AA.Trigger;let t=r.getContextKeyValue(e4);if(!1===t)return p.AA.Trigger},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:"number"==typeof n.getValue(tt)?n.getValue(tt):void 0,renderIndentGuides:n.getValue(ti),smoothScrolling:!!n.getValue(tn),defaultFindMode:ty(n),horizontalScrolling:a,additionalScrollHeight:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(ts),contextViewProvider:o})}}tw=eW([eH(7,eO.TG),eH(8,eM.i6),eH(9,ez),eH(10,eV.XE),eH(11,eE.Ui)],tw);let tL=class{constructor(e,t,i,n,o,r,s,a){var l;this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=e3(o,e),this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);let h=eZ.bindTo(this.contextKeyService);h.set(!!t.selectionNavigation),this.listSupportFindWidget=eY.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(l=t.findWidgetEnabled)||void 0===l||l),this.hasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.hasDoubleSelection=eG.bindTo(this.contextKeyService),this.hasMultiSelection=eQ.bindTo(this.contextKeyService),this.treeElementCanCollapse=eJ.bindTo(this.contextKeyService),this.treeElementHasParent=eX.bindTo(this.contextKeyService),this.treeElementCanExpand=e0.bindTo(this.contextKeyService),this.treeElementHasChild=e1.bindTo(this.contextKeyService),this.treeFindOpen=e2.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=ta(a),this.updateStyleOverrides(n);let d=()=>{let t=e.getFocus()[0];if(!t)return;let i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},u=new Set;u.add(e5),u.add(e4),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{let t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{let t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),d()}),e.onDidChangeCollapseState(d),e.onDidChangeModel(d),e.onDidChangeFindOpenState(e=>this.treeFindOpen.set(e)),a.onDidChangeConfiguration(i=>{let n={};if(i.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(a)),i.affectsConfiguration(tt)){let e=a.getValue(tt);n=Object.assign(Object.assign({},n),{indent:e})}if(i.affectsConfiguration(ti)){let e=a.getValue(ti);n=Object.assign(Object.assign({},n),{renderIndentGuides:e})}if(i.affectsConfiguration(tn)){let e=!!a.getValue(tn);n=Object.assign(Object.assign({},n),{smoothScrolling:e})}if((i.affectsConfiguration(e8)||i.affectsConfiguration(te))&&e.updateOptions({defaultFindMode:ty(a)}),i.affectsConfiguration(e6)&&void 0===t.horizontalScrolling){let e=!!a.getValue(e6);n=Object.assign(Object.assign({},n),{horizontalScrolling:e})}if(i.affectsConfiguration(ts)&&void 0===t.expandOnlyOnTwistieClick&&(n=Object.assign(Object.assign({},n),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(ts)})),i.affectsConfiguration(to)){let e=a.getValue(to);n=Object.assign(Object.assign({},n),{mouseWheelScrollSensitivity:e})}if(i.affectsConfiguration(tr)){let e=a.getValue(tr);n=Object.assign(Object.assign({},n),{fastScrollSensitivity:e})}Object.keys(n).length>0&&e.updateOptions(n)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new tf(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){(0,g.B9)(this.styler),this.styler=e?(0,eB.Jl)(this.tree,this.themeService,e):g.JT.None}dispose(){this.disposables=(0,g.B9)(this.disposables),(0,g.B9)(this.styler),this.styler=void 0}};tL=eW([eH(4,eM.i6),eH(5,ez),eH(6,eV.XE),eH(7,eE.Ui)],tL);let tk=eF.B.as(eT.IP.Configuration);tk.registerConfiguration({id:"workbench",order:7,title:(0,B.NC)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[e9]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,B.NC)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,B.NC)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,B.NC)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[e7]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,B.NC)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[e6]:{type:"boolean",default:!1,description:(0,B.NC)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[tt]:{type:"number",default:8,minimum:4,maximum:40,description:(0,B.NC)("tree indent setting","Controls tree indentation in pixels.")},[ti]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,B.NC)("render tree indent guides","Controls whether the tree should render indent guides.")},[tn]:{type:"boolean",default:!1,description:(0,B.NC)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[to]:{type:"number",default:1,markdownDescription:(0,B.NC)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[tr]:{type:"number",default:5,description:(0,B.NC)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[e8]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,B.NC)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,B.NC)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,B.NC)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[te]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,B.NC)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,B.NC)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,B.NC)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,B.NC)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,B.NC)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' instead.")},[ts]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,B.NC)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},43557:function(e,t,i){"use strict";i.d(t,{$V:function(){return c},VZ:function(){return l},in:function(){return o},kw:function(){return u}});var n,o,r=i(4669),s=i(9917),a=i(72065);let l=(0,a.yh)("logService");(n=o||(o={}))[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Info=2]="Info",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.Off=6]="Off";let h=o.Info;class d extends s.JT{constructor(){super(...arguments),this.level=h,this._onDidChangeLogLevel=this._register(new r.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class u extends d{constructor(e=h){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=o.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=o.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=o.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=o.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class c extends s.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},98674:function(e,t,i){"use strict";i.d(t,{H0:function(){return r},ZL:function(){return o},lT:function(){return h}});var n,o,r,s=i(14603),a=i(63580),l=i(72065);(n=o||(o={}))[n.Hint=1]="Hint",n[n.Info=2]="Info",n[n.Warning=4]="Warning",n[n.Error=8]="Error",function(e){e.compare=function(e,t){return t-e};let t=Object.create(null);t[e.Error]=(0,a.NC)("sev.error","Error"),t[e.Warning]=(0,a.NC)("sev.warning","Warning"),t[e.Info]=(0,a.NC)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(o||(o={})),function(e){function t(e,t){let i=[""];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(""),e.code?"string"==typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(""),e.message&&t?i.push(e.message.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(""),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(""),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(""),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(""),i.push(""),i.join("\xa6")}e.makeKey=function(e){return t(e,!0)},e.makeKeyOptionalMessage=t}(r||(r={}));let h=(0,l.yh)("markerService")},59422:function(e,t,i){"use strict";i.d(t,{EO:function(){return a},lT:function(){return s},zb:function(){return r}});var n=i(14603),o=i(72065),r=n.Z;let s=(0,o.yh)("notificationService");class a{}},50988:function(e,t,i){"use strict";i.d(t,{Gs:function(){return u},SW:function(){return h},v4:function(){return l},xI:function(){return c},xn:function(){return d}});var n=i(9917),o=i(97295),r=i(70666),s=i(72065),a=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let l=(0,s.yh)("openerService"),h=Object.freeze({_serviceBrand:void 0,registerOpener:()=>n.JT.None,registerValidator:()=>n.JT.None,registerExternalUriResolver:()=>n.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>n.JT.None,open(){return a(this,void 0,void 0,function*(){return!1})},resolveExternalUri(e){return a(this,void 0,void 0,function*(){return{resolved:e,dispose(){}}})}});function d(e,t){return r.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}function u(e,...t){return t.some(t=>d(e,t))}function c(e){let t;let i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},90535:function(e,t,i){"use strict";i.d(t,{Ex:function(){return r},R9:function(){return o},ek:function(){return s}});var n=i(72065);let o=(0,n.yh)("progressService");Object.freeze({total(){},worked(){},done(){}});class r{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}r.None=Object.freeze({report(){}});let s=(0,n.yh)("editorProgressService")},45503:function(e,t,i){"use strict";i.d(t,{IP:function(){return l},Ry:function(){return o}});var n,o,r=i(9488),s=i(9917),a=i(89872);(n=o||(o={}))[n.PRESERVE=0]="PRESERVE",n[n.LAST=1]="LAST";let l={Quickaccess:"workbench.contributions.quickaccess"};a.B.add(l.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,s.OF)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,r.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){let t=e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0;return t||this.defaultProvider}})},41157:function(e,t,i){"use strict";i.d(t,{eJ:function(){return r},jG:function(){return o.jG}});var n=i(72065),o=i(67746);let r=(0,n.yh)("quickInputService")},89872:function(e,t,i){"use strict";i.d(t,{B:function(){return r}});var n=i(35146),o=i(98401);let r=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},87060:function(e,t,i){"use strict";i.d(t,{Uy:function(){return f},vm:function(){return v},fk:function(){return s}});var n,o,r,s,a=i(4669),l=i(9917),h=i(98401),d=i(15393),u=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};(n=r||(r={}))[n.None=0]="None",n[n.Initialized=1]="Initialized",n[n.Closed=2]="Closed";class c extends l.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new a.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=r.None,this.cache=new Map,this.flushDelayer=new d.rH(c.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach((e,t)=>this.accept(t,e)),null===(i=e.deleted)||void 0===i||i.forEach(e=>this.accept(e,void 0))}accept(e,t){if(this.state===r.Closed)return;let i=!1;if((0,h.Jp)(t))i=this.cache.delete(e);else{let n=this.cache.get(e);n!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire(e)}get(e,t){let i=this.cache.get(e);return(0,h.Jp)(i)?t:i}getBoolean(e,t){let i=this.get(e);return(0,h.Jp)(i)?t:"true"===i}getNumber(e,t){let i=this.get(e);return(0,h.Jp)(i)?t:parseInt(i,10)}set(e,t){return u(this,void 0,void 0,function*(){if(this.state===r.Closed)return;if((0,h.Jp)(t))return this.delete(e);let i=String(t),n=this.cache.get(e);if(n!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return u(this,void 0,void 0,function*(){if(this.state===r.Closed)return;let t=this.cache.delete(e);if(t)return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return u(this,void 0,void 0,function*(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()})})}doFlush(e){return u(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),e)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}c.DEFAULT_FLUSH_DELAY=100;class g{constructor(){this.onDidChangeItemsExternal=a.ju.None,this.items=new Map}updateItems(e){var t,i;return u(this,void 0,void 0,function*(){null===(t=e.insert)||void 0===t||t.forEach((e,t)=>this.items.set(t,e)),null===(i=e.delete)||void 0===i||i.forEach(e=>this.items.delete(e))})}}var p=i(72065);let m="__$__targetStorageMarker",f=(0,p.yh)("storageService");(o=s||(s={}))[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN";class _ extends l.JT{constructor(e={flushInterval:_.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new a.K3),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new a.K3),this._onWillSaveState=this._register(new a.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(e,t){if(t===m){switch(e){case -1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){if((0,h.Jp)(t)){this.remove(e,i);return}this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;let r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(m,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(m,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case -1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.get(m,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}_.DEFAULT_FLUSH_INTERVAL=6e4;class v extends _{constructor(){super(),this.applicationStorage=this._register(new c(new g)),this.profileStorage=this._register(new c(new g)),this.workspaceStorage=this._register(new c(new g)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case -1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},10829:function(e,t,i){"use strict";i.d(t,{b:function(){return o}});var n=i(72065);let o=(0,n.yh)("telemetryService")},73910:function(e,t,i){"use strict";i.d(t,{$DX:function(){return tM},$d5:function(){return tg},ABB:function(){return Z},AS1:function(){return tp},AWI:function(){return eS},BOY:function(){return t2},Bqu:function(){return tn},C3g:function(){return O},CA6:function(){return tJ},CNo:function(){return eV},Cdg:function(){return tx},CzK:function(){return eZ},D0T:function(){return ec},D1_:function(){return ep},DEr:function(){return tI},Dut:function(){return el},E3h:function(){return tA},EPQ:function(){return M},EQn:function(){return tS},ES4:function(){return eD},EiJ:function(){return eR},F3d:function(){return tu},F9q:function(){return e3},Fm_:function(){return tK},Fu1:function(){return eG},GO4:function(){return U},Gj_:function(){return tG},Gwp:function(){return tm},HCL:function(){return ej},Hfx:function(){return eg},Hz8:function(){return tE},IPX:function(){return u},IYc:function(){return tj},Ido:function(){return m},Itd:function(){return tY},Ivo:function(){return tQ},JpG:function(){return t1},K19:function(){return eL},LLc:function(){return e6},L_H:function(){return X},L_t:function(){return e8},LoV:function(){return eW},M6C:function(){return tr},MUv:function(){return eT},NOs:function(){return eu},NPS:function(){return tk},Ng6:function(){return em},OLZ:function(){return t5},OZR:function(){return B},Oop:function(){return ti},P4M:function(){return eX},P6G:function(){return g},P6Y:function(){return e4},PRb:function(){return D},PX0:function(){return tf},PpC:function(){return eK},Pvw:function(){return I},QO2:function(){return d},R80:function(){return _},RV_:function(){return A},Rzx:function(){return ex},SPM:function(){return tU},SUG:function(){return R},SUY:function(){return t$},Saq:function(){return tC},Sbf:function(){return eB},Snq:function(){return t8},SwI:function(){return y},T83:function(){return ea},Tnx:function(){return ts},UnT:function(){return tw},VVv:function(){return ez},Vqd:function(){return tD},XEs:function(){return x},XL$:function(){return e9},XZx:function(){return f},Xy4:function(){return tX},YI3:function(){return T},ZGJ:function(){return tR},ZnX:function(){return t9},_2n:function(){return tt},_Yy:function(){return eH},_bK:function(){return te},_lC:function(){return E},_t9:function(){return F},_wn:function(){return G},b6y:function(){return et},b7$:function(){return K},bKB:function(){return e$},brw:function(){return t0},c63:function(){return es},cbQ:function(){return tN},cvW:function(){return ed},dCr:function(){return to},dRz:function(){return p},dt_:function(){return N},etL:function(){return Q},fEB:function(){return eh},few:function(){return er},g8u:function(){return j},g_n:function(){return eI},gkn:function(){return eO},gpD:function(){return ei},hEj:function(){return ek},hX8:function(){return eU},hzo:function(){return e0},j51:function(){return e2},j5u:function(){return z},jUe:function(){return eM},jbW:function(){return tT},kJk:function(){return eC},kVY:function(){return tZ},keg:function(){return eY},kvU:function(){return th},kwl:function(){return t7},lRK:function(){return v},lUq:function(){return tO},lWp:function(){return ey},lXJ:function(){return ee},loF:function(){return ev},mHy:function(){return e7},mV1:function(){return tc},nyM:function(){return eE},oQ$:function(){return ew},oSI:function(){return tv},opG:function(){return eb},ov3:function(){return tq},pW3:function(){return eo},paE:function(){return P},phM:function(){return eq},pnM:function(){return eA},ptc:function(){return eP},qeD:function(){return q},rg2:function(){return ta},rh:function(){return S},s$:function(){return td},sEe:function(){return L},sKV:function(){return eQ},sgC:function(){return w},tZ6:function(){return e_},uoC:function(){return en},url:function(){return b},uxu:function(){return ty},vGG:function(){return t_},xL1:function(){return C},xi6:function(){return e1},y65:function(){return tb},yJx:function(){return eF},yb5:function(){return eN},ynu:function(){return Y},ypS:function(){return eJ},ytC:function(){return tl},zJb:function(){return k},zKr:function(){return ef},zOm:function(){return e5},zRJ:function(){return J}});var n=i(15393),o=i(41264),r=i(4669),s=i(98401),a=i(63580),l=i(81294),h=i(89872);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}let u={ColorContribution:"base.contributions.colors"},c=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){this.colorsById[e]={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let i=this.colorsById[e];if(i&&i.defaults){let e=i.defaults[t.type];return t8(e,t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}};function g(e,t,i,n,o){return c.registerColor(e,(null===t||void 0===t.hcLight&&(null===t.hcDark||"string"==typeof t.hcDark?t.hcLight=t.hcDark:t.hcLight=t.light),t),i,n,o)}h.B.add(u.ColorContribution,c);let p=g("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("foreground","Overall foreground color. This color is only used if not overridden by a component."));g("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},a.NC("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));let m=g("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));g("descriptionForeground",{light:"#717171",dark:t9(p,.7),hcDark:t9(p,.7),hcLight:t9(p,.7)},a.NC("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));let f=g("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("iconForeground","The default color for icons in the workbench.")),_=g("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},a.NC("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),v=g("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},a.NC("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),C=g("contrastActiveBorder",{light:null,dark:null,hcDark:_,hcLight:_},a.NC("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));g("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),g("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Il.black,hcLight:"#292929"},a.NC("textSeparatorForeground","Color for text separators."));let b=g("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkForeground","Foreground color for links in text.")),w=g("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));g("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},a.NC("textPreformatForeground","Foreground color for preformatted text segments.")),g("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},a.NC("textBlockQuoteBackground","Background color for block quotes in text.")),g("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Il.white,hcLight:"#292929"},a.NC("textBlockQuoteBorder","Border color for block quotes in text."));let y=g("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Il.black,hcLight:"#F2F2F2"},a.NC("textCodeBlockBackground","Background color for code blocks in text.")),S=g("widget.shadow",{dark:t9(o.Il.black,.36),light:t9(o.Il.black,.16),hcDark:null,hcLight:null},a.NC("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),L=g("input.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputBoxBackground","Input box background.")),k=g("input.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("inputBoxForeground","Input box foreground.")),N=g("input.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("inputBoxBorder","Input box border.")),D=g("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:v,hcLight:v},a.NC("inputBoxActiveOptionBorder","Border color of activated options in input fields."));g("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("inputOption.hoverBackground","Background color of activated options in input fields."));let x=g("inputOption.activeBackground",{dark:t9(_,.4),light:t9(_,.2),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("inputOption.activeBackground","Background hover color of options in input fields.")),I=g("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hcDark:null,hcLight:p},a.NC("inputOption.activeForeground","Foreground color of activated options in input fields."));g("input.placeholderForeground",{light:t9(p,.5),dark:t9(p,.5),hcDark:t9(p,.7),hcLight:t9(p,.7)},a.NC("inputPlaceholderForeground","Input box foreground color for placeholder text."));let E=g("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationInfoBackground","Input validation background color for information severity.")),T=g("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationInfoForeground","Input validation foreground color for information severity.")),M=g("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:v,hcLight:v},a.NC("inputValidationInfoBorder","Input validation border color for information severity.")),A=g("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationWarningBackground","Input validation background color for warning severity.")),R=g("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationWarningForeground","Input validation foreground color for warning severity.")),O=g("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:v,hcLight:v},a.NC("inputValidationWarningBorder","Input validation border color for warning severity.")),P=g("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationErrorBackground","Input validation background color for error severity.")),F=g("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationErrorForeground","Input validation foreground color for error severity.")),B=g("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:v,hcLight:v},a.NC("inputValidationErrorBorder","Input validation border color for error severity.")),V=g("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownBackground","Dropdown background."));g("dropdown.listBackground",{dark:null,light:null,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownListBackground","Dropdown list background."));let W=g("dropdown.foreground",{dark:"#F0F0F0",light:null,hcDark:o.Il.white,hcLight:p},a.NC("dropdownForeground","Dropdown foreground.")),H=g("dropdown.border",{dark:V,light:"#CECECE",hcDark:v,hcLight:v},a.NC("dropdownBorder","Dropdown border."));g("checkbox.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("checkbox.background","Background color of checkbox widget.")),g("checkbox.foreground",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("checkbox.foreground","Foreground color of checkbox widget.")),g("checkbox.border",{dark:H,light:H,hcDark:H,hcLight:H},a.NC("checkbox.border","Border color of checkbox widget."));let z=g("button.foreground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:o.Il.white},a.NC("buttonForeground","Button foreground color."));g("button.separator",{dark:t9(z,.4),light:t9(z,.4),hcDark:t9(z,.4),hcLight:t9(z,.4)},a.NC("buttonSeparator","Button separator color."));let K=g("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},a.NC("buttonBackground","Button background color.")),U=g("button.hoverBackground",{dark:t3(K,.2),light:t4(K,.2),hcDark:null,hcLight:null},a.NC("buttonHoverBackground","Button background color when hovering."));g("button.border",{dark:v,light:v,hcDark:v,hcLight:v},a.NC("buttonBorder","Button border color.")),g("button.secondaryForeground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:p},a.NC("buttonSecondaryForeground","Secondary button foreground color."));let $=g("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Il.white},a.NC("buttonSecondaryBackground","Secondary button background color."));g("button.secondaryHoverBackground",{dark:t3($,.2),light:t4($,.2),hcDark:null,hcLight:null},a.NC("buttonSecondaryHoverBackground","Secondary button background color when hovering."));let j=g("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Il.black,hcLight:"#0F4A85"},a.NC("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),q=g("badge.foreground",{dark:o.Il.white,light:"#333",hcDark:o.Il.white,hcLight:o.Il.white},a.NC("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),G=g("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},a.NC("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Q=g("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hcDark:t9(v,.6),hcLight:t9(v,.4)},a.NC("scrollbarSliderBackground","Scrollbar slider background color.")),Z=g("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hcDark:t9(v,.8),hcLight:t9(v,.8)},a.NC("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Y=g("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hcDark:v,hcLight:v},a.NC("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),J=g("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hcDark:v,hcLight:v},a.NC("progressBarBackground","Background color of the progress bar that can show for long running operations.")),X=g("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ee=g("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("editorError.foreground","Foreground color of error squigglies in the editor.")),et=g("editorError.border",{dark:null,light:null,hcDark:o.Il.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},a.NC("errorBorder","Border color of error boxes in the editor.")),ei=g("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),en=g("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD37",hcLight:"#895503"},a.NC("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),eo=g("editorWarning.border",{dark:null,light:null,hcDark:o.Il.fromHex("#FFCC00").transparent(.8),hcLight:"#"},a.NC("warningBorder","Border color of warning boxes in the editor.")),er=g("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),es=g("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},a.NC("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ea=g("editorInfo.border",{dark:null,light:null,hcDark:o.Il.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},a.NC("infoBorder","Border color of info boxes in the editor.")),el=g("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},a.NC("editorHint.foreground","Foreground color of hint squigglies in the editor.")),eh=g("editorHint.border",{dark:null,light:null,hcDark:o.Il.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},a.NC("hintBorder","Border color of hint boxes in the editor."));g("sash.hoverBorder",{dark:_,light:_,hcDark:_,hcLight:_},a.NC("sashActiveBorder","Border color of active sashes."));let ed=g("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("editorBackground","Editor background color.")),eu=g("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Il.white,hcLight:p},a.NC("editorForeground","Editor default foreground color."));g("editorStickyScroll.background",{light:ed,dark:ed,hcDark:ed,hcLight:ed},a.NC("editorStickyScrollBackground","Sticky scroll background color for the editor")),g("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));let ec=g("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Il.white},a.NC("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),eg=g("editorWidget.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ep=g("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:v,hcLight:v},a.NC("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),em=g("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ef=g("quickInput.background",{dark:ec,light:ec,hcDark:ec,hcLight:ec},a.NC("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),e_=g("quickInput.foreground",{dark:eg,light:eg,hcDark:eg,hcLight:eg},a.NC("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ev=g("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hcDark:"#000000",hcLight:o.Il.white},a.NC("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),eC=g("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupForeground","Quick picker color for grouping labels.")),eb=g("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupBorder","Quick picker color for grouping borders.")),ew=g("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ey=g("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hcDark:o.Il.white,hcLight:p},a.NC("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),eS=g("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:v},a.NC("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),eL=g("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:p},a.NC("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ek=g("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},a.NC("editorSelectionBackground","Color of the editor selection.")),eN=g("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Il.white},a.NC("editorSelectionForeground","Color of the selected text for high contrast.")),eD=g("editor.inactiveSelectionBackground",{light:t9(ek,.5),dark:t9(ek,.5),hcDark:t9(ek,.7),hcLight:t9(ek,.5)},a.NC("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),ex=g("editor.selectionHighlightBackground",{light:t6(ek,ed,.3,.6),dark:t6(ek,ed,.3,.6),hcDark:null,hcLight:null},a.NC("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),eI=g("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),eE=g("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},a.NC("editorFindMatch","Color of the current search match.")),eT=g("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},a.NC("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),eM=g("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},a.NC("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),eA=g("editor.findMatchBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("editorFindMatchBorder","Border color of the current search match.")),eR=g("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("findMatchHighlightBorder","Border color of the other search matches.")),eO=g("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:t9(C,.4),hcLight:t9(C,.4)},a.NC("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);g("searchEditor.findMatchBackground",{light:t9(eT,.66),dark:t9(eT,.66),hcDark:eT,hcLight:eT},a.NC("searchEditor.queryMatch","Color of the Search Editor query matches.")),g("searchEditor.findMatchBorder",{light:t9(eR,.66),dark:t9(eR,.66),hcDark:eR,hcLight:eR},a.NC("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));let eP=g("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},a.NC("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),eF=g("editorHoverWidget.background",{light:ec,dark:ec,hcDark:ec,hcLight:ec},a.NC("hoverBackground","Background color of the editor hover.")),eB=g("editorHoverWidget.foreground",{light:eg,dark:eg,hcDark:eg,hcLight:eg},a.NC("hoverForeground","Foreground color of the editor hover.")),eV=g("editorHoverWidget.border",{light:ep,dark:ep,hcDark:ep,hcLight:ep},a.NC("hoverBorder","Border color of the editor hover.")),eW=g("editorHoverWidget.statusBarBackground",{dark:t3(eF,.2),light:t4(eF,.05),hcDark:ec,hcLight:ec},a.NC("statusBarBackground","Background color of the editor hover status bar.")),eH=g("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hcDark:o.Il.cyan,hcLight:"#292929"},a.NC("activeLinkForeground","Color of active links.")),ez=g("editorInlayHint.foreground",{dark:t9(q,.8),light:t9(q,.8),hcDark:q,hcLight:q},a.NC("editorInlayHintForeground","Foreground color of inline hints")),eK=g("editorInlayHint.background",{dark:t9(j,.6),light:t9(j,.3),hcDark:j,hcLight:j},a.NC("editorInlayHintBackground","Background color of inline hints")),eU=g("editorInlayHint.typeForeground",{dark:ez,light:ez,hcDark:ez,hcLight:ez},a.NC("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),e$=g("editorInlayHint.typeBackground",{dark:eK,light:eK,hcDark:eK,hcLight:eK},a.NC("editorInlayHintBackgroundTypes","Background color of inline hints for types")),ej=g("editorInlayHint.parameterForeground",{dark:ez,light:ez,hcDark:ez,hcLight:ez},a.NC("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),eq=g("editorInlayHint.parameterBackground",{dark:eK,light:eK,hcDark:eK,hcLight:eK},a.NC("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),eG=g("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},a.NC("editorLightBulbForeground","The color used for the lightbulb actions icon.")),eQ=g("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.NC("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),eZ=new o.Il(new o.VS(155,185,85,.2)),eY=new o.Il(new o.VS(255,0,0,.2)),eJ=g("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c66",hcDark:null,hcLight:null},a.NC("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),eX=g("diffEditor.removedTextBackground",{dark:"#ff000066",light:"#ff00004d",hcDark:null,hcLight:null},a.NC("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e0=g("diffEditor.insertedLineBackground",{dark:eZ,light:eZ,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),e1=g("diffEditor.removedLineBackground",{dark:eY,light:eY,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e2=g("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),e5=g("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),e4=g("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),e3=g("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),e9=g("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},a.NC("diffEditorInsertedOutline","Outline color for the text that got inserted.")),e7=g("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},a.NC("diffEditorRemovedOutline","Outline color for text that got removed.")),e6=g("diffEditor.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("diffEditorBorder","Border color between the two text editors.")),e8=g("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},a.NC("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),te=g("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=g("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ti=g("list.focusOutline",{dark:_,light:_,hcDark:C,hcLight:C},a.NC("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tn=g("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),to=g("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tr=g("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hcDark:null,hcLight:null},a.NC("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ts=g("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ta=g("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tl=g("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),th=g("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),td=g("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tu=g("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tc=g("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listHoverBackground","List/Tree background when hovering over items using the mouse.")),tg=g("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),tp=g("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},a.NC("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),tm=g("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:_,hcLight:_},a.NC("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),tf=g("list.focusHighlightForeground",{dark:tm,light:{op:5,if:to,then:tm,else:"#BBE7FF"},hcDark:tm,hcLight:tm},a.NC("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));g("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},a.NC("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),g("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},a.NC("listErrorForeground","Foreground color of list items containing errors.")),g("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},a.NC("listWarningForeground","Foreground color of list items containing warnings."));let t_=g("listFilterWidget.background",{light:t4(ec,0),dark:t3(ec,0),hcDark:ec,hcLight:ec},a.NC("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),tv=g("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hcDark:"#f38518",hcLight:"#007ACC"},a.NC("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),tC=g("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:v,hcLight:v},a.NC("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),tb=g("listFilterWidget.shadow",{dark:S,light:S,hcDark:S,hcLight:S},a.NC("listFilterWidgetShadow","Shadown color of the type filter widget in lists and trees."));g("list.filterMatchBackground",{dark:eT,light:eT,hcDark:null,hcLight:null},a.NC("listFilterMatchHighlight","Background color of the filtered match.")),g("list.filterMatchBorder",{dark:eR,light:eR,hcDark:v,hcLight:C},a.NC("listFilterMatchHighlightBorder","Border color of the filtered match."));let tw=g("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},a.NC("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ty=g("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},a.NC("tableColumnsBorder","Table border color between columns.")),tS=g("tree.tableOddRowsBackground",{dark:t9(p,.04),light:t9(p,.04),hcDark:null,hcLight:null},a.NC("tableOddRowsBackgroundColor","Background color for odd table rows."));g("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},a.NC("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));let tL=g("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,a.NC("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),tk=g("quickInputList.focusForeground",{dark:tr,light:tr,hcDark:tr,hcLight:tr},a.NC("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),tN=g("quickInputList.focusIconForeground",{dark:ts,light:ts,hcDark:ts,hcLight:ts},a.NC("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),tD=g("quickInputList.focusBackground",{dark:t7(tL,to),light:t7(tL,to),hcDark:null,hcLight:null},a.NC("quickInput.listFocusBackground","Quick picker background color for the focused item.")),tx=g("menu.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("menuBorder","Border color of menus.")),tI=g("menu.foreground",{dark:W,light:p,hcDark:W,hcLight:W},a.NC("menuForeground","Foreground color of menu items.")),tE=g("menu.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("menuBackground","Background color of menu items.")),tT=g("menu.selectionForeground",{dark:tr,light:tr,hcDark:tr,hcLight:tr},a.NC("menuSelectionForeground","Foreground color of the selected menu item in menus.")),tM=g("menu.selectionBackground",{dark:to,light:to,hcDark:to,hcLight:to},a.NC("menuSelectionBackground","Background color of the selected menu item in menus.")),tA=g("menu.selectionBorder",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("menuSelectionBorder","Border color of the selected menu item in menus.")),tR=g("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:v,hcLight:v},a.NC("menuSeparatorBackground","Color of a separator menu item in menus.")),tO=g("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));g("toolbar.hoverOutline",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),g("toolbar.activeBackground",{dark:t3(tO,.1),light:t4(tO,.1),hcDark:null,hcLight:null},a.NC("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),g("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hcDark:new o.Il(new o.VS(124,124,124,.3)),hcLight:new o.Il(new o.VS(10,50,100,.2))},a.NC("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),g("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),g("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),g("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},a.NC("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),g("breadcrumb.foreground",{light:t9(p,.8),dark:t9(p,.8),hcDark:t9(p,.8),hcLight:t9(p,.8)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),g("breadcrumb.background",{light:ed,dark:ed,hcDark:ed,hcLight:ed},a.NC("breadcrumbsBackground","Background color of breadcrumb items.")),g("breadcrumb.focusForeground",{light:t4(p,.2),dark:t3(p,.1),hcDark:t3(p,.1),hcLight:t3(p,.1)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),g("breadcrumb.activeSelectionForeground",{light:t4(p,.2),dark:t3(p,.1),hcDark:t3(p,.1),hcLight:t3(p,.1)},a.NC("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),g("breadcrumbPicker.background",{light:ec,dark:ec,hcDark:ec,hcLight:ec},a.NC("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));let tP=o.Il.fromHex("#40C8AE").transparent(.5),tF=o.Il.fromHex("#40A6FF").transparent(.5),tB=o.Il.fromHex("#606060").transparent(.4),tV=g("merge.currentHeaderBackground",{dark:tP,light:tP,hcDark:null,hcLight:null},a.NC("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.currentContentBackground",{dark:t9(tV,.4),light:t9(tV,.4),hcDark:t9(tV,.4),hcLight:t9(tV,.4)},a.NC("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tW=g("merge.incomingHeaderBackground",{dark:tF,light:tF,hcDark:null,hcLight:null},a.NC("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.incomingContentBackground",{dark:t9(tW,.4),light:t9(tW,.4),hcDark:t9(tW,.4),hcLight:t9(tW,.4)},a.NC("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tH=g("merge.commonHeaderBackground",{dark:tB,light:tB,hcDark:null,hcLight:null},a.NC("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.commonContentBackground",{dark:t9(tH,.4),light:t9(tH,.4),hcDark:t9(tH,.4),hcLight:t9(tH,.4)},a.NC("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tz=g("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},a.NC("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));g("editorOverviewRuler.currentContentForeground",{dark:t9(tV,1),light:t9(tV,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),g("editorOverviewRuler.incomingContentForeground",{dark:t9(tW,1),light:t9(tW,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),g("editorOverviewRuler.commonContentForeground",{dark:t9(tH,1),light:t9(tH,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));let tK=g("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},a.NC("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),tU=g("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},a.NC("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),t$=g("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},a.NC("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),tj=g("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),tq=g("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),tG=g("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},a.NC("minimapError","Minimap marker color for errors.")),tQ=g("minimap.warningHighlight",{dark:en,light:en,hcDark:eo,hcLight:eo},a.NC("overviewRuleWarning","Minimap marker color for warnings.")),tZ=g("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("minimapBackground","Minimap background color.")),tY=g("minimap.foregroundOpacity",{dark:o.Il.fromHex("#000f"),light:o.Il.fromHex("#000f"),hcDark:o.Il.fromHex("#000f"),hcLight:o.Il.fromHex("#000f")},a.NC("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),tJ=g("minimapSlider.background",{light:t9(Q,.5),dark:t9(Q,.5),hcDark:t9(Q,.5),hcLight:t9(Q,.5)},a.NC("minimapSliderBackground","Minimap slider background color.")),tX=g("minimapSlider.hoverBackground",{light:t9(Z,.5),dark:t9(Z,.5),hcDark:t9(Z,.5),hcLight:t9(Z,.5)},a.NC("minimapSliderHoverBackground","Minimap slider background color when hovering.")),t0=g("minimapSlider.activeBackground",{light:t9(Y,.5),dark:t9(Y,.5),hcDark:t9(Y,.5),hcLight:t9(Y,.5)},a.NC("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),t1=g("problemsErrorIcon.foreground",{dark:ee,light:ee,hcDark:ee,hcLight:ee},a.NC("problemsErrorIconForeground","The color used for the problems error icon.")),t2=g("problemsWarningIcon.foreground",{dark:en,light:en,hcDark:en,hcLight:en},a.NC("problemsWarningIconForeground","The color used for the problems warning icon.")),t5=g("problemsInfoIcon.foreground",{dark:es,light:es,hcDark:es,hcLight:es},a.NC("problemsInfoIconForeground","The color used for the problems info icon."));function t4(e,t){return{op:0,value:e,factor:t}}function t3(e,t){return{op:1,value:e,factor:t}}function t9(e,t){return{op:2,value:e,factor:t}}function t7(...e){return{op:3,values:e}}function t6(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function t8(e,t){if(null===e);else if("string"==typeof e)return"#"===e[0]?o.Il.fromHex(e):t.getColor(e);else if(e instanceof o.Il)return e;else if("object"==typeof e)return function(e,t){var i,n,r;switch(e.op){case 0:return null===(i=t8(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=t8(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(r=t8(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:for(let i of e.values){let e=t8(i,t);if(e)return e}return;case 5:return t8(t.defines(e.if)?e.then:e.else,t);case 4:{let i=t8(e.value,t);if(!i)return;let n=t8(e.background,t);if(!n)return i.transparent(e.factor*e.transparency);return i.isDarkerThan(n)?o.Il.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Il.getDarkerColor(i,n,e.factor).transparent(e.transparency)}default:throw(0,s.vE)(e)}}(e,t)}g("charts.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("chartsForeground","The foreground color used in charts.")),g("charts.lines",{dark:t9(p,.5),light:t9(p,.5),hcDark:t9(p,.5),hcLight:t9(p,.5)},a.NC("chartsLines","The color used for horizontal lines in charts.")),g("charts.red",{dark:ee,light:ee,hcDark:ee,hcLight:ee},a.NC("chartsRed","The red color used in chart visualizations.")),g("charts.blue",{dark:es,light:es,hcDark:es,hcLight:es},a.NC("chartsBlue","The blue color used in chart visualizations.")),g("charts.yellow",{dark:en,light:en,hcDark:en,hcLight:en},a.NC("chartsYellow","The yellow color used in chart visualizations.")),g("charts.orange",{dark:t$,light:t$,hcDark:t$,hcLight:t$},a.NC("chartsOrange","The orange color used in chart visualizations.")),g("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},a.NC("chartsGreen","The green color used in chart visualizations.")),g("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.NC("chartsPurple","The purple color used in chart visualizations."));let ie="vscode://schemas/workbench-colors",it=h.B.as(l.I.JSONContribution);it.registerSchema(ie,c.getColorSchema());let ii=new n.pY(()=>it.notifySchemaChanged(ie),200);c.onDidChangeSchema(()=>{ii.isScheduled()||ii.schedule()})},59554:function(e,t,i){"use strict";i.d(t,{Ks:function(){return _},q5:function(){return f},s_:function(){return w}});var n,o,r,s=i(15393),a=i(73046),l=i(4669),h=i(98401),d=i(70666),u=i(63580),c=i(81294),g=i(89872),p=i(97781);(o||(o={})).getDefinition=function(e,t){let i=e.defaults;for(;p.kS.isThemeIcon(i);){let e=m.getIcon(i.id);if(!e)return;i=e.defaults}return i},(n=r||(r={})).toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map(e=>({format:e.format,location:e.location.toString()}))}},n.fromJSONObject=function(e){let t=e=>(0,h.HD)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every(e=>(0,h.HD)(e.format)&&(0,h.HD)(e.location)))return{weight:t(e.weight),style:t(e.style),src:e.src.map(e=>({format:e.format,location:d.o.parse(e.location)}))}};let m=new class{constructor(){this._onDidChange=new l.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,u.NC)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,u.NC)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${a.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){let o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;let t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}this.iconsById[e]={id:e,description:i,defaults:t,deprecationMessage:n};let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;p.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let n=Object.keys(this.iconsById).map(e=>this.iconsById[e]);for(let o of n.filter(e=>!!e.description).sort(e))i.push(`||${o.id}|${p.kS.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);for(let o of(i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |"),n.filter(e=>!p.kS.isThemeIcon(e.defaults)).sort(e)))i.push(`||${o.id}|`);return i.join("\n")}};function f(e,t,i,n){return m.registerIcon(e,t,i,n)}function _(){return m}g.B.add("base.contributions.icons",m),function(){for(let e of a.lA.getAll())m.registerIcon(e.id,e.definition,e.description)}();let v="vscode://schemas/icons",C=g.B.as(c.I.JSONContribution);C.registerSchema(v,m.getIconSchema());let b=new s.pY(()=>C.notifySchemaChanged(v),200);m.onDidChange(()=>{b.isScheduled()||b.schedule()});let w=f("widget-close",a.lA.close,(0,u.NC)("widgetClose","Icon for the close action in widgets."));f("goto-previous-location",a.lA.arrowUp,(0,u.NC)("previousChangeIcon","Icon for goto previous editor location.")),f("goto-next-location",a.lA.arrowDown,(0,u.NC)("nextChangeIcon","Icon for goto next editor location.")),p.kS.modify(a.lA.sync,"spin"),p.kS.modify(a.lA.loading,"spin")},88810:function(e,t,i){"use strict";i.d(t,{Jl:function(){return a},O2:function(){return l},WZ:function(){return s},o:function(){return o},tj:function(){return d}});var n=i(73910);function o(e,t){let i=Object.create(null);for(let o in t){let r=t[o];r&&(i[o]=(0,n.Snq)(r,e))}return i}function r(e,t,i){function n(){let n=o(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function s(e,t,i){return r(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||n.g8u,badgeForeground:(null==i?void 0:i.badgeForeground)||n.qeD,badgeBorder:n.lRK},e)}function a(e,t,i){return r(t,Object.assign(Object.assign({},l),i||{}),e)}let l={listFocusBackground:n._bK,listFocusForeground:n._2n,listFocusOutline:n.Oop,listActiveSelectionBackground:n.dCr,listActiveSelectionForeground:n.M6C,listActiveSelectionIconForeground:n.Tnx,listFocusAndSelectionOutline:n.Bqu,listFocusAndSelectionBackground:n.dCr,listFocusAndSelectionForeground:n.M6C,listInactiveSelectionBackground:n.rg2,listInactiveSelectionIconForeground:n.kvU,listInactiveSelectionForeground:n.ytC,listInactiveFocusBackground:n.s$,listInactiveFocusOutline:n.F3d,listHoverBackground:n.mV1,listHoverForeground:n.$d5,listDropBackground:n.AS1,listSelectionOutline:n.xL1,listHoverOutline:n.xL1,listFilterWidgetBackground:n.vGG,listFilterWidgetOutline:n.oSI,listFilterWidgetNoMatchesOutline:n.Saq,listFilterWidgetShadow:n.y65,treeIndentGuidesStroke:n.UnT,tableColumnsBorder:n.uxu,tableOddRowsBackgroundColor:n.EQn,inputActiveOptionBorder:n.PRb,inputActiveOptionForeground:n.Pvw,inputActiveOptionBackground:n.XEs,inputBackground:n.sEe,inputForeground:n.zJb,inputBorder:n.dt_,inputValidationInfoBackground:n._lC,inputValidationInfoForeground:n.YI3,inputValidationInfoBorder:n.EPQ,inputValidationWarningBackground:n.RV_,inputValidationWarningForeground:n.SUG,inputValidationWarningBorder:n.C3g,inputValidationErrorBackground:n.paE,inputValidationErrorForeground:n._t9,inputValidationErrorBorder:n.OZR},h={shadowColor:n.rh,borderColor:n.Cdg,foregroundColor:n.DEr,backgroundColor:n.Hz8,selectionForegroundColor:n.jbW,selectionBackgroundColor:n.$DX,selectionBorderColor:n.E3h,separatorColor:n.ZGJ,scrollbarShadow:n._wn,scrollbarSliderBackground:n.etL,scrollbarSliderHoverBackground:n.ABB,scrollbarSliderActiveBackground:n.ynu};function d(e,t,i){return r(t,Object.assign(Object.assign({},h),i),e)}},92321:function(e,t,i){"use strict";var n,o;function r(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{_T:function(){return s},c3:function(){return r},eL:function(){return n}}),(o=n||(n={})).DARK="dark",o.LIGHT="light",o.HIGH_CONTRAST_DARK="hcDark",o.HIGH_CONTRAST_LIGHT="hcLight"},97781:function(e,t,i){"use strict";i.d(t,{EN:function(){return c},IP:function(){return p},Ic:function(){return f},XE:function(){return u},bB:function(){return _},kS:function(){return o},m6:function(){return g}});var n,o,r=i(73046),s=i(4669),a=i(9917),l=i(72065),h=i(89872),d=i(92321);let u=(0,l.yh)("themeService");function c(e){return{id:e}}function g(e){switch(e){case d.eL.DARK:return"vs-dark";case d.eL.HIGH_CONTRAST_DARK:return"hc-black";case d.eL.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}(n||(n={})).isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id},function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};let t=RegExp(`^\\$\\((${r.dT.iconNameExpression}(?:${r.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){let i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id,n=i.lastIndexOf("~");return -1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){let t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e,t){return{id:e.id,color:t?{id:t}:void 0}},e.asClassNameArray=r.dT.asClassNameArray,e.asClassName=r.dT.asClassName,e.asCSSSelector=r.dT.asCSSSelector}(o||(o={}));let p={ThemingContribution:"base.contributions.theming"},m=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,a.OF)(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}};function f(e){return m.onColorThemeChange(e)}h.B.add(p.ThemingContribution,m);class _ extends a.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},64862:function(e,t,i){"use strict";i.d(t,{Xt:function(){return s},YO:function(){return r},gJ:function(){return a},tJ:function(){return o}});var n=i(72065);let o=(0,n.yh)("undoRedoService");class r{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class a{constructor(){this.id=a._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}a._ID=0,a.None=new a},40382:function(e,t,i){"use strict";i.d(t,{A6:function(){return d},eb:function(){return a},ec:function(){return s},md:function(){return h},uT:function(){return l}});var n=i(63580);i(43702);var o=i(70666),r=i(72065);let s=(0,r.yh)("contextService");function a(e){return"string"==typeof(null==e?void 0:e.id)&&o.o.isUri(e.uri)}function l(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}class h{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}let d="code-workspace";(0,n.NC)("codeWorkspace","Code Workspace")},33425:function(e,t,i){"use strict";i.d(t,{Y:function(){return o}});var n=i(72065);let o=(0,n.yh)("workspaceTrustManagementService")},13880:function(){},40944:function(){},49373:function(){},44142:function(){},90900:function(){},7697:function(){},32501:function(){},63513:function(){},82654:function(){},74090:function(){},14075:function(){},92845:function(){},98727:function(){},50203:function(){},30591:function(){},7226:function(){},91550:function(){},85947:function(){},39769:function(){},98524:function(){},58206:function(){},38386:function(){},27611:function(){},33094:function(){},47848:function(){},84888:function(){},58153:function(){},1237:function(){},88541:function(){},44789:function(){},48394:function(){},7919:function(){},83765:function(){},24850:function(){},31282:function(){},2641:function(){},27505:function(){},7525:function(){},32452:function(){},38356:function(){},45007:function(){},50103:function(){},41459:function(){},64287:function(){},36053:function(){},10721:function(){},32585:function(){},51094:function(){},32811:function(){},99580:function(){},62736:function(){},55484:function(){},96808:function(){},37640:function(){},69409:function(){},82438:function(){},52205:function(){},51397:function(){},13791:function(){},74153:function(){},32365:function(){},60624:function(){},36046:function(){},60858:function(){},96909:function(){},64520:function(){},63737:function(){},544:function(){},79807:function(){},95656:function(){},45778:function(){}}]); \ No newline at end of file + }`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}w.InstanceCount=0,i(4850);var y=i(59069);i(90317),i(3070);var S=i(72010);i(82900),(n=s||(s={}))[n.Unknown=0]="Unknown",n[n.Twistie=1]="Twistie",n[n.Element=2]="Element",n[n.Filter=3]="Filter";class L extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class k{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var N=i(15393),D=i(22571),x=i(53725);function I(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function E(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function T(e){return"boolean"==typeof e.collapsible}class M{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new c.E7,this._onDidChangeCollapseState=new c.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new c.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new c.Q5,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new N.vp(N.ne),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=x.$.empty(),n={}){if(0===e.length)throw new L(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,r){var s;void 0===n&&(n=x.$.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);let{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);let l=[...n],h=t[t.length-1],d=new D.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map(t=>e.getId(t.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);let u=t.slice(0,-1),c=(t,i,n)=>{if(r>0)for(let s=0;st.originalStart-e.originalStart))c(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-h,this.spliceSimple([...u,g],e.originalLength,x.$.slice(l,p,p+e.modifiedLength),o);c(g,p,g)}spliceSimple(e,t,i=x.$.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:r}){let{parentNode:s,listIndex:a,revealed:l,visible:h}=this.getParentNodeWithListIndex(e),u=[],c=x.$.map(i,e=>this.createTreeNode(e,s,s.visible?1:0,l,u,n)),g=e[e.length-1],p=s.children.length>0,m=0;for(let e=g;e>=0&&er.getId(e.element).toString())):s.lastDiffIds=s.children.map(e=>r.getId(e.element).toString()):s.lastDiffIds=void 0;let b=0;for(let e of C)e.visible&&b++;if(0!==b)for(let e=g+f.length;ee+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(s,v-e),this.list.splice(a,e,u)}if(C.length>0&&o){let e=t=>{o(t),t.children.forEach(e)};C.forEach(e)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:C});let w=s.children.length>0;p!==w&&this.setCollapsible(e.slice(0,-1),w);let y=s;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger(()=>this.refilter());break}y=y.parent}}rerender(e){if(0===e.length)throw new L(this.user,"Invalid tree location");let{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){let{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){let i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);let n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){let n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);let o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){let{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!T(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){let o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;let r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(T(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!T(t)&&t.recursive)for(let i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){let e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,r){let s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,i);s.visibility=a,n&&o.push(s);let l=e.children||x.$.empty(),h=n&&0!==a&&!s.collapsed,d=x.$.map(l,e=>this.createTreeNode(e,s,a,h,o,r)),u=0,c=1;for(let e of d)s.children.push(e),c+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=u++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=u,s.visible=2===a?u>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=c):(s.renderNodeCount=0,n&&o.pop()),null==r||r(s),s}updateNodeAfterCollapseChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(let i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){let t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(0===(o=this._filterNode(e,t)))return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}let r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(let r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){let i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):I(i)?(e.filterData=i.data,E(i.visibility)):(e.filterData=void 0,E(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;let[i,...n]=e;return!(i<0)&&!(i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;let[i,...n]=e;if(i<0||i>t.children.length)throw new L(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};let{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new L(this.user,"Invalid tree location");let s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){let[r,...s]=e;if(r<0||r>t.children.length)throw new L(this.user,"Invalid tree location");for(let e=0;ee.element)),this.data=e}}function W(e){return e instanceof S.kX?new V(e):e}class H{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=g.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,W(e),t)}onDragOver(e,t,i,n,o=!0){let r=this.dnd.onDragOver(W(e),t&&t.element,i,n),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(s&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,N.Vg)(()=>{let e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback){if(!o){let e="boolean"==typeof r?r:r.accept,t="boolean"==typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[i]}}return r}if(1===r.bubble){let i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}let a=this.modelProvider(),l=a.getNodeLocation(t),h=a.getListIndex(l),u=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:(0,d.w6)(h,h+u)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(W(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}class z{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}(o=a||(a={})).None="none",o.OnHover="onHover",o.Always="always";class K{constructor(e,t=[]){this._elements=t,this.disposables=new g.SL,this.onDidChange=c.ju.forEach(e,e=>this._elements=e,this.disposables)}get elements(){return this._elements}dispose(){this.disposables.dispose()}}class U{constructor(e,t,i,n,o={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=U.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new R,this.activeIndentNodes=new Set,this.indentGuidesDisposable=g.JT.None,this.disposables=new g.SL,this.templateId=e.templateId,this.updateOptions(o),c.ju.map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),null===(r=e.onDidChangeTwistieState)||void 0===r||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,P.uZ)(e.indent,0,40)),void 0!==e.renderIndentGuides){let t=e.renderIndentGuides!==a.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){let e=new g.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=(0,h.R3)(e,(0,h.$)(".monaco-tl-row")),i=(0,h.R3)(t,(0,h.$)(".monaco-tl-indent")),n=(0,h.R3)(t,(0,h.$)(".monaco-tl-twistie")),o=(0,h.R3)(t,(0,h.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:g.JT.None,templateData:r}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));let o=U.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=`${o+this.indent-16}px`,this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,r;i.indentGuidesDisposable.dispose(),null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...A.lA.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...A.lA.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,h.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let i=new g.SL,n=this.modelProvider(),o=e;for(;;){let e=n.getNodeLocation(o),r=n.getParentNodeLocation(e);if(!r)break;let s=n.getNode(r),a=(0,h.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(s)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(s,a),i.add((0,g.OF)(()=>this.renderedIndentGuides.delete(s,a))),o=s}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set,i=this.modelProvider();e.forEach(e=>{let n=i.getNodeLocation(e);try{let o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,g.B9)(this.disposables)}}U.DefaultIndent=8;class ${constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new g.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}filter(e,t){let i=1;if(this._filter){let n=this._filter.filter(e,t);if(0===(i="boolean"==typeof n?n?1:0:I(n)?E(n.visibility):n))return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:O.CL.Default,visibility:i};let n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(let e of o){let t=e&&e.toString();if(void 0===t)return{data:O.CL.Default,visibility:i};let n=(0,O.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===l.Filter?2:{data:O.CL.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,g.B9)(this.disposables)}}(r=l||(l={}))[r.Highlight=0]="Highlight",r[r.Filter=1]="Filter";class j{constructor(e,t,i,n,o){var r;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this._pattern="",this.width=0,this._onDidChangeMode=new c.Q5,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new c.Q5,this._onDidChangeOpenState=new c.Q5,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new g.SL,this.disposables=new g.SL,this._mode=null!==(r=e.options.defaultFindMode)&&void 0!==r?r:l.Highlight,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t;let i=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&i?null===(e=this.widget)||void 0===e||e.showMessage({type:2,content:(0,B.NC)("not found","No elements found.")}):null===(t=this.widget)||void 0===t||t.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===l.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1||!O.CL.isDefault(e.filterData)}style(e){var t;this.styles=e,null===(t=this.widget)||void 0===t||t.style(e)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function q(e){let t=s.Unknown;return(0,h.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=s.Twistie:(0,h.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=s.Element:(0,h.uU)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=s.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function G(e,t){t(e),e.children.forEach(e=>G(e,t))}class Q{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(null==t?void 0:t.__forceEvent)&&(0,d.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let e=this.createNodeSet(),i=t=>e.delete(t);t.forEach(e=>G(e,i)),this.set([...e.values()]);return}let i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>G(e,n));let o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>G(e,r));let s=[];for(let e of this.nodes){let t=this.identityProvider.getId(e.element).toString(),n=i.has(t);if(n){let e=o.get(t);e&&s.push(e)}else s.push(e)}if(this.nodes.length>0&&0===s.length){let e=this.getFirstViewElementWithTrait();e&&s.push(e)}this._set(s,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}}class Z extends p.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,p.iK)(e.browserEvent.target)||(0,p.cK)(e.browserEvent.target)||(0,p.hD)(e.browserEvent.target))return;let t=e.element;if(!t||this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=!1;if((o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick)&&!n&&2!==e.browserEvent.detail||!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){let i=this.tree.model,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){let t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class Y extends p.aV{constructor(e,t,i,n,o,r,s,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new Z(this,e.tree)}splice(e,t,i=[]){let n;if(super.splice(e,t,i),0===i.length)return;let o=[],r=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&o.push(e+i),this.selectionTrait.has(t)&&r.push(e+i),this.anchorTrait.has(t)&&(n=e+i)}),o.length>0&&super.setFocus((0,d.EB)([...super.getFocus(),...o])),r.length>0&&super.setSelection((0,d.EB)([...super.getSelection(),...r])),"number"==typeof n&&super.setAnchor(n)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class J{constructor(e,t,i,n,o={}){var r,s,l;let d;this._user=e,this._options=o,this.eventBufferer=new c.E7,this.onDidChangeFindOpenState=c.ju.None,this.disposables=new g.SL,this._onWillRefilter=new c.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new c.Q5;let u=new z(i),m=new c.ZD,f=new c.ZD,_=this.disposables.add(new K(f.event));for(let e of(this.renderers=n.map(e=>new U(e,()=>this.model,m.event,_,o)),this.renderers))this.disposables.add(e);o.keyboardNavigationLabelProvider&&(d=new $(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:d}),this.disposables.add(d)),this.focus=new Q(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new Q(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new Q(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new Y(e,t,u,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(s=()=>this.model,(l=o)&&Object.assign(Object.assign({},l),{identityProvider:l.identityProvider&&{getId:e=>l.identityProvider.getId(e.element)},dnd:l.dnd&&new H(s,l.dnd),multipleSelectionController:l.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>l.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>l.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:l.accessibilityProvider&&Object.assign(Object.assign({},l.accessibilityProvider),{getSetSize(e){let t=s(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i),o=t.getNode(n);return o.visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:l.accessibilityProvider&&l.accessibilityProvider.isChecked?e=>l.accessibilityProvider.isChecked(e.element):void 0,getRole:l.accessibilityProvider&&l.accessibilityProvider.getRole?e=>l.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>l.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>l.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:l.accessibilityProvider&&l.accessibilityProvider.getWidgetRole?()=>l.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:l.accessibilityProvider&&l.accessibilityProvider.getAriaLevel?e=>l.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:l.accessibilityProvider.getActiveDescendantId&&(e=>l.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:l.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},l.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>l.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})}))),{tree:this})),this.model=this.createModel(e,this.view,o),m.input=this.model.onDidChangeCollapseState;let v=c.ju.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})},this.disposables);if(v(()=>null,null,this.disposables),f.input=c.ju.chain(c.ju.any(v,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{let e=new Set;for(let t of this.focus.getNodes())e.add(t);for(let t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==o.keyboardSupport){let e=c.ju.chain(this.view.onKeyDown).filter(e=>!(0,p.cK)(e.target)).map(e=>new y.y(e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}(null===(r=o.findWidgetEnabled)||void 0===r||r)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider?(this.findController=new j(this,this.model,this.view,d,o.contextViewProvider),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=c.ju.None,this.styleElement=(0,h.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===a.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return c.ju.filter(c.ju.map(this.view.onMouseDblClick,q),e=>e.target!==s.Filter)}get onPointer(){return c.ju.map(this.view.onPointer,q)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return c.ju.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:l.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){for(let t of(this._options=Object.assign(Object.assign({},this._options),e),this.renderers))t.updateOptions(e);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===a.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),(0,F.hj)(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){var t;let i=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join("\n"),null===(t=this.findController)||void 0===t||t.style(e),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e),i=this.model.getNode(t);return i.element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){let i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){let i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!0);if(!o){let e=this.model.getParentNodeLocation(n);if(!e)return;let t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!1);if(!o){if(!i.children.some(e=>e.visible))return;let[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,g.B9)(this.disposables),this.view.dispose()}}class X{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new M(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=x.$.empty(),i={}){let n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=x.$.empty(),i){let n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null!==e.element){if(n.add(e.element),this.nodes.set(e.element,e),this.identityProvider){let t=this.identityProvider.getId(e.element).toString();o.add(t),this.nodesByIdentity.set(t,e)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,e)}},onDidDeleteNode:e=>{var t;if(null!==e.element){if(n.has(e.element)||this.nodes.delete(e.element),this.identityProvider){let t=this.identityProvider.getId(e.element).toString();o.has(t)||this.nodesByIdentity.delete(t)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,e)}}}))}preserveCollapseState(e=x.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),x.$.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){let i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});let i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})})}rerender(e){let t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){let t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){let t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new L(this.user,"Invalid getParentNodeLocation call");let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);let i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),o=this.model.getNode(n);return o.element}getElementLocation(e){if(null===e)return[];let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function ee(e){let t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:x.$.map(x.$.from(e.children),ee),collapsible:e.collapsible,collapsed:e.collapsed}}function et(e){let t,i;let n=[e.element],o=e.incompressible||!1;for(;[i,t]=x.$.consume(x.$.from(e.children),2),1===i.length&&!i[0].incompressible;)n.push((e=i[0]).element);return{element:{elements:n,incompressible:o},children:x.$.map(x.$.concat(i,t),et),collapsible:e.collapsible,collapsed:e.collapsed}}function ei(e){return function e(t,i=0){let n;return(n=ie(t,0)),0===i&&t.element.incompressible)?{element:t.element.elements[i],children:n,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[i],children:n,collapsible:t.collapsible,collapsed:t.collapsed}}(e,0)}let en=e=>({getId:t=>t.elements.map(t=>e.getId(t).toString()).join("\x00")});class eo{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new X(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=x.$.empty(),i){let n=i.diffIdentityProvider&&en(i.diffIdentityProvider);if(null===e){let e=x.$.map(t,this.enabled?et:ee);this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0});return}let o=this.nodes.get(e);if(!o)throw Error("Unknown compressed tree node");let r=this.model.getNode(o),s=this.model.getParentNodeLocation(o),a=this.model.getNode(s),l=ei(r),h=function e(t,i,n){return t.element===i?Object.assign(Object.assign({},t),{children:n}):Object.assign(Object.assign({},t),{children:x.$.map(x.$.from(t.children),t=>e(t,i,n))})}(l,e,t),d=(this.enabled?et:ee)(h),u=a.children.map(e=>e===r?d:e);this._setChildren(a.element,u,{diffIdentityProvider:n,diffDepth:r.depth-a.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;let t=this.model.getNode(),i=t.children,n=x.$.map(i,ei),o=x.$.map(n,e?et:ee);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){let n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(let t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(let t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){let t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){let t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();let t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){let t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){let t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){let t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){let t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){let i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){let t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){let n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){let t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){let t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;let t=this.nodes.get(e);if(!t)throw new L(this.user,`Tree element not found: ${e}`);return t}}let er=e=>e[e.length-1];class es{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new es(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ea{constructor(e,t,i={}){var n;this.rootRef=null,this.elementMapper=i.elementMapper||er;let o=e=>this.elementMapper(e.elements);this.nodeMapper=new k(e=>new es(o,e)),this.model=new eo(e,(n=this.nodeMapper,{splice(e,i,o){t.splice(e,i,o.map(e=>n.map(e)))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}),Object.assign(Object.assign({},i),{identityProvider:i.identityProvider&&{getId:e=>i.identityProvider.getId(o(e))},sorter:i.sorter&&{compare:(e,t)=>i.sorter.compare(e.elements[0],t.elements[0])},filter:i.filter&&{filter:(e,t)=>i.filter.filter(o(e),t)}}))}get onDidSplice(){return c.ju.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return c.ju.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return c.ju.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=x.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){let t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var el=i(49898);class eh extends J{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(void 0===e){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new X(e,t,i)}}class ed{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){let o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,r,s,a;i.compressedTreeNode?null===(r=(o=this.renderer).disposeCompressedElements)||void 0===r||r.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(s=this.renderer).disposeElement)||void 0===a||a.call(s,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([el.H],ed.prototype,"compressedTreeNodeProvider",null);class eu extends eh{constructor(e,t,i,n,o={}){let r=()=>this,s=n.map(e=>new ed(r,e));super(e,t,i,s,o&&Object.assign(Object.assign({},o),{keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(e){let t;try{t=r().getCompressedTreeNode(e)}catch(t){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e)}return 1===t.element.elements.length?o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e):o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.element.elements)}}}))}setChildren(e,t=x.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new ea(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var ec=i(17301),eg=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};function ep(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function em(e,t){return!!t.parent&&(t.parent===e||em(e,t.parent))}class ef{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new ef(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class e_{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...A.lA.treeItemLoading.classNamesArray),!0):(t.classList.remove(...A.lA.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function ev(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function eC(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class eb extends S.kX{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function ew(e){return e instanceof S.kX?new eb(e):e}class ey{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,ew(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(ew(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(ew(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}function eS(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new ey(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function eL(e,t){t(e),e.children.forEach(e=>eL(e,t))}class ek{constructor(e,t,i,n,o,r={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new c.Q5,this._onDidChangeNodeSlowState=new c.Q5,this.nodeMapper=new k(e=>new ef(e)),this.disposables=new g.SL,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=void 0!==r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=ep({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return c.ju.map(this.tree.onDidChangeFocus,ev)}get onDidChangeSelection(){return c.ju.map(this.tree.onDidChangeSelection,ev)}get onMouseDblClick(){return c.ju.map(this.tree.onMouseDblClick,eC)}get onPointer(){return c.ju.map(this.tree.onPointer,eC)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){let r=new z(i),s=n.map(e=>new e_(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=eS(o)||{};return new eh(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return eg(this,void 0,void 0,function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;let i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return eg(this,void 0,void 0,function*(){if(void 0===this.root.element)throw new L(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event));let r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,o),i)try{this.tree.rerender(r)}catch(e){}})}rerender(e){if(void 0===e||e===this.root.element){this.tree.rerender();return}let t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){let i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return eg(this,void 0,void 0,function*(){if(void 0===this.root.element)throw new L(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event));let i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;let n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield c.ju.toPromise(this._onDidRender.event)),n})}setSelection(e,t){let i=e.map(e=>this.getDataNode(e));this.tree.setSelection(i,t)}getSelection(){let e=this.tree.getSelection();return e.map(e=>e.element)}setFocus(e,t){let i=e.map(e=>this.getDataNode(e));this.tree.setFocus(i,t)}getFocus(){let e=this.tree.getFocus();return e.map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){let t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){let t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){let t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new L(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return eg(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return eg(this,void 0,void 0,function*(){let n;if(this.subTreeRefreshPromises.forEach((o,r)=>{!n&&(r===e||em(r,e)||em(e,r))&&(n=o.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root){let t=this.tree.getNode(e);if(t.collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}}return this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return eg(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(e=>n=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{let n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield N.jT.settled(n.map(e=>this.doRefreshSubTree(e,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return eg(this,void 0,void 0,function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){let t=this.doGetChildren(e);if((0,F.TW)(t))n=Promise.resolve(t);else{let i=(0,N.Vs)(800);i.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),n=t.finally(()=>i.cancel())}}else n=Promise.resolve(x.$.empty());try{let o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,ec.n2)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;let i=this.dataSource.getChildren(e.element);return(0,F.TW)(i)?this.processChildren(i):(t=(0,N.PG)(()=>eg(this,void 0,void 0,function*(){return this.processChildren((yield i))})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ec.dL))}setChildren(e,t,i,n){let o=[...t];if(0===e.children.length&&0===o.length)return[];let r=new Map,s=new Map;for(let t of e.children)if(r.set(t.element,t),this.identityProvider){let e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}let a=[],l=o.map(t=>{let o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){let i=ep({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}let l=this.identityProvider.getId(t).toString(),h=s.get(l);if(h){let e=h.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?h.collapsed?(e.children.forEach(e=>eL(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}let d=ep({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d});for(let e of r.values())eL(e,e=>this.nodes.delete(e.element));for(let e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){let n=e.children.map(e=>this.asTreeElement(e,t)),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){let i;return e.stale?{element:e,collapsible:e.hasChildren,collapsed:!0}:(i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?x.$.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:i})}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class eN{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new eN(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class eD{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){let t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...A.lA.treeItemLoading.classNamesArray),!0):(t.classList.remove(...A.lA.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeElement)||void 0===r||r.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,r;null===(r=(o=this.renderer).disposeCompressedElements)||void 0===r||r.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,g.B9)(this.disposables)}}class ex extends ek{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new k(e=>new eN(e)),this.filter=s.filter}createTree(e,t,i,n,o){let r=new z(i),s=n.map(e=>new eD(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=function(e){let t=e&&eS(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))})})}(o)||{};return new eu(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);let i=e=>this.identityProvider.getId(e).toString(),n=e=>{let t=new Set;for(let n of e){let e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(let n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);let s=this.getSelection(),a=!1,l=this.getFocus(),h=!1,d=e=>{let t=e.element;if(t)for(let e=0;e{let t=this.filter.filter(e,1),i="boolean"==typeof t?t?1:0:I(t)?E(t.visibility):E(t);if(2===i)throw Error("Recursive tree visibility not supported in async data compressed trees");return 1===i})),super.processChildren(e)}}class eI extends J{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new X(e,t,i)}}var eE=i(33108),eT=i(23193),eM=i(38819),eA=i(39282),eR=i(5606),eO=i(72065),eP=i(91847),eF=i(89872),eB=i(88810),eV=i(97781),eW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},eH=function(e,t){return function(i,n){t(i,n,e)}};let ez=(0,eO.yh)("listService"),eK=class{constructor(e){this._themeService=e,this.disposables=new g.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;let e=new p.wD((0,h.dS)(),"");this.disposables.add((0,eB.Jl)(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw Error("Cannot register the same widget multiple times");let i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),(0,g.F8)(e.onDidFocus(()=>this.setLastFocusedList(e)),(0,g.OF)(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};eK=eW([eH(0,eV.XE)],eK);let eU=new eM.uy("listFocus",!0),e$=new eM.uy("listSupportsMultiselect",!0),ej=eM.Ao.and(eU,eM.Ao.not(eA.d0)),eq=new eM.uy("listHasSelectionOrFocus",!1),eG=new eM.uy("listDoubleSelection",!1),eQ=new eM.uy("listMultiSelection",!1),eZ=new eM.uy("listSelectionNavigation",!1),eY=new eM.uy("listSupportsFind",!0),eJ=new eM.uy("treeElementCanCollapse",!1),eX=new eM.uy("treeElementHasParent",!1),e0=new eM.uy("treeElementCanExpand",!1),e1=new eM.uy("treeElementHasChild",!1),e2=new eM.uy("treeFindOpen",!1),e5="listTypeNavigationMode",e4="listAutomaticKeyboardNavigation";function e3(e,t){let i=e.createScoped(t.getHTMLElement());return eU.bindTo(i),i}let e9="workbench.list.multiSelectModifier",e7="workbench.list.openMode",e6="workbench.list.horizontalScrolling",e8="workbench.list.defaultFindMode",te="workbench.list.keyboardNavigation",tt="workbench.tree.indent",ti="workbench.tree.renderIndentGuides",tn="workbench.list.smoothScrolling",to="workbench.list.mouseWheelScrollSensitivity",tr="workbench.list.fastScrollSensitivity",ts="workbench.tree.expandMode";function ta(e){return"alt"===e.getValue(e9)}class tl extends g.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=ta(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this.useAltAsMultipleSelectionModifier=ta(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,p.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,p.wn)(e)}}function th(e,t){var i;let n;let o=e.get(eE.Ui),r=e.get(eP.d),s=new g.SL,a=Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>r.mightProducePrintableCharacter(e)},smoothScrolling:!!o.getValue(tn),mouseWheelScrollSensitivity:o.getValue(to),fastScrollSensitivity:o.getValue(tr),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new tl(o)),keyboardNavigationEventFilter:(n=!1,e=>{if(e.toKeybinding().isModifierKey())return!1;if(n)return n=!1,!1;let t=r.softDispatch(e,e.target);return(null==t?void 0:t.enterChord)?(n=!0,!1):(n=!1,!t)})});return[a,s]}let td=class extends p.aV{constructor(e,t,i,n,o,r,s,a,l,h){let d=void 0!==o.horizontalScrolling?o.horizontalScrolling:!!l.getValue(e6),[u,c]=h.invokeFunction(th,o);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(a.getColorTheme(),eB.O2)),u),{horizontalScrolling:d})),this.disposables.add(c),this.contextKeyService=e3(r,this),this.themeService=a,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);let g=eZ.bindTo(this.contextKeyService);g.set(!!o.selectionNavigation),this.listHasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.listDoubleSelection=eG.bindTo(this.contextKeyService),this.listMultiSelection=eQ.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ta(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{let e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(l));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!l.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!l.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=l.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=l.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tp(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};td=eW([eH(5,eM.i6),eH(6,ez),eH(7,eV.XE),eH(8,eE.Ui),eH(9,eO.TG)],td);let tu=class extends _{constructor(e,t,i,n,o,r,s,a,l,h){let d=void 0!==o.horizontalScrolling?o.horizontalScrolling:!!l.getValue(e6),[u,c]=h.invokeFunction(th,o);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(a.getColorTheme(),eB.O2)),u),{horizontalScrolling:d})),this.disposables=new g.SL,this.disposables.add(c),this.contextKeyService=e3(r,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);let p=eZ.bindTo(this.contextKeyService);p.set(!!o.selectionNavigation),this._useAltAsMultipleSelectionModifier=ta(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add((0,eB.Jl)(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(l));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!l.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!l.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=l.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=l.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tp(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tu=eW([eH(5,eM.i6),eH(6,ez),eH(7,eV.XE),eH(8,eE.Ui),eH(9,eO.TG)],tu);let tc=class extends w{constructor(e,t,i,n,o,r,s,a,l,h,d){let u=void 0!==r.horizontalScrolling?r.horizontalScrolling:!!h.getValue(e6),[c,g]=d.invokeFunction(th,r);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,eB.o)(l.getColorTheme(),eB.O2)),c),{horizontalScrolling:u})),this.disposables.add(g),this.contextKeyService=e3(s,this),this.themeService=l,this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==r.multipleSelectionSupport);let p=eZ.bindTo(this.contextKeyService);p.set(!!r.selectionNavigation),this.listHasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.listDoubleSelection=eG.bindTo(this.contextKeyService),this.listMultiSelection=eQ.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ta(h),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{let e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{let e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(h.onDidChangeConfiguration(e=>{e.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(h));let t={};if(e.affectsConfiguration(e6)&&void 0===this.horizontalScrolling){let e=!!h.getValue(e6);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tn)){let e=!!h.getValue(tn);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(to)){let e=h.getValue(to);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(tr)){let e=h.getValue(tr);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new tm(this,Object.assign({configurationService:h},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,eB.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tc=eW([eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui),eH(10,eO.TG)],tc);class tg extends g.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new c.Q5),this.onDidOpen=this._onDidOpen.event,this._register(c.ju.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.element,e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.element,e.browserEvent))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick=(null==t?void 0:t.configurationService.getValue(e7))!=="doubleClick",this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(null==t?void 0:t.configurationService.getValue(e7))!=="doubleClick"}))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;let t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;let i=2===t.detail;if(i)return;let n=1===t.button,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,n,o,t)}onMouseDblClick(e,t){if(!t)return;let i=t.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16;if(n)return;let o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,o,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class tp extends tg{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class tm extends tg{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class tf extends tg{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}let t_=class extends eh{constructor(e,t,i,n,o,r,s,a,l,h){let{options:d,getTypeNavigationMode:u,disposable:c}=r.invokeFunction(tS,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new tL(this,o,u,o.overrideStyles,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};t_=eW([eH(5,eO.TG),eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui)],t_);let tv=class extends eu{constructor(e,t,i,n,o,r,s,a,l,h){let{options:d,getTypeNavigationMode:u,disposable:c}=r.invokeFunction(tS,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new tL(this,o,u,o.overrideStyles,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tv=eW([eH(5,eO.TG),eH(6,eM.i6),eH(7,ez),eH(8,eV.XE),eH(9,eE.Ui)],tv);let tC=class extends eI{constructor(e,t,i,n,o,r,s,a,l,h,d){let{options:u,getTypeNavigationMode:c,disposable:g}=s.invokeFunction(tS,r);super(e,t,i,n,o,u),this.disposables.add(g),this.internals=new tL(this,r,c,r.overrideStyles,a,l,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tC=eW([eH(6,eO.TG),eH(7,eM.i6),eH(8,ez),eH(9,eV.XE),eH(10,eE.Ui)],tC);let tb=class extends ek{constructor(e,t,i,n,o,r,s,a,l,h,d){let{options:u,getTypeNavigationMode:c,disposable:g}=s.invokeFunction(tS,r);super(e,t,i,n,o,u),this.disposables.add(g),this.internals=new tL(this,r,c,r.overrideStyles,a,l,h,d),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};tb=eW([eH(6,eO.TG),eH(7,eM.i6),eH(8,ez),eH(9,eV.XE),eH(10,eE.Ui)],tb);let tw=class extends ex{constructor(e,t,i,n,o,r,s,a,l,h,d,u){let{options:c,getTypeNavigationMode:g,disposable:p}=a.invokeFunction(tS,s);super(e,t,i,n,o,r,c),this.disposables.add(p),this.internals=new tL(this,s,g,s.overrideStyles,l,h,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function ty(e){let t=e.getValue(e8);if("highlight"===t)return l.Highlight;if("filter"===t)return l.Filter;let i=e.getValue(te);return"simple"===i||"highlight"===i?l.Highlight:"filter"===i?l.Filter:void 0}function tS(e,t){var i;let n=e.get(eE.Ui),o=e.get(eR.u),r=e.get(eM.i6),s=e.get(eO.TG),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:!!n.getValue(e6),[l,h]=s.invokeFunction(th,t),d=t.additionalScrollHeight;return{getTypeNavigationMode:()=>{let e=r.getContextKeyValue(e5);if("automatic"===e)return p.AA.Automatic;if("trigger"===e)return p.AA.Trigger;let t=r.getContextKeyValue(e4);if(!1===t)return p.AA.Trigger},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:"number"==typeof n.getValue(tt)?n.getValue(tt):void 0,renderIndentGuides:n.getValue(ti),smoothScrolling:!!n.getValue(tn),defaultFindMode:ty(n),horizontalScrolling:a,additionalScrollHeight:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(ts),contextViewProvider:o})}}tw=eW([eH(7,eO.TG),eH(8,eM.i6),eH(9,ez),eH(10,eV.XE),eH(11,eE.Ui)],tw);let tL=class{constructor(e,t,i,n,o,r,s,a){var l;this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=e3(o,e),this.listSupportsMultiSelect=e$.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);let h=eZ.bindTo(this.contextKeyService);h.set(!!t.selectionNavigation),this.listSupportFindWidget=eY.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(l=t.findWidgetEnabled)||void 0===l||l),this.hasSelectionOrFocus=eq.bindTo(this.contextKeyService),this.hasDoubleSelection=eG.bindTo(this.contextKeyService),this.hasMultiSelection=eQ.bindTo(this.contextKeyService),this.treeElementCanCollapse=eJ.bindTo(this.contextKeyService),this.treeElementHasParent=eX.bindTo(this.contextKeyService),this.treeElementCanExpand=e0.bindTo(this.contextKeyService),this.treeElementHasChild=e1.bindTo(this.contextKeyService),this.treeFindOpen=e2.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=ta(a),this.updateStyleOverrides(n);let d=()=>{let t=e.getFocus()[0];if(!t)return;let i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},u=new Set;u.add(e5),u.add(e4),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{let t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{let t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),d()}),e.onDidChangeCollapseState(d),e.onDidChangeModel(d),e.onDidChangeFindOpenState(e=>this.treeFindOpen.set(e)),a.onDidChangeConfiguration(i=>{let n={};if(i.affectsConfiguration(e9)&&(this._useAltAsMultipleSelectionModifier=ta(a)),i.affectsConfiguration(tt)){let e=a.getValue(tt);n=Object.assign(Object.assign({},n),{indent:e})}if(i.affectsConfiguration(ti)){let e=a.getValue(ti);n=Object.assign(Object.assign({},n),{renderIndentGuides:e})}if(i.affectsConfiguration(tn)){let e=!!a.getValue(tn);n=Object.assign(Object.assign({},n),{smoothScrolling:e})}if((i.affectsConfiguration(e8)||i.affectsConfiguration(te))&&e.updateOptions({defaultFindMode:ty(a)}),i.affectsConfiguration(e6)&&void 0===t.horizontalScrolling){let e=!!a.getValue(e6);n=Object.assign(Object.assign({},n),{horizontalScrolling:e})}if(i.affectsConfiguration(ts)&&void 0===t.expandOnlyOnTwistieClick&&(n=Object.assign(Object.assign({},n),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(ts)})),i.affectsConfiguration(to)){let e=a.getValue(to);n=Object.assign(Object.assign({},n),{mouseWheelScrollSensitivity:e})}if(i.affectsConfiguration(tr)){let e=a.getValue(tr);n=Object.assign(Object.assign({},n),{fastScrollSensitivity:e})}Object.keys(n).length>0&&e.updateOptions(n)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new tf(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){(0,g.B9)(this.styler),this.styler=e?(0,eB.Jl)(this.tree,this.themeService,e):g.JT.None}dispose(){this.disposables=(0,g.B9)(this.disposables),(0,g.B9)(this.styler),this.styler=void 0}};tL=eW([eH(4,eM.i6),eH(5,ez),eH(6,eV.XE),eH(7,eE.Ui)],tL);let tk=eF.B.as(eT.IP.Configuration);tk.registerConfiguration({id:"workbench",order:7,title:(0,B.NC)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[e9]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,B.NC)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,B.NC)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,B.NC)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[e7]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,B.NC)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[e6]:{type:"boolean",default:!1,description:(0,B.NC)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[tt]:{type:"number",default:8,minimum:4,maximum:40,description:(0,B.NC)("tree indent setting","Controls tree indentation in pixels.")},[ti]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,B.NC)("render tree indent guides","Controls whether the tree should render indent guides.")},[tn]:{type:"boolean",default:!1,description:(0,B.NC)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[to]:{type:"number",default:1,markdownDescription:(0,B.NC)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[tr]:{type:"number",default:5,description:(0,B.NC)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[e8]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,B.NC)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,B.NC)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,B.NC)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[te]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,B.NC)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,B.NC)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,B.NC)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,B.NC)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,B.NC)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' instead.")},[ts]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,B.NC)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},43557:function(e,t,i){"use strict";i.d(t,{$V:function(){return c},VZ:function(){return l},in:function(){return o},kw:function(){return u}});var n,o,r=i(4669),s=i(9917),a=i(72065);let l=(0,a.yh)("logService");(n=o||(o={}))[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Info=2]="Info",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.Off=6]="Off";let h=o.Info;class d extends s.JT{constructor(){super(...arguments),this.level=h,this._onDidChangeLogLevel=this._register(new r.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class u extends d{constructor(e=h){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=o.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=o.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=o.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=o.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class c extends s.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},98674:function(e,t,i){"use strict";i.d(t,{H0:function(){return r},ZL:function(){return o},lT:function(){return h}});var n,o,r,s=i(14603),a=i(63580),l=i(72065);(n=o||(o={}))[n.Hint=1]="Hint",n[n.Info=2]="Info",n[n.Warning=4]="Warning",n[n.Error=8]="Error",function(e){e.compare=function(e,t){return t-e};let t=Object.create(null);t[e.Error]=(0,a.NC)("sev.error","Error"),t[e.Warning]=(0,a.NC)("sev.warning","Warning"),t[e.Info]=(0,a.NC)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(o||(o={})),function(e){function t(e,t){let i=[""];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(""),e.code?"string"==typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(""),e.message&&t?i.push(e.message.replace("\xa6","\\\xa6")):i.push(""),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(""),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(""),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(""),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(""),i.push(""),i.join("\xa6")}e.makeKey=function(e){return t(e,!0)},e.makeKeyOptionalMessage=t}(r||(r={}));let h=(0,l.yh)("markerService")},59422:function(e,t,i){"use strict";i.d(t,{EO:function(){return a},lT:function(){return s},zb:function(){return r}});var n=i(14603),o=i(72065),r=n.Z;let s=(0,o.yh)("notificationService");class a{}},50988:function(e,t,i){"use strict";i.d(t,{Gs:function(){return u},SW:function(){return h},v4:function(){return l},xI:function(){return c},xn:function(){return d}});var n=i(9917),o=i(97295),r=i(70666),s=i(72065),a=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let l=(0,s.yh)("openerService"),h=Object.freeze({_serviceBrand:void 0,registerOpener:()=>n.JT.None,registerValidator:()=>n.JT.None,registerExternalUriResolver:()=>n.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>n.JT.None,open(){return a(this,void 0,void 0,function*(){return!1})},resolveExternalUri(e){return a(this,void 0,void 0,function*(){return{resolved:e,dispose(){}}})}});function d(e,t){return r.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}function u(e,...t){return t.some(t=>d(e,t))}function c(e){let t;let i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},90535:function(e,t,i){"use strict";i.d(t,{Ex:function(){return r},R9:function(){return o},ek:function(){return s}});var n=i(72065);let o=(0,n.yh)("progressService");Object.freeze({total(){},worked(){},done(){}});class r{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}r.None=Object.freeze({report(){}});let s=(0,n.yh)("editorProgressService")},45503:function(e,t,i){"use strict";i.d(t,{IP:function(){return l},Ry:function(){return o}});var n,o,r=i(9488),s=i(9917),a=i(89872);(n=o||(o={}))[n.PRESERVE=0]="PRESERVE",n[n.LAST=1]="LAST";let l={Quickaccess:"workbench.contributions.quickaccess"};a.B.add(l.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,s.OF)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,r.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){let t=e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0;return t||this.defaultProvider}})},41157:function(e,t,i){"use strict";i.d(t,{eJ:function(){return r},jG:function(){return o.jG}});var n=i(72065),o=i(67746);let r=(0,n.yh)("quickInputService")},89872:function(e,t,i){"use strict";i.d(t,{B:function(){return r}});var n=i(35146),o=i(98401);let r=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},87060:function(e,t,i){"use strict";i.d(t,{Uy:function(){return f},vm:function(){return v},fk:function(){return s}});var n,o,r,s,a=i(4669),l=i(9917),h=i(98401),d=i(15393),u=function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};(n=r||(r={}))[n.None=0]="None",n[n.Initialized=1]="Initialized",n[n.Closed=2]="Closed";class c extends l.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new a.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=r.None,this.cache=new Map,this.flushDelayer=new d.rH(c.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach((e,t)=>this.accept(t,e)),null===(i=e.deleted)||void 0===i||i.forEach(e=>this.accept(e,void 0))}accept(e,t){if(this.state===r.Closed)return;let i=!1;if((0,h.Jp)(t))i=this.cache.delete(e);else{let n=this.cache.get(e);n!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire(e)}get(e,t){let i=this.cache.get(e);return(0,h.Jp)(i)?t:i}getBoolean(e,t){let i=this.get(e);return(0,h.Jp)(i)?t:"true"===i}getNumber(e,t){let i=this.get(e);return(0,h.Jp)(i)?t:parseInt(i,10)}set(e,t){return u(this,void 0,void 0,function*(){if(this.state===r.Closed)return;if((0,h.Jp)(t))return this.delete(e);let i=String(t),n=this.cache.get(e);if(n!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}delete(e){return u(this,void 0,void 0,function*(){if(this.state===r.Closed)return;let t=this.cache.delete(e);if(t)return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return u(this,void 0,void 0,function*(){if(!this.hasPending)return;let e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()})})}doFlush(e){return u(this,void 0,void 0,function*(){return this.flushDelayer.trigger(()=>this.flushPending(),e)})}dispose(){this.flushDelayer.dispose(),super.dispose()}}c.DEFAULT_FLUSH_DELAY=100;class g{constructor(){this.onDidChangeItemsExternal=a.ju.None,this.items=new Map}updateItems(e){var t,i;return u(this,void 0,void 0,function*(){null===(t=e.insert)||void 0===t||t.forEach((e,t)=>this.items.set(t,e)),null===(i=e.delete)||void 0===i||i.forEach(e=>this.items.delete(e))})}}var p=i(72065);let m="__$__targetStorageMarker",f=(0,p.yh)("storageService");(o=s||(s={}))[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN";class _ extends l.JT{constructor(e={flushInterval:_.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new a.K3),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new a.K3),this._onWillSaveState=this._register(new a.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}emitDidChangeValue(e,t){if(t===m){switch(e){case -1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){if((0,h.Jp)(t)){this.remove(e,i);return}this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;let r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(m,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(m,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case -1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){let t=this.get(m,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}_.DEFAULT_FLUSH_INTERVAL=6e4;class v extends _{constructor(){super(),this.applicationStorage=this._register(new c(new g)),this.profileStorage=this._register(new c(new g)),this.workspaceStorage=this._register(new c(new g)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case -1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},10829:function(e,t,i){"use strict";i.d(t,{b:function(){return o}});var n=i(72065);let o=(0,n.yh)("telemetryService")},73910:function(e,t,i){"use strict";i.d(t,{$DX:function(){return tM},$d5:function(){return tg},ABB:function(){return Z},AS1:function(){return tp},AWI:function(){return eS},BOY:function(){return t2},Bqu:function(){return tn},C3g:function(){return O},CA6:function(){return tJ},CNo:function(){return eV},Cdg:function(){return tx},CzK:function(){return eZ},D0T:function(){return ec},D1_:function(){return ep},DEr:function(){return tI},Dut:function(){return el},E3h:function(){return tA},EPQ:function(){return M},EQn:function(){return tS},ES4:function(){return eD},EiJ:function(){return eR},F3d:function(){return tu},F9q:function(){return e3},Fm_:function(){return tK},Fu1:function(){return eG},GO4:function(){return U},Gj_:function(){return tG},Gwp:function(){return tm},HCL:function(){return ej},Hfx:function(){return eg},Hz8:function(){return tE},IPX:function(){return u},IYc:function(){return tj},Ido:function(){return m},Itd:function(){return tY},Ivo:function(){return tQ},JpG:function(){return t1},K19:function(){return eL},LLc:function(){return e6},L_H:function(){return X},L_t:function(){return e8},LoV:function(){return eW},M6C:function(){return tr},MUv:function(){return eT},NOs:function(){return eu},NPS:function(){return tk},Ng6:function(){return em},OLZ:function(){return t5},OZR:function(){return B},Oop:function(){return ti},P4M:function(){return eX},P6G:function(){return g},P6Y:function(){return e4},PRb:function(){return D},PX0:function(){return tf},PpC:function(){return eK},Pvw:function(){return I},QO2:function(){return d},R80:function(){return _},RV_:function(){return A},Rzx:function(){return ex},SPM:function(){return tU},SUG:function(){return R},SUY:function(){return t$},Saq:function(){return tC},Sbf:function(){return eB},Snq:function(){return t8},SwI:function(){return y},T83:function(){return ea},Tnx:function(){return ts},UnT:function(){return tw},VVv:function(){return ez},Vqd:function(){return tD},XEs:function(){return x},XL$:function(){return e9},XZx:function(){return f},Xy4:function(){return tX},YI3:function(){return T},ZGJ:function(){return tR},ZnX:function(){return t9},_2n:function(){return tt},_Yy:function(){return eH},_bK:function(){return te},_lC:function(){return E},_t9:function(){return F},_wn:function(){return G},b6y:function(){return et},b7$:function(){return K},bKB:function(){return e$},brw:function(){return t0},c63:function(){return es},cbQ:function(){return tN},cvW:function(){return ed},dCr:function(){return to},dRz:function(){return p},dt_:function(){return N},etL:function(){return Q},fEB:function(){return eh},few:function(){return er},g8u:function(){return j},g_n:function(){return eI},gkn:function(){return eO},gpD:function(){return ei},hEj:function(){return ek},hX8:function(){return eU},hzo:function(){return e0},j51:function(){return e2},j5u:function(){return z},jUe:function(){return eM},jbW:function(){return tT},kJk:function(){return eC},kVY:function(){return tZ},keg:function(){return eY},kvU:function(){return th},kwl:function(){return t7},lRK:function(){return v},lUq:function(){return tO},lWp:function(){return ey},lXJ:function(){return ee},loF:function(){return ev},mHy:function(){return e7},mV1:function(){return tc},nyM:function(){return eE},oQ$:function(){return ew},oSI:function(){return tv},opG:function(){return eb},ov3:function(){return tq},pW3:function(){return eo},paE:function(){return P},phM:function(){return eq},pnM:function(){return eA},ptc:function(){return eP},qeD:function(){return q},rg2:function(){return ta},rh:function(){return S},s$:function(){return td},sEe:function(){return L},sKV:function(){return eQ},sgC:function(){return w},tZ6:function(){return e_},uoC:function(){return en},url:function(){return b},uxu:function(){return ty},vGG:function(){return t_},xL1:function(){return C},xi6:function(){return e1},y65:function(){return tb},yJx:function(){return eF},yb5:function(){return eN},ynu:function(){return Y},ypS:function(){return eJ},ytC:function(){return tl},zJb:function(){return k},zKr:function(){return ef},zOm:function(){return e5},zRJ:function(){return J}});var n=i(15393),o=i(41264),r=i(4669),s=i(98401),a=i(63580),l=i(81294),h=i(89872);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}let u={ColorContribution:"base.contributions.colors"},c=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){this.colorsById[e]={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){let i=this.colorsById[e];if(i&&i.defaults){let e=i.defaults[t.type];return t8(e,t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}};function g(e,t,i,n,o){return c.registerColor(e,(null===t||void 0===t.hcLight&&(null===t.hcDark||"string"==typeof t.hcDark?t.hcLight=t.hcDark:t.hcLight=t.light),t),i,n,o)}h.B.add(u.ColorContribution,c);let p=g("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("foreground","Overall foreground color. This color is only used if not overridden by a component."));g("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},a.NC("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));let m=g("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));g("descriptionForeground",{light:"#717171",dark:t9(p,.7),hcDark:t9(p,.7),hcLight:t9(p,.7)},a.NC("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));let f=g("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("iconForeground","The default color for icons in the workbench.")),_=g("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},a.NC("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),v=g("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},a.NC("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),C=g("contrastActiveBorder",{light:null,dark:null,hcDark:_,hcLight:_},a.NC("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));g("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),g("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Il.black,hcLight:"#292929"},a.NC("textSeparatorForeground","Color for text separators."));let b=g("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkForeground","Foreground color for links in text.")),w=g("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));g("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},a.NC("textPreformatForeground","Foreground color for preformatted text segments.")),g("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},a.NC("textBlockQuoteBackground","Background color for block quotes in text.")),g("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Il.white,hcLight:"#292929"},a.NC("textBlockQuoteBorder","Border color for block quotes in text."));let y=g("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Il.black,hcLight:"#F2F2F2"},a.NC("textCodeBlockBackground","Background color for code blocks in text.")),S=g("widget.shadow",{dark:t9(o.Il.black,.36),light:t9(o.Il.black,.16),hcDark:null,hcLight:null},a.NC("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),L=g("input.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputBoxBackground","Input box background.")),k=g("input.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("inputBoxForeground","Input box foreground.")),N=g("input.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("inputBoxBorder","Input box border.")),D=g("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:v,hcLight:v},a.NC("inputBoxActiveOptionBorder","Border color of activated options in input fields."));g("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("inputOption.hoverBackground","Background color of activated options in input fields."));let x=g("inputOption.activeBackground",{dark:t9(_,.4),light:t9(_,.2),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("inputOption.activeBackground","Background hover color of options in input fields.")),I=g("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hcDark:null,hcLight:p},a.NC("inputOption.activeForeground","Foreground color of activated options in input fields."));g("input.placeholderForeground",{light:t9(p,.5),dark:t9(p,.5),hcDark:t9(p,.7),hcLight:t9(p,.7)},a.NC("inputPlaceholderForeground","Input box foreground color for placeholder text."));let E=g("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationInfoBackground","Input validation background color for information severity.")),T=g("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationInfoForeground","Input validation foreground color for information severity.")),M=g("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:v,hcLight:v},a.NC("inputValidationInfoBorder","Input validation border color for information severity.")),A=g("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationWarningBackground","Input validation background color for warning severity.")),R=g("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationWarningForeground","Input validation foreground color for warning severity.")),O=g("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:v,hcLight:v},a.NC("inputValidationWarningBorder","Input validation border color for warning severity.")),P=g("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationErrorBackground","Input validation background color for error severity.")),F=g("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:p},a.NC("inputValidationErrorForeground","Input validation foreground color for error severity.")),B=g("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:v,hcLight:v},a.NC("inputValidationErrorBorder","Input validation border color for error severity.")),V=g("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownBackground","Dropdown background."));g("dropdown.listBackground",{dark:null,light:null,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownListBackground","Dropdown list background."));let W=g("dropdown.foreground",{dark:"#F0F0F0",light:null,hcDark:o.Il.white,hcLight:p},a.NC("dropdownForeground","Dropdown foreground.")),H=g("dropdown.border",{dark:V,light:"#CECECE",hcDark:v,hcLight:v},a.NC("dropdownBorder","Dropdown border."));g("checkbox.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("checkbox.background","Background color of checkbox widget.")),g("checkbox.foreground",{dark:W,light:W,hcDark:W,hcLight:W},a.NC("checkbox.foreground","Foreground color of checkbox widget.")),g("checkbox.border",{dark:H,light:H,hcDark:H,hcLight:H},a.NC("checkbox.border","Border color of checkbox widget."));let z=g("button.foreground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:o.Il.white},a.NC("buttonForeground","Button foreground color."));g("button.separator",{dark:t9(z,.4),light:t9(z,.4),hcDark:t9(z,.4),hcLight:t9(z,.4)},a.NC("buttonSeparator","Button separator color."));let K=g("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},a.NC("buttonBackground","Button background color.")),U=g("button.hoverBackground",{dark:t3(K,.2),light:t4(K,.2),hcDark:null,hcLight:null},a.NC("buttonHoverBackground","Button background color when hovering."));g("button.border",{dark:v,light:v,hcDark:v,hcLight:v},a.NC("buttonBorder","Button border color.")),g("button.secondaryForeground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:p},a.NC("buttonSecondaryForeground","Secondary button foreground color."));let $=g("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Il.white},a.NC("buttonSecondaryBackground","Secondary button background color."));g("button.secondaryHoverBackground",{dark:t3($,.2),light:t4($,.2),hcDark:null,hcLight:null},a.NC("buttonSecondaryHoverBackground","Secondary button background color when hovering."));let j=g("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Il.black,hcLight:"#0F4A85"},a.NC("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),q=g("badge.foreground",{dark:o.Il.white,light:"#333",hcDark:o.Il.white,hcLight:o.Il.white},a.NC("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),G=g("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},a.NC("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Q=g("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hcDark:t9(v,.6),hcLight:t9(v,.4)},a.NC("scrollbarSliderBackground","Scrollbar slider background color.")),Z=g("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hcDark:t9(v,.8),hcLight:t9(v,.8)},a.NC("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Y=g("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hcDark:v,hcLight:v},a.NC("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),J=g("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hcDark:v,hcLight:v},a.NC("progressBarBackground","Background color of the progress bar that can show for long running operations.")),X=g("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ee=g("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("editorError.foreground","Foreground color of error squigglies in the editor.")),et=g("editorError.border",{dark:null,light:null,hcDark:o.Il.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},a.NC("errorBorder","Border color of error boxes in the editor.")),ei=g("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),en=g("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD37",hcLight:"#895503"},a.NC("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),eo=g("editorWarning.border",{dark:null,light:null,hcDark:o.Il.fromHex("#FFCC00").transparent(.8),hcLight:"#"},a.NC("warningBorder","Border color of warning boxes in the editor.")),er=g("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),es=g("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},a.NC("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ea=g("editorInfo.border",{dark:null,light:null,hcDark:o.Il.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},a.NC("infoBorder","Border color of info boxes in the editor.")),el=g("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},a.NC("editorHint.foreground","Foreground color of hint squigglies in the editor.")),eh=g("editorHint.border",{dark:null,light:null,hcDark:o.Il.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},a.NC("hintBorder","Border color of hint boxes in the editor."));g("sash.hoverBorder",{dark:_,light:_,hcDark:_,hcLight:_},a.NC("sashActiveBorder","Border color of active sashes."));let ed=g("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("editorBackground","Editor background color.")),eu=g("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Il.white,hcLight:p},a.NC("editorForeground","Editor default foreground color."));g("editorStickyScroll.background",{light:ed,dark:ed,hcDark:ed,hcLight:ed},a.NC("editorStickyScrollBackground","Sticky scroll background color for the editor")),g("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));let ec=g("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Il.white},a.NC("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),eg=g("editorWidget.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ep=g("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:v,hcLight:v},a.NC("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),em=g("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ef=g("quickInput.background",{dark:ec,light:ec,hcDark:ec,hcLight:ec},a.NC("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),e_=g("quickInput.foreground",{dark:eg,light:eg,hcDark:eg,hcLight:eg},a.NC("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ev=g("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hcDark:"#000000",hcLight:o.Il.white},a.NC("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),eC=g("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupForeground","Quick picker color for grouping labels.")),eb=g("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupBorder","Quick picker color for grouping borders.")),ew=g("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ey=g("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hcDark:o.Il.white,hcLight:p},a.NC("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),eS=g("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:v},a.NC("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),eL=g("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:p},a.NC("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ek=g("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},a.NC("editorSelectionBackground","Color of the editor selection.")),eN=g("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Il.white},a.NC("editorSelectionForeground","Color of the selected text for high contrast.")),eD=g("editor.inactiveSelectionBackground",{light:t9(ek,.5),dark:t9(ek,.5),hcDark:t9(ek,.7),hcLight:t9(ek,.5)},a.NC("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),ex=g("editor.selectionHighlightBackground",{light:t6(ek,ed,.3,.6),dark:t6(ek,ed,.3,.6),hcDark:null,hcLight:null},a.NC("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),eI=g("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),eE=g("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},a.NC("editorFindMatch","Color of the current search match.")),eT=g("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},a.NC("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),eM=g("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},a.NC("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),eA=g("editor.findMatchBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("editorFindMatchBorder","Border color of the current search match.")),eR=g("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:C,hcLight:C},a.NC("findMatchHighlightBorder","Border color of the other search matches.")),eO=g("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:t9(C,.4),hcLight:t9(C,.4)},a.NC("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);g("searchEditor.findMatchBackground",{light:t9(eT,.66),dark:t9(eT,.66),hcDark:eT,hcLight:eT},a.NC("searchEditor.queryMatch","Color of the Search Editor query matches.")),g("searchEditor.findMatchBorder",{light:t9(eR,.66),dark:t9(eR,.66),hcDark:eR,hcLight:eR},a.NC("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));let eP=g("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},a.NC("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),eF=g("editorHoverWidget.background",{light:ec,dark:ec,hcDark:ec,hcLight:ec},a.NC("hoverBackground","Background color of the editor hover.")),eB=g("editorHoverWidget.foreground",{light:eg,dark:eg,hcDark:eg,hcLight:eg},a.NC("hoverForeground","Foreground color of the editor hover.")),eV=g("editorHoverWidget.border",{light:ep,dark:ep,hcDark:ep,hcLight:ep},a.NC("hoverBorder","Border color of the editor hover.")),eW=g("editorHoverWidget.statusBarBackground",{dark:t3(eF,.2),light:t4(eF,.05),hcDark:ec,hcLight:ec},a.NC("statusBarBackground","Background color of the editor hover status bar.")),eH=g("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hcDark:o.Il.cyan,hcLight:"#292929"},a.NC("activeLinkForeground","Color of active links.")),ez=g("editorInlayHint.foreground",{dark:t9(q,.8),light:t9(q,.8),hcDark:q,hcLight:q},a.NC("editorInlayHintForeground","Foreground color of inline hints")),eK=g("editorInlayHint.background",{dark:t9(j,.6),light:t9(j,.3),hcDark:j,hcLight:j},a.NC("editorInlayHintBackground","Background color of inline hints")),eU=g("editorInlayHint.typeForeground",{dark:ez,light:ez,hcDark:ez,hcLight:ez},a.NC("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),e$=g("editorInlayHint.typeBackground",{dark:eK,light:eK,hcDark:eK,hcLight:eK},a.NC("editorInlayHintBackgroundTypes","Background color of inline hints for types")),ej=g("editorInlayHint.parameterForeground",{dark:ez,light:ez,hcDark:ez,hcLight:ez},a.NC("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),eq=g("editorInlayHint.parameterBackground",{dark:eK,light:eK,hcDark:eK,hcLight:eK},a.NC("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),eG=g("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},a.NC("editorLightBulbForeground","The color used for the lightbulb actions icon.")),eQ=g("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.NC("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),eZ=new o.Il(new o.VS(155,185,85,.2)),eY=new o.Il(new o.VS(255,0,0,.2)),eJ=g("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c66",hcDark:null,hcLight:null},a.NC("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),eX=g("diffEditor.removedTextBackground",{dark:"#ff000066",light:"#ff00004d",hcDark:null,hcLight:null},a.NC("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e0=g("diffEditor.insertedLineBackground",{dark:eZ,light:eZ,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),e1=g("diffEditor.removedLineBackground",{dark:eY,light:eY,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),e2=g("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),e5=g("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),e4=g("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),e3=g("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),e9=g("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},a.NC("diffEditorInsertedOutline","Outline color for the text that got inserted.")),e7=g("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},a.NC("diffEditorRemovedOutline","Outline color for text that got removed.")),e6=g("diffEditor.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("diffEditorBorder","Border color between the two text editors.")),e8=g("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},a.NC("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),te=g("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=g("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ti=g("list.focusOutline",{dark:_,light:_,hcDark:C,hcLight:C},a.NC("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tn=g("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),to=g("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tr=g("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hcDark:null,hcLight:null},a.NC("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ts=g("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ta=g("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tl=g("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),th=g("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),td=g("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tu=g("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tc=g("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listHoverBackground","List/Tree background when hovering over items using the mouse.")),tg=g("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),tp=g("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},a.NC("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),tm=g("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:_,hcLight:_},a.NC("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),tf=g("list.focusHighlightForeground",{dark:tm,light:{op:5,if:to,then:tm,else:"#BBE7FF"},hcDark:tm,hcLight:tm},a.NC("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));g("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},a.NC("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),g("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},a.NC("listErrorForeground","Foreground color of list items containing errors.")),g("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},a.NC("listWarningForeground","Foreground color of list items containing warnings."));let t_=g("listFilterWidget.background",{light:t4(ec,0),dark:t3(ec,0),hcDark:ec,hcLight:ec},a.NC("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),tv=g("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hcDark:"#f38518",hcLight:"#007ACC"},a.NC("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),tC=g("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:v,hcLight:v},a.NC("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),tb=g("listFilterWidget.shadow",{dark:S,light:S,hcDark:S,hcLight:S},a.NC("listFilterWidgetShadow","Shadown color of the type filter widget in lists and trees."));g("list.filterMatchBackground",{dark:eT,light:eT,hcDark:null,hcLight:null},a.NC("listFilterMatchHighlight","Background color of the filtered match.")),g("list.filterMatchBorder",{dark:eR,light:eR,hcDark:v,hcLight:C},a.NC("listFilterMatchHighlightBorder","Border color of the filtered match."));let tw=g("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},a.NC("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ty=g("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},a.NC("tableColumnsBorder","Table border color between columns.")),tS=g("tree.tableOddRowsBackground",{dark:t9(p,.04),light:t9(p,.04),hcDark:null,hcLight:null},a.NC("tableOddRowsBackgroundColor","Background color for odd table rows."));g("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},a.NC("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));let tL=g("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,a.NC("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),tk=g("quickInputList.focusForeground",{dark:tr,light:tr,hcDark:tr,hcLight:tr},a.NC("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),tN=g("quickInputList.focusIconForeground",{dark:ts,light:ts,hcDark:ts,hcLight:ts},a.NC("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),tD=g("quickInputList.focusBackground",{dark:t7(tL,to),light:t7(tL,to),hcDark:null,hcLight:null},a.NC("quickInput.listFocusBackground","Quick picker background color for the focused item.")),tx=g("menu.border",{dark:null,light:null,hcDark:v,hcLight:v},a.NC("menuBorder","Border color of menus.")),tI=g("menu.foreground",{dark:W,light:p,hcDark:W,hcLight:W},a.NC("menuForeground","Foreground color of menu items.")),tE=g("menu.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("menuBackground","Background color of menu items.")),tT=g("menu.selectionForeground",{dark:tr,light:tr,hcDark:tr,hcLight:tr},a.NC("menuSelectionForeground","Foreground color of the selected menu item in menus.")),tM=g("menu.selectionBackground",{dark:to,light:to,hcDark:to,hcLight:to},a.NC("menuSelectionBackground","Background color of the selected menu item in menus.")),tA=g("menu.selectionBorder",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("menuSelectionBorder","Border color of the selected menu item in menus.")),tR=g("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:v,hcLight:v},a.NC("menuSeparatorBackground","Color of a separator menu item in menus.")),tO=g("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));g("toolbar.hoverOutline",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),g("toolbar.activeBackground",{dark:t3(tO,.1),light:t4(tO,.1),hcDark:null,hcLight:null},a.NC("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),g("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hcDark:new o.Il(new o.VS(124,124,124,.3)),hcLight:new o.Il(new o.VS(10,50,100,.2))},a.NC("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),g("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),g("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),g("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},a.NC("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),g("breadcrumb.foreground",{light:t9(p,.8),dark:t9(p,.8),hcDark:t9(p,.8),hcLight:t9(p,.8)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),g("breadcrumb.background",{light:ed,dark:ed,hcDark:ed,hcLight:ed},a.NC("breadcrumbsBackground","Background color of breadcrumb items.")),g("breadcrumb.focusForeground",{light:t4(p,.2),dark:t3(p,.1),hcDark:t3(p,.1),hcLight:t3(p,.1)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),g("breadcrumb.activeSelectionForeground",{light:t4(p,.2),dark:t3(p,.1),hcDark:t3(p,.1),hcLight:t3(p,.1)},a.NC("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),g("breadcrumbPicker.background",{light:ec,dark:ec,hcDark:ec,hcLight:ec},a.NC("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));let tP=o.Il.fromHex("#40C8AE").transparent(.5),tF=o.Il.fromHex("#40A6FF").transparent(.5),tB=o.Il.fromHex("#606060").transparent(.4),tV=g("merge.currentHeaderBackground",{dark:tP,light:tP,hcDark:null,hcLight:null},a.NC("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.currentContentBackground",{dark:t9(tV,.4),light:t9(tV,.4),hcDark:t9(tV,.4),hcLight:t9(tV,.4)},a.NC("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tW=g("merge.incomingHeaderBackground",{dark:tF,light:tF,hcDark:null,hcLight:null},a.NC("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.incomingContentBackground",{dark:t9(tW,.4),light:t9(tW,.4),hcDark:t9(tW,.4),hcLight:t9(tW,.4)},a.NC("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tH=g("merge.commonHeaderBackground",{dark:tB,light:tB,hcDark:null,hcLight:null},a.NC("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);g("merge.commonContentBackground",{dark:t9(tH,.4),light:t9(tH,.4),hcDark:t9(tH,.4),hcLight:t9(tH,.4)},a.NC("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let tz=g("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},a.NC("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));g("editorOverviewRuler.currentContentForeground",{dark:t9(tV,1),light:t9(tV,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),g("editorOverviewRuler.incomingContentForeground",{dark:t9(tW,1),light:t9(tW,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),g("editorOverviewRuler.commonContentForeground",{dark:t9(tH,1),light:t9(tH,1),hcDark:tz,hcLight:tz},a.NC("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));let tK=g("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},a.NC("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),tU=g("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},a.NC("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),t$=g("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},a.NC("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),tj=g("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),tq=g("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),tG=g("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},a.NC("minimapError","Minimap marker color for errors.")),tQ=g("minimap.warningHighlight",{dark:en,light:en,hcDark:eo,hcLight:eo},a.NC("overviewRuleWarning","Minimap marker color for warnings.")),tZ=g("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("minimapBackground","Minimap background color.")),tY=g("minimap.foregroundOpacity",{dark:o.Il.fromHex("#000f"),light:o.Il.fromHex("#000f"),hcDark:o.Il.fromHex("#000f"),hcLight:o.Il.fromHex("#000f")},a.NC("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),tJ=g("minimapSlider.background",{light:t9(Q,.5),dark:t9(Q,.5),hcDark:t9(Q,.5),hcLight:t9(Q,.5)},a.NC("minimapSliderBackground","Minimap slider background color.")),tX=g("minimapSlider.hoverBackground",{light:t9(Z,.5),dark:t9(Z,.5),hcDark:t9(Z,.5),hcLight:t9(Z,.5)},a.NC("minimapSliderHoverBackground","Minimap slider background color when hovering.")),t0=g("minimapSlider.activeBackground",{light:t9(Y,.5),dark:t9(Y,.5),hcDark:t9(Y,.5),hcLight:t9(Y,.5)},a.NC("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),t1=g("problemsErrorIcon.foreground",{dark:ee,light:ee,hcDark:ee,hcLight:ee},a.NC("problemsErrorIconForeground","The color used for the problems error icon.")),t2=g("problemsWarningIcon.foreground",{dark:en,light:en,hcDark:en,hcLight:en},a.NC("problemsWarningIconForeground","The color used for the problems warning icon.")),t5=g("problemsInfoIcon.foreground",{dark:es,light:es,hcDark:es,hcLight:es},a.NC("problemsInfoIconForeground","The color used for the problems info icon."));function t4(e,t){return{op:0,value:e,factor:t}}function t3(e,t){return{op:1,value:e,factor:t}}function t9(e,t){return{op:2,value:e,factor:t}}function t7(...e){return{op:3,values:e}}function t6(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function t8(e,t){if(null===e);else if("string"==typeof e)return"#"===e[0]?o.Il.fromHex(e):t.getColor(e);else if(e instanceof o.Il)return e;else if("object"==typeof e)return function(e,t){var i,n,r;switch(e.op){case 0:return null===(i=t8(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=t8(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(r=t8(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:for(let i of e.values){let e=t8(i,t);if(e)return e}return;case 5:return t8(t.defines(e.if)?e.then:e.else,t);case 4:{let i=t8(e.value,t);if(!i)return;let n=t8(e.background,t);if(!n)return i.transparent(e.factor*e.transparency);return i.isDarkerThan(n)?o.Il.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Il.getDarkerColor(i,n,e.factor).transparent(e.transparency)}default:throw(0,s.vE)(e)}}(e,t)}g("charts.foreground",{dark:p,light:p,hcDark:p,hcLight:p},a.NC("chartsForeground","The foreground color used in charts.")),g("charts.lines",{dark:t9(p,.5),light:t9(p,.5),hcDark:t9(p,.5),hcLight:t9(p,.5)},a.NC("chartsLines","The color used for horizontal lines in charts.")),g("charts.red",{dark:ee,light:ee,hcDark:ee,hcLight:ee},a.NC("chartsRed","The red color used in chart visualizations.")),g("charts.blue",{dark:es,light:es,hcDark:es,hcLight:es},a.NC("chartsBlue","The blue color used in chart visualizations.")),g("charts.yellow",{dark:en,light:en,hcDark:en,hcLight:en},a.NC("chartsYellow","The yellow color used in chart visualizations.")),g("charts.orange",{dark:t$,light:t$,hcDark:t$,hcLight:t$},a.NC("chartsOrange","The orange color used in chart visualizations.")),g("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},a.NC("chartsGreen","The green color used in chart visualizations.")),g("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.NC("chartsPurple","The purple color used in chart visualizations."));let ie="vscode://schemas/workbench-colors",it=h.B.as(l.I.JSONContribution);it.registerSchema(ie,c.getColorSchema());let ii=new n.pY(()=>it.notifySchemaChanged(ie),200);c.onDidChangeSchema(()=>{ii.isScheduled()||ii.schedule()})},59554:function(e,t,i){"use strict";i.d(t,{Ks:function(){return _},q5:function(){return f},s_:function(){return w}});var n,o,r,s=i(15393),a=i(73046),l=i(4669),h=i(98401),d=i(70666),u=i(63580),c=i(81294),g=i(89872),p=i(97781);(o||(o={})).getDefinition=function(e,t){let i=e.defaults;for(;p.kS.isThemeIcon(i);){let e=m.getIcon(i.id);if(!e)return;i=e.defaults}return i},(n=r||(r={})).toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map(e=>({format:e.format,location:e.location.toString()}))}},n.fromJSONObject=function(e){let t=e=>(0,h.HD)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every(e=>(0,h.HD)(e.format)&&(0,h.HD)(e.location)))return{weight:t(e.weight),style:t(e.style),src:e.src.map(e=>({format:e.format,location:d.o.parse(e.location)}))}};let m=new class{constructor(){this._onDidChange=new l.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,u.NC)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,u.NC)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${a.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){let o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;let t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}this.iconsById[e]={id:e,description:i,defaults:t,deprecationMessage:n};let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){let e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;p.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let n=Object.keys(this.iconsById).map(e=>this.iconsById[e]);for(let o of n.filter(e=>!!e.description).sort(e))i.push(`||${o.id}|${p.kS.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);for(let o of(i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |"),n.filter(e=>!p.kS.isThemeIcon(e.defaults)).sort(e)))i.push(`||${o.id}|`);return i.join("\n")}};function f(e,t,i,n){return m.registerIcon(e,t,i,n)}function _(){return m}g.B.add("base.contributions.icons",m),function(){for(let e of a.lA.getAll())m.registerIcon(e.id,e.definition,e.description)}();let v="vscode://schemas/icons",C=g.B.as(c.I.JSONContribution);C.registerSchema(v,m.getIconSchema());let b=new s.pY(()=>C.notifySchemaChanged(v),200);m.onDidChange(()=>{b.isScheduled()||b.schedule()});let w=f("widget-close",a.lA.close,(0,u.NC)("widgetClose","Icon for the close action in widgets."));f("goto-previous-location",a.lA.arrowUp,(0,u.NC)("previousChangeIcon","Icon for goto previous editor location.")),f("goto-next-location",a.lA.arrowDown,(0,u.NC)("nextChangeIcon","Icon for goto next editor location.")),p.kS.modify(a.lA.sync,"spin"),p.kS.modify(a.lA.loading,"spin")},88810:function(e,t,i){"use strict";i.d(t,{Jl:function(){return a},O2:function(){return l},WZ:function(){return s},o:function(){return o},tj:function(){return d}});var n=i(73910);function o(e,t){let i=Object.create(null);for(let o in t){let r=t[o];r&&(i[o]=(0,n.Snq)(r,e))}return i}function r(e,t,i){function n(){let n=o(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function s(e,t,i){return r(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||n.g8u,badgeForeground:(null==i?void 0:i.badgeForeground)||n.qeD,badgeBorder:n.lRK},e)}function a(e,t,i){return r(t,Object.assign(Object.assign({},l),i||{}),e)}let l={listFocusBackground:n._bK,listFocusForeground:n._2n,listFocusOutline:n.Oop,listActiveSelectionBackground:n.dCr,listActiveSelectionForeground:n.M6C,listActiveSelectionIconForeground:n.Tnx,listFocusAndSelectionOutline:n.Bqu,listFocusAndSelectionBackground:n.dCr,listFocusAndSelectionForeground:n.M6C,listInactiveSelectionBackground:n.rg2,listInactiveSelectionIconForeground:n.kvU,listInactiveSelectionForeground:n.ytC,listInactiveFocusBackground:n.s$,listInactiveFocusOutline:n.F3d,listHoverBackground:n.mV1,listHoverForeground:n.$d5,listDropBackground:n.AS1,listSelectionOutline:n.xL1,listHoverOutline:n.xL1,listFilterWidgetBackground:n.vGG,listFilterWidgetOutline:n.oSI,listFilterWidgetNoMatchesOutline:n.Saq,listFilterWidgetShadow:n.y65,treeIndentGuidesStroke:n.UnT,tableColumnsBorder:n.uxu,tableOddRowsBackgroundColor:n.EQn,inputActiveOptionBorder:n.PRb,inputActiveOptionForeground:n.Pvw,inputActiveOptionBackground:n.XEs,inputBackground:n.sEe,inputForeground:n.zJb,inputBorder:n.dt_,inputValidationInfoBackground:n._lC,inputValidationInfoForeground:n.YI3,inputValidationInfoBorder:n.EPQ,inputValidationWarningBackground:n.RV_,inputValidationWarningForeground:n.SUG,inputValidationWarningBorder:n.C3g,inputValidationErrorBackground:n.paE,inputValidationErrorForeground:n._t9,inputValidationErrorBorder:n.OZR},h={shadowColor:n.rh,borderColor:n.Cdg,foregroundColor:n.DEr,backgroundColor:n.Hz8,selectionForegroundColor:n.jbW,selectionBackgroundColor:n.$DX,selectionBorderColor:n.E3h,separatorColor:n.ZGJ,scrollbarShadow:n._wn,scrollbarSliderBackground:n.etL,scrollbarSliderHoverBackground:n.ABB,scrollbarSliderActiveBackground:n.ynu};function d(e,t,i){return r(t,Object.assign(Object.assign({},h),i),e)}},92321:function(e,t,i){"use strict";var n,o;function r(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{_T:function(){return s},c3:function(){return r},eL:function(){return n}}),(o=n||(n={})).DARK="dark",o.LIGHT="light",o.HIGH_CONTRAST_DARK="hcDark",o.HIGH_CONTRAST_LIGHT="hcLight"},97781:function(e,t,i){"use strict";i.d(t,{EN:function(){return c},IP:function(){return p},Ic:function(){return f},XE:function(){return u},bB:function(){return _},kS:function(){return o},m6:function(){return g}});var n,o,r=i(73046),s=i(4669),a=i(9917),l=i(72065),h=i(89872),d=i(92321);let u=(0,l.yh)("themeService");function c(e){return{id:e}}function g(e){switch(e){case d.eL.DARK:return"vs-dark";case d.eL.HIGH_CONTRAST_DARK:return"hc-black";case d.eL.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}(n||(n={})).isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id},function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};let t=RegExp(`^\\$\\((${r.dT.iconNameExpression}(?:${r.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){let i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id,n=i.lastIndexOf("~");return -1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){let t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e,t){return{id:e.id,color:t?{id:t}:void 0}},e.asClassNameArray=r.dT.asClassNameArray,e.asClassName=r.dT.asClassName,e.asCSSSelector=r.dT.asCSSSelector}(o||(o={}));let p={ThemingContribution:"base.contributions.theming"},m=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,a.OF)(()=>{let t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}};function f(e){return m.onColorThemeChange(e)}h.B.add(p.ThemingContribution,m);class _ extends a.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},64862:function(e,t,i){"use strict";i.d(t,{Xt:function(){return s},YO:function(){return r},gJ:function(){return a},tJ:function(){return o}});var n=i(72065);let o=(0,n.yh)("undoRedoService");class r{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class a{constructor(){this.id=a._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}a._ID=0,a.None=new a},40382:function(e,t,i){"use strict";i.d(t,{A6:function(){return d},eb:function(){return a},ec:function(){return s},md:function(){return h},uT:function(){return l}});var n=i(63580);i(43702);var o=i(70666),r=i(72065);let s=(0,r.yh)("contextService");function a(e){return"string"==typeof(null==e?void 0:e.id)&&o.o.isUri(e.uri)}function l(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}class h{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}let d="code-workspace";(0,n.NC)("codeWorkspace","Code Workspace")},33425:function(e,t,i){"use strict";i.d(t,{Y:function(){return o}});var n=i(72065);let o=(0,n.yh)("workspaceTrustManagementService")},13880:function(){},40944:function(){},49373:function(){},44142:function(){},90900:function(){},7697:function(){},32501:function(){},63513:function(){},82654:function(){},74090:function(){},14075:function(){},92845:function(){},98727:function(){},50203:function(){},30591:function(){},7226:function(){},91550:function(){},85947:function(){},39769:function(){},98524:function(){},58206:function(){},38386:function(){},27611:function(){},33094:function(){},47848:function(){},84888:function(){},58153:function(){},1237:function(){},88541:function(){},44789:function(){},7919:function(){},48394:function(){},83765:function(){},24850:function(){},31282:function(){},2641:function(){},27505:function(){},7525:function(){},32452:function(){},38356:function(){},45007:function(){},50103:function(){},41459:function(){},64287:function(){},36053:function(){},10721:function(){},32585:function(){},51094:function(){},32811:function(){},99580:function(){},62736:function(){},55484:function(){},96808:function(){},37640:function(){},69409:function(){},82438:function(){},52205:function(){},51397:function(){},13791:function(){},74153:function(){},32365:function(){},60624:function(){},36046:function(){},60858:function(){},96909:function(){},64520:function(){},63737:function(){},544:function(){},79807:function(){},95656:function(){},45778:function(){}}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5789-9438e4ced8168bb8.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5789-2039689e65be4b48.js similarity index 100% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5789-9438e4ced8168bb8.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/5789-2039689e65be4b48.js diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-0c6ffed8e4e3b488.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-9727b79352b76431.js similarity index 99% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-0c6ffed8e4e3b488.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-9727b79352b76431.js index f70ec38cc..2bc2af54b 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-0c6ffed8e4e3b488.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/7249-9727b79352b76431.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7249],{23430:function(e,t,l){"use strict";var a=l(85893),r=l(25675),n=l.n(r);t.Z=function(e){let{src:t,label:l,width:r,height:s,className:o}=e;return(0,a.jsx)(n(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white ".concat(o),width:r||44,height:s||44,src:t,alt:l||"db-icon"})}},86600:function(e,t,l){"use strict";var a=l(85893),r=l(30119),n=l(65654),s=l(2487),o=l(83062),i=l(45360),c=l(28459),d=l(55241),u=l(99859),m=l(34041),p=l(12652),h=l(67294),x=l(67421);let f=e=>{let{data:t,loading:l,submit:r,close:n}=e,{t:i}=(0,x.$G)(),c=e=>()=>{r(e),n()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(s.Z,{dataSource:null==t?void 0:t.data,loading:l,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(s.Z.Item,{onClick:c(e),children:(0,a.jsx)(o.Z,{title:e.content,children:(0,a.jsx)(s.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:i("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+i("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};t.Z=e=>{let{submit:t,chat_scene:l}=e,{t:s}=(0,x.$G)(),[g,v]=(0,h.useState)(!1),[_,b]=(0,h.useState)("common"),{data:j,loading:w,run:y}=(0,n.Z)(()=>{let e={};return"common"!==_&&(e.prompt_type=_),l&&(e.chat_scene=l),(0,r.PR)("/prompt/list",e)},{refreshDeps:[_,l],onError:e=>{i.ZP.error(null==e?void 0:e.message)},manual:!0});return(0,h.useEffect)(()=>{g&&y()},[g,_,l,y]),(0,a.jsx)(c.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(d.Z,{title:(0,a.jsx)(u.default.Item,{label:"Prompt "+s("Type"),children:(0,a.jsx)(m.default,{style:{width:150},value:_,onChange:e=>{b(e)},options:[{label:s("Public")+" Prompts",value:"common"},{label:s("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(f,{data:j,loading:w,submit:t,close:()=>{v(!1)}}),placement:"topRight",trigger:"click",open:g,onOpenChange:e=>{v(e)},children:(0,a.jsx)(o.Z,{title:s("Click_Select")+" Prompt",children:(0,a.jsx)(p.Z,{className:"bottom-[30%]"})})})})}},43446:function(e,t,l){"use strict";var a=l(41468),r=l(64371),n=l(62418),s=l(25519),o=l(1375),i=l(45360),c=l(67294),d=l(83454);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions",app_code:l}=e,[u,m]=(0,c.useState)({}),{scene:p}=(0,c.useContext)(a.p),h=(0,c.useCallback)(async e=>{let{data:a,chatId:c,onMessage:u,onClose:h,onDone:x,onError:f,ctrl:g}=e;if(g&&m(g),!(null==a?void 0:a.user_input)&&!(null==a?void 0:a.doc_id)){i.ZP.warning(r.Z.t("no_context_tip"));return}let v={conv_uid:c,app_code:l};a&&Object.keys(a).forEach(e=>{v[e]=a[e]}),console.log("DEBUG - API request params:",v),console.log("DEBUG - prompt_code in params:",v.prompt_code),console.log("DEBUG - data object received:",a);try{var _,b;let e=JSON.stringify(v);console.log("DEBUG - API request body:",e),await (0,o.L)("".concat(null!==(_=d.env.API_BASE_URL)&&void 0!==_?_:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json",[s.gp]:null!==(b=(0,n.n5)())&&void 0!==b?b:""},body:e,signal:g?g.signal:null,openWhenHidden:!0,async onopen(e){e.ok&&e.headers.get("content-type")===o.a||"application/json"!==e.headers.get("content-type")||e.json().then(e=>{null==u||u(e),null==x||x(),g&&g.abort()})},onclose(){g&&g.abort(),null==h||h()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===p?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==f||f(null==t?void 0:t.replace("[ERROR]","")):null==u||u(t):(null==u||u(t),null==x||x())}})}catch(e){g&&g.abort(),null==f||f("Sorry, We meet some error, please try agin later.",e)}},[t,l,p]);return{chat:h,ctrl:u}}},48218:function(e,t,l){"use strict";var a=l(85893),r=l(82353),n=l(16165),s=l(67294);t.Z=e=>{let{width:t,height:l,scene:o}=e,i=(0,s.useCallback)(()=>{switch(o){case"chat_knowledge":return r.je;case"chat_with_db_execute":return r.zM;case"chat_excel":return r.DL;case"chat_with_db_qa":case"chat_dba":return r.RD;case"chat_dashboard":return r.In;case"chat_agent":return r.si;case"chat_normal":return r.O7;default:return}},[o]);return(0,a.jsx)(n.Z,{className:"w-".concat(t||7," h-").concat(l||7),component:i()})}},70065:function(e,t,l){"use strict";var a=l(91321);let r=(0,a.Z)({scriptUrl:"//at.alicdn.com/t/a/font_4440880_ljyggdw605.js"});t.Z=r},91467:function(e,t,l){"use strict";l.d(t,{TH:function(){return x},ZS:function(){return f}});var a=l(85893),r=l(89705),n=l(83062),s=l(96074),o=l(45030),i=l(85418),c=l(93967),d=l.n(c),u=l(36609),m=l(25675),p=l.n(m);l(67294);var h=l(48218);l(11873);let x=e=>{let{onClick:t,Icon:l="/pictures/card_chat.png",text:r=(0,u.t)("start_chat")}=e;return"string"==typeof l&&(l=(0,a.jsx)(p(),{src:l,alt:l,width:17,height:15})),(0,a.jsxs)("div",{className:"flex items-center gap-1 text-default",onClick:e=>{e.stopPropagation(),t&&t()},children:[l,(0,a.jsx)("span",{children:r})]})},f=e=>{let{menu:t}=e;return(0,a.jsx)(i.Z,{menu:t,getPopupContainer:e=>e.parentNode,placement:"bottomRight",autoAdjustOverflow:!1,children:(0,a.jsx)(r.Z,{className:"p-2 hover:bg-white hover:dark:bg-black rounded-md"})})};t.ZP=e=>{let{RightTop:t,Tags:l,LeftBottom:r,RightBottom:i,onClick:c,rightTopHover:u=!0,logo:m,name:x,description:f,className:g,scene:v,code:_}=e;return"string"==typeof f&&(f=(0,a.jsx)("p",{className:"line-clamp-2 relative bottom-4 text-ellipsis min-h-[42px] text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)]",children:f})),(0,a.jsx)("div",{className:d()("hover-underline-gradient flex justify-center mt-6 relative group w-1/3 px-2 mb-6",g),children:(0,a.jsxs)("div",{onClick:c,className:"backdrop-filter backdrop-blur-lg cursor-pointer bg-white bg-opacity-70 border-2 border-white rounded-lg shadow p-4 relative w-full h-full dark:border-[#6f7f95] dark:bg-[#6f7f95] dark:bg-opacity-60",children:[(0,a.jsxs)("div",{className:"flex items-end relative bottom-8 justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-end gap-4 w-11/12 flex-1",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-14 h-14 flex items-center p-3",children:v?(0,a.jsx)(h.Z,{scene:v,width:14,height:14}):m&&(0,a.jsx)(p(),{src:m,width:44,height:44,alt:x,className:"w-8 min-w-8 rounded-full max-w-none"})}),(0,a.jsx)("div",{className:"flex-1",children:x.length>6?(0,a.jsx)(n.Z,{title:x,children:(0,a.jsx)("span",{className:"line-clamp-1 text-ellipsis font-semibold text-base",style:{maxWidth:"60%"},children:x})}):(0,a.jsx)("span",{className:"line-clamp-1 text-ellipsis font-semibold text-base",style:{maxWidth:"60%"},children:x})})]}),(0,a.jsx)("span",{className:d()("shrink-0",{hidden:u,"group-hover:block":u}),onClick:e=>{e.stopPropagation()},children:t})]}),f,(0,a.jsx)("div",{className:"relative bottom-2",children:l}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("div",{children:r}),(0,a.jsx)("div",{children:i})]}),_&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{className:"my-3"}),(0,a.jsx)(o.Z.Text,{copyable:!0,className:"absolute bottom-1 right-4 text-xs text-gray-500",children:_})]})]})})}},57249:function(e,t,l){"use strict";l.r(t),l.d(t,{ChatContentContext:function(){return eM},default:function(){return eT}});var a=l(85893),r=l(41468),n=l(76212),s=l(86600),o=l(43446),i=l(50888),c=l(90598),d=l(75750),u=l(58638),m=l(45360),p=l(66309),h=l(45030),x=l(74330),f=l(20640),g=l.n(f),v=l(67294),_=l(67421),b=l(65654),j=l(48218);let w=["magenta","orange","geekblue","purple","cyan","green"];var y=e=>{var t,l,r,s,o,f;let{isScrollToTop:y}=e,{appInfo:N,refreshAppInfo:k,handleChat:Z,scrollRef:S,temperatureValue:C,resourceValue:P,currentDialogue:R}=(0,v.useContext)(eM),{t:E}=(0,_.$G)(),M=(0,v.useMemo)(()=>{var e;return(null==N?void 0:null===(e=N.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent"},[N]),T=(0,v.useMemo)(()=>(null==N?void 0:N.is_collected)==="true",[N]),{run:I,loading:O}=(0,b.Z)(async()=>{let[e]=await (0,n.Vx)(T?(0,n.gD)({app_code:N.app_code}):(0,n.mo)({app_code:N.app_code}));if(!e)return await k()},{manual:!0}),V=(0,v.useMemo)(()=>{var e;return(null===(e=N.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[N.param_need]);if(!Object.keys(N).length)return null;let L=async()=>{let e=g()(location.href);m.ZP[e?"success":"error"](e?E("copy_success"):E("copy_failed"))};return(0,a.jsx)("div",{className:"h-20 mt-6 ".concat((null==N?void 0:N.recommend_questions)&&(null==N?void 0:null===(t=N.recommend_questions)||void 0===t?void 0:t.length)>0?"mb-6":""," sticky top-0 bg-transparent z-30 transition-all duration-400 ease-in-out"),children:y?(0,a.jsxs)("header",{className:"flex items-center justify-between w-full h-14 bg-[#ffffffb7] dark:bg-[rgba(41,63,89,0.4)] px-8 transition-all duration-500 ease-in-out",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg mr-2 bg-white",children:(0,a.jsx)(j.Z,{scene:M})}),(0,a.jsxs)("div",{className:"flex items-center text-base text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] font-semibold gap-2",children:[(0,a.jsx)("span",{children:null==N?void 0:N.app_name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(null==N?void 0:N.team_mode)&&(0,a.jsx)(p.Z,{color:"green",children:null==N?void 0:N.team_mode}),(null==N?void 0:null===(l=N.team_context)||void 0===l?void 0:l.chat_scene)&&(0,a.jsx)(p.Z,{color:"cyan",children:null==N?void 0:null===(r=N.team_context)||void 0===r?void 0:r.chat_scene})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-8",onClick:async()=>{await I()},children:[O?(0,a.jsx)(x.Z,{spinning:O,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})}):(0,a.jsx)(a.Fragment,{children:T?(0,a.jsx)(c.Z,{style:{fontSize:18},className:"text-yellow-400 cursor-pointer"}):(0,a.jsx)(d.Z,{style:{fontSize:18,cursor:"pointer"}})}),(0,a.jsx)(u.Z,{className:"text-lg",onClick:e=>{e.stopPropagation(),L()}})]})]}):(0,a.jsxs)("header",{className:"flex items-center justify-between w-5/6 h-full px-6 bg-[#ffffff99] border dark:bg-[rgba(255,255,255,0.1)] dark:border-[rgba(255,255,255,0.1)] rounded-2xl mx-auto transition-all duration-400 ease-in-out relative",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex w-12 h-12 justify-center items-center rounded-xl mr-4 bg-white",children:(0,a.jsx)(j.Z,{scene:M,width:16,height:16})}),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center text-base text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] font-semibold gap-2",children:[(0,a.jsx)("span",{children:null==N?void 0:N.app_name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(null==N?void 0:N.team_mode)&&(0,a.jsx)(p.Z,{color:"green",children:null==N?void 0:N.team_mode}),(null==N?void 0:null===(s=N.team_context)||void 0===s?void 0:s.chat_scene)&&(0,a.jsx)(p.Z,{color:"cyan",children:null==N?void 0:null===(o=N.team_context)||void 0===o?void 0:o.chat_scene})]})]}),(0,a.jsx)(h.Z.Text,{className:"text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)] leading-6",ellipsis:{tooltip:!0},children:null==N?void 0:N.app_describe})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{onClick:async()=>{await I()},className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:O?(0,a.jsx)(x.Z,{spinning:O,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})}):(0,a.jsx)(a.Fragment,{children:T?(0,a.jsx)(c.Z,{style:{fontSize:18},className:"text-yellow-400 cursor-pointer"}):(0,a.jsx)(d.Z,{style:{fontSize:18,cursor:"pointer"}})})}),(0,a.jsx)("div",{onClick:L,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,a.jsx)(u.Z,{className:"text-lg"})})]}),!!(null==N?void 0:null===(f=N.recommend_questions)||void 0===f?void 0:f.length)&&(0,a.jsxs)("div",{className:"absolute bottom-[-40px] left-0",children:[(0,a.jsx)("span",{className:"text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)] leading-6",children:"或许你想问:"}),N.recommend_questions.map((e,t)=>(0,a.jsx)(p.Z,{color:w[t],className:"text-xs p-1 px-2 cursor-pointer",onClick:async()=>{Z((null==e?void 0:e.question)||"",{app_code:N.app_code,...V.includes("temperature")&&{temperature:C},...V.includes("resource")&&{select_param:"string"==typeof P?P:JSON.stringify(P)||R.select_param}}),setTimeout(()=>{var e,t;null===(e=S.current)||void 0===e||e.scrollTo({top:null===(t=S.current)||void 0===t?void 0:t.scrollHeight,behavior:"smooth"})},0)},children:e.question},e.id))]})]})})},N=l(62635),k=l(66017),Z=l(5152),S=l.n(Z);let C=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(1154),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3764),l.e(5e3),l.e(3768),l.e(5789),l.e(3913),l.e(4434),l.e(3013)]).then(l.bind(l,88331)),{loadableGenerated:{webpack:()=>[88331]},ssr:!1});var P=(0,v.forwardRef)((e,t)=>{let{className:l}=e,r=(0,v.useRef)(null),[n,s]=(0,v.useState)(!1),[o,i]=(0,v.useState)(!1),[c,d]=(0,v.useState)(!0),[u,m]=(0,v.useState)(!1),{history:p}=(0,v.useContext)(eM),h=(0,v.useRef)(!0),x=(0,v.useRef)(null);(0,v.useImperativeHandle)(t,()=>r.current);let f=(0,v.useCallback)(()=>{var e;if(!r.current)return;let t=r.current,l=t.scrollTop,a=t.scrollHeight,n=t.clientHeight,o=Number(null==t?void 0:null===(e=t.dataset)||void 0===e?void 0:e.lastScrollTop)||0,c=l>o?"down":"up";t.dataset.lastScrollTop=String(l),h.current="down"===c,d(l<=20),m(l+n>=a-20),l>=74?s(!0):s(!1);let u=a>n;i(u)},[]);(0,v.useEffect)(()=>{let e=r.current;if(e){e.addEventListener("scroll",f);let t=e.scrollHeight>e.clientHeight;i(t)}return()=>{e&&e.removeEventListener("scroll",f)}},[f]);let g=(0,v.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!r.current||!e&&!h.current)return;let t=r.current,{scrollTop:l,scrollHeight:a,clientHeight:n}=t;(l+n>=a-Math.max(50,.1*n)||e)&&(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{r.current&&r.current.scrollTo({top:r.current.scrollHeight,behavior:e?"smooth":"auto"}),x.current=null}))},[]),_=(0,v.useMemo)(()=>{let e=p[p.length-1];return e?{context:e.context,thinking:e.thinking}:null},[p]),b=(0,v.useRef)(p.length);(0,v.useEffect)(()=>{let e=p.length,t=e>b.current;t?(g(!0),b.current=e):g(!1)},[p.length,g]),(0,v.useEffect)(()=>{p.length===b.current&&g(!1)},[null==_?void 0:_.context,null==_?void 0:_.thinking,p.length,g]),(0,v.useEffect)(()=>()=>{x.current&&cancelAnimationFrame(x.current)},[]);let j=(0,v.useCallback)(()=>{r.current&&r.current.scrollTo({top:0,behavior:"smooth"})},[]),w=(0,v.useCallback)(()=>{r.current&&r.current.scrollTo({top:r.current.scrollHeight,behavior:"smooth"})},[]);return(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden relative ".concat(l||""),children:[(0,a.jsxs)("div",{ref:r,className:"h-full w-full mx-auto overflow-y-auto",children:[(0,a.jsx)(y,{isScrollToTop:n}),(0,a.jsx)(C,{})]}),o&&(0,a.jsxs)("div",{className:"absolute right-6 bottom-24 flex flex-col gap-2",children:[!c&&(0,a.jsx)("button",{onClick:j,className:"w-10 h-10 bg-white dark:bg-[rgba(255,255,255,0.2)] border border-gray-200 dark:border-[rgba(255,255,255,0.2)] rounded-full flex items-center justify-center shadow-md hover:shadow-lg transition-shadow","aria-label":"Scroll to top",children:(0,a.jsx)(N.Z,{className:"text-[#525964] dark:text-[rgba(255,255,255,0.85)]"})}),!u&&(0,a.jsx)("button",{onClick:w,className:"w-10 h-10 bg-white dark:bg-[rgba(255,255,255,0.2)] border border-gray-200 dark:border-[rgba(255,255,255,0.2)] rounded-full flex items-center justify-center shadow-md hover:shadow-lg transition-shadow","aria-label":"Scroll to bottom",children:(0,a.jsx)(k.Z,{className:"text-[#525964] dark:text-[rgba(255,255,255,0.85)]"})})]})]})}),R=l(89546),E=l(91467),M=l(7134),T=l(32983),I=l(25675),O=l.n(I),V=l(11163),L=l(70065),z=e=>{let{apps:t,refresh:l,loading:s,type:o}=e,i=async e=>{let[t]=await (0,n.Vx)("true"===e.is_collected?(0,n.gD)({app_code:e.app_code}):(0,n.mo)({app_code:e.app_code}));t||l()},{setAgent:u,model:m,setCurrentDialogInfo:p}=(0,v.useContext)(r.p),h=(0,V.useRouter)(),f=async e=>{if("native_app"===e.team_mode){let{chat_scene:t=""}=e.team_context,[,l]=await (0,n.Vx)((0,n.sW)({chat_mode:t}));l&&(null==p||p({chat_scene:l.chat_mode,app_code:e.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:l.chat_mode,app_code:e.app_code})),h.push("/chat?scene=".concat(t,"&id=").concat(l.conv_uid).concat(m?"&model=".concat(m):"")))}else{let[,t]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_agent"}));t&&(null==p||p({chat_scene:t.chat_mode,app_code:e.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:t.chat_mode,app_code:e.app_code})),null==u||u(e.app_code),h.push("/chat/?scene=chat_agent&id=".concat(t.conv_uid).concat(m?"&model=".concat(m):"")))}};return s?(0,a.jsx)(x.Z,{size:"large",className:"flex items-center justify-center h-full",spinning:s}):(0,a.jsx)("div",{className:"flex flex-wrap mt-4 w-full overflow-y-auto ",children:(null==t?void 0:t.length)>0?t.map(e=>{var t;return(0,a.jsx)(E.ZP,{name:e.app_name,description:e.app_describe,onClick:()=>f(e),RightTop:"true"===e.is_collected?(0,a.jsx)(c.Z,{onClick:t=>{t.stopPropagation(),i(e)},style:{height:"21px",cursor:"pointer",color:"#f9c533"}}):(0,a.jsx)(d.Z,{onClick:t=>{t.stopPropagation(),i(e)},style:{height:"21px",cursor:"pointer"}}),LeftBottom:(0,a.jsxs)("div",{className:"flex gap-8 items-center text-gray-500 text-sm",children:[e.owner_name&&(0,a.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,a.jsx)(M.C,{src:null==e?void 0:e.owner_avatar_url,className:"bg-gradient-to-tr from-[#31afff] to-[#1677ff] cursor-pointer",children:e.owner_name}),(0,a.jsx)("span",{children:e.owner_name})]}),"used"!==o&&(0,a.jsxs)("div",{className:"flex items-start gap-1",children:[(0,a.jsx)(L.Z,{type:"icon-hot",className:"text-lg"}),(0,a.jsx)("span",{className:"text-[#878c93]",children:e.hot_value})]})]}),scene:(null==e?void 0:null===(t=e.team_context)||void 0===t?void 0:t.chat_scene)||"chat_agent"},e.app_code)}):(0,a.jsx)(T.Z,{image:(0,a.jsx)(O(),{src:"/pictures/empty.png",alt:"empty",width:142,height:133,className:"w-[142px] h-[133px]"}),className:"flex justify-center items-center w-full h-full min-h-[200px]"})})},A=l(62418),D=l(25278),G=l(14726),H=l(93967),q=l.n(H),J=function(){let{setCurrentDialogInfo:e}=(0,v.useContext)(r.p),{t}=(0,_.$G)(),l=(0,V.useRouter)(),[s,o]=(0,v.useState)(""),[i,c]=(0,v.useState)(!1),[d,u]=(0,v.useState)(!1),m=async()=>{let[,t]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_normal"}));t&&(null==e||e({chat_scene:t.chat_mode,app_code:t.chat_mode}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:t.chat_mode,app_code:t.chat_mode})),localStorage.setItem(A.rU,JSON.stringify({id:t.conv_uid,message:s})),l.push("/chat/?scene=chat_normal&id=".concat(t.conv_uid))),o("")};return(0,a.jsxs)("div",{className:"flex flex-1 h-12 p-2 pl-4 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border-t border-b border-l border-r ".concat(i?"border-[#0c75fc]":""),children:[(0,a.jsx)(D.default.TextArea,{placeholder:t("input_tips"),className:"w-full resize-none border-0 p-0 focus:shadow-none",value:s,autoSize:{minRows:1},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&!d&&(e.preventDefault(),s.trim()&&m())},onChange:e=>{o(e.target.value)},onFocus:()=>{c(!0)},onBlur:()=>c(!1),onCompositionStart:()=>u(!0),onCompositionEnd:()=>u(!1)}),(0,a.jsx)(G.ZP,{type:"primary",className:q()("flex items-center justify-center w-14 h-8 rounded-lg text-sm bg-button-gradient border-0",{"opacity-40 cursor-not-allowed":!s.trim()}),onClick:()=>{s.trim()&&m()},children:t("sent")})]})},U=l(28459),W=l(92783),$=l(36609),B=function(){let{setCurrentDialogInfo:e,model:t}=(0,v.useContext)(r.p),l=(0,V.useRouter)(),[s,o]=(0,v.useState)({app_list:[],total_count:0}),[i,c]=(0,v.useState)("recommend"),d=e=>(0,n.Vx)((0,n.yk)({...e,page_no:"1",page_size:"6"})),u=e=>(0,n.Vx)((0,n.mW)({page_no:"1",page_size:"6",...e})),{run:m,loading:p,refresh:h}=(0,b.Z)(async e=>{switch(i){case"recommend":return await u({});case"used":return await d({is_recent_used:"true",need_owner_info:"true",...e&&{app_name:e}});default:return[]}},{manual:!0,onSuccess:e=>{let[t,l]=e;if("recommend"===i)return o({app_list:l,total_count:(null==l?void 0:l.length)||0});o(l||{})},debounceWait:500});(0,v.useEffect)(()=>{m()},[i,m]);let x=[{value:"recommend",label:(0,$.t)("recommend_apps")},{value:"used",label:(0,$.t)("used_apps")}],{data:f}=(0,b.Z)(async()=>{let[,e]=await (0,n.Vx)((0,R.A)({is_hot_question:"true"}));return null!=e?e:[]});return(0,a.jsx)(U.ZP,{theme:{components:{Button:{defaultBorderColor:"white"},Segmented:{itemSelectedBg:"#2867f5",itemSelectedColor:"white"}}},children:(0,a.jsxs)("div",{className:"px-28 py-10 h-full flex flex-col justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)(W.Z,{className:"backdrop-filter h-10 backdrop-blur-lg bg-white bg-opacity-30 border border-white rounded-lg shadow p-1 dark:border-[#6f7f95] dark:bg-[#6f7f95] dark:bg-opacity-60",options:x,value:i,onChange:e=>{c(e)}}),(0,a.jsxs)("span",{className:"flex items-center text-gray-500 gap-1 dark:text-slate-300",children:[(0,a.jsx)("span",{children:(0,$.t)("app_in_mind")}),(0,a.jsxs)("span",{className:"flex items-center cursor-pointer",onClick:()=>{l.push("/")},children:[(0,a.jsx)(O(),{src:"/pictures/explore_active.png",alt:"construct_image",width:24,height:24},"image_explore"),(0,a.jsx)("span",{className:"text-default",children:(0,$.t)("explore")})]}),(0,a.jsx)("span",{children:(0,$.t)("Discover_more")})]})]}),(0,a.jsx)(z,{apps:(null==s?void 0:s.app_list)||[],loading:p,refresh:h,type:i}),f&&f.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-medium text-xl my-4",children:(0,$.t)("help")}),(0,a.jsx)("div",{className:"flex justify-start gap-4",children:f.map(r=>(0,a.jsxs)("span",{className:"flex gap-4 items-center backdrop-filter backdrop-blur-lg cursor-pointer bg-white bg-opacity-70 border-0 rounded-lg shadow p-2 relative dark:bg-[#6f7f95] dark:bg-opacity-60",onClick:async()=>{let[,a]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_knowledge",model:t}));a&&(null==e||e({chat_scene:a.chat_mode,app_code:r.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:a.chat_mode,app_code:r.app_code})),localStorage.setItem(A.rU,JSON.stringify({id:a.conv_uid,message:r.question})),l.push("/chat/?scene=".concat(a.chat_mode,"&id=").concat(null==a?void 0:a.conv_uid)))},children:[(0,a.jsx)("span",{children:r.question}),(0,a.jsx)(O(),{src:"/icons/send.png",alt:"construct_image",width:20,height:20},"image_explore")]},r.id))})]})]}),(0,a.jsx)("div",{children:(0,a.jsx)(J,{})})]})})},F=l(39332),K=l(30159),X=l(87740),Y=l(52645),Q=l(83062),ee=l(11186),et=l(55241),el=l(30568),ea=l(13457),er=(0,v.memo)(e=>{let{maxNewTokensValue:t,setMaxNewTokensValue:l}=e,{appInfo:r}=(0,v.useContext)(eM),{t:n}=(0,_.$G)(),s=(0,v.useMemo)(()=>{var e;return(null===(e=r.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[r.param_need]);if(!s.includes("max_new_tokens"))return(0,a.jsx)(Q.Z,{title:n("max_new_tokens_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{className:"text-xl cursor-not-allowed opacity-30"})})});let o=e=>{null===e||isNaN(e)||l(e)},i=e=>{l(e)};return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(et.Z,{arrow:!1,trigger:["click"],placement:"topLeft",content:()=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(el.Z,{className:"w-32",min:1,max:20480,step:1,onChange:i,value:"number"==typeof t?t:4e3}),(0,a.jsx)(ea.Z,{size:"small",className:"w-20",min:1,max:20480,step:1,onChange:o,value:t})]}),children:(0,a.jsx)(Q.Z,{title:n("max_new_tokens"),placement:"bottom",arrow:!1,children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{})})})}),(0,a.jsx)("span",{className:"text-sm ml-2",children:t})]})}),en=l(42952),es=l(34041),eo=l(39718),ei=(0,v.memo)(()=>{let{modelList:e}=(0,v.useContext)(r.p),{appInfo:t,modelValue:l,setModelValue:n}=(0,v.useContext)(eM),{t:s}=(0,_.$G)(),o=(0,v.useMemo)(()=>{var e;return(null===(e=t.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[t.param_need]);return o.includes("model")?(0,a.jsx)(es.default,{value:l,placeholder:s("choose_model"),className:"h-8 rounded-3xl",onChange:e=>{n(e)},popupMatchSelectWidth:300,children:e.map(e=>(0,a.jsx)(es.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(eo.Z,{model:e}),(0,a.jsx)("span",{className:"ml-2",children:e})]})},e))}):(0,a.jsx)(Q.Z,{title:s("model_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(en.Z,{className:"text-xl cursor-not-allowed opacity-30"})})})}),ec=l(23430),ed=l(90725),eu=l(83266),em=l(2093),ep=l(23799),eh=(0,v.memo)(e=>{var t,l,r,s;let{fileList:o,setFileList:i,setLoading:c,fileName:d}=e,{setResourceValue:u,appInfo:m,refreshHistory:p,refreshDialogList:h,modelValue:x,resourceValue:f}=(0,v.useContext)(eM),{temperatureValue:g,maxNewTokensValue:j}=(0,v.useContext)(eM),w=(0,F.useSearchParams)(),y=null!==(t=null==w?void 0:w.get("scene"))&&void 0!==t?t:"",N=null!==(l=null==w?void 0:w.get("id"))&&void 0!==l?l:"",{t:k}=(0,_.$G)(),[Z,S]=(0,v.useState)([]),C=(0,v.useMemo)(()=>{var e;return(null===(e=m.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[m.param_need]),P=(0,v.useMemo)(()=>{var e,t;return C.includes("resource")&&(null===(e=null===(t=m.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type)[0])||void 0===e?void 0:e.value)==="database"},[m.param_need,C]),R=(0,v.useMemo)(()=>{var e,t;return C.includes("resource")&&(null===(e=null===(t=m.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type)[0])||void 0===e?void 0:e.value)==="knowledge"},[m.param_need,C]),E=(0,v.useMemo)(()=>{var e;return null===(e=m.param_need)||void 0===e?void 0:e.find(e=>"resource"===e.type)},[m.param_need]),{run:M,loading:T}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.vD)(y)),{manual:!0,onSuccess:e=>{let[,t]=e;S(null!=t?t:[])}});(0,em.Z)(async()=>{(P||R)&&!(null==E?void 0:E.bind_value)&&await M()},[P,R,E]);let I=(0,v.useMemo)(()=>{var e;return null===(e=Z.map)||void 0===e?void 0:e.call(Z,e=>({label:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ec.Z,{width:24,height:24,src:A.S$[e.type].icon,label:A.S$[e.type].label,className:"w-[1.5em] h-[1.5em] mr-1 inline-block mt-[-4px]"}),e.param]}),value:e.param}))},[Z]),O=(0,v.useCallback)(async()=>{let e=new FormData;e.append("doc_files",null==o?void 0:o[0]),c(!0);let[t,l]=await (0,n.Vx)((0,n.qn)({convUid:N,chatMode:y,data:e,model:x,temperatureValue:g,maxNewTokensValue:j,config:{timeout:36e5}})).finally(()=>{c(!1)});l&&(u(l),await p(),await h())},[N,o,x,h,p,y,c,u]);if(!C.includes("resource"))return(0,a.jsx)(Q.Z,{title:k("extend_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(ed.Z,{className:"text-lg cursor-not-allowed opacity-30"})})});switch(null==E?void 0:E.value){case"excel_file":case"text_file":case"image_file":case"audio_file":case"video_file":{let e="chat_excel"===y&&(!!d||!!(null===(r=o[0])||void 0===r?void 0:r.name)),t=k("chat_excel"===y?"file_tip":"file_upload_tip");return(0,a.jsx)(ep.default,{name:"file",accept:(()=>{switch(null==E?void 0:E.value){case"excel_file":return".csv,.xlsx,.xls";case"text_file":return".txt,.doc,.docx,.pdf,.md";case"image_file":return".jpg,.jpeg,.png,.gif,.bmp,.webp";case"audio_file":return".mp3,.wav,.ogg,.aac";case"video_file":return".mp4,.wav,.wav";default:return""}})(),fileList:o,showUploadList:!1,beforeUpload:(e,t)=>{null==i||i(t)},customRequest:O,disabled:e,children:(0,a.jsx)(Q.Z,{title:t,arrow:!1,placement:"bottom",children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(eu.Z,{className:q()("text-xl",{"cursor-pointer":!e})})})})})}case"database":case"knowledge":case"plugin":case"awel_flow":return f||u(null==I?void 0:null===(s=I[0])||void 0===s?void 0:s.value),(0,a.jsx)(es.default,{value:f,className:"w-52 h-8 rounded-3xl",onChange:e=>{u(e)},disabled:!!(null==E?void 0:E.bind_value),loading:T,options:I})}}),ex=(0,v.memo)(e=>{let{temperatureValue:t,setTemperatureValue:l}=e,{appInfo:r}=(0,v.useContext)(eM),{t:n}=(0,_.$G)(),s=(0,v.useMemo)(()=>{var e;return(null===(e=r.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[r.param_need]);if(!s.includes("temperature"))return(0,a.jsx)(Q.Z,{title:n("temperature_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{className:"text-xl cursor-not-allowed opacity-30"})})});let o=e=>{isNaN(e)||l(e)};return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(et.Z,{arrow:!1,trigger:["click"],placement:"topLeft",content:()=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(el.Z,{className:"w-20",min:0,max:1,step:.1,onChange:o,value:"number"==typeof t?t:0}),(0,a.jsx)(ea.Z,{size:"small",className:"w-14",min:0,max:1,step:.1,onChange:o,value:t})]}),children:(0,a.jsx)(Q.Z,{title:n("temperature"),placement:"bottom",arrow:!1,children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{})})})}),(0,a.jsx)("span",{className:"text-sm ml-2",children:t})]})}),ef=e=>{let{ctrl:t}=e,{t:l}=(0,_.$G)(),{history:r,scrollRef:s,canAbort:o,replyLoading:c,currentDialogue:d,appInfo:u,temperatureValue:m,maxNewTokensValue:p,resourceValue:h,setTemperatureValue:f,setMaxNewTokensValue:g,refreshHistory:b,setCanAbort:j,setReplyLoading:w,handleChat:y}=(0,v.useContext)(eM),[N,k]=(0,v.useState)([]),[Z,S]=(0,v.useState)(!1),[C,P]=(0,v.useState)(!1),R=(0,v.useMemo)(()=>{var e;return(null===(e=u.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[u.param_need]),E=(0,v.useMemo)(()=>[{tip:l("stop_replying"),icon:(0,a.jsx)(K.Z,{className:q()({"text-[#0c75fc]":o})}),can_use:o,key:"abort",onClick:()=>{o&&(t.abort(),setTimeout(()=>{j(!1),w(!1)},100))}},{tip:l("answer_again"),icon:(0,a.jsx)(X.Z,{}),can_use:!c&&r.length>0,key:"redo",onClick:async()=>{var e,t;let l=null===(e=null===(t=r.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];y((null==l?void 0:l.context)||"",{app_code:u.app_code,...R.includes("temperature")&&{temperature:m},...R.includes("max_new_tokens")&&{max_new_tokens:p},...R.includes("resource")&&{select_param:"string"==typeof h?h:JSON.stringify(h)||d.select_param}}),setTimeout(()=>{var e,t;null===(e=s.current)||void 0===e||e.scrollTo({top:null===(t=s.current)||void 0===t?void 0:t.scrollHeight,behavior:"smooth"})},0)}},{tip:l("erase_memory"),icon:C?(0,a.jsx)(x.Z,{spinning:C,indicator:(0,a.jsx)(i.Z,{style:{fontSize:20}})}):(0,a.jsx)(Y.Z,{}),can_use:r.length>0,key:"clear",onClick:async()=>{C||(P(!0),await (0,n.Vx)((0,n.zR)(d.conv_uid)).finally(async()=>{await b(),P(!1)}))}}],[l,o,c,r,C,t,j,w,y,u.app_code,R,m,h,d.select_param,d.conv_uid,s,b]),M=(0,v.useMemo)(()=>{try{if(h){if("string"==typeof h)return JSON.parse(h).file_name||"";return h.file_name||""}return JSON.parse(d.select_param).file_name||""}catch(e){return""}},[h,d.select_param]);return(0,a.jsxs)("div",{className:"flex flex-col mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between h-full w-full",children:[(0,a.jsxs)("div",{className:"flex gap-3 text-lg",children:[(0,a.jsx)(ei,{}),(0,a.jsx)(eh,{fileList:N,setFileList:k,setLoading:S,fileName:M}),(0,a.jsx)(ex,{temperatureValue:m,setTemperatureValue:f}),(0,a.jsx)(er,{maxNewTokensValue:p,setMaxNewTokensValue:g})]}),(0,a.jsx)("div",{className:"flex gap-1",children:(0,a.jsx)(a.Fragment,{children:E.map(e=>(0,a.jsx)(Q.Z,{title:e.tip,arrow:!1,placement:"bottom",children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] text-lg ".concat(e.can_use?"cursor-pointer":"opacity-30 cursor-not-allowed"),onClick:()=>{var t;null===(t=e.onClick)||void 0===t||t.call(e)},children:e.icon})},e.key))})})]}),(0,a.jsx)(()=>{let e=(0,A.Ev)(h)||(0,A.Ev)(d.select_param)||[];return 0===e.length?null:(0,a.jsx)("div",{className:"group/item flex flex-wrap gap-2 mt-2",children:e.map((e,t)=>{var l,r;if("image_url"===e.type&&(null===(l=e.image_url)||void 0===l?void 0:l.url)){let l=e.image_url.fileName,r=(0,A.Hb)(e.image_url.url);return(0,a.jsxs)("div",{className:"flex flex-col border border-[#e3e4e6] dark:border-[rgba(255,255,255,0.6)] rounded-lg p-2",children:[(0,a.jsx)("div",{className:"w-32 h-32 mb-2 overflow-hidden flex items-center justify-center bg-gray-100 dark:bg-gray-800 rounded",children:(0,a.jsx)("img",{src:r,alt:l||"Preview",className:"max-w-full max-h-full object-contain"})}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"text-sm text-[#1c2533] dark:text-white line-clamp-1",children:l})})]},"img-".concat(t))}if("file_url"===e.type&&(null===(r=e.file_url)||void 0===r?void 0:r.url)){let l=e.file_url.file_name;return(0,a.jsx)("div",{className:"flex items-center justify-between border border-[#e3e4e6] dark:border-[rgba(255,255,255,0.6)] rounded-lg p-2",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(O(),{src:"/icons/chat/excel.png",width:20,height:20,alt:"file-icon",className:"mr-2"}),(0,a.jsx)("span",{className:"text-sm text-[#1c2533] dark:text-white line-clamp-1",children:l})]})},"file-".concat(t))}return null})})},{}),(0,a.jsx)(x.Z,{spinning:Z,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})})]})},eg=(0,v.forwardRef)((e,t)=>{var l,r;let{ctrl:n}=e,{t:s}=(0,_.$G)(),{replyLoading:o,handleChat:c,appInfo:d,currentDialogue:u,temperatureValue:m,maxNewTokensValue:p,resourceValue:h,setResourceValue:f,refreshDialogList:g}=(0,v.useContext)(eM),b=(0,F.useSearchParams)(),j=null!==(l=null==b?void 0:b.get("scene"))&&void 0!==l?l:"",w=null!==(r=null==b?void 0:b.get("select_param"))&&void 0!==r?r:"",[y,N]=(0,v.useState)(""),[k,Z]=(0,v.useState)(!1),[S,C]=(0,v.useState)(!1),P=(0,v.useRef)(0),R=(0,v.useMemo)(()=>{var e;return(null===(e=d.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[d.param_need]),E=async()=>{let e;P.current++,N("");let t=(0,A.Ev)(h);if(t.length>0){"chat_excel"!==j&&f(null);let l=[...t];l.push({type:"text",text:y}),e={role:"user",content:l}}else e=y;let l={app_code:d.app_code||"",...R.includes("temperature")&&{temperature:m},...R.includes("max_new_tokens")&&{max_new_tokens:p},select_param:w,...R.includes("resource")&&{select_param:"string"==typeof h?h:JSON.stringify(h)||u.select_param}};await c(e,l),1===P.current&&await g()};return(0,v.useImperativeHandle)(t,()=>({setUserInput:N})),(0,a.jsx)("div",{className:"flex flex-col w-5/6 mx-auto pt-4 pb-6 bg-transparent",children:(0,a.jsxs)("div",{className:"flex flex-1 flex-col bg-white dark:bg-[rgba(255,255,255,0.16)] px-5 py-4 pt-2 rounded-xl relative border-t border-b border-l border-r dark:border-[rgba(255,255,255,0.6)] ".concat(k?"border-[#0c75fc]":""),id:"input-panel",children:[(0,a.jsx)(ef,{ctrl:n}),(0,a.jsx)(D.default.TextArea,{placeholder:s("input_tips"),className:"w-full h-20 resize-none border-0 p-0 focus:shadow-none dark:bg-transparent",value:y,onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&!S&&(e.preventDefault(),y.trim()&&!o&&E())},onChange:e=>{N(e.target.value)},onFocus:()=>{Z(!0)},onBlur:()=>Z(!1),onCompositionStart:()=>C(!0),onCompositionEnd:()=>C(!1)}),(0,a.jsx)(G.ZP,{type:"primary",className:q()("flex items-center justify-center w-14 h-8 rounded-lg text-sm absolute right-4 bottom-3 bg-button-gradient border-0",{"cursor-not-allowed":!y.trim()}),onClick:()=>{!o&&y.trim()&&E()},children:o?(0,a.jsx)(x.Z,{spinning:o,indicator:(0,a.jsx)(i.Z,{className:"text-white"})}):s("sent")})]})})}),ev=l(20046),e_=l(48689),eb=l(14313),ej=l(94155),ew=l(21612),ey=l(85576),eN=l(86250);let{Sider:ek}=ew.default,eZ={display:"flex",alignItems:"center",justifyContent:"center",width:16,height:48,position:"absolute",top:"50%",transform:"translateY(-50%)",border:"1px solid #d6d8da",borderRadius:8,right:-8},eS=e=>{var t,l;let{item:s,refresh:o,historyLoading:i}=e,{t:c}=(0,_.$G)(),d=(0,F.useRouter)(),u=(0,F.useSearchParams)(),p=null!==(t=null==u?void 0:u.get("id"))&&void 0!==t?t:"",x=null!==(l=null==u?void 0:u.get("scene"))&&void 0!==l?l:"",{setCurrentDialogInfo:f}=(0,v.useContext)(r.p),b=(0,v.useMemo)(()=>s.default?s.default&&!p&&!x:s.conv_uid===p&&s.chat_mode===x,[p,x,s]),j=()=>{ey.default.confirm({title:c("delete_chat"),content:c("delete_chat_confirm"),centered:!0,onOk:async()=>{let[e]=await (0,n.Vx)((0,n.MX)(s.conv_uid));e||(await (null==o?void 0:o()),s.conv_uid===p&&d.push("/chat"))}})};return(0,a.jsxs)(eN.Z,{align:"center",className:"group/item w-full h-12 p-3 rounded-lg hover:bg-white dark:hover:bg-theme-dark cursor-pointer mb-2 relative ".concat(b?"bg-white dark:bg-theme-dark bg-opacity-100":""),onClick:()=>{i||(s.default||null==f||f({chat_scene:s.chat_mode,app_code:s.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:s.chat_mode,app_code:s.app_code})),d.push(s.default?"/chat":"?scene=".concat(s.chat_mode,"&id=").concat(s.conv_uid)))},children:[(0,a.jsx)(Q.Z,{title:s.chat_mode,children:(0,a.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg mr-3 bg-white",children:s.icon})}),(0,a.jsx)("div",{className:"flex flex-1 line-clamp-1",children:(0,a.jsx)(h.Z.Text,{ellipsis:{tooltip:!0},children:s.label})}),!s.default&&(0,a.jsxs)("div",{className:"flex gap-1 ml-1",children:[(0,a.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.stopPropagation()},children:(0,a.jsx)(ev.Z,{style:{fontSize:16},onClick:()=>{let e=g()("".concat(location.origin,"/chat?scene=").concat(s.chat_mode,"&id=").concat(s.conv_uid));m.ZP[e?"success":"error"](e?c("copy_success"):c("copy_failed"))}})}),(0,a.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.stopPropagation(),j()},children:(0,a.jsx)(e_.Z,{style:{fontSize:16}})})]}),(0,a.jsx)("div",{className:" w-1 rounded-sm bg-[#0c75fc] absolute top-1/2 left-0 -translate-y-1/2 transition-all duration-500 ease-in-out ".concat(b?"h-5":"w-0 h-0")})]})};var eC=e=>{var t;let{dialogueList:l=[],refresh:n,historyLoading:s,listLoading:o,order:i}=e,c=(0,F.useSearchParams)(),d=null!==(t=null==c?void 0:c.get("scene"))&&void 0!==t?t:"",{t:u}=(0,_.$G)(),{mode:m}=(0,v.useContext)(r.p),[p,h]=(0,v.useState)("chat_dashboard"===d),f=(0,v.useMemo)(()=>p?{...eZ,right:-16,borderRadius:"0px 8px 8px 0",borderLeft:"1px solid #d5e5f6"}:{...eZ,borderLeft:"1px solid #d6d8da"},[p]),g=(0,v.useMemo)(()=>{let e=l[1]||[];return(null==e?void 0:e.length)>0?e.map(e=>({...e,label:e.user_input||e.select_param,key:e.conv_uid,icon:(0,a.jsx)(j.Z,{scene:e.chat_mode}),default:!1})):[]},[l]);return(0,a.jsx)(ek,{className:"bg-[#ffffff80] border-r border-[#d5e5f6] dark:bg-[#ffffff29] dark:border-[#ffffff66]",theme:m,width:280,collapsible:!0,collapsed:p,collapsedWidth:0,trigger:p?(0,a.jsx)(eb.Z,{className:"text-base"}):(0,a.jsx)(ej.Z,{className:"text-base"}),zeroWidthTriggerStyle:f,onCollapse:e=>h(e),children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full bg-transparent px-4 pt-6 ",children:[(0,a.jsx)("div",{className:"w-full text-base font-semibold text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] mb-4 line-clamp-1",children:u("dialog_list")}),(0,a.jsxs)(eN.Z,{flex:1,vertical:!0,className:"overflow-y-auto",children:[(0,a.jsx)(eS,{item:{label:u("assistant"),key:"default",icon:(0,a.jsx)(O(),{src:"/LOGO_SMALL.png",alt:"default",width:24,height:24,className:"flex-1"}),default:!0},order:i}),(0,a.jsx)(x.Z,{spinning:o,className:"mt-2",children:!!(null==g?void 0:g.length)&&g.map(e=>(0,a.jsx)(eS,{item:e,refresh:n,historyLoading:s,order:i},null==e?void 0:e.key))})]})]})})};let eP=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(4567),l.e(9773),l.e(4035),l.e(1154),l.e(3764),l.e(5e3),l.e(3768),l.e(4434),l.e(2800)]).then(l.bind(l,96307)),{loadableGenerated:{webpack:()=>[96307]},ssr:!1}),eR=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(1154),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3764),l.e(5e3),l.e(4019),l.e(3768),l.e(5789),l.e(3913),l.e(4434),l.e(8624)]).then(l.bind(l,8334)),{loadableGenerated:{webpack:()=>[8334]},ssr:!1}),{Content:eE}=ew.default,eM=(0,v.createContext)({history:[],replyLoading:!1,scrollRef:{current:null},canAbort:!1,chartsData:[],agent:"",currentDialogue:{},appInfo:{},temperatureValue:.5,maxNewTokensValue:1024,resourceValue:{},modelValue:"",setModelValue:()=>{},setResourceValue:()=>{},setTemperatureValue:()=>{},setMaxNewTokensValue:()=>{},setAppInfo:()=>{},setAgent:()=>{},setCanAbort:()=>{},setReplyLoading:()=>{},refreshDialogList:()=>{},refreshHistory:()=>{},refreshAppInfo:()=>{},setHistory:()=>{},handleChat:()=>Promise.resolve()});var eT=()=>{var e,t,l,i;let{model:c,currentDialogInfo:d}=(0,v.useContext)(r.p),{isContract:u,setIsContract:m,setIsMenuExpand:p}=(0,v.useContext)(r.p),{chat:h,ctrl:f}=(0,o.Z)({app_code:d.app_code||""}),g=(0,F.useSearchParams)(),_=null!==(e=null==g?void 0:g.get("id"))&&void 0!==e?e:"",j=null!==(t=null==g?void 0:g.get("scene"))&&void 0!==t?t:"",w=null!==(l=null==g?void 0:g.get("knowledge_id"))&&void 0!==l?l:"",y=null!==(i=null==g?void 0:g.get("db_name"))&&void 0!==i?i:"",N=(0,v.useRef)(null),k=(0,v.useRef)(1),Z=(0,v.useRef)(null),S=(0,v.useRef)(void 0),[C,R]=(0,v.useState)([]),[E]=(0,v.useState)(),[M,T]=(0,v.useState)(!1),[I,O]=(0,v.useState)(!1),[V,L]=(0,v.useState)(""),[z,D]=(0,v.useState)({}),[G,H]=(0,v.useState)(),[q,J]=(0,v.useState)(),[U,W]=(0,v.useState)(),[$,K]=(0,v.useState)("");(0,v.useEffect)(()=>{var e,t,l,a,r,n,s,o;H((null===(e=null==z?void 0:null===(t=z.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type)[0])||void 0===e?void 0:e.value)||.6),J((null===(l=null==z?void 0:null===(a=z.param_need)||void 0===a?void 0:a.filter(e=>"max_new_tokens"===e.type)[0])||void 0===l?void 0:l.value)||4e3),K((null===(r=null==z?void 0:null===(n=z.param_need)||void 0===n?void 0:n.filter(e=>"model"===e.type)[0])||void 0===r?void 0:r.value)||c),W(w||y||(null===(s=null==z?void 0:null===(o=z.param_need)||void 0===o?void 0:o.filter(e=>"resource"===e.type)[0])||void 0===s?void 0:s.bind_value))},[z,y,w,c]),(0,v.useEffect)(()=>{p("chat_dashboard"!==j),_&&j&&m(!1)},[_,j,m,p]);let X=(0,v.useMemo)(()=>!_&&!j,[_,j]),{data:Y=[],refresh:Q,loading:ee}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.iP)())),{run:et,refresh:el}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.BN)({...d})),{manual:!0,onSuccess:e=>{let[,t]=e;D(t||{})}}),ea=(0,v.useMemo)(()=>{let[,e]=Y;return(null==e?void 0:e.find(e=>e.conv_uid===_))||{}},[_,Y]);(0,v.useEffect)(()=>{let e=(0,A.a_)();d.chat_scene!==j||X||e&&e.message||et()},[_,d,X,et,j]);let{run:er,loading:en,refresh:es}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.$i)(_)),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(k.current=l[l.length-1].order+1),R(t||[])}}),eo=(0,v.useCallback)((e,t)=>new Promise(l=>{let a=(0,A.a_)(),r=new AbortController;if(T(!0),C&&C.length>0){var n,s;let e=null==C?void 0:C.filter(e=>"view"===e.role),t=null==C?void 0:C.filter(e=>"human"===e.role);k.current=((null===(n=e[e.length-1])||void 0===n?void 0:n.order)||(null===(s=t[t.length-1])||void 0===s?void 0:s.order))+1}let o="";if("string"==typeof e)o=e;else{let t=e.content||[],l=t.filter(e=>"text"===e.type),a=t.filter(e=>"text"!==e.type);l.length>0&&(o=l.map(e=>e.text).join(" "));let r=a.map(e=>{if("image_url"===e.type){var t,l;let a=(null===(t=e.image_url)||void 0===t?void 0:t.url)||"",r=(0,A.Hb)(a),n=(null===(l=e.image_url)||void 0===l?void 0:l.fileName)||"image";return"\n![".concat(n,"](").concat(r,")")}if("video"!==e.type)return"\n[".concat(e.type," attachment]");{let t=e.video||"",l=(0,A.Hb)(t);return"\n[Video](".concat(l,")")}}).join("\n");r&&(o=o+"\n"+r)}let i=[...a&&a.id===_?[]:C,{role:"human",context:o,model_name:(null==t?void 0:t.model_name)||$,order:k.current,time_stamp:0},{role:"view",context:"",model_name:(null==t?void 0:t.model_name)||$,order:k.current,time_stamp:0,thinking:!0}],c=i.length-1;R([...i]);let d={chat_mode:j,model_name:$,user_input:e};if(t&&Object.assign(d,t),"chat_dashboard"!==j){let e=S.current||localStorage.getItem("dbgpt_prompt_code_".concat(_));e&&(d.prompt_code=e,localStorage.removeItem("dbgpt_prompt_code_".concat(_)))}h({data:d,ctrl:r,chatId:_,onMessage:e=>{O(!0),(null==t?void 0:t.incremental)?(i[c].context+=e,i[c].thinking=!1):(i[c].context=e,i[c].thinking=!1),R([...i])},onDone:()=>{T(!1),O(!1),l()},onClose:()=>{T(!1),O(!1),l()},onError:e=>{T(!1),O(!1),i[c].context=e,i[c].thinking=!1,R([...i]),l()}})}),[_,C,$,h,j]);return(0,em.Z)(async()=>{if(X)return;let e=(0,A.a_)();e&&e.id===_||await er()},[_,j,er]),(0,v.useEffect)(()=>{X&&(k.current=1,R([]))},[X]),(0,a.jsx)(eM.Provider,{value:{history:C,replyLoading:M,scrollRef:N,canAbort:I,chartsData:E||[],agent:V,currentDialogue:ea,appInfo:z,temperatureValue:G,maxNewTokensValue:q,resourceValue:U,modelValue:$,setModelValue:K,setResourceValue:W,setTemperatureValue:H,setMaxNewTokensValue:J,setAppInfo:D,setAgent:L,setCanAbort:O,setReplyLoading:T,handleChat:eo,refreshDialogList:Q,refreshHistory:es,refreshAppInfo:el,setHistory:R},children:(0,a.jsx)(eN.Z,{flex:1,children:(0,a.jsxs)(ew.default,{className:"bg-gradient-light bg-cover bg-center dark:bg-gradient-dark",children:[(0,a.jsx)(eC,{refresh:Q,dialogueList:Y,listLoading:ee,historyLoading:en,order:k}),(0,a.jsxs)(ew.default,{className:"bg-transparent",children:["chat_dashboard"===j?u?(0,a.jsx)(eP,{}):(0,a.jsx)(eR,{}):X?(0,a.jsx)(eE,{children:(0,a.jsx)(B,{})}):(0,a.jsx)(x.Z,{spinning:en,className:"w-full h-full m-auto",children:(0,a.jsxs)(eE,{className:"flex flex-col h-screen",children:[(0,a.jsx)(P,{ref:N,className:"flex-1"}),(0,a.jsx)(eg,{ref:Z,ctrl:f})]})}),(0,a.jsx)(s.Z,{submit:e=>{if("chat_dashboard"===j)localStorage.setItem("dbgpt_prompt_code_".concat(_),e.prompt_code);else{var t,l;null===(t=Z.current)||void 0===t||null===(l=t.setUserInput)||void 0===l||l.call(t,e.content),S.current=e.prompt_code,localStorage.setItem("dbgpt_prompt_code_".concat(_),e.prompt_code)}},chat_scene:j})]})]})})})}},30119:function(e,t,l){"use strict";l.d(t,{Tk:function(){return d},PR:function(){return u}});var a,r=l(62418),n=l(45360);l(96486);var s=l(87066),o=l(83454);let i=s.default.create({baseURL:null!==(a=o.env.API_BASE_URL)&&void 0!==a?a:""});i.defaults.timeout=1e4,i.interceptors.response.use(e=>e.data,e=>Promise.reject(e));let c={"content-type":"application/json","User-Id":(0,r.n5)()},d=(e,t)=>{if(t){let l=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");l&&(e+="?".concat(l))}return i.get("/api"+e,{headers:c}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},u=(e,t)=>i.post(e,t,{headers:c}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},11873:function(){}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7249],{23430:function(e,t,l){"use strict";var a=l(85893),r=l(25675),n=l.n(r);t.Z=function(e){let{src:t,label:l,width:r,height:s,className:o}=e;return(0,a.jsx)(n(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white ".concat(o),width:r||44,height:s||44,src:t,alt:l||"db-icon"})}},86600:function(e,t,l){"use strict";var a=l(85893),r=l(30119),n=l(65654),s=l(2487),o=l(83062),i=l(45360),c=l(28459),d=l(55241),u=l(99859),m=l(34041),p=l(12652),h=l(67294),x=l(67421);let f=e=>{let{data:t,loading:l,submit:r,close:n}=e,{t:i}=(0,x.$G)(),c=e=>()=>{r(e),n()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(s.Z,{dataSource:null==t?void 0:t.data,loading:l,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(s.Z.Item,{onClick:c(e),children:(0,a.jsx)(o.Z,{title:e.content,children:(0,a.jsx)(s.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:i("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+i("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};t.Z=e=>{let{submit:t,chat_scene:l}=e,{t:s}=(0,x.$G)(),[g,v]=(0,h.useState)(!1),[_,b]=(0,h.useState)("common"),{data:j,loading:w,run:y}=(0,n.Z)(()=>{let e={};return"common"!==_&&(e.prompt_type=_),l&&(e.chat_scene=l),(0,r.PR)("/prompt/list",e)},{refreshDeps:[_,l],onError:e=>{i.ZP.error(null==e?void 0:e.message)},manual:!0});return(0,h.useEffect)(()=>{g&&y()},[g,_,l,y]),(0,a.jsx)(c.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(d.Z,{title:(0,a.jsx)(u.default.Item,{label:"Prompt "+s("Type"),children:(0,a.jsx)(m.default,{style:{width:150},value:_,onChange:e=>{b(e)},options:[{label:s("Public")+" Prompts",value:"common"},{label:s("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(f,{data:j,loading:w,submit:t,close:()=>{v(!1)}}),placement:"topRight",trigger:"click",open:g,onOpenChange:e=>{v(e)},children:(0,a.jsx)(o.Z,{title:s("Click_Select")+" Prompt",children:(0,a.jsx)(p.Z,{className:"bottom-[30%]"})})})})}},43446:function(e,t,l){"use strict";var a=l(41468),r=l(64371),n=l(62418),s=l(25519),o=l(1375),i=l(45360),c=l(67294),d=l(83454);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions",app_code:l}=e,[u,m]=(0,c.useState)({}),{scene:p}=(0,c.useContext)(a.p),h=(0,c.useCallback)(async e=>{let{data:a,chatId:c,onMessage:u,onClose:h,onDone:x,onError:f,ctrl:g}=e;if(g&&m(g),!(null==a?void 0:a.user_input)&&!(null==a?void 0:a.doc_id)){i.ZP.warning(r.Z.t("no_context_tip"));return}let v={conv_uid:c,app_code:l};a&&Object.keys(a).forEach(e=>{v[e]=a[e]}),console.log("DEBUG - API request params:",v),console.log("DEBUG - prompt_code in params:",v.prompt_code),console.log("DEBUG - data object received:",a);try{var _,b;let e=JSON.stringify(v);console.log("DEBUG - API request body:",e),await (0,o.L)("".concat(null!==(_=d.env.API_BASE_URL)&&void 0!==_?_:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json",[s.gp]:null!==(b=(0,n.n5)())&&void 0!==b?b:""},body:e,signal:g?g.signal:null,openWhenHidden:!0,async onopen(e){e.ok&&e.headers.get("content-type")===o.a||"application/json"!==e.headers.get("content-type")||e.json().then(e=>{null==u||u(e),null==x||x(),g&&g.abort()})},onclose(){g&&g.abort(),null==h||h()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===p?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==f||f(null==t?void 0:t.replace("[ERROR]","")):null==u||u(t):(null==u||u(t),null==x||x())}})}catch(e){g&&g.abort(),null==f||f("Sorry, We meet some error, please try agin later.",e)}},[t,l,p]);return{chat:h,ctrl:u}}},48218:function(e,t,l){"use strict";var a=l(85893),r=l(82353),n=l(16165),s=l(67294);t.Z=e=>{let{width:t,height:l,scene:o}=e,i=(0,s.useCallback)(()=>{switch(o){case"chat_knowledge":return r.je;case"chat_with_db_execute":return r.zM;case"chat_excel":return r.DL;case"chat_with_db_qa":case"chat_dba":return r.RD;case"chat_dashboard":return r.In;case"chat_agent":return r.si;case"chat_normal":return r.O7;default:return}},[o]);return(0,a.jsx)(n.Z,{className:"w-".concat(t||7," h-").concat(l||7),component:i()})}},70065:function(e,t,l){"use strict";var a=l(91321);let r=(0,a.Z)({scriptUrl:"//at.alicdn.com/t/a/font_4440880_ljyggdw605.js"});t.Z=r},91467:function(e,t,l){"use strict";l.d(t,{TH:function(){return x},ZS:function(){return f}});var a=l(85893),r=l(89705),n=l(83062),s=l(96074),o=l(45030),i=l(85418),c=l(93967),d=l.n(c),u=l(36609),m=l(25675),p=l.n(m);l(67294);var h=l(48218);l(11873);let x=e=>{let{onClick:t,Icon:l="/pictures/card_chat.png",text:r=(0,u.t)("start_chat")}=e;return"string"==typeof l&&(l=(0,a.jsx)(p(),{src:l,alt:l,width:17,height:15})),(0,a.jsxs)("div",{className:"flex items-center gap-1 text-default",onClick:e=>{e.stopPropagation(),t&&t()},children:[l,(0,a.jsx)("span",{children:r})]})},f=e=>{let{menu:t}=e;return(0,a.jsx)(i.Z,{menu:t,getPopupContainer:e=>e.parentNode,placement:"bottomRight",autoAdjustOverflow:!1,children:(0,a.jsx)(r.Z,{className:"p-2 hover:bg-white hover:dark:bg-black rounded-md"})})};t.ZP=e=>{let{RightTop:t,Tags:l,LeftBottom:r,RightBottom:i,onClick:c,rightTopHover:u=!0,logo:m,name:x,description:f,className:g,scene:v,code:_}=e;return"string"==typeof f&&(f=(0,a.jsx)("p",{className:"line-clamp-2 relative bottom-4 text-ellipsis min-h-[42px] text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)]",children:f})),(0,a.jsx)("div",{className:d()("hover-underline-gradient flex justify-center mt-6 relative group w-1/3 px-2 mb-6",g),children:(0,a.jsxs)("div",{onClick:c,className:"backdrop-filter backdrop-blur-lg cursor-pointer bg-white bg-opacity-70 border-2 border-white rounded-lg shadow p-4 relative w-full h-full dark:border-[#6f7f95] dark:bg-[#6f7f95] dark:bg-opacity-60",children:[(0,a.jsxs)("div",{className:"flex items-end relative bottom-8 justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-end gap-4 w-11/12 flex-1",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg shadow-sm w-14 h-14 flex items-center p-3",children:v?(0,a.jsx)(h.Z,{scene:v,width:14,height:14}):m&&(0,a.jsx)(p(),{src:m,width:44,height:44,alt:x,className:"w-8 min-w-8 rounded-full max-w-none"})}),(0,a.jsx)("div",{className:"flex-1",children:x.length>6?(0,a.jsx)(n.Z,{title:x,children:(0,a.jsx)("span",{className:"line-clamp-1 text-ellipsis font-semibold text-base",style:{maxWidth:"60%"},children:x})}):(0,a.jsx)("span",{className:"line-clamp-1 text-ellipsis font-semibold text-base",style:{maxWidth:"60%"},children:x})})]}),(0,a.jsx)("span",{className:d()("shrink-0",{hidden:u,"group-hover:block":u}),onClick:e=>{e.stopPropagation()},children:t})]}),f,(0,a.jsx)("div",{className:"relative bottom-2",children:l}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("div",{children:r}),(0,a.jsx)("div",{children:i})]}),_&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{className:"my-3"}),(0,a.jsx)(o.Z.Text,{copyable:!0,className:"absolute bottom-1 right-4 text-xs text-gray-500",children:_})]})]})})}},57249:function(e,t,l){"use strict";l.r(t),l.d(t,{ChatContentContext:function(){return eM},default:function(){return eT}});var a=l(85893),r=l(41468),n=l(76212),s=l(86600),o=l(43446),i=l(50888),c=l(90598),d=l(75750),u=l(58638),m=l(45360),p=l(66309),h=l(45030),x=l(74330),f=l(20640),g=l.n(f),v=l(67294),_=l(67421),b=l(65654),j=l(48218);let w=["magenta","orange","geekblue","purple","cyan","green"];var y=e=>{var t,l,r,s,o,f;let{isScrollToTop:y}=e,{appInfo:N,refreshAppInfo:k,handleChat:Z,scrollRef:S,temperatureValue:C,resourceValue:P,currentDialogue:R}=(0,v.useContext)(eM),{t:E}=(0,_.$G)(),M=(0,v.useMemo)(()=>{var e;return(null==N?void 0:null===(e=N.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent"},[N]),T=(0,v.useMemo)(()=>(null==N?void 0:N.is_collected)==="true",[N]),{run:I,loading:O}=(0,b.Z)(async()=>{let[e]=await (0,n.Vx)(T?(0,n.gD)({app_code:N.app_code}):(0,n.mo)({app_code:N.app_code}));if(!e)return await k()},{manual:!0}),V=(0,v.useMemo)(()=>{var e;return(null===(e=N.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[N.param_need]);if(!Object.keys(N).length)return null;let L=async()=>{let e=g()(location.href);m.ZP[e?"success":"error"](e?E("copy_success"):E("copy_failed"))};return(0,a.jsx)("div",{className:"h-20 mt-6 ".concat((null==N?void 0:N.recommend_questions)&&(null==N?void 0:null===(t=N.recommend_questions)||void 0===t?void 0:t.length)>0?"mb-6":""," sticky top-0 bg-transparent z-30 transition-all duration-400 ease-in-out"),children:y?(0,a.jsxs)("header",{className:"flex items-center justify-between w-full h-14 bg-[#ffffffb7] dark:bg-[rgba(41,63,89,0.4)] px-8 transition-all duration-500 ease-in-out",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg mr-2 bg-white",children:(0,a.jsx)(j.Z,{scene:M})}),(0,a.jsxs)("div",{className:"flex items-center text-base text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] font-semibold gap-2",children:[(0,a.jsx)("span",{children:null==N?void 0:N.app_name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(null==N?void 0:N.team_mode)&&(0,a.jsx)(p.Z,{color:"green",children:null==N?void 0:N.team_mode}),(null==N?void 0:null===(l=N.team_context)||void 0===l?void 0:l.chat_scene)&&(0,a.jsx)(p.Z,{color:"cyan",children:null==N?void 0:null===(r=N.team_context)||void 0===r?void 0:r.chat_scene})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-8",onClick:async()=>{await I()},children:[O?(0,a.jsx)(x.Z,{spinning:O,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})}):(0,a.jsx)(a.Fragment,{children:T?(0,a.jsx)(c.Z,{style:{fontSize:18},className:"text-yellow-400 cursor-pointer"}):(0,a.jsx)(d.Z,{style:{fontSize:18,cursor:"pointer"}})}),(0,a.jsx)(u.Z,{className:"text-lg",onClick:e=>{e.stopPropagation(),L()}})]})]}):(0,a.jsxs)("header",{className:"flex items-center justify-between w-5/6 h-full px-6 bg-[#ffffff99] border dark:bg-[rgba(255,255,255,0.1)] dark:border-[rgba(255,255,255,0.1)] rounded-2xl mx-auto transition-all duration-400 ease-in-out relative",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex w-12 h-12 justify-center items-center rounded-xl mr-4 bg-white",children:(0,a.jsx)(j.Z,{scene:M,width:16,height:16})}),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center text-base text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] font-semibold gap-2",children:[(0,a.jsx)("span",{children:null==N?void 0:N.app_name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(null==N?void 0:N.team_mode)&&(0,a.jsx)(p.Z,{color:"green",children:null==N?void 0:N.team_mode}),(null==N?void 0:null===(s=N.team_context)||void 0===s?void 0:s.chat_scene)&&(0,a.jsx)(p.Z,{color:"cyan",children:null==N?void 0:null===(o=N.team_context)||void 0===o?void 0:o.chat_scene})]})]}),(0,a.jsx)(h.Z.Text,{className:"text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)] leading-6",ellipsis:{tooltip:!0},children:null==N?void 0:N.app_describe})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{onClick:async()=>{await I()},className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:O?(0,a.jsx)(x.Z,{spinning:O,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})}):(0,a.jsx)(a.Fragment,{children:T?(0,a.jsx)(c.Z,{style:{fontSize:18},className:"text-yellow-400 cursor-pointer"}):(0,a.jsx)(d.Z,{style:{fontSize:18,cursor:"pointer"}})})}),(0,a.jsx)("div",{onClick:L,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,a.jsx)(u.Z,{className:"text-lg"})})]}),!!(null==N?void 0:null===(f=N.recommend_questions)||void 0===f?void 0:f.length)&&(0,a.jsxs)("div",{className:"absolute bottom-[-40px] left-0",children:[(0,a.jsx)("span",{className:"text-sm text-[#525964] dark:text-[rgba(255,255,255,0.65)] leading-6",children:"或许你想问:"}),N.recommend_questions.map((e,t)=>(0,a.jsx)(p.Z,{color:w[t],className:"text-xs p-1 px-2 cursor-pointer",onClick:async()=>{Z((null==e?void 0:e.question)||"",{app_code:N.app_code,...V.includes("temperature")&&{temperature:C},...V.includes("resource")&&{select_param:"string"==typeof P?P:JSON.stringify(P)||R.select_param}}),setTimeout(()=>{var e,t;null===(e=S.current)||void 0===e||e.scrollTo({top:null===(t=S.current)||void 0===t?void 0:t.scrollHeight,behavior:"smooth"})},0)},children:e.question},e.id))]})]})})},N=l(62635),k=l(66017),Z=l(5152),S=l.n(Z);let C=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(9473),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3764),l.e(5e3),l.e(3768),l.e(5789),l.e(3913),l.e(4434),l.e(3013)]).then(l.bind(l,88331)),{loadableGenerated:{webpack:()=>[88331]},ssr:!1});var P=(0,v.forwardRef)((e,t)=>{let{className:l}=e,r=(0,v.useRef)(null),[n,s]=(0,v.useState)(!1),[o,i]=(0,v.useState)(!1),[c,d]=(0,v.useState)(!0),[u,m]=(0,v.useState)(!1),{history:p}=(0,v.useContext)(eM),h=(0,v.useRef)(!0),x=(0,v.useRef)(null);(0,v.useImperativeHandle)(t,()=>r.current);let f=(0,v.useCallback)(()=>{var e;if(!r.current)return;let t=r.current,l=t.scrollTop,a=t.scrollHeight,n=t.clientHeight,o=Number(null==t?void 0:null===(e=t.dataset)||void 0===e?void 0:e.lastScrollTop)||0,c=l>o?"down":"up";t.dataset.lastScrollTop=String(l),h.current="down"===c,d(l<=20),m(l+n>=a-20),l>=74?s(!0):s(!1);let u=a>n;i(u)},[]);(0,v.useEffect)(()=>{let e=r.current;if(e){e.addEventListener("scroll",f);let t=e.scrollHeight>e.clientHeight;i(t)}return()=>{e&&e.removeEventListener("scroll",f)}},[f]);let g=(0,v.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!r.current||!e&&!h.current)return;let t=r.current,{scrollTop:l,scrollHeight:a,clientHeight:n}=t;(l+n>=a-Math.max(50,.1*n)||e)&&(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{r.current&&r.current.scrollTo({top:r.current.scrollHeight,behavior:e?"smooth":"auto"}),x.current=null}))},[]),_=(0,v.useMemo)(()=>{let e=p[p.length-1];return e?{context:e.context,thinking:e.thinking}:null},[p]),b=(0,v.useRef)(p.length);(0,v.useEffect)(()=>{let e=p.length,t=e>b.current;t?(g(!0),b.current=e):g(!1)},[p.length,g]),(0,v.useEffect)(()=>{p.length===b.current&&g(!1)},[null==_?void 0:_.context,null==_?void 0:_.thinking,p.length,g]),(0,v.useEffect)(()=>()=>{x.current&&cancelAnimationFrame(x.current)},[]);let j=(0,v.useCallback)(()=>{r.current&&r.current.scrollTo({top:0,behavior:"smooth"})},[]),w=(0,v.useCallback)(()=>{r.current&&r.current.scrollTo({top:r.current.scrollHeight,behavior:"smooth"})},[]);return(0,a.jsxs)("div",{className:"flex flex-1 overflow-hidden relative ".concat(l||""),children:[(0,a.jsxs)("div",{ref:r,className:"h-full w-full mx-auto overflow-y-auto",children:[(0,a.jsx)(y,{isScrollToTop:n}),(0,a.jsx)(C,{})]}),o&&(0,a.jsxs)("div",{className:"absolute right-6 bottom-24 flex flex-col gap-2",children:[!c&&(0,a.jsx)("button",{onClick:j,className:"w-10 h-10 bg-white dark:bg-[rgba(255,255,255,0.2)] border border-gray-200 dark:border-[rgba(255,255,255,0.2)] rounded-full flex items-center justify-center shadow-md hover:shadow-lg transition-shadow","aria-label":"Scroll to top",children:(0,a.jsx)(N.Z,{className:"text-[#525964] dark:text-[rgba(255,255,255,0.85)]"})}),!u&&(0,a.jsx)("button",{onClick:w,className:"w-10 h-10 bg-white dark:bg-[rgba(255,255,255,0.2)] border border-gray-200 dark:border-[rgba(255,255,255,0.2)] rounded-full flex items-center justify-center shadow-md hover:shadow-lg transition-shadow","aria-label":"Scroll to bottom",children:(0,a.jsx)(k.Z,{className:"text-[#525964] dark:text-[rgba(255,255,255,0.85)]"})})]})]})}),R=l(89546),E=l(91467),M=l(7134),T=l(32983),I=l(25675),O=l.n(I),V=l(11163),L=l(70065),z=e=>{let{apps:t,refresh:l,loading:s,type:o}=e,i=async e=>{let[t]=await (0,n.Vx)("true"===e.is_collected?(0,n.gD)({app_code:e.app_code}):(0,n.mo)({app_code:e.app_code}));t||l()},{setAgent:u,model:m,setCurrentDialogInfo:p}=(0,v.useContext)(r.p),h=(0,V.useRouter)(),f=async e=>{if("native_app"===e.team_mode){let{chat_scene:t=""}=e.team_context,[,l]=await (0,n.Vx)((0,n.sW)({chat_mode:t}));l&&(null==p||p({chat_scene:l.chat_mode,app_code:e.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:l.chat_mode,app_code:e.app_code})),h.push("/chat?scene=".concat(t,"&id=").concat(l.conv_uid).concat(m?"&model=".concat(m):"")))}else{let[,t]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_agent"}));t&&(null==p||p({chat_scene:t.chat_mode,app_code:e.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:t.chat_mode,app_code:e.app_code})),null==u||u(e.app_code),h.push("/chat/?scene=chat_agent&id=".concat(t.conv_uid).concat(m?"&model=".concat(m):"")))}};return s?(0,a.jsx)(x.Z,{size:"large",className:"flex items-center justify-center h-full",spinning:s}):(0,a.jsx)("div",{className:"flex flex-wrap mt-4 w-full overflow-y-auto ",children:(null==t?void 0:t.length)>0?t.map(e=>{var t;return(0,a.jsx)(E.ZP,{name:e.app_name,description:e.app_describe,onClick:()=>f(e),RightTop:"true"===e.is_collected?(0,a.jsx)(c.Z,{onClick:t=>{t.stopPropagation(),i(e)},style:{height:"21px",cursor:"pointer",color:"#f9c533"}}):(0,a.jsx)(d.Z,{onClick:t=>{t.stopPropagation(),i(e)},style:{height:"21px",cursor:"pointer"}}),LeftBottom:(0,a.jsxs)("div",{className:"flex gap-8 items-center text-gray-500 text-sm",children:[e.owner_name&&(0,a.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,a.jsx)(M.C,{src:null==e?void 0:e.owner_avatar_url,className:"bg-gradient-to-tr from-[#31afff] to-[#1677ff] cursor-pointer",children:e.owner_name}),(0,a.jsx)("span",{children:e.owner_name})]}),"used"!==o&&(0,a.jsxs)("div",{className:"flex items-start gap-1",children:[(0,a.jsx)(L.Z,{type:"icon-hot",className:"text-lg"}),(0,a.jsx)("span",{className:"text-[#878c93]",children:e.hot_value})]})]}),scene:(null==e?void 0:null===(t=e.team_context)||void 0===t?void 0:t.chat_scene)||"chat_agent"},e.app_code)}):(0,a.jsx)(T.Z,{image:(0,a.jsx)(O(),{src:"/pictures/empty.png",alt:"empty",width:142,height:133,className:"w-[142px] h-[133px]"}),className:"flex justify-center items-center w-full h-full min-h-[200px]"})})},A=l(62418),D=l(25278),G=l(14726),H=l(93967),q=l.n(H),J=function(){let{setCurrentDialogInfo:e}=(0,v.useContext)(r.p),{t}=(0,_.$G)(),l=(0,V.useRouter)(),[s,o]=(0,v.useState)(""),[i,c]=(0,v.useState)(!1),[d,u]=(0,v.useState)(!1),m=async()=>{let[,t]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_normal"}));t&&(null==e||e({chat_scene:t.chat_mode,app_code:t.chat_mode}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:t.chat_mode,app_code:t.chat_mode})),localStorage.setItem(A.rU,JSON.stringify({id:t.conv_uid,message:s})),l.push("/chat/?scene=chat_normal&id=".concat(t.conv_uid))),o("")};return(0,a.jsxs)("div",{className:"flex flex-1 h-12 p-2 pl-4 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border-t border-b border-l border-r ".concat(i?"border-[#0c75fc]":""),children:[(0,a.jsx)(D.default.TextArea,{placeholder:t("input_tips"),className:"w-full resize-none border-0 p-0 focus:shadow-none",value:s,autoSize:{minRows:1},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&!d&&(e.preventDefault(),s.trim()&&m())},onChange:e=>{o(e.target.value)},onFocus:()=>{c(!0)},onBlur:()=>c(!1),onCompositionStart:()=>u(!0),onCompositionEnd:()=>u(!1)}),(0,a.jsx)(G.ZP,{type:"primary",className:q()("flex items-center justify-center w-14 h-8 rounded-lg text-sm bg-button-gradient border-0",{"opacity-40 cursor-not-allowed":!s.trim()}),onClick:()=>{s.trim()&&m()},children:t("sent")})]})},U=l(28459),W=l(92783),$=l(36609),B=function(){let{setCurrentDialogInfo:e,model:t}=(0,v.useContext)(r.p),l=(0,V.useRouter)(),[s,o]=(0,v.useState)({app_list:[],total_count:0}),[i,c]=(0,v.useState)("recommend"),d=e=>(0,n.Vx)((0,n.yk)({...e,page_no:"1",page_size:"6"})),u=e=>(0,n.Vx)((0,n.mW)({page_no:"1",page_size:"6",...e})),{run:m,loading:p,refresh:h}=(0,b.Z)(async e=>{switch(i){case"recommend":return await u({});case"used":return await d({is_recent_used:"true",need_owner_info:"true",...e&&{app_name:e}});default:return[]}},{manual:!0,onSuccess:e=>{let[t,l]=e;if("recommend"===i)return o({app_list:l,total_count:(null==l?void 0:l.length)||0});o(l||{})},debounceWait:500});(0,v.useEffect)(()=>{m()},[i,m]);let x=[{value:"recommend",label:(0,$.t)("recommend_apps")},{value:"used",label:(0,$.t)("used_apps")}],{data:f}=(0,b.Z)(async()=>{let[,e]=await (0,n.Vx)((0,R.A)({is_hot_question:"true"}));return null!=e?e:[]});return(0,a.jsx)(U.ZP,{theme:{components:{Button:{defaultBorderColor:"white"},Segmented:{itemSelectedBg:"#2867f5",itemSelectedColor:"white"}}},children:(0,a.jsxs)("div",{className:"px-28 py-10 h-full flex flex-col justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)(W.Z,{className:"backdrop-filter h-10 backdrop-blur-lg bg-white bg-opacity-30 border border-white rounded-lg shadow p-1 dark:border-[#6f7f95] dark:bg-[#6f7f95] dark:bg-opacity-60",options:x,value:i,onChange:e=>{c(e)}}),(0,a.jsxs)("span",{className:"flex items-center text-gray-500 gap-1 dark:text-slate-300",children:[(0,a.jsx)("span",{children:(0,$.t)("app_in_mind")}),(0,a.jsxs)("span",{className:"flex items-center cursor-pointer",onClick:()=>{l.push("/")},children:[(0,a.jsx)(O(),{src:"/pictures/explore_active.png",alt:"construct_image",width:24,height:24},"image_explore"),(0,a.jsx)("span",{className:"text-default",children:(0,$.t)("explore")})]}),(0,a.jsx)("span",{children:(0,$.t)("Discover_more")})]})]}),(0,a.jsx)(z,{apps:(null==s?void 0:s.app_list)||[],loading:p,refresh:h,type:i}),f&&f.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-medium text-xl my-4",children:(0,$.t)("help")}),(0,a.jsx)("div",{className:"flex justify-start gap-4",children:f.map(r=>(0,a.jsxs)("span",{className:"flex gap-4 items-center backdrop-filter backdrop-blur-lg cursor-pointer bg-white bg-opacity-70 border-0 rounded-lg shadow p-2 relative dark:bg-[#6f7f95] dark:bg-opacity-60",onClick:async()=>{let[,a]=await (0,n.Vx)((0,n.sW)({chat_mode:"chat_knowledge",model:t}));a&&(null==e||e({chat_scene:a.chat_mode,app_code:r.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:a.chat_mode,app_code:r.app_code})),localStorage.setItem(A.rU,JSON.stringify({id:a.conv_uid,message:r.question})),l.push("/chat/?scene=".concat(a.chat_mode,"&id=").concat(null==a?void 0:a.conv_uid)))},children:[(0,a.jsx)("span",{children:r.question}),(0,a.jsx)(O(),{src:"/icons/send.png",alt:"construct_image",width:20,height:20},"image_explore")]},r.id))})]})]}),(0,a.jsx)("div",{children:(0,a.jsx)(J,{})})]})})},F=l(39332),K=l(30159),X=l(87740),Y=l(52645),Q=l(83062),ee=l(11186),et=l(55241),el=l(30568),ea=l(13457),er=(0,v.memo)(e=>{let{maxNewTokensValue:t,setMaxNewTokensValue:l}=e,{appInfo:r}=(0,v.useContext)(eM),{t:n}=(0,_.$G)(),s=(0,v.useMemo)(()=>{var e;return(null===(e=r.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[r.param_need]);if(!s.includes("max_new_tokens"))return(0,a.jsx)(Q.Z,{title:n("max_new_tokens_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{className:"text-xl cursor-not-allowed opacity-30"})})});let o=e=>{null===e||isNaN(e)||l(e)},i=e=>{l(e)};return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(et.Z,{arrow:!1,trigger:["click"],placement:"topLeft",content:()=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(el.Z,{className:"w-32",min:1,max:20480,step:1,onChange:i,value:"number"==typeof t?t:4e3}),(0,a.jsx)(ea.Z,{size:"small",className:"w-20",min:1,max:20480,step:1,onChange:o,value:t})]}),children:(0,a.jsx)(Q.Z,{title:n("max_new_tokens"),placement:"bottom",arrow:!1,children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{})})})}),(0,a.jsx)("span",{className:"text-sm ml-2",children:t})]})}),en=l(42952),es=l(34041),eo=l(39718),ei=(0,v.memo)(()=>{let{modelList:e}=(0,v.useContext)(r.p),{appInfo:t,modelValue:l,setModelValue:n}=(0,v.useContext)(eM),{t:s}=(0,_.$G)(),o=(0,v.useMemo)(()=>{var e;return(null===(e=t.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[t.param_need]);return o.includes("model")?(0,a.jsx)(es.default,{value:l,placeholder:s("choose_model"),className:"h-8 rounded-3xl",onChange:e=>{n(e)},popupMatchSelectWidth:300,children:e.map(e=>(0,a.jsx)(es.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(eo.Z,{model:e}),(0,a.jsx)("span",{className:"ml-2",children:e})]})},e))}):(0,a.jsx)(Q.Z,{title:s("model_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(en.Z,{className:"text-xl cursor-not-allowed opacity-30"})})})}),ec=l(23430),ed=l(90725),eu=l(83266),em=l(2093),ep=l(23799),eh=(0,v.memo)(e=>{var t,l,r,s;let{fileList:o,setFileList:i,setLoading:c,fileName:d}=e,{setResourceValue:u,appInfo:m,refreshHistory:p,refreshDialogList:h,modelValue:x,resourceValue:f}=(0,v.useContext)(eM),{temperatureValue:g,maxNewTokensValue:j}=(0,v.useContext)(eM),w=(0,F.useSearchParams)(),y=null!==(t=null==w?void 0:w.get("scene"))&&void 0!==t?t:"",N=null!==(l=null==w?void 0:w.get("id"))&&void 0!==l?l:"",{t:k}=(0,_.$G)(),[Z,S]=(0,v.useState)([]),C=(0,v.useMemo)(()=>{var e;return(null===(e=m.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[m.param_need]),P=(0,v.useMemo)(()=>{var e,t;return C.includes("resource")&&(null===(e=null===(t=m.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type)[0])||void 0===e?void 0:e.value)==="database"},[m.param_need,C]),R=(0,v.useMemo)(()=>{var e,t;return C.includes("resource")&&(null===(e=null===(t=m.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type)[0])||void 0===e?void 0:e.value)==="knowledge"},[m.param_need,C]),E=(0,v.useMemo)(()=>{var e;return null===(e=m.param_need)||void 0===e?void 0:e.find(e=>"resource"===e.type)},[m.param_need]),{run:M,loading:T}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.vD)(y)),{manual:!0,onSuccess:e=>{let[,t]=e;S(null!=t?t:[])}});(0,em.Z)(async()=>{(P||R)&&!(null==E?void 0:E.bind_value)&&await M()},[P,R,E]);let I=(0,v.useMemo)(()=>{var e;return null===(e=Z.map)||void 0===e?void 0:e.call(Z,e=>({label:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ec.Z,{width:24,height:24,src:A.S$[e.type].icon,label:A.S$[e.type].label,className:"w-[1.5em] h-[1.5em] mr-1 inline-block mt-[-4px]"}),e.param]}),value:e.param}))},[Z]),O=(0,v.useCallback)(async()=>{let e=new FormData;e.append("doc_files",null==o?void 0:o[0]),c(!0);let[t,l]=await (0,n.Vx)((0,n.qn)({convUid:N,chatMode:y,data:e,model:x,temperatureValue:g,maxNewTokensValue:j,config:{timeout:36e5}})).finally(()=>{c(!1)});l&&(u(l),await p(),await h())},[N,o,x,h,p,y,c,u]);if(!C.includes("resource"))return(0,a.jsx)(Q.Z,{title:k("extend_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(ed.Z,{className:"text-lg cursor-not-allowed opacity-30"})})});switch(null==E?void 0:E.value){case"excel_file":case"text_file":case"image_file":case"audio_file":case"video_file":{let e="chat_excel"===y&&(!!d||!!(null===(r=o[0])||void 0===r?void 0:r.name)),t=k("chat_excel"===y?"file_tip":"file_upload_tip");return(0,a.jsx)(ep.default,{name:"file",accept:(()=>{switch(null==E?void 0:E.value){case"excel_file":return".csv,.xlsx,.xls";case"text_file":return".txt,.doc,.docx,.pdf,.md";case"image_file":return".jpg,.jpeg,.png,.gif,.bmp,.webp";case"audio_file":return".mp3,.wav,.ogg,.aac";case"video_file":return".mp4,.wav,.wav";default:return""}})(),fileList:o,showUploadList:!1,beforeUpload:(e,t)=>{null==i||i(t)},customRequest:O,disabled:e,children:(0,a.jsx)(Q.Z,{title:t,arrow:!1,placement:"bottom",children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)]",children:(0,a.jsx)(eu.Z,{className:q()("text-xl",{"cursor-pointer":!e})})})})})}case"database":case"knowledge":case"plugin":case"awel_flow":return f||u(null==I?void 0:null===(s=I[0])||void 0===s?void 0:s.value),(0,a.jsx)(es.default,{value:f,className:"w-52 h-8 rounded-3xl",onChange:e=>{u(e)},disabled:!!(null==E?void 0:E.bind_value),loading:T,options:I})}}),ex=(0,v.memo)(e=>{let{temperatureValue:t,setTemperatureValue:l}=e,{appInfo:r}=(0,v.useContext)(eM),{t:n}=(0,_.$G)(),s=(0,v.useMemo)(()=>{var e;return(null===(e=r.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[r.param_need]);if(!s.includes("temperature"))return(0,a.jsx)(Q.Z,{title:n("temperature_tip"),children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{className:"text-xl cursor-not-allowed opacity-30"})})});let o=e=>{isNaN(e)||l(e)};return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(et.Z,{arrow:!1,trigger:["click"],placement:"topLeft",content:()=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(el.Z,{className:"w-20",min:0,max:1,step:.1,onChange:o,value:"number"==typeof t?t:0}),(0,a.jsx)(ea.Z,{size:"small",className:"w-14",min:0,max:1,step:.1,onChange:o,value:t})]}),children:(0,a.jsx)(Q.Z,{title:n("temperature"),placement:"bottom",arrow:!1,children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] cursor-pointer",children:(0,a.jsx)(ee.Z,{})})})}),(0,a.jsx)("span",{className:"text-sm ml-2",children:t})]})}),ef=e=>{let{ctrl:t}=e,{t:l}=(0,_.$G)(),{history:r,scrollRef:s,canAbort:o,replyLoading:c,currentDialogue:d,appInfo:u,temperatureValue:m,maxNewTokensValue:p,resourceValue:h,setTemperatureValue:f,setMaxNewTokensValue:g,refreshHistory:b,setCanAbort:j,setReplyLoading:w,handleChat:y}=(0,v.useContext)(eM),[N,k]=(0,v.useState)([]),[Z,S]=(0,v.useState)(!1),[C,P]=(0,v.useState)(!1),R=(0,v.useMemo)(()=>{var e;return(null===(e=u.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[u.param_need]),E=(0,v.useMemo)(()=>[{tip:l("stop_replying"),icon:(0,a.jsx)(K.Z,{className:q()({"text-[#0c75fc]":o})}),can_use:o,key:"abort",onClick:()=>{o&&(t.abort(),setTimeout(()=>{j(!1),w(!1)},100))}},{tip:l("answer_again"),icon:(0,a.jsx)(X.Z,{}),can_use:!c&&r.length>0,key:"redo",onClick:async()=>{var e,t;let l=null===(e=null===(t=r.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];y((null==l?void 0:l.context)||"",{app_code:u.app_code,...R.includes("temperature")&&{temperature:m},...R.includes("max_new_tokens")&&{max_new_tokens:p},...R.includes("resource")&&{select_param:"string"==typeof h?h:JSON.stringify(h)||d.select_param}}),setTimeout(()=>{var e,t;null===(e=s.current)||void 0===e||e.scrollTo({top:null===(t=s.current)||void 0===t?void 0:t.scrollHeight,behavior:"smooth"})},0)}},{tip:l("erase_memory"),icon:C?(0,a.jsx)(x.Z,{spinning:C,indicator:(0,a.jsx)(i.Z,{style:{fontSize:20}})}):(0,a.jsx)(Y.Z,{}),can_use:r.length>0,key:"clear",onClick:async()=>{C||(P(!0),await (0,n.Vx)((0,n.zR)(d.conv_uid)).finally(async()=>{await b(),P(!1)}))}}],[l,o,c,r,C,t,j,w,y,u.app_code,R,m,h,d.select_param,d.conv_uid,s,b]),M=(0,v.useMemo)(()=>{try{if(h){if("string"==typeof h)return JSON.parse(h).file_name||"";return h.file_name||""}return JSON.parse(d.select_param).file_name||""}catch(e){return""}},[h,d.select_param]);return(0,a.jsxs)("div",{className:"flex flex-col mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between h-full w-full",children:[(0,a.jsxs)("div",{className:"flex gap-3 text-lg",children:[(0,a.jsx)(ei,{}),(0,a.jsx)(eh,{fileList:N,setFileList:k,setLoading:S,fileName:M}),(0,a.jsx)(ex,{temperatureValue:m,setTemperatureValue:f}),(0,a.jsx)(er,{maxNewTokensValue:p,setMaxNewTokensValue:g})]}),(0,a.jsx)("div",{className:"flex gap-1",children:(0,a.jsx)(a.Fragment,{children:E.map(e=>(0,a.jsx)(Q.Z,{title:e.tip,arrow:!1,placement:"bottom",children:(0,a.jsx)("div",{className:"flex w-8 h-8 items-center justify-center rounded-md hover:bg-[rgb(221,221,221,0.6)] text-lg ".concat(e.can_use?"cursor-pointer":"opacity-30 cursor-not-allowed"),onClick:()=>{var t;null===(t=e.onClick)||void 0===t||t.call(e)},children:e.icon})},e.key))})})]}),(0,a.jsx)(()=>{let e=(0,A.Ev)(h)||(0,A.Ev)(d.select_param)||[];return 0===e.length?null:(0,a.jsx)("div",{className:"group/item flex flex-wrap gap-2 mt-2",children:e.map((e,t)=>{var l,r;if("image_url"===e.type&&(null===(l=e.image_url)||void 0===l?void 0:l.url)){let l=e.image_url.fileName,r=(0,A.Hb)(e.image_url.url);return(0,a.jsxs)("div",{className:"flex flex-col border border-[#e3e4e6] dark:border-[rgba(255,255,255,0.6)] rounded-lg p-2",children:[(0,a.jsx)("div",{className:"w-32 h-32 mb-2 overflow-hidden flex items-center justify-center bg-gray-100 dark:bg-gray-800 rounded",children:(0,a.jsx)("img",{src:r,alt:l||"Preview",className:"max-w-full max-h-full object-contain"})}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"text-sm text-[#1c2533] dark:text-white line-clamp-1",children:l})})]},"img-".concat(t))}if("file_url"===e.type&&(null===(r=e.file_url)||void 0===r?void 0:r.url)){let l=e.file_url.file_name;return(0,a.jsx)("div",{className:"flex items-center justify-between border border-[#e3e4e6] dark:border-[rgba(255,255,255,0.6)] rounded-lg p-2",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(O(),{src:"/icons/chat/excel.png",width:20,height:20,alt:"file-icon",className:"mr-2"}),(0,a.jsx)("span",{className:"text-sm text-[#1c2533] dark:text-white line-clamp-1",children:l})]})},"file-".concat(t))}return null})})},{}),(0,a.jsx)(x.Z,{spinning:Z,indicator:(0,a.jsx)(i.Z,{style:{fontSize:24},spin:!0})})]})},eg=(0,v.forwardRef)((e,t)=>{var l,r;let{ctrl:n}=e,{t:s}=(0,_.$G)(),{replyLoading:o,handleChat:c,appInfo:d,currentDialogue:u,temperatureValue:m,maxNewTokensValue:p,resourceValue:h,setResourceValue:f,refreshDialogList:g}=(0,v.useContext)(eM),b=(0,F.useSearchParams)(),j=null!==(l=null==b?void 0:b.get("scene"))&&void 0!==l?l:"",w=null!==(r=null==b?void 0:b.get("select_param"))&&void 0!==r?r:"",[y,N]=(0,v.useState)(""),[k,Z]=(0,v.useState)(!1),[S,C]=(0,v.useState)(!1),P=(0,v.useRef)(0),R=(0,v.useMemo)(()=>{var e;return(null===(e=d.param_need)||void 0===e?void 0:e.map(e=>e.type))||[]},[d.param_need]),E=async()=>{let e;P.current++,N("");let t=(0,A.Ev)(h);if(t.length>0){"chat_excel"!==j&&f(null);let l=[...t];l.push({type:"text",text:y}),e={role:"user",content:l}}else e=y;let l={app_code:d.app_code||"",...R.includes("temperature")&&{temperature:m},...R.includes("max_new_tokens")&&{max_new_tokens:p},select_param:w,...R.includes("resource")&&{select_param:"string"==typeof h?h:JSON.stringify(h)||u.select_param}};await c(e,l),1===P.current&&await g()};return(0,v.useImperativeHandle)(t,()=>({setUserInput:N})),(0,a.jsx)("div",{className:"flex flex-col w-5/6 mx-auto pt-4 pb-6 bg-transparent",children:(0,a.jsxs)("div",{className:"flex flex-1 flex-col bg-white dark:bg-[rgba(255,255,255,0.16)] px-5 py-4 pt-2 rounded-xl relative border-t border-b border-l border-r dark:border-[rgba(255,255,255,0.6)] ".concat(k?"border-[#0c75fc]":""),id:"input-panel",children:[(0,a.jsx)(ef,{ctrl:n}),(0,a.jsx)(D.default.TextArea,{placeholder:s("input_tips"),className:"w-full h-20 resize-none border-0 p-0 focus:shadow-none dark:bg-transparent",value:y,onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&!S&&(e.preventDefault(),y.trim()&&!o&&E())},onChange:e=>{N(e.target.value)},onFocus:()=>{Z(!0)},onBlur:()=>Z(!1),onCompositionStart:()=>C(!0),onCompositionEnd:()=>C(!1)}),(0,a.jsx)(G.ZP,{type:"primary",className:q()("flex items-center justify-center w-14 h-8 rounded-lg text-sm absolute right-4 bottom-3 bg-button-gradient border-0",{"cursor-not-allowed":!y.trim()}),onClick:()=>{!o&&y.trim()&&E()},children:o?(0,a.jsx)(x.Z,{spinning:o,indicator:(0,a.jsx)(i.Z,{className:"text-white"})}):s("sent")})]})})}),ev=l(20046),e_=l(48689),eb=l(14313),ej=l(94155),ew=l(21612),ey=l(85576),eN=l(86250);let{Sider:ek}=ew.default,eZ={display:"flex",alignItems:"center",justifyContent:"center",width:16,height:48,position:"absolute",top:"50%",transform:"translateY(-50%)",border:"1px solid #d6d8da",borderRadius:8,right:-8},eS=e=>{var t,l;let{item:s,refresh:o,historyLoading:i}=e,{t:c}=(0,_.$G)(),d=(0,F.useRouter)(),u=(0,F.useSearchParams)(),p=null!==(t=null==u?void 0:u.get("id"))&&void 0!==t?t:"",x=null!==(l=null==u?void 0:u.get("scene"))&&void 0!==l?l:"",{setCurrentDialogInfo:f}=(0,v.useContext)(r.p),b=(0,v.useMemo)(()=>s.default?s.default&&!p&&!x:s.conv_uid===p&&s.chat_mode===x,[p,x,s]),j=()=>{ey.default.confirm({title:c("delete_chat"),content:c("delete_chat_confirm"),centered:!0,onOk:async()=>{let[e]=await (0,n.Vx)((0,n.MX)(s.conv_uid));e||(await (null==o?void 0:o()),s.conv_uid===p&&d.push("/chat"))}})};return(0,a.jsxs)(eN.Z,{align:"center",className:"group/item w-full h-12 p-3 rounded-lg hover:bg-white dark:hover:bg-theme-dark cursor-pointer mb-2 relative ".concat(b?"bg-white dark:bg-theme-dark bg-opacity-100":""),onClick:()=>{i||(s.default||null==f||f({chat_scene:s.chat_mode,app_code:s.app_code}),localStorage.setItem("cur_dialog_info",JSON.stringify({chat_scene:s.chat_mode,app_code:s.app_code})),d.push(s.default?"/chat":"?scene=".concat(s.chat_mode,"&id=").concat(s.conv_uid)))},children:[(0,a.jsx)(Q.Z,{title:s.chat_mode,children:(0,a.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg mr-3 bg-white",children:s.icon})}),(0,a.jsx)("div",{className:"flex flex-1 line-clamp-1",children:(0,a.jsx)(h.Z.Text,{ellipsis:{tooltip:!0},children:s.label})}),!s.default&&(0,a.jsxs)("div",{className:"flex gap-1 ml-1",children:[(0,a.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.stopPropagation()},children:(0,a.jsx)(ev.Z,{style:{fontSize:16},onClick:()=>{let e=g()("".concat(location.origin,"/chat?scene=").concat(s.chat_mode,"&id=").concat(s.conv_uid));m.ZP[e?"success":"error"](e?c("copy_success"):c("copy_failed"))}})}),(0,a.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.stopPropagation(),j()},children:(0,a.jsx)(e_.Z,{style:{fontSize:16}})})]}),(0,a.jsx)("div",{className:" w-1 rounded-sm bg-[#0c75fc] absolute top-1/2 left-0 -translate-y-1/2 transition-all duration-500 ease-in-out ".concat(b?"h-5":"w-0 h-0")})]})};var eC=e=>{var t;let{dialogueList:l=[],refresh:n,historyLoading:s,listLoading:o,order:i}=e,c=(0,F.useSearchParams)(),d=null!==(t=null==c?void 0:c.get("scene"))&&void 0!==t?t:"",{t:u}=(0,_.$G)(),{mode:m}=(0,v.useContext)(r.p),[p,h]=(0,v.useState)("chat_dashboard"===d),f=(0,v.useMemo)(()=>p?{...eZ,right:-16,borderRadius:"0px 8px 8px 0",borderLeft:"1px solid #d5e5f6"}:{...eZ,borderLeft:"1px solid #d6d8da"},[p]),g=(0,v.useMemo)(()=>{let e=l[1]||[];return(null==e?void 0:e.length)>0?e.map(e=>({...e,label:e.user_input||e.select_param,key:e.conv_uid,icon:(0,a.jsx)(j.Z,{scene:e.chat_mode}),default:!1})):[]},[l]);return(0,a.jsx)(ek,{className:"bg-[#ffffff80] border-r border-[#d5e5f6] dark:bg-[#ffffff29] dark:border-[#ffffff66]",theme:m,width:280,collapsible:!0,collapsed:p,collapsedWidth:0,trigger:p?(0,a.jsx)(eb.Z,{className:"text-base"}):(0,a.jsx)(ej.Z,{className:"text-base"}),zeroWidthTriggerStyle:f,onCollapse:e=>h(e),children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full bg-transparent px-4 pt-6 ",children:[(0,a.jsx)("div",{className:"w-full text-base font-semibold text-[#1c2533] dark:text-[rgba(255,255,255,0.85)] mb-4 line-clamp-1",children:u("dialog_list")}),(0,a.jsxs)(eN.Z,{flex:1,vertical:!0,className:"overflow-y-auto",children:[(0,a.jsx)(eS,{item:{label:u("assistant"),key:"default",icon:(0,a.jsx)(O(),{src:"/LOGO_SMALL.png",alt:"default",width:24,height:24,className:"flex-1"}),default:!0},order:i}),(0,a.jsx)(x.Z,{spinning:o,className:"mt-2",children:!!(null==g?void 0:g.length)&&g.map(e=>(0,a.jsx)(eS,{item:e,refresh:n,historyLoading:s,order:i},null==e?void 0:e.key))})]})]})})};let eP=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(4567),l.e(9773),l.e(4035),l.e(9473),l.e(3764),l.e(5e3),l.e(3768),l.e(4434),l.e(2800)]).then(l.bind(l,96307)),{loadableGenerated:{webpack:()=>[96307]},ssr:!1}),eR=S()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(9473),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3764),l.e(5e3),l.e(1791),l.e(3768),l.e(5789),l.e(3913),l.e(4434),l.e(8624)]).then(l.bind(l,8334)),{loadableGenerated:{webpack:()=>[8334]},ssr:!1}),{Content:eE}=ew.default,eM=(0,v.createContext)({history:[],replyLoading:!1,scrollRef:{current:null},canAbort:!1,chartsData:[],agent:"",currentDialogue:{},appInfo:{},temperatureValue:.5,maxNewTokensValue:1024,resourceValue:{},modelValue:"",setModelValue:()=>{},setResourceValue:()=>{},setTemperatureValue:()=>{},setMaxNewTokensValue:()=>{},setAppInfo:()=>{},setAgent:()=>{},setCanAbort:()=>{},setReplyLoading:()=>{},refreshDialogList:()=>{},refreshHistory:()=>{},refreshAppInfo:()=>{},setHistory:()=>{},handleChat:()=>Promise.resolve()});var eT=()=>{var e,t,l,i;let{model:c,currentDialogInfo:d}=(0,v.useContext)(r.p),{isContract:u,setIsContract:m,setIsMenuExpand:p}=(0,v.useContext)(r.p),{chat:h,ctrl:f}=(0,o.Z)({app_code:d.app_code||""}),g=(0,F.useSearchParams)(),_=null!==(e=null==g?void 0:g.get("id"))&&void 0!==e?e:"",j=null!==(t=null==g?void 0:g.get("scene"))&&void 0!==t?t:"",w=null!==(l=null==g?void 0:g.get("knowledge_id"))&&void 0!==l?l:"",y=null!==(i=null==g?void 0:g.get("db_name"))&&void 0!==i?i:"",N=(0,v.useRef)(null),k=(0,v.useRef)(1),Z=(0,v.useRef)(null),S=(0,v.useRef)(void 0),[C,R]=(0,v.useState)([]),[E]=(0,v.useState)(),[M,T]=(0,v.useState)(!1),[I,O]=(0,v.useState)(!1),[V,L]=(0,v.useState)(""),[z,D]=(0,v.useState)({}),[G,H]=(0,v.useState)(),[q,J]=(0,v.useState)(),[U,W]=(0,v.useState)(),[$,K]=(0,v.useState)("");(0,v.useEffect)(()=>{var e,t,l,a,r,n,s,o;H((null===(e=null==z?void 0:null===(t=z.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type)[0])||void 0===e?void 0:e.value)||.6),J((null===(l=null==z?void 0:null===(a=z.param_need)||void 0===a?void 0:a.filter(e=>"max_new_tokens"===e.type)[0])||void 0===l?void 0:l.value)||4e3),K((null===(r=null==z?void 0:null===(n=z.param_need)||void 0===n?void 0:n.filter(e=>"model"===e.type)[0])||void 0===r?void 0:r.value)||c),W(w||y||(null===(s=null==z?void 0:null===(o=z.param_need)||void 0===o?void 0:o.filter(e=>"resource"===e.type)[0])||void 0===s?void 0:s.bind_value))},[z,y,w,c]),(0,v.useEffect)(()=>{p("chat_dashboard"!==j),_&&j&&m(!1)},[_,j,m,p]);let X=(0,v.useMemo)(()=>!_&&!j,[_,j]),{data:Y=[],refresh:Q,loading:ee}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.iP)())),{run:et,refresh:el}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.BN)({...d})),{manual:!0,onSuccess:e=>{let[,t]=e;D(t||{})}}),ea=(0,v.useMemo)(()=>{let[,e]=Y;return(null==e?void 0:e.find(e=>e.conv_uid===_))||{}},[_,Y]);(0,v.useEffect)(()=>{let e=(0,A.a_)();d.chat_scene!==j||X||e&&e.message||et()},[_,d,X,et,j]);let{run:er,loading:en,refresh:es}=(0,b.Z)(async()=>await (0,n.Vx)((0,n.$i)(_)),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(k.current=l[l.length-1].order+1),R(t||[])}}),eo=(0,v.useCallback)((e,t)=>new Promise(l=>{let a=(0,A.a_)(),r=new AbortController;if(T(!0),C&&C.length>0){var n,s;let e=null==C?void 0:C.filter(e=>"view"===e.role),t=null==C?void 0:C.filter(e=>"human"===e.role);k.current=((null===(n=e[e.length-1])||void 0===n?void 0:n.order)||(null===(s=t[t.length-1])||void 0===s?void 0:s.order))+1}let o="";if("string"==typeof e)o=e;else{let t=e.content||[],l=t.filter(e=>"text"===e.type),a=t.filter(e=>"text"!==e.type);l.length>0&&(o=l.map(e=>e.text).join(" "));let r=a.map(e=>{if("image_url"===e.type){var t,l;let a=(null===(t=e.image_url)||void 0===t?void 0:t.url)||"",r=(0,A.Hb)(a),n=(null===(l=e.image_url)||void 0===l?void 0:l.fileName)||"image";return"\n![".concat(n,"](").concat(r,")")}if("video"!==e.type)return"\n[".concat(e.type," attachment]");{let t=e.video||"",l=(0,A.Hb)(t);return"\n[Video](".concat(l,")")}}).join("\n");r&&(o=o+"\n"+r)}let i=[...a&&a.id===_?[]:C,{role:"human",context:o,model_name:(null==t?void 0:t.model_name)||$,order:k.current,time_stamp:0},{role:"view",context:"",model_name:(null==t?void 0:t.model_name)||$,order:k.current,time_stamp:0,thinking:!0}],c=i.length-1;R([...i]);let d={chat_mode:j,model_name:$,user_input:e};if(t&&Object.assign(d,t),"chat_dashboard"!==j){let e=S.current||localStorage.getItem("dbgpt_prompt_code_".concat(_));e&&(d.prompt_code=e,localStorage.removeItem("dbgpt_prompt_code_".concat(_)))}h({data:d,ctrl:r,chatId:_,onMessage:e=>{O(!0),(null==t?void 0:t.incremental)?(i[c].context+=e,i[c].thinking=!1):(i[c].context=e,i[c].thinking=!1),R([...i])},onDone:()=>{T(!1),O(!1),l()},onClose:()=>{T(!1),O(!1),l()},onError:e=>{T(!1),O(!1),i[c].context=e,i[c].thinking=!1,R([...i]),l()}})}),[_,C,$,h,j]);return(0,em.Z)(async()=>{if(X)return;let e=(0,A.a_)();e&&e.id===_||await er()},[_,j,er]),(0,v.useEffect)(()=>{X&&(k.current=1,R([]))},[X]),(0,a.jsx)(eM.Provider,{value:{history:C,replyLoading:M,scrollRef:N,canAbort:I,chartsData:E||[],agent:V,currentDialogue:ea,appInfo:z,temperatureValue:G,maxNewTokensValue:q,resourceValue:U,modelValue:$,setModelValue:K,setResourceValue:W,setTemperatureValue:H,setMaxNewTokensValue:J,setAppInfo:D,setAgent:L,setCanAbort:O,setReplyLoading:T,handleChat:eo,refreshDialogList:Q,refreshHistory:es,refreshAppInfo:el,setHistory:R},children:(0,a.jsx)(eN.Z,{flex:1,children:(0,a.jsxs)(ew.default,{className:"bg-gradient-light bg-cover bg-center dark:bg-gradient-dark",children:[(0,a.jsx)(eC,{refresh:Q,dialogueList:Y,listLoading:ee,historyLoading:en,order:k}),(0,a.jsxs)(ew.default,{className:"bg-transparent",children:["chat_dashboard"===j?u?(0,a.jsx)(eP,{}):(0,a.jsx)(eR,{}):X?(0,a.jsx)(eE,{children:(0,a.jsx)(B,{})}):(0,a.jsx)(x.Z,{spinning:en,className:"w-full h-full m-auto",children:(0,a.jsxs)(eE,{className:"flex flex-col h-screen",children:[(0,a.jsx)(P,{ref:N,className:"flex-1"}),(0,a.jsx)(eg,{ref:Z,ctrl:f})]})}),(0,a.jsx)(s.Z,{submit:e=>{if("chat_dashboard"===j)localStorage.setItem("dbgpt_prompt_code_".concat(_),e.prompt_code);else{var t,l;null===(t=Z.current)||void 0===t||null===(l=t.setUserInput)||void 0===l||l.call(t,e.content),S.current=e.prompt_code,localStorage.setItem("dbgpt_prompt_code_".concat(_),e.prompt_code)}},chat_scene:j})]})]})})})}},30119:function(e,t,l){"use strict";l.d(t,{Tk:function(){return d},PR:function(){return u}});var a,r=l(62418),n=l(45360);l(96486);var s=l(87066),o=l(83454);let i=s.default.create({baseURL:null!==(a=o.env.API_BASE_URL)&&void 0!==a?a:""});i.defaults.timeout=1e4,i.interceptors.response.use(e=>e.data,e=>Promise.reject(e));let c={"content-type":"application/json","User-Id":(0,r.n5)()},d=(e,t)=>{if(t){let l=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");l&&(e+="?".concat(l))}return i.get("/api"+e,{headers:c}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},u=(e,t)=>i.post(e,t,{headers:c}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},11873:function(){}}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1154-5374436bc6c264ea.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/9473-b8a100a835f3f5f6.js similarity index 99% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1154-5374436bc6c264ea.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/9473-b8a100a835f3f5f6.js index a3f4bb3d6..658f9e5d9 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/1154-5374436bc6c264ea.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/9473-b8a100a835f3f5f6.js @@ -1,4 +1,4 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1154],{29158:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(87462),i=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},o=n(13401),l=i.forwardRef(function(t,e){return i.createElement(o.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},64352:function(t,e,n){"use strict";n.d(e,{w:function(){return ev}});var r=n(97582),i={line_chart:{id:"line_chart",name:"Line Chart",alias:["Lines"],family:["LineCharts"],def:"A line chart uses lines with segments to show changes in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},step_line_chart:{id:"step_line_chart",name:"Step Line Chart",alias:["Step Lines"],family:["LineCharts"],def:"A step line chart is a line chart in which points of each line are connected by horizontal and vertical line segments, looking like steps of a staircase.",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},area_chart:{id:"area_chart",name:"Area Chart",alias:[],family:["AreaCharts"],def:"An area chart uses series of line segments with overlapped areas to show the change in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_area_chart:{id:"stacked_area_chart",name:"Stacked Area Chart",alias:[],family:["AreaCharts"],def:"A stacked area chart uses layered line segments with different styles of padding regions to display how multiple sets of data change in the same ordinal dimension, and the endpoint heights of the segments on the same dimension tick are accumulated by value.",purpose:["Composition","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},percent_stacked_area_chart:{id:"percent_stacked_area_chart",name:"Percent Stacked Area Chart",alias:["Percent Stacked Area","% Stacked Area","100% Stacked Area"],family:["AreaCharts"],def:"A percent stacked area chart is an extented stacked area chart in which the height of the endpoints of the line segment on the same dimension tick is the accumulated proportion of the ratio, which is 100% of the total.",purpose:["Comparison","Composition","Proportion","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},column_chart:{id:"column_chart",name:"Column Chart",alias:["Columns"],family:["ColumnCharts"],def:"A column chart uses series of columns to display the value of the dimension. The horizontal axis shows the classification dimension and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},grouped_column_chart:{id:"grouped_column_chart",name:"Grouped Column Chart",alias:["Grouped Column"],family:["ColumnCharts"],def:"A grouped column chart uses columns of different colors to form a group to display the values of dimensions. The horizontal axis indicates the grouping of categories, the color indicates the categories, and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_column_chart:{id:"stacked_column_chart",name:"Stacked Column Chart",alias:["Stacked Column"],family:["ColumnCharts"],def:"A stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_column_chart:{id:"percent_stacked_column_chart",name:"Percent Stacked Column Chart",alias:["Percent Stacked Column","% Stacked Column","100% Stacked Column"],family:["ColumnCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},range_column_chart:{id:"range_column_chart",name:"Range Column Chart",alias:[],family:["ColumnCharts"],def:"A column chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Length"],recRate:"Recommended"},waterfall_chart:{id:"waterfall_chart",name:"Waterfall Chart",alias:["Flying Bricks Chart","Mario Chart","Bridge Chart","Cascade Chart"],family:["ColumnCharts"],def:"A waterfall chart is used to portray how an initial value is affected by a series of intermediate positive or negative values",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal","Time","Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},histogram:{id:"histogram",name:"Histogram",alias:[],family:["ColumnCharts"],def:"A histogram is an accurate representation of the distribution of numerical data.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},bar_chart:{id:"bar_chart",name:"Bar Chart",alias:["Bars"],family:["BarCharts"],def:"A bar chart uses series of bars to display the value of the dimension. The vertical axis shows the classification dimension and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},stacked_bar_chart:{id:"stacked_bar_chart",name:"Stacked Bar Chart",alias:["Stacked Bar"],family:["BarCharts"],def:"A stacked bar chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_bar_chart:{id:"percent_stacked_bar_chart",name:"Percent Stacked Bar Chart",alias:["Percent Stacked Bar","% Stacked Bar","100% Stacked Bar"],family:["BarCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},grouped_bar_chart:{id:"grouped_bar_chart",name:"Grouped Bar Chart",alias:["Grouped Bar"],family:["BarCharts"],def:"A grouped bar chart uses bars of different colors to form a group to display the values of the dimensions. The vertical axis indicates the grouping of categories, the color indicates the categories, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},range_bar_chart:{id:"range_bar_chart",name:"Range Bar Chart",alias:[],family:["BarCharts"],def:"A bar chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Length"],recRate:"Recommended"},radial_bar_chart:{id:"radial_bar_chart",name:"Radial Bar Chart",alias:["Radial Column Chart"],family:["BarCharts"],def:"A bar chart that is plotted in the polar coordinate system. The axis along radius shows the classification dimension and the angle shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color"],recRate:"Recommended"},bullet_chart:{id:"bullet_chart",name:"Bullet Chart",alias:[],family:["BarCharts"],def:"A bullet graph is a variation of a bar graph developed by Stephen Few. Seemingly inspired by the traditional thermometer charts and progress bars found in many dashboards, the bullet graph serves as a replacement for dashboard gauges and meters.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Position","Color"],recRate:"Recommended"},pie_chart:{id:"pie_chart",name:"Pie Chart",alias:["Circle Chart","Pie"],family:["PieCharts"],def:"A pie chart is a chart that the classification and proportion of data are represented by the color and arc length (angle, area) of the sector.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Area","Color"],recRate:"Use with Caution"},donut_chart:{id:"donut_chart",name:"Donut Chart",alias:["Donut","Doughnut","Doughnut Chart","Ring Chart"],family:["PieCharts"],def:"A donut chart is a variation on a Pie chart except it has a round hole in the center which makes it look like a donut.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["ArcLength"],recRate:"Recommended"},nested_pie_chart:{id:"nested_pie_chart",name:"Nested Pie Chart",alias:["Nested Circle Chart","Nested Pie","Nested Donut Chart"],family:["PieCharts"],def:"A nested pie chart is a chart that contains several donut charts, where all the donut charts share the same center in position.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:"*",fieldConditions:["Interval"]}],channel:["Angle","Area","Color","Position"],recRate:"Use with Caution"},rose_chart:{id:"rose_chart",name:"Rose Chart",alias:["Nightingale Chart","Polar Area Chart","Coxcomb Chart"],family:["PieCharts"],def:"Nightingale Rose Chart is a peculiar combination of the Radar Chart and Stacked Column Chart types of data visualization.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color","Length"],recRate:"Use with Caution"},scatter_plot:{id:"scatter_plot",name:"Scatter Plot",alias:["Scatter Chart","Scatterplot"],family:["ScatterCharts"],def:"A scatter plot is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for series of data.",purpose:["Comparison","Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},bubble_chart:{id:"bubble_chart",name:"Bubble Chart",alias:["Bubble Chart"],family:["ScatterCharts"],def:"A bubble chart is a type of chart that displays four dimensions of data with x, y positions, circle size and circle color.",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position","Size"],recRate:"Recommended"},non_ribbon_chord_diagram:{id:"non_ribbon_chord_diagram",name:"Non-Ribbon Chord Diagram",alias:[],family:["GeneralGraph"],def:"A stripped-down version of a Chord Diagram, with only the connection lines showing. This provides more emphasis on the connections within the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},arc_diagram:{id:"arc_diagram",name:"Arc Diagram",alias:[],family:["GeneralGraph"],def:"A graph where the edges are represented as arcs.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},chord_diagram:{id:"chord_diagram",name:"Chord Diagram",alias:[],family:["GeneralGraph"],def:"A graphical method of displaying the inter-relationships between data in a matrix. The data are arranged radially around a circle with the relationships between the data points typically drawn as arcs connecting the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},treemap:{id:"treemap",name:"Treemap",alias:[],family:["TreeGraph"],def:"A visual representation of a data tree with nodes. Each node is displayed as a rectangle, sized and colored according to values that you assign.",purpose:["Composition","Comparison","Hierarchy"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Area"],recRate:"Recommended"},sankey_diagram:{id:"sankey_diagram",name:"Sankey Diagram",alias:[],family:["GeneralGraph"],def:"A graph shows the flows with weights between objects.",purpose:["Flow","Trend","Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},funnel_chart:{id:"funnel_chart",name:"Funnel Chart",alias:[],family:["FunnelCharts"],def:"A funnel chart is often used to represent stages in a sales process and show the amount of potential revenue for each stage.",purpose:["Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},mirror_funnel_chart:{id:"mirror_funnel_chart",name:"Mirror Funnel Chart",alias:["Contrast Funnel Chart"],family:["FunnelCharts"],def:"A mirror funnel chart is a funnel chart divided into two series by a central axis.",purpose:["Comparison","Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length","Direction"],recRate:"Recommended"},box_plot:{id:"box_plot",name:"Box Plot",alias:["Box and Whisker Plot","boxplot"],family:["BarCharts"],def:"A box plot is often used to graphically depict groups of numerical data through their quartiles. Box plots may also have lines extending from the boxes indicating variability outside the upper and lower quartiles. Outliers may be plotted as individual points.",purpose:["Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},heatmap:{id:"heatmap",name:"Heatmap",alias:[],family:["HeatmapCharts"],def:"A heatmap is a graphical representation of data where the individual values contained in a matrix are represented as colors.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},density_heatmap:{id:"density_heatmap",name:"Density Heatmap",alias:["Heatmap"],family:["HeatmapCharts"],def:"A density heatmap is a heatmap for representing the density of dots.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]}],channel:["Color","Position","Area"],recRate:"Recommended"},radar_chart:{id:"radar_chart",name:"Radar Chart",alias:["Web Chart","Spider Chart","Star Chart","Cobweb Chart","Irregular Polygon","Kiviat diagram"],family:["RadarCharts"],def:"A radar chart maps series of data volume of multiple dimensions onto the axes. Starting at the same center point, usually ending at the edge of the circle, connecting the same set of points using lines.",purpose:["Comparison"],coord:["Radar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},wordcloud:{id:"wordcloud",name:"Word Cloud",alias:["Wordle","Tag Cloud","Text Cloud"],family:["Others"],def:"A word cloud is a collection, or cluster, of words depicted in different sizes, colors, and shapes, which takes a piece of text as input. Typically, the font size in the word cloud is encoded as the word frequency in the input text.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Diagram"],shape:["Scatter"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal"]},{minQty:0,maxQty:1,fieldConditions:["Interval"]}],channel:["Size","Position","Color"],recRate:"Recommended"},candlestick_chart:{id:"candlestick_chart",name:"Candlestick Chart",alias:["Japanese Candlestick Chart)"],family:["BarCharts"],def:"A candlestick chart is a specific version of box plot, which is a style of financial chart used to describe price movements of a security, derivative, or currency.",purpose:["Trend","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},compact_box_tree:{id:"compact_box_tree",name:"CompactBox Tree",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the nodes with same depth on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},dendrogram:{id:"dendrogram",name:"Dendrogram",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the leaves on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},indented_tree:{id:"indented_tree",name:"Indented Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout where the hierarchy of tree is represented by the horizontal indentation, and each element will occupy one row/column. It is commonly used to represent the file directory structure.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_tree:{id:"radial_tree",name:"Radial Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which places the root at the center, and the branches around the root radially.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},flow_diagram:{id:"flow_diagram",name:"Flow Diagram",alias:["Dagre Graph Layout","Dagre","Flow Chart"],family:["GeneralGraph"],def:"Directed flow graph.",purpose:["Relation","Flow"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fruchterman_layout_graph:{id:"fruchterman_layout_graph",name:"Fruchterman Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},force_directed_layout_graph:{id:"force_directed_layout_graph",name:"Force Directed Graph Layout",alias:[],family:["GeneralGraph"],def:"The classical force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fa2_layout_graph:{id:"fa2_layout_graph",name:"Force Atlas 2 Graph Layout",alias:["FA2 Layout"],family:["GeneralGraph"],def:"A type of force directed graph layout algorithm. It focuses more on the degree of the node when calculating the force than the classical force-directed algorithm .",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},mds_layout_graph:{id:"mds_layout_graph",name:"Multi-Dimensional Scaling Layout",alias:["MDS Layout"],family:["GeneralGraph"],def:"A type of dimension reduction algorithm that could be used for calculating graph layout. MDS (Multidimensional scaling) is used for project high dimensional data onto low dimensional space.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},circular_layout_graph:{id:"circular_layout_graph",name:"Circular Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes on a circle.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},spiral_layout_graph:{id:"spiral_layout_graph",name:"Spiral Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes along a spiral line.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_layout_graph:{id:"radial_layout_graph",name:"Radial Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which places a focus node on the center and the others on the concentrics centered at the focus node according to the shortest path length to the it.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},concentric_layout_graph:{id:"concentric_layout_graph",name:"Concentric Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges the nodes on concentrics.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},grid_layout_graph:{id:"grid_layout_graph",name:"Grid Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout arranges the nodes on grids.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"}};function a(t,e){return e.every(function(e){return t.includes(e)})}var o=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"],l=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"];function s(t,e){return e.some(function(e){return t.includes(e)})}function c(t,e){return t.distincte.distinct?-1:0}var u=["pie_chart","donut_chart"],f=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"];function d(t){var e=t.chartType,n=t.dataProps,r=t.preferences;return!!(n&&e&&r&&r.canvasLayout)}var h=["line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart"],p=["bar_chart","column_chart","grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"];function g(t){return t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])})}var m=["pie_chart","donut_chart","radar_chart","rose_chart"],y=n(96486);function v(t){return"number"==typeof t}function b(t){return"string"==typeof t||"boolean"==typeof t}function x(t){return t instanceof Date}function O(t){var e=t.encode,n=t.data,i=t.scale,a=(0,y.mapValues)(e,function(t,e){var r,a,o;return{field:t,type:void 0!==(r=null==i?void 0:i[e].type)?function(t){switch(t){case"linear":case"log":case"pow":case"sqrt":case"quantile":case"threshold":case"quantize":case"sequential":return"quantitative";case"time":return"temporal";case"ordinal":case"point":case"band":return"categorical";default:throw Error("Unkonwn scale type: ".concat(t,"."))}}(r):function(t){if(t.some(v))return"quantitative";if(t.some(b))return"categorical";if(t.some(x))return"temporal";throw Error("Unknown type: ".concat(typeof t[0]))}((a=n,"function"==typeof(o=t)?a.map(o):"string"==typeof o&&a.some(function(t){return void 0!==t[o]})?a.map(function(t){return t[o]}):a.map(function(){return o})))}});return(0,r.pi)((0,r.pi)({},t),{encode:a})}var w=["line_chart"];(0,r.ev)((0,r.ev)([],(0,r.CR)(["data-check","data-field-qty","no-redundant-field","purpose-check"]),!1),(0,r.CR)(["series-qty-limit","bar-series-qty","line-field-time-ordinal","landscape-or-portrait","diff-pie-sector","nominal-enum-combinatorial","limit-series"]),!1);var _={"data-check":{id:"data-check",type:"HARD",docs:{lintText:"Data must satisfy the data prerequisites."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){e=1;var a=i[r].dataPres||[];a.forEach(function(t){!function(t,e){var n=e.map(function(t){return t.levelOfMeasurements});if(n){var r=0;if(n.forEach(function(e){e&&s(e,t.fieldConditions)&&(r+=1)}),r>=t.minQty&&("*"===t.maxQty||r<=t.maxQty))return!0}return!1}(t,n)&&(e=0)}),n.map(function(t){return t.levelOfMeasurements}).forEach(function(t){var n=!1;a.forEach(function(e){t&&s(t,e.fieldConditions)&&(n=!0)}),n||(e=0)})}return e}},"data-field-qty":{id:"data-field-qty",type:"HARD",docs:{lintText:"Data must have at least the min qty of the prerequisite."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){e=1;var a=(i[r].dataPres||[]).map(function(t){return t.minQty}).reduce(function(t,e){return t+e});n.length&&n.length>=a&&(e=1)}return e}},"no-redundant-field":{id:"no-redundant-field",type:"HARD",docs:{lintText:"No redundant field."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){var a=(i[r].dataPres||[]).map(function(t){return"*"===t.maxQty?99:t.maxQty}).reduce(function(t,e){return t+e});n.length&&n.length<=a&&(e=1)}return e}},"purpose-check":{id:"purpose-check",type:"HARD",docs:{lintText:"Choose chart types that satisfy the purpose, if purpose is defined."},trigger:function(){return!0},validator:function(t){var e=0,n=t.chartType,r=t.purpose,i=t.chartWIKI;return r?(n&&i[n]&&r&&(i[n].purpose||"").includes(r)&&(e=1),e):e=1}},"bar-series-qty":{id:"bar-series-qty",type:"SOFT",docs:{lintText:"Bar chart should has proper number of bars or bar groups."},trigger:function(t){var e=t.chartType;return o.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n&&r){var i=n.find(function(t){return a(t.levelOfMeasurements,["Nominal"])}),o=i&&i.count?i.count:0;o>20&&(e=20/o)}return e<.1?.1:e}},"diff-pie-sector":{id:"diff-pie-sector",type:"SOFT",docs:{lintText:"The difference between sectors of a pie chart should be large enough."},trigger:function(t){var e=t.chartType;return u.includes(e)},validator:function(t){var e=1,n=t.dataProps;if(n){var r=n.find(function(t){return a(t.levelOfMeasurements,["Interval"])});if(r&&r.sum&&r.rawData){var i=1/r.sum,o=r.rawData.map(function(t){return t*i}).reduce(function(t,e){return t*e}),l=r.rawData.length,s=Math.pow(1/l,l);e=2*(Math.abs(s-Math.abs(o))/s)}}return e<.1?.1:e}},"landscape-or-portrait":{id:"landscape-or-portrait",type:"SOFT",docs:{lintText:"Recommend column charts for landscape layout and bar charts for portrait layout."},trigger:function(t){return f.includes(t.chartType)&&d(t)},validator:function(t){var e=1,n=t.chartType,r=t.preferences;return d(t)&&("portrait"===r.canvasLayout&&["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart"].includes(n)?e=5:"landscape"===r.canvasLayout&&["column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"].includes(n)&&(e=5)),e}},"limit-series":{id:"limit-series",type:"SOFT",docs:{lintText:"Avoid too many values in one series."},trigger:function(t){return t.dataProps.filter(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal"])}).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var i=n.filter(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal"])});if(i.length>=2){var a=i.sort(c)[1];a.distinct&&(e=a.distinct>10?.1:1/a.distinct,a.distinct>6&&"heatmap"===r?e=5:"heatmap"===r&&(e=1))}}return e}},"line-field-time-ordinal":{id:"line-field-time-ordinal",type:"SOFT",docs:{lintText:"Data containing time or ordinal fields are suitable for line or area charts."},trigger:function(t){var e=t.chartType;return h.includes(e)},validator:function(t){var e=1,n=t.dataProps;return n&&n.find(function(t){return s(t.levelOfMeasurements,["Ordinal","Time"])})&&(e=5),e}},"nominal-enum-combinatorial":{id:"nominal-enum-combinatorial",type:"SOFT",docs:{lintText:"Single (Basic) and Multi (Stacked, Grouped,...) charts should be optimized recommended by nominal enums combinatorial numbers."},trigger:function(t){var e=t.chartType,n=t.dataProps;return p.includes(e)&&g(n).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var i=g(n);if(i.length>=2){var a=i.sort(c),o=a[0],l=a[1];o.distinct===o.count&&["bar_chart","column_chart"].includes(r)&&(e=5),o.count&&o.distinct&&l.distinct&&o.count>o.distinct&&["grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"].includes(r)&&(e=5)}}return e}},"series-qty-limit":{id:"series-qty-limit",type:"SOFT",docs:{lintText:"Some charts should has at most N values for the series."},trigger:function(t){var e=t.chartType;return m.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType,i=t.limit;if((!Number.isInteger(i)||i<=0)&&(i=6,("pie_chart"===r||"donut_chart"===r||"rose_chart"===r)&&(i=6),"radar_chart"===r&&(i=8)),n){var o=n.find(function(t){return a(t.levelOfMeasurements,["Nominal"])}),l=o&&o.count?o.count:0;l>=2&&l<=i&&(e=5+2/l)}return e}},"x-axis-line-fading":{id:"x-axis-line-fading",type:"DESIGN",docs:{lintText:"Adjust axis to make it prettier"},trigger:function(t){var e=t.chartType;return w.includes(e)},optimizer:function(t,e){var n,r=O(e).encode;if(r&&(null===(n=r.y)||void 0===n?void 0:n.type)==="quantitative"){var i=t.find(function(t){var e;return t.name===(null===(e=r.y)||void 0===e?void 0:e.field)});if(i){var a=i.maximum-i.minimum;if(i.minimum&&i.maximum&&a<2*i.maximum/3){var o=Math.floor(i.minimum-a/5);return{axis:{x:{tick:!1}},scale:{y:{domainMin:o>0?o:0}},clip:!0}}}}return{}}},"bar-without-axis-min":{id:"bar-without-axis-min",type:"DESIGN",docs:{lintText:"It is not recommended to set the minimum value of axis for the bar or column chart.",fixText:"Remove the minimum value config of axis."},trigger:function(t){var e=t.chartType;return l.includes(e)},optimizer:function(t,e){var n,r,i=e.scale;if(!i)return{};var a=null===(n=i.x)||void 0===n?void 0:n.domainMin,o=null===(r=i.y)||void 0===r?void 0:r.domainMin;if(a||o){var l=JSON.parse(JSON.stringify(i));return a&&(l.x.domainMin=0),o&&(l.y.domainMin=0),{scale:l}}return{}}}},k=Object.keys(_),C=function(t){var e={};return t.forEach(function(t){Object.keys(_).includes(t)&&(e[t]=_[t])}),e},M=function(t){if(!t)return C(k);var e=C(k);if(t.exclude&&t.exclude.forEach(function(t){Object.keys(e).includes(t)&&delete e[t]}),t.include){var n=t.include;Object.keys(e).forEach(function(t){n.includes(t)||delete e[t]})}var i=(0,r.pi)((0,r.pi)({},e),t.custom),a=t.options;return a&&Object.keys(a).forEach(function(t){if(Object.keys(i).includes(t)){var e=a[t];i[t]=(0,r.pi)((0,r.pi)({},i[t]),{option:e})}}),i},j=function(t){if("object"!=typeof t||null===t)return t;if(Array.isArray(t)){e=[];for(var e,n=0,r=t.length;ne.distinct)return -1}return 0};function B(t){var e,n,r,i=null!==(n=null!==(e=t.find(function(t){return s(t.levelOfMeasurements,["Nominal"])}))&&void 0!==e?e:t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}))&&void 0!==n?n:t.find(function(t){return s(t.levelOfMeasurements,["Interval"])}),a=null!==(r=t.filter(function(t){return t!==i}).find(function(t){return s(t.levelOfMeasurements,["Interval"])}))&&void 0!==r?r:t.filter(function(t){return t!==i}).find(function(t){return s(t.levelOfMeasurements,["Nominal","Time","Ordinal"])});return[i,a]}function I(t){var e,n=null!==(e=t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal","Nominal"])}))&&void 0!==e?e:t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),r=t.filter(function(t){return t!==n}).find(function(t){return a(t.levelOfMeasurements,["Interval"])}),i=t.filter(function(t){return t!==n&&t!==r}).find(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal","Time"])});return[n,r,i]}function N(t){var e=t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}),n=t.find(function(t){return a(t.levelOfMeasurements,["Nominal"])});return[e,t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),n]}function D(t){var e=t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L),n=e[0],r=e[1];return[t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),n,r]}function z(t){var e,n,i,o,l,s,c=t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L);return(0,Z.Js)(null===(i=c[1])||void 0===i?void 0:i.rawData,null===(o=c[0])||void 0===o?void 0:o.rawData)?(s=(e=(0,r.CR)(c,2))[0],l=e[1]):(l=(n=(0,r.CR)(c,2))[0],s=n[1]),[l,t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),s]}var F=function(t){var e=t.data,n=t.xField;return(0,y.uniq)(e.map(function(t){return t[n]})).length<=1},$=function(t,e,n){var r=n.field4Split,i=n.field4X;if((null==r?void 0:r.name)&&(null==i?void 0:i.name)){var a=t[r.name];return F({data:e.filter(function(t){return r.name&&t[r.name]===a}),xField:i.name})?5:void 0}return(null==i?void 0:i.name)&&F({data:e,xField:i.name})?5:void 0},W=n(66465);function H(t){var e,n,i,o,l,c,u,f,d,h,p,g,m,y,v,b,x,O,w,_,k,C,M,j,S,A,E,P,Z,T,F,H,G,q,V,Y,U,Q,X,K,J,tt,te,tn,tr,ti=t.chartType,ta=t.data,to=t.dataProps,tl=t.chartKnowledge;if(!R.includes(ti)&&tl)return tl.toSpec?tl.toSpec(ta,to):null;switch(ti){case"pie_chart":return n=(e=(0,r.CR)(B(to),2))[0],(i=e[1])&&n?{type:"interval",data:ta,encode:{color:n.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta"}}:null;case"donut_chart":return l=(o=(0,r.CR)(B(to),2))[0],(c=o[1])&&l?{type:"interval",data:ta,encode:{color:l.name,y:c.name},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:.6}}:null;case"line_chart":return function(t,e){var n=(0,r.CR)(I(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"line",data:t,encode:{x:i.name,y:a.name,size:function(e){return $(e,t,{field4X:i})}},legend:{size:!1}};return o&&(l.encode.color=o.name),l}(ta,to);case"step_line_chart":return function(t,e){var n=(0,r.CR)(I(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"line",data:t,encode:{x:i.name,y:a.name,shape:"hvh",size:function(e){return $(e,t,{field4X:i})}},legend:{size:!1}};return o&&(l.encode.color=o.name),l}(ta,to);case"area_chart":return u=to.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}),f=to.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),u&&f?{type:"area",data:ta,encode:{x:u.name,y:f.name,size:function(t){return $(t,ta,{field4X:u})}},legend:{size:!1}}:null;case"stacked_area_chart":return h=(d=(0,r.CR)(N(to),3))[0],p=d[1],g=d[2],h&&p&&g?{type:"area",data:ta,encode:{x:h.name,y:p.name,color:g.name,size:function(t){return $(t,ta,{field4Split:g,field4X:h})}},legend:{size:!1},transform:[{type:"stackY"}]}:null;case"percent_stacked_area_chart":return y=(m=(0,r.CR)(N(to),3))[0],v=m[1],b=m[2],y&&v&&b?{type:"area",data:ta,encode:{x:y.name,y:v.name,color:b.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null;case"bar_chart":return function(t,e){var n=(0,r.CR)(D(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"interval",data:t,encode:{x:a.name,y:i.name},coordinate:{transform:[{type:"transpose"}]}};return o&&(l.encode.color=o.name,l.transform=[{type:"stackY"}]),l}(ta,to);case"grouped_bar_chart":return O=(x=(0,r.CR)(D(to),3))[0],w=x[1],_=x[2],O&&w&&_?{type:"interval",data:ta,encode:{x:w.name,y:O.name,color:_.name},transform:[{type:"dodgeX"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"stacked_bar_chart":return C=(k=(0,r.CR)(D(to),3))[0],M=k[1],j=k[2],C&&M&&j?{type:"interval",data:ta,encode:{x:M.name,y:C.name,color:j.name},transform:[{type:"stackY"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"percent_stacked_bar_chart":return A=(S=(0,r.CR)(D(to),3))[0],E=S[1],P=S[2],A&&E&&P?{type:"interval",data:ta,encode:{x:E.name,y:A.name,color:P.name},transform:[{type:"stackY"},{type:"normalizeY"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"column_chart":return function(t,e){var n=e.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L),r=n[0],i=n[1],o=e.find(function(t){return a(t.levelOfMeasurements,["Interval"])});if(!r||!o)return null;var l={type:"interval",data:t,encode:{x:r.name,y:o.name}};return i&&(l.encode.color=i.name,l.transform=[{type:"stackY"}]),l}(ta,to);case"grouped_column_chart":return T=(Z=(0,r.CR)(z(to),3))[0],F=Z[1],H=Z[2],T&&F&&H?{type:"interval",data:ta,encode:{x:T.name,y:F.name,color:H.name},transform:[{type:"dodgeX"}]}:null;case"stacked_column_chart":return q=(G=(0,r.CR)(z(to),3))[0],V=G[1],Y=G[2],q&&V&&Y?{type:"interval",data:ta,encode:{x:q.name,y:V.name,color:Y.name},transform:[{type:"stackY"}]}:null;case"percent_stacked_column_chart":return Q=(U=(0,r.CR)(z(to),3))[0],X=U[1],K=U[2],Q&&X&&K?{type:"interval",data:ta,encode:{x:Q.name,y:X.name,color:K.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null;case"scatter_plot":return function(t,e){var n=e.filter(function(t){return a(t.levelOfMeasurements,["Interval"])}).sort(L),r=n[0],i=n[1],o=e.find(function(t){return a(t.levelOfMeasurements,["Nominal"])});if(!r||!i)return null;var l={type:"point",data:t,encode:{x:r.name,y:i.name}};return o&&(l.encode.color=o.name),l}(ta,to);case"bubble_chart":return function(t,e){for(var n=e.filter(function(t){return a(t.levelOfMeasurements,["Interval"])}),i={x:n[0],y:n[1],corr:0,size:n[2]},o=function(t){for(var e=function(e){var a=(0,W.Vs)(n[t].rawData,n[e].rawData);Math.abs(a)>i.corr&&(i.x=n[t],i.y=n[e],i.corr=a,i.size=n[(0,r.ev)([],(0,r.CR)(Array(n.length).keys()),!1).find(function(n){return n!==t&&n!==e})||0])},a=t+1;ae.score?-1:0},X=function(t){var e=t.chartWIKI,n=t.dataProps,r=t.ruleBase,i=t.options;return Object.keys(e).map(function(t){return function(t,e,n,r,i){var a=i?i.purpose:"",o=i?i.preferences:void 0,l=[],s={dataProps:n,chartType:t,purpose:a,preferences:o},c=U(t,e,r,"HARD",s,l);if(0===c)return{chartType:t,score:0,log:l};var u=U(t,e,r,"SOFT",s,l);return{chartType:t,score:c*u,log:l}}(t,e,n,r,i)}).filter(function(t){return t.score>0}).sort(Q)};function K(t,e,n,r){return Object.values(n).filter(function(r){var i;return"DESIGN"===r.type&&r.trigger({dataProps:e,chartType:t})&&!(null===(i=n[r.id].option)||void 0===i?void 0:i.off)}).reduce(function(t,n){return P(t,n.optimizer(e,r))},{})}var J=n(28670),tt=n.n(J);let te=t=>!!tt().valid(t);function tn(t){let{value:e}=t;return te(e)?tt()(e).hex():""}let tr={lab:{l:[0,100],a:[-86.185,98.254],b:[-107.863,94.482]},lch:{l:[0,100],c:[0,100],h:[0,360]},rgb:{r:[0,255],g:[0,255],b:[0,255]},rgba:{r:[0,255],g:[0,255],b:[0,255],a:[0,1]},hsl:{h:[0,360],s:[0,1],l:[0,1]},hsv:{h:[0,360],s:[0,1],v:[0,1]},hsi:{h:[0,360],s:[0,1],i:[0,1]},cmyk:{c:[0,1],m:[0,1],y:[0,1],k:[0,1]}},ti={model:"rgb",value:{r:255,g:255,b:255}},ta=["normal","darken","multiply","colorBurn","linearBurn","lighten","screen","colorDodge","linearDodge","overlay","softLight","hardLight","vividLight","linearLight","pinLight","difference","exclusion"];[...ta];let to=t=>!!tt().valid(t),tl=t=>{let{value:e}=t;return to(e)?tt()(e):tt()("#000")},ts=(t,e=t.model)=>{let n=tl(t);return n?n[e]():[0,0,0]},tc=(t,e=4===t.length?"rgba":"rgb")=>{let n={};if(1===t.length){let[r]=t;for(let t=0;tt*e/255,tp=(t,e)=>t+e-t*e/255,tg=(t,e)=>t<128?th(2*t,e):tp(2*t-255,e),tm={normal:t=>t,darken:(t,e)=>Math.min(t,e),multiply:th,colorBurn:(t,e)=>0===t?0:Math.max(0,255*(1-(255-e)/t)),lighten:(t,e)=>Math.max(t,e),screen:tp,colorDodge:(t,e)=>255===t?255:Math.min(255,255*(e/(255-t))),overlay:(t,e)=>tg(e,t),softLight:(t,e)=>{if(t<128)return e-(1-2*t/255)*e*(1-e/255);let n=e<64?((16*(e/255)-12)*(e/255)+4)*(e/255):Math.sqrt(e/255);return e+255*(2*t/255-1)*(n-e/255)},hardLight:tg,difference:(t,e)=>Math.abs(t-e),exclusion:(t,e)=>t+e-2*t*e/255,linearBurn:(t,e)=>Math.max(t+e-255,0),linearDodge:(t,e)=>Math.min(255,t+e),linearLight:(t,e)=>Math.max(e+2*t-255,0),vividLight:(t,e)=>t<128?255*(1-(1-e/255)/(2*t/255)):255*(e/2/(255-t)),pinLight:(t,e)=>t<128?Math.min(e,2*t):Math.max(e,2*t-255)},ty=t=>.3*t[0]+.58*t[1]+.11*t[2],tv=t=>{let e=ty(t),n=Math.min(...t),r=Math.max(...t),i=[...t];return n<0&&(i=i.map(t=>e+(t-e)*e/(e-n))),r>255&&(i=i.map(t=>e+(t-e)*(255-e)/(r-e))),i},tb=(t,e)=>{let n=e-ty(t);return tv(t.map(t=>t+n))},tx=t=>Math.max(...t)-Math.min(...t),tO=(t,e)=>{let n=t.map((t,e)=>({value:t,index:e}));n.sort((t,e)=>t.value-e.value);let r=n[0].index,i=n[1].index,a=n[2].index,o=[...t];return o[a]>o[r]?(o[i]=(o[i]-o[r])*e/(o[a]-o[r]),o[a]=e):(o[i]=0,o[a]=0),o[r]=0,o},tw={hue:(t,e)=>tb(tO(t,tx(e)),ty(e)),saturation:(t,e)=>tb(tO(e,tx(t)),ty(e)),color:(t,e)=>tb(t,ty(e)),luminosity:(t,e)=>tb(e,ty(t))},t_=(t,e,n="normal")=>{let r;let[i,a,o,l]=ts(t,"rgba"),[s,c,u,f]=ts(e,"rgba"),d=[i,a,o],h=[s,c,u];if(ta.includes(n)){let t=tm[n];r=d.map((e,n)=>Math.floor(t(e,h[n])))}else r=tw[n](d,h);let p=l+f*(1-l),g=Math.round((l*(1-f)*i+l*f*r[0]+(1-l)*f*s)/p),m=Math.round((l*(1-f)*a+l*f*r[1]+(1-l)*f*c)/p),y=Math.round((l*(1-f)*o+l*f*r[2]+(1-l)*f*u)/p);return 1===p?{model:"rgb",value:{r:g,g:m,b:y}}:{model:"rgba",value:{r:g,g:m,b:y,a:p}}},tk=(t,e)=>{let n=(t+e)%360;return n<0?n+=360:n>=360&&(n-=360),n},tC=(t=1,e=0)=>{let n=Math.min(t,e),r=Math.max(t,e);return n+Math.random()*(r-n)},tM=(t=1,e=0)=>{let n=Math.ceil(Math.min(t,e)),r=Math.floor(Math.max(t,e));return Math.floor(n+Math.random()*(r-n+1))},tj=t=>{if(t&&"object"==typeof t){let e=Array.isArray(t);if(e){let e=t.map(t=>tj(t));return e}let n={},r=Object.keys(t);return r.forEach(e=>{n[e]=tj(t[e])}),n}return t};function tS(t){return t*(Math.PI/180)}var tA=n(56917),tE=n.n(tA);let tP=(t,e="normal")=>{if("normal"===e)return{...t};let n=tn(t),r=tE()[e](n);return td(r)},tR=t=>{let e=tu(t),[,,,n=1]=ts(t,"rgba");return tf(e,n)},tZ=(t,e="normal")=>"grayscale"===e?tR(t):tP(t,e),tT=(t,e,n=[tM(5,10),tM(90,95)])=>{let[r,i,a]=ts(t,"lab"),o=r<=15?r:n[0],l=r>=85?r:n[1],s=(l-o)/(e-1),c=Math.ceil((r-o)/s);return s=0===c?s:(r-o)/c,Array(e).fill(0).map((t,e)=>tc([s*e+o,i,a],"lab"))},tL=t=>{let{count:e,color:n,tendency:r}=t,i=tT(n,e),a={name:"monochromatic",semantic:null,type:"discrete-scale",colors:"tint"===r?i:i.reverse()};return a},tB={model:"rgb",value:{r:0,g:0,b:0}},tI={model:"rgb",value:{r:255,g:255,b:255}},tN=(t,e,n="lab")=>tt().distance(tl(t),tl(e),n),tD=(t,e)=>{let n=Math.atan2(t,e)*(180/Math.PI);return n>=0?n:n+360},tz=(t,e)=>{let n,r;let[i,a,o]=ts(t,"lab"),[l,s,c]=ts(e,"lab"),u=Math.sqrt(a**2+o**2),f=Math.sqrt(s**2+c**2),d=(u+f)/2,h=.5*(1-Math.sqrt(d**7/(d**7+6103515625))),p=(1+h)*a,g=(1+h)*s,m=Math.sqrt(p**2+o**2),y=Math.sqrt(g**2+c**2),v=tD(o,p),b=tD(c,g),x=y-m;n=180>=Math.abs(b-v)?b-v:b-v<-180?b-v+360:b-v-360;let O=2*Math.sqrt(m*y)*Math.sin(tS(n)/2);r=180>=Math.abs(v-b)?(v+b)/2:Math.abs(v-b)>180&&v+b<360?(v+b+360)/2:(v+b-360)/2;let w=(i+l)/2,_=(m+y)/2,k=1-.17*Math.cos(tS(r-30))+.24*Math.cos(tS(2*r))+.32*Math.cos(tS(3*r+6))-.2*Math.cos(tS(4*r-63)),C=1+.015*(w-50)**2/Math.sqrt(20+(w-50)**2),M=1+.045*_,j=1+.015*_*k,S=-2*Math.sqrt(_**7/(_**7+6103515625))*Math.sin(tS(60*Math.exp(-(((r-275)/25)**2)))),A=Math.sqrt(((l-i)/(1*C))**2+(x/(1*M))**2+(O/(1*j))**2+S*(x/(1*M))*(O/(1*j)));return A},tF=t=>{let e=t/255;return e<=.03928?e/12.92:((e+.055)/1.055)**2.4},t$=t=>{let[e,n,r]=ts(t);return .2126*tF(e)+.7152*tF(n)+.0722*tF(r)},tW=(t,e)=>{let n=t$(t),r=t$(e);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},tH=(t,e,n={measure:"euclidean"})=>{let{measure:r="euclidean",backgroundColor:i=ti}=n,a=t_(t,i),o=t_(e,i);switch(r){case"CIEDE2000":return tz(a,o);case"euclidean":return tN(a,o,n.colorModel);case"contrastRatio":return tW(a,o);default:return tN(a,o)}},tG=[.8,1.2],tq={rouletteWheel:t=>{let e=t.reduce((t,e)=>t+e),n=0,r=tC(e),i=0;for(let e=0;e{let e=-1,n=0;for(let r=0;r<3;r+=1){let i=tM(t.length-1);t[i]>n&&(e=r,n=t[i])}return e}},tV=(t,e="tournament")=>tq[e](t),tY=(t,e)=>{let n=tj(t),r=tj(e);for(let i=1;i{let i=tj(t),a=e[tM(e.length-1)],o=tM(t[0].length-1),l=i[a][o]*tC(...tG),s=[15,240];"grayscale"!==n&&(s=tr[r][r.split("")[o]]);let[c,u]=s;return lu&&(l=u),i[a][o]=l,i},tQ=(t,e,n,r,i,a)=>{let o;o="grayscale"===n?t.map(([t])=>tf(t)):t.map(t=>tZ(tc(t,r),n));let l=1/0;for(let t=0;t{if(Math.round(tQ(t,e,n,i,a,o))>r)return t;let l=Array(t.length).fill(0).map((t,e)=>e).filter((t,n)=>!e[n]),s=Array(50).fill(0).map(()=>tU(t,l,n,i)),c=s.map(t=>tQ(t,e,n,i,a,o)),u=Math.max(...c),f=s[c.findIndex(t=>t===u)],d=1;for(;d<100&&Math.round(u)tC()?tY(e,r):[e,r];a=a.map(t=>.1>tC()?tU(t,l,n,i):t),t.push(...a)}c=(s=t).map(t=>tQ(t,e,n,i,a,o));let r=Math.max(...c);u=r,f=s[c.findIndex(t=>t===r)],d+=1}return f},tK={euclidean:30,CIEDE2000:20,contrastRatio:4.5},tJ={euclidean:291.48,CIEDE2000:100,contrastRatio:21},t0=(t,e={})=>{let{locked:n=[],simulationType:r="normal",threshold:i,colorModel:a="hsv",colorDifferenceMeasure:o="euclidean",backgroundColor:l=ti}=e,s=i;if(s||(s=tK[o]),"grayscale"===r){let e=tJ[o];s=Math.min(s,e/t.colors.length)}let c=tj(t);if("matrix"!==c.type&&"continuous-scale"!==c.type){if("grayscale"===r){let t=c.colors.map(t=>[tu(t)]),e=tX(t,n,r,s,a,o,l);c.colors.forEach((t,n)=>Object.assign(t,function(t,e){let n;let[,r,i]=ts(e,"lab"),[,,,a=1]=ts(e,"rgba"),o=100*t,l=Math.round(o),s=tu(tc([l,r,i],"lab")),c=25;for(;Math.round(o)!==Math.round(s/255*100)&&c>0;)o>s/255*100?l+=1:l-=1,c-=1,s=tu(tc([l,r,i],"lab"));if(Math.round(o)ts(t,a)),e=tX(t,n,r,s,a,o,l);c.colors.forEach((t,n)=>{Object.assign(t,tc(e[n],a))})}}return c},t1=[.3,.9],t2=[.5,1],t5=(t,e,n,r=[])=>{let[i]=ts(t,"hsv"),a=Array(n).fill(!1),o=-1===r.findIndex(e=>e&&e.model===t.model&&e.value===t.value),l=Array(n).fill(0).map((n,l)=>{let s=r[l];return s?(a[l]=!0,s):o?(o=!1,a[l]=!0,t):tc([tk(i,e*l),tC(...t1),tC(...t2)],"hsv")});return{newColors:l,locked:a}};function t3(){let t=tM(255),e=tM(255),n=tM(255);return tc([t,e,n],"rgb")}let t4=t=>{let{count:e,colors:n}=t,r=[],i={name:"random",semantic:null,type:"categorical",colors:Array(e).fill(0).map((t,e)=>{let i=n[e];return i?(r[e]=!0,i):t3()})};return t0(i,{locked:r})},t6=["monochromatic"],t8=(t,e)=>{let{count:n=8,tendency:r="tint"}=e,{colors:i=[],color:a}=e;return a||(a=i.find(t=>!!t&&!!t.model&&!!t.value)||t3()),t6.includes(t)&&(i=[]),{color:a,colors:i,count:n,tendency:r}},t7={monochromatic:tL,analogous:t=>{let{count:e,color:n,tendency:r}=t,[i,a,o]=ts(n,"hsv"),l=Math.floor(e/2),s=60/(e-1);i>=60&&i<=240&&(s=-s);let c=(a-.1)/3/(e-l-1),u=(o-.4)/3/l,f=Array(e).fill(0).map((t,e)=>{let n=tk(i,s*(e-l)),r=e<=l?Math.min(a+c*(l-e),1):a+3*c*(l-e),f=e<=l?o-3*u*(l-e):Math.min(o-u*(l-e),1);return tc([n,r,f],"hsv")}),d={name:"analogous",semantic:null,type:"discrete-scale",colors:"tint"===r?f:f.reverse()};return d},achromatic:t=>{let{tendency:e}=t,n={...t,color:"tint"===e?tB:tI},r=tL(n);return{...r,name:"achromatic"}},complementary:t=>{let e;let{count:n,color:r}=t,[i,a,o]=ts(r,"hsv"),l=tc([tk(i,180),a,o],"hsv"),s=tM(80,90),c=tM(15,25),u=Math.floor(n/2),f=tT(r,u,[c,s]),d=tT(l,u,[c,s]).reverse();if(n%2==1){let t=tc([(tk(i,180)+i)/2,tC(.05,.1),tC(.9,.95)],"hsv");e=[...f,t,...d]}else e=[...f,...d];let h={name:"complementary",semantic:null,type:"discrete-scale",colors:e};return h},"split-complementary":t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,180,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},triadic:t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,120,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},tetradic:t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,90,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},polychromatic:t=>{let{count:e,color:n,colors:r}=t,i=360/e,{newColors:a,locked:o}=t5(n,i,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:a},{locked:o})},customized:t4},t9=(t="monochromatic",e={})=>{let n=t8(t,e);try{return t7[t](n)}catch(t){return t4(n)}};function et(t,e,n){var r,i=O(e),a=n.primaryColor,o=i.encode;if(a&&o){var l=td(a);if(o.color){var s=o.color,c=s.type,u=s.field;return{scale:{color:{range:t9("quantitative"===c?G[Math.floor(Math.random()*G.length)]:q[Math.floor(Math.random()*q.length)],{color:l,count:null===(r=t.find(function(t){return t.name===u}))||void 0===r?void 0:r.count}).colors.map(function(t){return tn(t)})}}}}return"line"===e.type?{style:{stroke:tn(l)}}:{style:{fill:tn(l)}}}return{}}function ee(t,e,n,r,i){var a,o=O(e).encode;if(n&&o){var l=td(n);if(o.color){var s=o.color,c=s.type,u=s.field,f=r;return f||(f="quantitative"===c?"monochromatic":"polychromatic"),{scale:{color:{range:t9(f,{color:l,count:null===(a=t.find(function(t){return t.name===u}))||void 0===a?void 0:a.count}).colors.map(function(t){return tn(i?tZ(t,i):t)})}}}}return"line"===e.type?{style:{stroke:tn(l)}}:{style:{fill:tn(l)}}}return{}}n(16243);var en=n(8625);function er(t,e,n){try{i=e?new en.Z(t,{columns:e}):new en.Z(t)}catch(t){return console.error("failed to transform the input data into DataFrame: ",t),[]}var i,a=i.info();return n?a.map(function(t){var e=n.find(function(e){return e.name===t.name});return(0,r.pi)((0,r.pi)({},t),e)}):a}var ei=function(t){var e=t.data,n=t.fields;return n?e.map(function(t){return Object.keys(t).forEach(function(e){n.includes(e)||delete t[e]}),t}):e};function ea(t){var e=t.adviseParams,n=t.ckb,r=t.ruleBase,i=e.data,a=e.dataProps,o=e.smartColor,l=e.options,s=e.colorOptions,c=e.fields,u=l||{},f=u.refine,d=void 0!==f&&f,h=u.requireSpec,p=void 0===h||h,g=u.theme,m=s||{},y=m.themeColor,v=void 0===y?V:y,b=m.colorSchemeType,x=m.simulationType,O=j(i),w=er(O,c,a),_=ei({data:O,fields:c}),k=X({dataProps:w,ruleBase:r,chartWIKI:n});return{advices:k.map(function(t){var e=t.score,i=t.chartType,a=H({chartType:i,data:_,dataProps:w,chartKnowledge:n[i]});if(a&&d){var l=K(i,w,r,a);P(a,l)}if(a){if(g&&!o){var l=et(w,a,g);P(a,l)}else if(o){var l=ee(w,a,v,b,x);P(a,l)}}return{type:i,spec:a,score:e}}).filter(function(t){return!p||t.spec}),log:k}}var eo=function(t){var e,n=t.coordinate;if((null==n?void 0:n.type)==="theta")return(null==n?void 0:n.innerRadius)?"donut_chart":"pie_chart";var r=t.transform,i=null===(e=null==n?void 0:n.transform)||void 0===e?void 0:e.some(function(t){return"transpose"===t.type}),a=null==r?void 0:r.some(function(t){return"normalizeY"===t.type}),o=null==r?void 0:r.some(function(t){return"stackY"===t.type}),l=null==r?void 0:r.some(function(t){return"dodgeX"===t.type});return i?l?"grouped_bar_chart":a?"stacked_bar_chart":o?"percent_stacked_bar_chart":"bar_chart":l?"grouped_column_chart":a?"stacked_column_chart":o?"percent_stacked_column_chart":"column_chart"},el=function(t){var e=t.transform,n=null==e?void 0:e.some(function(t){return"stackY"===t.type}),r=null==e?void 0:e.some(function(t){return"normalizeY"===t.type});return n?r?"percent_stacked_area_chart":"stacked_area_chart":"area_chart"},es=function(t){var e=t.encode;return e.shape&&"hvh"===e.shape?"step_line_chart":"line_chart"},ec=function(t){var e;switch(t.type){case"area":e=el(t);break;case"interval":e=eo(t);break;case"line":e=es(t);break;case"point":e=t.encode.size?"bubble_chart":"scatter_plot";break;case"rect":e="histogram";break;case"cell":e="heatmap";break;default:e=""}return e};function eu(t,e,n,i,a,o,l){Object.values(t).filter(function(t){var i,a,l=t.option||{},s=l.weight,c=l.extra;return i=t.type,("DESIGN"===e?"DESIGN"===i:"DESIGN"!==i)&&!(null===(a=t.option)||void 0===a?void 0:a.off)&&t.trigger((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},n),{weight:s}),c),{chartWIKI:o}))}).forEach(function(t){var s,c=t.type,u=t.id,f=t.docs;if("DESIGN"===e){var d=t.optimizer(n.dataProps,l);s=0===Object.keys(d).length?1:0,a.push({type:c,id:u,score:s,fix:d,docs:f})}else{var h=t.option||{},p=h.weight,g=h.extra;s=t.validator((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},n),{weight:p}),g),{chartWIKI:o})),a.push({type:c,id:u,score:s,docs:f})}i.push({phase:"LINT",ruleId:u,score:s,base:s,weight:1,ruleType:c})})}function ef(t,e,n){var r=t.spec,i=t.options,a=t.dataProps,o=null==i?void 0:i.purpose,l=null==i?void 0:i.preferences,s=ec(r),c=[],u=[];if(!r||!s)return{lints:c,log:u};if(!a||!a.length)try{a=new en.Z(r.data).info()}catch(t){return console.error("error: ",t),{lints:c,log:u}}var f={dataProps:a,chartType:s,purpose:o,preferences:l};return eu(e,"notDESIGN",f,u,c,n),eu(e,"DESIGN",f,u,c,n,r),{lints:c=c.filter(function(t){return t.score<1}),log:u}}var ed=n(89991),eh=function(){function t(t,e){var n,r,i,a=this;this.plugins=[],this.name=t,this.afterPluginsExecute=null!==(n=null==e?void 0:e.afterPluginsExecute)&&void 0!==n?n:this.defaultAfterPluginsExecute,this.pluginManager=new ed.AsyncParallelHook(["data","results"]),this.syncPluginManager=new ed.SyncHook(["data","results"]),this.context=null==e?void 0:e.context,this.hasAsyncPlugin=!!(null===(r=null==e?void 0:e.plugins)||void 0===r?void 0:r.find(function(t){return a.isPluginAsync(t)})),null===(i=null==e?void 0:e.plugins)||void 0===i||i.forEach(function(t){a.registerPlugin(t)})}return t.prototype.defaultAfterPluginsExecute=function(t){return(0,y.last)(Object.values(t))},t.prototype.isPluginAsync=function(t){return"AsyncFunction"===t.execute.constructor.name},t.prototype.registerPlugin=function(t){var e,n=this;null===(e=t.onLoad)||void 0===e||e.call(t,this.context),this.plugins.push(t),this.isPluginAsync(t)&&(this.hasAsyncPlugin=!0),this.hasAsyncPlugin?this.pluginManager.tapPromise(t.name,function(e,i){return void 0===i&&(i={}),(0,r.mG)(n,void 0,void 0,function(){var n,a,o;return(0,r.Jh)(this,function(r){switch(r.label){case 0:return null===(a=t.onBeforeExecute)||void 0===a||a.call(t,e,this.context),[4,t.execute(e,this.context)];case 1:return n=r.sent(),null===(o=t.onAfterExecute)||void 0===o||o.call(t,n,this.context),i[t.name]=n,[2]}})})}):this.syncPluginManager.tap(t.name,function(e,r){void 0===r&&(r={}),null===(i=t.onBeforeExecute)||void 0===i||i.call(t,e,n.context);var i,a,o=t.execute(e,n.context);return null===(a=t.onAfterExecute)||void 0===a||a.call(t,o,n.context),r[t.name]=o,o})},t.prototype.unloadPlugin=function(t){var e,n=this.plugins.find(function(e){return e.name===t});n&&(null===(e=n.onUnload)||void 0===e||e.call(n,this.context),this.plugins=this.plugins.filter(function(e){return e.name!==t}))},t.prototype.execute=function(t){var e,n=this;if(this.hasAsyncPlugin){var i={};return this.pluginManager.promise(t,i).then(function(){return(0,r.mG)(n,void 0,void 0,function(){var t;return(0,r.Jh)(this,function(e){return[2,null===(t=this.afterPluginsExecute)||void 0===t?void 0:t.call(this,i)]})})})}var a={};return this.syncPluginManager.call(t,a),null===(e=this.afterPluginsExecute)||void 0===e?void 0:e.call(this,a)},t}(),ep=function(){function t(t){var e=t.components,n=this;this.components=e,this.componentsManager=new ed.AsyncSeriesWaterfallHook(["initialParams"]),e.forEach(function(t){t&&n.componentsManager.tapPromise(t.name,function(e){return(0,r.mG)(n,void 0,void 0,function(){var n,i;return(0,r.Jh)(this,function(a){switch(a.label){case 0:return n=e,[4,t.execute(n||{})];case 1:return i=a.sent(),[2,(0,r.pi)((0,r.pi)({},n),i)]}})})})})}return t.prototype.execute=function(t){return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){switch(e.label){case 0:return[4,this.componentsManager.promise(t)];case 1:return[2,e.sent()]}})})},t}(),eg={name:"defaultDataProcessor",stage:["dataAnalyze"],execute:function(t,e){var n=t.data,r=t.customDataProps,i=((null==e?void 0:e.options)||{}).fields,a=(0,y.cloneDeep)(n),o=er(a,i,r);return{data:ei({data:a,fields:i}),dataProps:o}}},em={name:"defaultChartTypeRecommend",stage:["chartTypeRecommend"],execute:function(t,e){var n=t.dataProps,r=e||{},i=r.advisor,a=r.options;return{chartTypeRecommendations:X({dataProps:n,chartWIKI:i.ckb,ruleBase:i.ruleBase,options:a})}}},ey={name:"defaultSpecGenerator",stage:["specGenerate"],execute:function(t,e){var n=t.chartTypeRecommendations,r=t.dataProps,i=t.data,a=e||{},o=a.options,l=a.advisor,s=o||{},c=s.refine,u=void 0!==c&&c,f=s.theme,d=s.colorOptions,h=s.smartColor,p=d||{},g=p.themeColor,m=void 0===g?V:g,y=p.colorSchemeType,v=p.simulationType;return{advices:null==n?void 0:n.map(function(t){var e=t.chartType,n=H({chartType:e,data:i,dataProps:r,chartKnowledge:l.ckb[e]});if(n&&u){var a=K(e,r,l.ruleBase,n);P(n,a)}if(n){if(f&&!h){var a=et(r,n,f);P(n,a)}else if(h){var a=ee(r,n,m,y,v);P(n,a)}}return{type:t.chartType,spec:n,score:t.score}}).filter(function(t){return t.spec})}}},ev=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.ckb=(n=t.ckbCfg,a=JSON.parse(JSON.stringify(i)),n?(o=n.exclude,l=n.include,s=n.custom,o&&o.forEach(function(t){Object.keys(a).includes(t)&&delete a[t]}),l&&Object.keys(a).forEach(function(t){l.includes(t)||delete a[t]}),(0,r.pi)((0,r.pi)({},a),s)):a),this.ruleBase=M(t.ruleCfg),this.context={advisor:this},this.initDefaultComponents();var n,a,o,l,s,c=[this.dataAnalyzer,this.chartTypeRecommender,this.chartEncoder,this.specGenerator],u=e.plugins,f=e.components;this.plugins=u,this.pipeline=new ep({components:null!=f?f:c})}return t.prototype.initDefaultComponents=function(){this.dataAnalyzer=new eh("data",{plugins:[eg],context:this.context}),this.chartTypeRecommender=new eh("chartType",{plugins:[em],context:this.context}),this.specGenerator=new eh("specGenerate",{plugins:[ey],context:this.context})},t.prototype.advise=function(t){return ea({adviseParams:t,ckb:this.ckb,ruleBase:this.ruleBase}).advices},t.prototype.adviseAsync=function(t){return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){switch(e.label){case 0:return this.context=(0,r.pi)((0,r.pi)({},this.context),{data:t.data,options:t.options}),[4,this.pipeline.execute(t)];case 1:return[2,e.sent().advices]}})})},t.prototype.adviseWithLog=function(t){return ea({adviseParams:t,ckb:this.ckb,ruleBase:this.ruleBase})},t.prototype.lint=function(t){return ef(t,this.ruleBase,this.ckb).lints},t.prototype.lintWithLog=function(t){return ef(t,this.ruleBase,this.ckb)},t.prototype.registerPlugins=function(t){var e={dataAnalyze:this.dataAnalyzer,chartTypeRecommend:this.chartTypeRecommender,encode:this.chartEncoder,specGenerate:this.specGenerator};t.forEach(function(t){"string"==typeof t.stage&&e[t.stage].registerPlugin(t)})},t}()},8625:function(t,e,n){"use strict";n.d(e,{Z:function(){return O}});var r=n(97582),i=n(66465),a=n(61839),o=n(7813),l=function(t){var e,n,i=(void 0===(e=t)&&(e=!0),["".concat(o.oP),"".concat(o.oP).concat(o.cF).concat(e?"":"?","W").concat(o.ps,"(").concat(o.cF).concat(e?"":"?").concat(o.NO,")?"),"".concat(o.vc).concat(o.cF).concat(e?"":"?").concat(o.x4).concat(o.cF).concat(e?"":"?").concat(o.oP),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.vc).concat(o.cF).concat(e?"":"?").concat(o.x4),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.vc),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.IY)]),a=(void 0===(n=t)&&(n=!0),["".concat(o.kr,":").concat(n?"":"?").concat(o.EB,":").concat(n?"":"?").concat(o.sh,"([.,]").concat(o.KP,")?").concat(o.ew,"?"),"".concat(o.kr,":").concat(n?"":"?").concat(o.EB,"?").concat(o.ew)]),l=(0,r.ev)((0,r.ev)([],(0,r.CR)(i),!1),(0,r.CR)(a),!1);return i.forEach(function(t){a.forEach(function(e){l.push("".concat(t,"[T\\s]").concat(e))})}),l.map(function(t){return new RegExp("^".concat(t,"$"))})};function s(t,e){if((0,a.HD)(t)){for(var n=l(e),r=0;r0&&(m.generateColumns([0],null==n?void 0:n.columns),m.colData=[m.data],m.data=m.data.map(function(t){return[t]})),(0,a.kJ)(b)){var x=(0,c.w6)(b.length);m.generateDataAndColDataFromArray(!1,e,x,null==n?void 0:n.fillValue,null==n?void 0:n.columnTypes),m.generateColumns(x,null==n?void 0:n.columns)}if((0,a.Kn)(b)){for(var O=[],y=0;y=0&&b>=0||O.length>0,"The rowLoc is not found in the indexes."),v>=0&&b>=0&&(E=this.data.slice(v,b),P=this.indexes.slice(v,b)),O.length>0)for(var s=0;s=0&&_>=0){for(var s=0;s0){for(var R=[],Z=E.slice(),s=0;s=0&&y>=0||v.length>0,"The colLoc is illegal"),(0,a.U)(n)&&(0,c.w6)(this.columns.length).includes(n)&&(b=n,O=n+1),(0,a.kJ)(n))for(var s=0;s=0&&y>=0||v.length>0,"The rowLoc is not found in the indexes.");var S=[],A=[];if(m>=0&&y>=0)S=this.data.slice(m,y),A=this.indexes.slice(m,y);else if(v.length>0)for(var s=0;s=0&&O>=0||w.length>0,"The colLoc is not found in the columns index."),b>=0&&O>=0){for(var s=0;s0){for(var E=[],P=S.slice(),s=0;s1){var _={},k=y;b.forEach(function(e){"date"===e?(_.date=t(k.filter(function(t){return s(t)}),n),k=k.filter(function(t){return!s(t)})):"integer"===e?(_.integer=t(k.filter(function(t){return(0,a.Cf)(t)&&!s(t)}),n),k=k.filter(function(t){return!(0,a.Cf)(t)})):"float"===e?(_.float=t(k.filter(function(t){return(0,a.vn)(t)&&!s(t)}),n),k=k.filter(function(t){return!(0,a.vn)(t)})):"string"===e&&(_.string=t(k.filter(function(t){return"string"===f(t,n)})),k=k.filter(function(t){return"string"!==f(t,n)}))}),w.meta=_}2===w.distinct&&"date"!==w.recommendation&&(g.length>=100?w.recommendation="boolean":(0,a.jn)(O,!0)&&(w.recommendation="boolean")),"string"===p&&Object.assign(w,(o=(r=y.map(function(t){return"".concat(t)})).map(function(t){return t.length}),{maxLength:(0,i.Fp)(o),minLength:(0,i.VV)(o),meanLength:(0,i.J6)(o),containsChar:r.some(function(t){return/[A-z]/.test(t)}),containsDigit:r.some(function(t){return/[0-9]/.test(t)}),containsSpace:r.some(function(t){return/\s/.test(t)})})),("integer"===p||"float"===p)&&Object.assign(w,(l=y.map(function(t){return 1*t}),{minimum:(0,i.VV)(l),maximum:(0,i.Fp)(l),mean:(0,i.J6)(l),percentile5:(0,i.VR)(l,5),percentile25:(0,i.VR)(l,25),percentile50:(0,i.VR)(l,50),percentile75:(0,i.VR)(l,75),percentile95:(0,i.VR)(l,95),sum:(0,i.Sm)(l),variance:(0,i.CA)(l),standardDeviation:(0,i.IN)(l),zeros:l.filter(function(t){return 0===t}).length})),"date"===p&&Object.assign(w,(d="integer"===w.type,h=y.map(function(t){if(d){var e="".concat(t);if(8===e.length)return new Date("".concat(e.substring(0,4),"/").concat(e.substring(4,2),"/").concat(e.substring(6,2))).getTime()}return new Date(t).getTime()}),{minimum:y[(0,i._D)(h)],maximum:y[(0,i.F_)(h)]}));var C=[];return"boolean"!==w.recommendation&&("string"!==w.recommendation||u(w))||C.push("Nominal"),u(w)&&C.push("Ordinal"),("integer"===w.recommendation||"float"===w.recommendation)&&C.push("Interval"),"integer"===w.recommendation&&C.push("Discrete"),"float"===w.recommendation&&C.push("Continuous"),"date"===w.recommendation&&C.push("Time"),w.levelOfMeasurements=C,w}(this.colData[n],this.extra.strictDatePattern)),{name:String(o)}))}return e},e.prototype.toString=function(){for(var t=this,e=Array(this.columns.length+1).fill(0),n=0;ne[0]&&(e[0]=r)}for(var n=0;ne[n+1]&&(e[n+1]=r)}for(var n=0;ne[n+1]&&(e[n+1]=r)}return"".concat(g(e[0])).concat(this.columns.map(function(n,r){return"".concat(n).concat(r!==t.columns.length?g(e[r+1]-y(n)+2):"")}).join(""),"\n").concat(this.indexes.map(function(n,r){var i;return"".concat(n).concat(g(e[0]-y(n))).concat(null===(i=t.data[r])||void 0===i?void 0:i.map(function(n,r){return"".concat(m(n)).concat(r!==t.columns.length?g(e[r+1]-y(n)):"")}).join("")).concat(r!==t.indexes.length?"\n":"")}).join(""))},e}(b)},66465:function(t,e,n){"use strict";n.d(e,{Fp:function(){return u},F_:function(){return f},J6:function(){return h},VV:function(){return s},_D:function(){return c},Vs:function(){return y},VR:function(){return p},IN:function(){return m},Sm:function(){return d},Gn:function(){return v},CA:function(){return g}});var r=n(97582),i=n(84813),a=new WeakMap;function o(t,e,n){return a.get(t)||a.set(t,new Map),a.get(t).set(e,n),n}function l(t,e){var n=a.get(t);if(n)return n.get(e)}function s(t){var e=l(t,"min");return void 0!==e?e:o(t,"min",Math.min.apply(Math,(0,r.ev)([],(0,r.CR)(t),!1)))}function c(t){var e=l(t,"minIndex");return void 0!==e?e:o(t,"minIndex",function(t){for(var e=t[0],n=0,r=0;re&&(n=r,e=t[r]);return n}(t))}function d(t){var e=l(t,"sum");return void 0!==e?e:o(t,"sum",t.reduce(function(t,e){return e+t},0))}function h(t){return d(t)/t.length}function p(t,e,n){return void 0===n&&(n=!1),(0,i.hu)(e>0&&e<100,"The percent cannot be between (0, 100)."),(n?t:t.sort(function(t,e){return t>e?1:-1}))[Math.ceil(t.length*e/100)-1]}function g(t){var e=h(t),n=l(t,"variance");return void 0!==n?n:o(t,"variance",t.reduce(function(t,n){return t+Math.pow(n-e,2)},0)/t.length)}function m(t){return Math.sqrt(g(t))}function y(t,e){return(0,i.hu)(t.length===e.length,"The x and y must has same length."),(h(t.map(function(t,n){return t*e[n]}))-h(t)*h(e))/(m(t)*m(e))}function v(t){var e={};return t.forEach(function(t){var n="".concat(t);e[n]?e[n]+=1:e[n]=1}),e}},84813:function(t,e,n){"use strict";n.d(e,{Js:function(){return s},Tw:function(){return a},hu:function(){return l},w6:function(){return o}});var r=n(97582),i=n(61839);function a(t){return Array.from(new Set(t))}function o(t){return(0,r.ev)([],(0,r.CR)(Array(t).keys()),!1)}function l(t,e){if(!t)throw Error(e)}function s(t,e){if(!(0,i.kJ)(t)||0===t.length||!(0,i.kJ)(e)||0===e.length||t.length!==e.length)return!1;for(var n={},r=0;r(18|19|20)\\d{2})",o="(?0?[1-9]|1[012])",l="(?0?[1-9]|[12]\\d|3[01])",s="(?[0-4]\\d|5[0-2])",c="(?[1-7])",u="(0?\\d|[012345]\\d)",f="(?".concat(u,")"),d="(?".concat(u,")"),h="(?".concat(u,")"),p="(?\\d{1,4})",g="(?(([0-2]\\d|3[0-5])\\d)|36[0-6])",m="(?Z|[+-]".concat("(0?\\d|1\\d|2[0-4])","(:").concat(u,")?)")},61839:function(t,e,n){"use strict";n.d(e,{Cf:function(){return c},HD:function(){return a},J_:function(){return f},Kn:function(){return h},M1:function(){return g},U:function(){return s},hj:function(){return o},i1:function(){return l},jn:function(){return d},kJ:function(){return p},kK:function(){return i},vn:function(){return u}});var r=n(7813);function i(t){return null==t||""===t||Number.isNaN(t)||"null"===t}function a(t){return"string"==typeof t}function o(t){return"number"==typeof t}function l(t){if(a(t)){var e=!1,n=t;/^[+-]/.test(n)&&(n=n.slice(1));for(var r=0;r=t.length?void 0:t)&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0n=>t(e(n)),t)}function k(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}Z=new p(3),p!=Float32Array&&(Z[0]=0,Z[1]=0,Z[2]=0),Z=new p(4),p!=Float32Array&&(Z[0]=0,Z[1]=0,Z[2]=0,Z[3]=0);let C=Math.sqrt(50),M=Math.sqrt(10),j=Math.sqrt(2);function S(t,e,n){return t=Math.floor(Math.log(e=(e-t)/Math.max(0,n))/Math.LN10),n=e/10**t,0<=t?(n>=C?10:n>=M?5:n>=j?2:1)*10**t:-(10**-t)/(n>=C?10:n>=M?5:n>=j?2:1)}let A=(t,e,n=5)=>{let r=0,i=(t=[t,e]).length-1,a=t[r],o=t[i],l;return o{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){var e=this.options.interpolator;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){var{domain:r,interpolator:i,round:a}=this.getOptions(),r=e(r.map(t)),a=a?t=>l(t=i(t),"Number")?Math.round(t):t:i;this.output=_(a,r,n,t)},n.prototype.invert=void 0}}var R,Z={exports:{}},T={exports:{}},L=Array.prototype.concat,B=Array.prototype.slice,I=T.exports=function(t){for(var e=[],n=0,r=t.length;nn=>t*(1-n)+e*n,U=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Y(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{let n=V(t),r=V(e);return null===n||null===r?n?()=>t:()=>e:t=>{var e=[,,,,];for(let o=0;o<4;o+=1){var i=n[o],a=r[o];e[o]=i*(1-t)+a*t}var[o,l,s,c]=e;return`rgba(${Math.round(o)}, ${Math.round(l)}, ${Math.round(s)}, ${c})`}}},Q=(t,e)=>{let n=Y(t,e);return t=>Math.round(n(t))};function X({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function K(t){return"object"==typeof t?t.valueOf():t}class J extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=K,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(X({map:this.map,initKey:this.initKey},t))}has(t){return super.has(X({map:this.map,initKey:this.initKey},t))}set(t,e){var n,r;return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e)}delete(t){var e,n;return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n))}}class tt{constructor(t){this.options=f({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=f({},this.options,t),this.rescale(t)}rescale(t){}}let te=Symbol("defaultUnknown");function tn(t,e,n){for(let r=0;r""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class ta extends tt{getDefaultOptions(){return{domain:[],range:[],unknown:te}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&tn(this.domainIndexMap,this.getDomain(),this.domainKey),tr({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&tn(this.rangeIndexMap,this.getRange(),this.rangeKey),tr({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=ti(e),this.rangeKey=ti(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new ta(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}class to extends ta{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:te,flex:[]}}constructor(t){super(t)}clone(){return new to(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0t/e)}(c),p=f/h.reduce((t,e)=>t+e);var c=new J(e.map((t,e)=>(e=h[e]*p,[t,o?Math.floor(e):e]))),g=new J(e.map((t,e)=>(e=h[e]*p+d,[t,o?Math.floor(e):e]))),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/s*i))*l;let m=o?Math.round(t):t;var y=Array(s);for(let t=0;ts+e*o),{valueStep:o,valueBandWidth:l,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}let tl=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0{let r;var[t,i]=t,[e,a]=e;return _(t{let r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r);var o=t[0]>t[r],l=o?[...t].reverse():t,s=o?[...e].reverse():e;for(let t=0;t{var n=function(t,e,n,r,i){let a=1,o=r||t.length;for(var l=t=>t;ae?o=s:a=s+1}return a}(t,e,0,r)-1,o=i[n];return _(a[n],o)(e)}},tu=(t,e,n,r)=>(2Math.min(Math.max(r,t),i)}return d}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=tu(n.map(t),r,a,i);this.output=_(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=tu(i,r.map(t),Y);this.input=_(e,n,i)}}class td extends tf{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:U,tickMethod:tl,tickCount:5}}chooseTransforms(){return[d,d]}clone(){return new td(this.options)}}class th extends to{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:te,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new th(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function tp(t,e){for(var n=[],r=0,i=t.length;r{var[t,e]=t;return _(Y(0,1),k(t,e))})],ty);let tv=a=class extends td{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:d,tickMethod:tl,tickCount:5}}constructor(t){super(t)}clone(){return new a(this.options)}};function tb(t,e,r,i,a){var o=new td({range:[e,e+i]}),l=new td({range:[r,r+a]});return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.map(e),l.map(t)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.invert(e),l.invert(t)]}}}function tx(t,e,r,i,a){return(0,n(t,1)[0])(e,r,i,a)}function tO(t,e,r,i,a){return n(t,1)[0]}function tw(t,e,r,i,a){var o=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],c=new td({range:[s,t]}),u=new td({range:[o,l]}),f=1<(s=a/i)?1:s,d=1{let[e,n,r]=t,i=_(Y(0,.5),k(e,n)),a=_(Y(.5,1),k(n,r));return t=>(e>r?te=>-t(-e),o=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?a(r):r},l=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?a(n):n};var s=n(7847);let c=(t,e,n,r=10)=>{let i=t<0,a=l(r,i),c=o(r,i),u=e=1;e-=1){let n=t*e;if(n>d)break;n>=f&&g.push(n)}}else for(;h<=p;h+=1){let t=a(h);for(let e=1;ed)break;n>=f&&g.push(n)}}2*g.length{let i=t<0,a=o(r,i),s=l(r,i),c=t>e,u=[s(Math.floor(a(c?e:t))),s(Math.ceil(a(c?t:e)))];return c?u.reverse():u};class f extends r.V{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:i.wp,tickMethod:c,tickCount:5}}chooseNice(){return u}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[o(t,n),l(t,n)]}clone(){return new f(this.options)}}},64117:function(t,e,n){"use strict";n.d(e,{E:function(){return a}});var r=n(88944),i=n(8064);class a extends r.t{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:i.z,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new a(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}},23331:function(t,e,n){"use strict";n.d(e,{p:function(){return u}});var r=n(67128),i=n(63025),a=n(25338),o=n(7847);let l=t=>e=>e<0?-((-e)**t):e**t,s=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),c=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class u extends i.V{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:a.wp,tickMethod:o.Z,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;if(1===t)return[r.Z,r.Z];let e=.5===t?c:l(t),n=s(t);return[e,n]}clone(){return new u(this.options)}}},15203:function(t,e,n){"use strict";n.d(e,{c:function(){return a}});var r=n(90314),i=n(88073);class a extends r.M{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:i.GX}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){n||t.sort((t,e)=>t-e);let r=[];for(let n=1;ne=>{let n=t(e);return(0,u.Z)(n)?Math.round(n):n};var d=n(36380);let h=i=class extends d.b{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:a.Z,tickMethod:o.Z,tickCount:5}}constructor(t){super(t)}clone(){return new i(this.options)}};h=i=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}([(r=t=>{let[e,n]=t,r=(0,l.q)((0,s.fv)(0,1),(0,c.I)(e,n));return r},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=[t(0),t(1)]},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:i,round:a}=this.getOptions(),o=r(n.map(t)),s=a?f(i):i;this.output=(0,l.q)(s,o,e,t)},t.prototype.invert=void 0})],h)},69437:function(t,e,n){"use strict";n.d(e,{F:function(){return o}});var r=n(25338),i=n(23331),a=n(7847);class o extends i.p{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:r.wp,tickMethod:a.Z,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new o(this.options)}}},90314:function(t,e,n){"use strict";n.d(e,{M:function(){return o}});var r=n(74271),i=n(13393),a=n(33338);class o extends r.X{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!(0,i.J)(t))return this.options.unknown;let e=(0,a.b)(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new o(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}},27527:function(t,e,n){"use strict";n.d(e,{q:function(){return Y}});var r=n(67128),i=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,a=/\[([^]*?)\]/gm;function o(t,e){for(var n=[],r=0,i=t.length;r-1?r:null}};function s(t){for(var e=[],n=1;n3?0:(t-t%10!=10?1:0)*t%10]}}),h=function(t,e){for(void 0===e&&(e=2),t=String(t);t.lengtht.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+h(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+h(Math.floor(Math.abs(e)/60),2)+":"+h(Math.abs(e)%60,2)}};l("monthNamesShort"),l("monthNames");var g={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},m=function(t,e,n){if(void 0===e&&(e=g.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=g[e]||e;var r=[];e=e.replace(a,function(t,e){return r.push(e),"@@@"});var o=s(s({},d),n);return(e=e.replace(i,function(e){return p[e](t,o)})).replace(/@@@/g,function(){return r.shift()})},y=n(63025);let v=864e5,b=7*v,x=30*v,O=365*v;function w(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,a=e;for(;a&&!i(t);)n(t,-1),a-=1;return t},a=(t,n)=>{n&&i(t,n),e(t)},o=(t,e)=>{let r=new Date(+t-1);return a(r,e),n(r,e),a(r),r};return{ceil:o,floor:(t,e)=>{let n=new Date(+t);return a(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),c=i?o(t,r):o(t);for(;ct,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),k=w(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),C=w(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),M=w(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),j=w(v,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v*e)},t=>t.getDate()-1),S=w(x,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),A=w(b,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=S.floor(t),n=new Date(+t);return Math.floor((+n-+e)/b)}),E=w(O,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),P={millisecond:_,second:k,minute:C,hour:M,day:j,week:A,month:S,year:E},R=w(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Z=w(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),T=w(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),L=w(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),B=w(v,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v*e)},t=>t.getUTCDate()-1),I=w(x,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),N=w(b,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+b*e)},t=>{let e=I.floor(t),n=new Date(+t);return Math.floor((+n-+e)/b)}),D=w(O,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),z={millisecond:R,second:Z,minute:T,hour:L,day:B,week:N,month:I,year:D};var F=n(33338),$=n(72478);function W(t,e,n,r,i){let a;let o=+t,l=+e,{tickIntervals:s,year:c,millisecond:u}=function(t){let{year:e,month:n,week:r,day:i,hour:a,minute:o,second:l,millisecond:s}=t?z:P;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[o,1],[o,5],[o,15],[o,30],[a,1],[a,3],[a,6],[a,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,d=r?(l-o)/r:n||5,h=r||(l-o)/d,p=s.length,g=(0,F.b)(s,h,0,p,f);if(g===p){let t=(0,$.l)(o/c.duration,l/c.duration,d);a=[c,t]}else if(g){let t=h/f(s[g-1]){let a=t>e,o=a?e:t,l=a?t:e,[s,c]=W(o,l,n,r,i),u=s.range(o,new Date(+l+1),c,!0);return a?u.reverse():u};var G=n(25338);let q=(t,e,n,r,i)=>{let a=t>e,o=a?e:t,l=a?t:e,[s,c]=W(o,l,n,r,i),u=[s.floor(o,c),s.ceil(l,c)];return a?u.reverse():u};function V(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Y extends y.V{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:H,interpolate:G.fv,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return q}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options,i=t[0],a=t[t.length-1];return[i,a,e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?z:P,i=e?V:r.Z;return e=>m(i(e),t||function(t,e){let{second:n,minute:r,hour:i,day:a,week:o,month:l,year:s}=e;return n.floor(t)Math.abs(t)?t:parseFloat(t.toFixed(14))}let l=[1,5,2,2.5,4,3],s=100*Number.EPSILON,c=(t,e,n=5,i=!0,c=l,u=[.25,.2,.5,.05])=>{let f=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!f)return[];if(e-t<1e-15||1===f)return[t];let d={score:-2,lmin:0,lmax:0,lstep:0},h=1;for(;h<1/0;){for(let n=0;n=f?2-(p-1)/(f-1):1;if(u[0]*l+u[1]+u[2]*n+u[3]r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,p*(g-1));if(u[0]*l+u[1]*m+u[2]*n+u[3]=0&&(f=1),1-u/(c-1)-n+f}(o,c,h,m,y,p),x=1-.5*((e-y)**2+(t-m)**2)/(.1*(e-t))**2,O=function(t,e,n,r,i,a){let o=(t-1)/(a-i),l=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/l,l/o)}(g,f,t,e,m,y),w=u[0]*b+u[1]*x+u[2]*O+1*u[3];w>d.score&&(!i||m<=t&&y>=e)&&(d.lmin=m,d.lmax=y,d.lstep=p,d.score=w)}}y+=1}g+=1}}h+=1}let g=o(d.lmax),m=o(d.lmin),y=o(d.lstep),v=Math.floor(Math.round(1e12*((g-m)/y))/1e12)+1,b=Array(v);b[0]=o(m);for(let t=1;t0?g[O]+" "+w:l(w,/&\f/g,g[O])).trim())&&(f[x++]=_);return b(t,e,n,0===a?E:c,f,d,h)}function B(t,e,n,r){return b(t,e,n,P,u(t,0,r),u(t,r+1,-1),r)}var I=function(t,e,n){for(var r=0,i=0;r=i,i=w(),38===r&&12===i&&(e[n]=1),!_(i);)O();return u(v,t,m)},N=function(t,e){var n=-1,r=44;do switch(_(r)){case 0:38===r&&12===w()&&(e[n]=1),t[n]+=I(m-1,e,n);break;case 2:t[n]+=C(r);break;case 4:if(44===r){t[++n]=58===w()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=a(r)}while(r=O());return t},D=function(t,e){var n;return n=N(k(t),e),v="",n},z=new WeakMap,F=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||z.get(n))&&!r){z.set(t,!0);for(var i=[],a=D(e,i),o=n.props,l=0,s=0;l-1&&!t.return)switch(t.type){case P:t.return=function t(e,n){switch(45^c(e,0)?(((n<<2^c(e,0))<<2^c(e,1))<<2^c(e,2))<<2^c(e,3):0){case 5103:return S+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return S+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return S+e+j+e+M+e+e;case 6828:case 4268:return S+e+M+e+e;case 6165:return S+e+M+"flex-"+e+e;case 5187:return S+e+l(e,/(\w+).+(:[^]+)/,S+"box-$1$2"+M+"flex-$1$2")+e;case 5443:return S+e+M+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return S+e+M+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return S+e+M+l(e,"shrink","negative")+e;case 5292:return S+e+M+l(e,"basis","preferred-size")+e;case 6060:return S+"box-"+l(e,"-grow","")+S+e+M+l(e,"grow","positive")+e;case 4554:return S+l(e,/([^-])(transform)/g,"$1"+S+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,S+"$1"),/(image-set)/,S+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,S+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,S+"box-pack:$3"+M+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+S+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,S+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(e)-1-n>6)switch(c(e,n+1)){case 109:if(45!==c(e,n+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+S+"$2-$3$1"+j+(108==c(e,n+3)?"$3":"$2-$3"))+e;case 115:return~s(e,"stretch")?t(l(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(115!==c(e,n+1))break;case 6444:switch(c(e,f(e)-3-(~s(e,"!important")&&10))){case 107:return l(e,":",":"+S)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+S+(45===c(e,14)?"inline-":"")+"box$3$1"+S+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(c(e,n+11)){case 114:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return S+e+M+e+e}return e}(t.value,t.length);break;case R:return Z([x(t,{value:l(t.value,"@","@"+S)})],r);case E:if(t.length)return t.props.map(function(e){var n;switch(n=e,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return Z([x(t,{props:[l(e,/:(read-\w+)/,":"+j+"$1")]})],r);case"::placeholder":return Z([x(t,{props:[l(e,/:(plac\w+)/,":"+S+"input-$1")]}),x(t,{props:[l(e,/:(plac\w+)/,":"+j+"$1")]}),x(t,{props:[l(e,/:(plac\w+)/,M+"input-$1")]})],r)}return""}).join("")}}],H=function(t){var e,n,i,o,g,x=t.key;if("css"===x){var M=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(M,function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))})}var j=t.stylisPlugins||W,S={},E=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+x+' "]'),function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n2||_(y)>3?"":" "}(T);break;case 92:G+=function(t,e){for(var n;--e&&O()&&!(y<48)&&!(y>102)&&(!(y>57)||!(y<65))&&(!(y>70)||!(y<97)););return n=m+(e<6&&32==w()&&32==O()),u(v,t,n)}(m-1,7);continue;case 47:switch(w()){case 42:case 47:d(b(j=function(t,e){for(;O();)if(t+y===57)break;else if(t+y===84&&47===w())break;return"/*"+u(v,e,m-1)+"*"+a(47===t?t:O())}(O(),m),n,r,A,a(y),u(j,2,-2),0),M);break;default:G+="/"}break;case 123*I:k[S++]=f(G)*D;case 125*I:case 59:case 0:switch(z){case 0:case 125:N=0;case 59+E:-1==D&&(G=l(G,/\f/g,"")),Z>0&&f(G)-P&&d(Z>32?B(G+";",i,r,P-1):B(l(G," ","")+";",i,r,P-2),M);break;case 59:G+=";";default:if(d(H=L(G,n,r,S,E,o,k,F,$=[],W=[],P),g),123===z){if(0===E)t(G,n,H,H,$,g,P,k,W);else switch(99===R&&110===c(G,3)?100:R){case 100:case 108:case 109:case 115:t(e,H,H,i&&d(L(e,H,H,0,0,o,k,F,o,$=[],P),W),o,W,P,k,i?$:W);break;default:t(G,H,H,H,[""],W,0,k,W)}}}S=E=Z=0,I=D=1,F=G="",P=x;break;case 58:P=1+f(G),Z=T;default:if(I<1){if(123==z)--I;else if(125==z&&0==I++&&125==(y=m>0?c(v,--m):0,p--,10===y&&(p=1,h--),y))continue}switch(G+=a(z),z*I){case 38:D=E>0?1:(G+="\f",-1);break;case 44:k[S++]=(f(G)-1)*D,D=1;break;case 64:45===w()&&(G+=C(O())),R=w(),E=P=f(F=G+=function(t){for(;!_(w());)O();return u(v,t,m)}(m)),z++;break;case 45:45===T&&2==f(G)&&(I=0)}}return g}("",null,null,null,[""],e=k(e=t),0,[0],e),v="",n),P)},I={key:x,sheet:new r({key:x,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:S,registered:{},insert:function(t,e,n,r){g=n,R(t?t+"{"+e.styles+"}":e.styles),r&&(I.inserted[e.name]=!0)}};return I.sheet.hydrate(E),I}},45042:function(t,e,n){"use strict";function r(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,{Z:function(){return r}})},6498:function(t,e,n){"use strict";n.d(e,{C:function(){return l},T:function(){return c},i:function(){return a},w:function(){return s}});var r=n(67294),i=n(8417);n(26346),n(27278);var a=!0,o=r.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),l=o.Provider,s=function(t){return(0,r.forwardRef)(function(e,n){return t(e,(0,r.useContext)(o),n)})};a||(s=function(t){return function(e){var n=(0,r.useContext)(o);return null===n?(n=(0,i.Z)({key:"css"}),r.createElement(o.Provider,{value:n},t(e,n))):t(e,n)}});var c=r.createContext({})},70917:function(t,e,n){"use strict";n.d(e,{F4:function(){return u},iv:function(){return c},xB:function(){return s}});var r=n(6498),i=n(67294),a=n(70444),o=n(27278),l=n(26346);n(8417),n(8679);var s=(0,r.w)(function(t,e){var n=t.styles,s=(0,l.O)([n],void 0,i.useContext(r.T));if(!r.i){for(var c,u=s.name,f=s.styles,d=s.next;void 0!==d;)u+=" "+d.name,f+=d.styles,d=d.next;var h=!0===e.compat,p=e.insert("",{name:u,styles:f},e.sheet,h);return h?null:i.createElement("style",((c={})["data-emotion"]=e.key+"-global "+u,c.dangerouslySetInnerHTML={__html:p},c.nonce=e.sheet.nonce,c))}var g=i.useRef();return(0,o.j)(function(){var t=e.key+"-global",n=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+t+" "+s.name+'"]');return e.sheet.tags.length&&(n.before=e.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",t),n.hydrate([i])),g.current=[n,r],function(){n.flush()}},[e]),(0,o.j)(function(){var t=g.current,n=t[0];if(t[1]){t[1]=!1;return}if(void 0!==s.next&&(0,a.My)(e,s.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}e.insert("",s,n,!1)},[e,s.name]),null});function c(){for(var t=arguments.length,e=Array(t),n=0;n=4;++r,i-=4)e=(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))*1540483477+((e>>>16)*59797<<16),e^=e>>>24,n=(65535&e)*1540483477+((e>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n^=255&t.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+c,styles:o,next:r}}},94371:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},27278:function(t,e,n){"use strict";n.d(e,{L:function(){return o},j:function(){return l}});var r,i=n(67294),a=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,o=a||function(t){return t()},l=a||i.useLayoutEffect},70444:function(t,e,n){"use strict";function r(t,e,n){var r="";return n.split(" ").forEach(function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "}),r}n.d(e,{My:function(){return a},fp:function(){return r},hC:function(){return i}});var i=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},a=function(t,e,n){i(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var a=e;do t.insert(e===a?"."+r:"",a,t.sheet,!0),a=a.next;while(void 0!==a)}}},10238:function(t,e,n){"use strict";n.d(e,{$:function(){return a}});var r=n(87462),i=n(28442);function a(t,e,n){return void 0===t||(0,i.X)(t)?e:(0,r.Z)({},e,{ownerState:(0,r.Z)({},e.ownerState,n)})}},30437:function(t,e,n){"use strict";function r(t,e=[]){if(void 0===t)return{};let n={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof t[n]&&!e.includes(n)).forEach(e=>{n[e]=t[e]}),n}n.d(e,{_:function(){return r}})},28442:function(t,e,n){"use strict";function r(t){return"string"==typeof t}n.d(e,{X:function(){return r}})},24407:function(t,e,n){"use strict";n.d(e,{L:function(){return l}});var r=n(87462),i=n(90512),a=n(30437);function o(t){if(void 0===t)return{};let e={};return Object.keys(t).filter(e=>!(e.match(/^on[A-Z]/)&&"function"==typeof t[e])).forEach(n=>{e[n]=t[n]}),e}function l(t){let{getSlotProps:e,additionalProps:n,externalSlotProps:l,externalForwardedProps:s,className:c}=t;if(!e){let t=(0,i.Z)(null==s?void 0:s.className,null==l?void 0:l.className,c,null==n?void 0:n.className),e=(0,r.Z)({},null==n?void 0:n.style,null==s?void 0:s.style,null==l?void 0:l.style),a=(0,r.Z)({},n,s,l);return t.length>0&&(a.className=t),Object.keys(e).length>0&&(a.style=e),{props:a,internalRef:void 0}}let u=(0,a._)((0,r.Z)({},s,l)),f=o(l),d=o(s),h=e(u),p=(0,i.Z)(null==h?void 0:h.className,null==n?void 0:n.className,c,null==s?void 0:s.className,null==l?void 0:l.className),g=(0,r.Z)({},null==h?void 0:h.style,null==n?void 0:n.style,null==s?void 0:s.style,null==l?void 0:l.style),m=(0,r.Z)({},h,n,d,f);return p.length>0&&(m.className=p),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:h.ref}}},71276:function(t,e,n){"use strict";function r(t,e,n){return"function"==typeof t?t(e,n):t}n.d(e,{x:function(){return r}})},41118:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(63366),i=n(87462),a=n(67294),o=n(90512),l=n(58510),s=n(62908),c=n(16485),u=n(20407),f=n(74312),d=n(2226),h=n(26821);function p(t){return(0,h.d6)("MuiCard",t)}(0,h.sI)("MuiCard",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","horizontal","vertical"]);var g=n(58859),m=n(30220),y=n(85893);let v=["className","color","component","invertedColors","size","variant","children","orientation","slots","slotProps"],b=t=>{let{size:e,variant:n,color:r,orientation:i}=t,a={root:["root",i,n&&`variant${(0,s.Z)(n)}`,r&&`color${(0,s.Z)(r)}`,e&&`size${(0,s.Z)(e)}`]};return(0,l.Z)(a,p,{})},x=(0,f.Z)("div",{name:"JoyCard",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r;let{p:a,padding:o,borderRadius:l}=(0,g.V)({theme:t,ownerState:e},["p","padding","borderRadius"]);return[(0,i.Z)({"--Icon-color":"neutral"!==e.color||"solid"===e.variant?"currentColor":t.vars.palette.text.icon,"--Card-childRadius":"max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))","--AspectRatio-radius":"var(--Card-childRadius)","--unstable_actionMargin":"calc(-1 * var(--variant-borderWidth, 0px))","--unstable_actionRadius":"var(--Card-radius)","--CardCover-radius":"calc(var(--Card-radius) - var(--variant-borderWidth, 0px))","--CardOverflow-offset":"calc(-1 * var(--Card-padding))","--CardOverflow-radius":"calc(var(--Card-radius) - var(--variant-borderWidth, 0px))","--Divider-inset":"calc(-1 * var(--Card-padding))"},"sm"===e.size&&{"--Card-radius":t.vars.radius.sm,"--Card-padding":"0.625rem",gap:"0.5rem"},"md"===e.size&&{"--Card-radius":t.vars.radius.md,"--Card-padding":"1rem",gap:"0.75rem 1rem"},"lg"===e.size&&{"--Card-radius":t.vars.radius.lg,"--Card-padding":"1.5rem",gap:"1rem 1.5rem"},{padding:"var(--Card-padding)",borderRadius:"var(--Card-radius)",backgroundColor:t.vars.palette.background.surface,position:"relative",display:"flex",flexDirection:"horizontal"===e.orientation?"row":"column"},t.typography[`body-${e.size}`],null==(n=t.variants[e.variant])?void 0:n[e.color]),"context"!==e.color&&e.invertedColors&&(null==(r=t.colorInversion[e.variant])?void 0:r[e.color]),void 0!==a&&{"--Card-padding":a},void 0!==o&&{"--Card-padding":o},void 0!==l&&{"--Card-radius":l}]}),O=a.forwardRef(function(t,e){let n=(0,u.Z)({props:t,name:"JoyCard"}),{className:l,color:s="neutral",component:f="div",invertedColors:h=!1,size:p="md",variant:g="outlined",children:O,orientation:w="vertical",slots:_={},slotProps:k={}}=n,C=(0,r.Z)(n,v),{getColor:M}=(0,d.VT)(g),j=M(t.color,s),S=(0,i.Z)({},n,{color:j,component:f,orientation:w,size:p,variant:g}),A=b(S),E=(0,i.Z)({},C,{component:f,slots:_,slotProps:k}),[P,R]=(0,m.Z)("root",{ref:e,className:(0,o.Z)(A.root,l),elementType:x,externalForwardedProps:E,ownerState:S}),Z=(0,y.jsx)(P,(0,i.Z)({},R,{children:a.Children.map(O,(t,e)=>{if(!a.isValidElement(t))return t;let n={};if((0,c.Z)(t,["Divider"])){n.inset="inset"in t.props?t.props.inset:"context";let e="vertical"===w?"horizontal":"vertical";n.orientation="orientation"in t.props?t.props.orientation:e}return(0,c.Z)(t,["CardOverflow"])&&("horizontal"===w&&(n["data-parent"]="Card-horizontal"),"vertical"===w&&(n["data-parent"]="Card-vertical")),0===e&&(n["data-first-child"]=""),e===a.Children.count(O)-1&&(n["data-last-child"]=""),a.cloneElement(t,n)})}));return h?(0,y.jsx)(d.do,{variant:g,children:Z}):Z});var w=O},30208:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=n(87462),i=n(63366),a=n(67294),o=n(90512),l=n(58510),s=n(20407),c=n(74312),u=n(26821);function f(t){return(0,u.d6)("MuiCardContent",t)}(0,u.sI)("MuiCardContent",["root"]);let d=(0,u.sI)("MuiCardOverflow",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var h=n(30220),p=n(85893);let g=["className","component","children","orientation","slots","slotProps"],m=()=>(0,l.Z)({root:["root"]},f,{}),y=(0,c.Z)("div",{name:"JoyCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({display:"flex",flexDirection:"horizontal"===t.orientation?"row":"column",flex:9999,zIndex:1,columnGap:"var(--Card-padding)",rowGap:"max(2px, calc(0.1875 * var(--Card-padding)))",padding:"var(--unstable_padding)",[`.${d.root} > &`]:{"--unstable_padding":"calc(var(--Card-padding) * 0.75) 0px"}})),v=a.forwardRef(function(t,e){let n=(0,s.Z)({props:t,name:"JoyCardContent"}),{className:a,component:l="div",children:c,orientation:u="vertical",slots:f={},slotProps:d={}}=n,v=(0,i.Z)(n,g),b=(0,r.Z)({},v,{component:l,slots:f,slotProps:d}),x=(0,r.Z)({},n,{component:l,orientation:u}),O=m(),[w,_]=(0,h.Z)("root",{ref:e,className:(0,o.Z)(O.root,a),elementType:y,externalForwardedProps:b,ownerState:x});return(0,p.jsx)(w,(0,r.Z)({},_,{children:c}))});var b=v},61685:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(63366),i=n(87462),a=n(67294),o=n(90512),l=n(62908),s=n(58510),c=n(20407),u=n(2226),f=n(74312),d=n(26821);function h(t){return(0,d.d6)("MuiTable",t)}(0,d.sI)("MuiTable",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","stickyHeader","stickyFooter","noWrap","hoverRow","borderAxisNone","borderAxisX","borderAxisXBetween","borderAxisY","borderAxisYBetween","borderAxisBoth","borderAxisBothBetween"]);var p=n(40911),g=n(30220),m=n(85893);let y=["className","component","children","borderAxis","hoverRow","noWrap","size","variant","color","stripe","stickyHeader","stickyFooter","slots","slotProps"],v=t=>{let{size:e,variant:n,color:r,borderAxis:i,stickyHeader:a,stickyFooter:o,noWrap:c,hoverRow:u}=t,f={root:["root",a&&"stickyHeader",o&&"stickyFooter",c&&"noWrap",u&&"hoverRow",i&&`borderAxis${(0,l.Z)(i)}`,n&&`variant${(0,l.Z)(n)}`,r&&`color${(0,l.Z)(r)}`,e&&`size${(0,l.Z)(e)}`]};return(0,s.Z)(f,h,{})},b={getColumnExceptFirst:()=>"& tr > *:not(:first-of-type), & tr > th + td, & tr > td + th",getCell:()=>"& th, & td",getHeadCell:()=>"& th",getHeaderCell:()=>"& thead th",getHeaderCellOfRow:t=>`& thead tr:nth-of-type(${t}) th`,getBottomHeaderCell:()=>"& thead th:not([colspan])",getHeaderNestedFirstColumn:()=>"& thead tr:not(:first-of-type) th:not([colspan]):first-of-type",getDataCell:()=>"& td",getDataCellExceptLastRow:()=>"& tr:not(:last-of-type) > td",getBodyCellExceptLastRow(){return`${this.getDataCellExceptLastRow()}, & tr:not(:last-of-type) > th[scope="row"]`},getBodyCellOfRow:t=>"number"==typeof t&&t<0?`& tbody tr:nth-last-of-type(${Math.abs(t)}) td, & tbody tr:nth-last-of-type(${Math.abs(t)}) th[scope="row"]`:`& tbody tr:nth-of-type(${t}) td, & tbody tr:nth-of-type(${t}) th[scope="row"]`,getBodyRow:t=>void 0===t?"& tbody tr":`& tbody tr:nth-of-type(${t})`,getFooterCell:()=>"& tfoot th, & tfoot td",getFooterFirstRowCell:()=>"& tfoot tr:not(:last-of-type) th, & tfoot tr:not(:last-of-type) td"},x=(0,f.Z)("table",{name:"JoyTable",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r,a,o,l,s,c;let u=null==(n=t.variants[e.variant])?void 0:n[e.color];return[(0,i.Z)({"--Table-headerUnderlineThickness":"2px","--TableCell-borderColor":null!=(r=null==u?void 0:u.borderColor)?r:t.vars.palette.divider,"--TableCell-headBackground":`var(--Sheet-background, ${t.vars.palette.background.surface})`},"sm"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 32px)","--TableCell-paddingX":"0.25rem","--TableCell-paddingY":"0.25rem"},"md"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 40px)","--TableCell-paddingX":"0.5rem","--TableCell-paddingY":"0.375rem"},"lg"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 48px)","--TableCell-paddingX":"0.75rem","--TableCell-paddingY":"0.5rem"},{tableLayout:"fixed",width:"100%",borderSpacing:"0px",borderCollapse:"separate",borderRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},t.typography[`body-${({sm:"xs",md:"sm",lg:"md"})[e.size]}`],null==(a=t.variants[e.variant])?void 0:a[e.color],{"& caption":{color:t.vars.palette.text.tertiary,padding:"calc(2 * var(--TableCell-paddingY)) var(--TableCell-paddingX)"},[b.getDataCell()]:(0,i.Z)({padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",height:"var(--unstable_TableCell-height)",borderColor:"var(--TableCell-borderColor)",backgroundColor:"var(--TableCell-dataBackground)"},e.noWrap&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}),[b.getHeadCell()]:{textAlign:"left",padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",backgroundColor:"var(--TableCell-headBackground)",height:"var(--unstable_TableCell-height)",fontWeight:t.vars.fontWeight.lg,borderColor:"var(--TableCell-borderColor)",color:t.vars.palette.text.secondary,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},[b.getHeaderCell()]:{verticalAlign:"bottom","&:first-of-type":{borderTopLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderTopRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}},"& tfoot tr > *":{backgroundColor:`var(--TableCell-footBackground, ${t.vars.palette.background.level1})`,"&:first-of-type":{borderBottomLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderBottomRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}}}),((null==(o=e.borderAxis)?void 0:o.startsWith("x"))||(null==(l=e.borderAxis)?void 0:l.startsWith("both")))&&{[b.getHeaderCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getBottomHeaderCell()]:{borderBottomWidth:"var(--Table-headerUnderlineThickness)",borderBottomStyle:"solid"},[b.getBodyCellExceptLastRow()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getFooterCell()]:{borderTopWidth:1,borderTopStyle:"solid"}},((null==(s=e.borderAxis)?void 0:s.startsWith("y"))||(null==(c=e.borderAxis)?void 0:c.startsWith("both")))&&{[`${b.getColumnExceptFirst()}, ${b.getHeaderNestedFirstColumn()}`]:{borderLeftWidth:1,borderLeftStyle:"solid"}},("x"===e.borderAxis||"both"===e.borderAxis)&&{[b.getHeaderCellOfRow(1)]:{borderTopWidth:1,borderTopStyle:"solid"},[b.getBodyCellOfRow(-1)]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getFooterCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"}},("y"===e.borderAxis||"both"===e.borderAxis)&&{"& tr > *:first-of-type":{borderLeftWidth:1,borderLeftStyle:"solid"},"& tr > *:last-of-type:not(:first-of-type)":{borderRightWidth:1,borderRightStyle:"solid"}},e.stripe&&{[b.getBodyRow(e.stripe)]:{background:`var(--TableRow-stripeBackground, ${t.vars.palette.background.level2})`,color:t.vars.palette.text.primary}},e.hoverRow&&{[b.getBodyRow()]:{"&:hover":{background:`var(--TableRow-hoverBackground, ${t.vars.palette.background.level3})`}}},e.stickyHeader&&{[b.getHeaderCell()]:{position:"sticky",top:0,zIndex:t.vars.zIndex.table},[b.getHeaderCellOfRow(2)]:{top:"var(--unstable_TableCell-height)"}},e.stickyFooter&&{[b.getFooterCell()]:{position:"sticky",bottom:0,zIndex:t.vars.zIndex.table,color:t.vars.palette.text.secondary,fontWeight:t.vars.fontWeight.lg},[b.getFooterFirstRowCell()]:{bottom:"var(--unstable_TableCell-height)"}}]}),O=a.forwardRef(function(t,e){let n=(0,c.Z)({props:t,name:"JoyTable"}),{className:a,component:l,children:s,borderAxis:f="xBetween",hoverRow:d=!1,noWrap:h=!1,size:b="md",variant:O="plain",color:w="neutral",stripe:_,stickyHeader:k=!1,stickyFooter:C=!1,slots:M={},slotProps:j={}}=n,S=(0,r.Z)(n,y),{getColor:A}=(0,u.VT)(O),E=A(t.color,w),P=(0,i.Z)({},n,{borderAxis:f,hoverRow:d,noWrap:h,component:l,size:b,color:E,variant:O,stripe:_,stickyHeader:k,stickyFooter:C}),R=v(P),Z=(0,i.Z)({},S,{component:l,slots:M,slotProps:j}),[T,L]=(0,g.Z)("root",{ref:e,className:(0,o.Z)(R.root,a),elementType:x,externalForwardedProps:Z,ownerState:P});return(0,m.jsx)(p.eu.Provider,{value:!0,children:(0,m.jsx)(T,(0,i.Z)({},L,{children:s}))})});var w=O},40911:function(t,e,n){"use strict";n.d(e,{eu:function(){return x},ZP:function(){return j}});var r=n(63366),i=n(87462),a=n(67294),o=n(62908),l=n(16485),s=n(39707),c=n(58510),u=n(74312),f=n(20407),d=n(2226),h=n(30220),p=n(26821);function g(t){return(0,p.d6)("MuiTypography",t)}(0,p.sI)("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=n(85893);let y=["color","textColor"],v=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],b=a.createContext(!1),x=a.createContext(!1),O=t=>{let{gutterBottom:e,noWrap:n,level:r,color:i,variant:a}=t,l={root:["root",r,e&&"gutterBottom",n&&"noWrap",i&&`color${(0,o.Z)(i)}`,a&&`variant${(0,o.Z)(a)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,c.Z)(l,g,{})},w=(0,u.Z)("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(t,e)=>e.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),_=(0,u.Z)("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(t,e)=>e.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),k=(0,u.Z)("span",{name:"JoyTypography",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r,a,o,l;let s="inherit"!==e.level?null==(n=t.typography[e.level])?void 0:n.lineHeight:"1";return(0,i.Z)({"--Icon-fontSize":`calc(1em * ${s})`},e.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},e.nesting?{display:"inline"}:(0,i.Z)({display:"block"},e.unstable_hasSkeleton&&{position:"relative"}),(e.startDecorator||e.endDecorator)&&(0,i.Z)({display:"flex",alignItems:"center"},e.nesting&&(0,i.Z)({display:"inline-flex"},e.startDecorator&&{verticalAlign:"bottom"})),e.level&&"inherit"!==e.level&&t.typography[e.level],{fontSize:`var(--Typography-fontSize, ${e.level&&"inherit"!==e.level&&null!=(r=null==(a=t.typography[e.level])?void 0:a.fontSize)?r:"inherit"})`},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.color&&"context"!==e.color&&{color:`rgba(${null==(o=t.vars.palette[e.color])?void 0:o.mainChannel} / 1)`},e.variant&&(0,i.Z)({borderRadius:t.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!e.nesting&&{marginInline:"-0.25em"},null==(l=t.variants[e.variant])?void 0:l[e.color]))}),C={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},M=a.forwardRef(function(t,e){let n=(0,f.Z)({props:t,name:"JoyTypography"}),{color:o,textColor:c}=n,u=(0,r.Z)(n,y),p=a.useContext(b),g=a.useContext(x),M=(0,s.Z)((0,i.Z)({},u,{color:c})),{component:j,gutterBottom:S=!1,noWrap:A=!1,level:E="body-md",levelMapping:P=C,children:R,endDecorator:Z,startDecorator:T,variant:L,slots:B={},slotProps:I={}}=M,N=(0,r.Z)(M,v),{getColor:D}=(0,d.VT)(L),z=D(t.color,L?null!=o?o:"neutral":o),F=p||g?t.level||"inherit":E,$=(0,l.Z)(R,["Skeleton"]),W=j||(p?"span":P[F]||C[F]||"span"),H=(0,i.Z)({},M,{level:F,component:W,color:z,gutterBottom:S,noWrap:A,nesting:p,variant:L,unstable_hasSkeleton:$}),G=O(H),q=(0,i.Z)({},N,{component:W,slots:B,slotProps:I}),[V,Y]=(0,h.Z)("root",{ref:e,className:G.root,elementType:k,externalForwardedProps:q,ownerState:H}),[U,Q]=(0,h.Z)("startDecorator",{className:G.startDecorator,elementType:w,externalForwardedProps:q,ownerState:H}),[X,K]=(0,h.Z)("endDecorator",{className:G.endDecorator,elementType:_,externalForwardedProps:q,ownerState:H});return(0,m.jsx)(b.Provider,{value:!0,children:(0,m.jsxs)(V,(0,i.Z)({},Y,{children:[T&&(0,m.jsx)(U,(0,i.Z)({},Q,{children:T})),$?a.cloneElement(R,{variant:R.props.variant||"inline"}):R,Z&&(0,m.jsx)(X,(0,i.Z)({},K,{children:Z}))]}))})});M.muiName="Typography";var j=M},26821:function(t,e,n){"use strict";n.d(e,{d6:function(){return a},sI:function(){return o}});var r=n(8027),i=n(1977);let a=(t,e)=>(0,r.ZP)(t,e,"Mui"),o=(t,e)=>(0,i.Z)(t,e,"Mui")},2226:function(t,e,n){"use strict";n.d(e,{do:function(){return f},ZP:function(){return d},VT:function(){return u}});var r=n(67294),i=n(79718),a=n(67299),o=n(2548),l=n(85893);let s=()=>{let t=(0,i.Z)(a.Z);return t[o.Z]||t},c=r.createContext(void 0),u=t=>{let e=r.useContext(c);return{getColor:(n,r)=>e&&t&&e.includes(t)?n||"context":n||r}};function f({children:t,variant:e}){var n;let r=s();return(0,l.jsx)(c.Provider,{value:e?(null!=(n=r.colorInversionConfig)?n:a.Z.colorInversionConfig)[e]:void 0,children:t})}var d=c},67299:function(t,e,n){"use strict";n.d(e,{Z:function(){return L}});var r=n(87462),i=n(63366),a=n(68027);function o(t=""){return(e,...n)=>`var(--${t?`${t}-`:""}${e}${function e(...n){if(!n.length)return"";let r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${t?`${t}-`:""}${r}${e(...n.slice(1))})`}(...n)})`}var l=n(78758);let s=t=>{let e=function t(e){let n;if(e.type)return e;if("#"===e.charAt(0))return t(function(t){t=t.slice(1);let e=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map(t=>t+t)),n?`rgb${4===n.length?"a":""}(${n.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),i=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(i))throw Error((0,l.Z)(9,e));let a=e.substring(r+1,e.length-1);if("color"===i){if(n=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw Error((0,l.Z)(10,n))}else a=a.split(",");return{type:i,values:a=a.map(t=>parseFloat(t)),colorSpace:n}}(t);return e.values.slice(0,3).map((t,n)=>-1!==e.type.indexOf("hsl")&&0!==n?`${t}%`:t).join(" ")};var c=n(41512),u=n(98373),f=n(83997);let d=(t,e,n,r=[])=>{let i=t;e.forEach((t,a)=>{a===e.length-1?Array.isArray(i)?i[Number(t)]=n:i&&"object"==typeof i&&(i[t]=n):i&&"object"==typeof i&&(i[t]||(i[t]=r.includes(t)?[]:{}),i=i[t])})},h=(t,e,n)=>{!function t(r,i=[],a=[]){Object.entries(r).forEach(([r,o])=>{n&&(!n||n([...i,r]))||null==o||("object"==typeof o&&Object.keys(o).length>0?t(o,[...i,r],Array.isArray(o)?[...a,r]:a):e([...i,r],o,a))})}(t)},p=(t,e)=>{if("number"==typeof e){if(["lineHeight","fontWeight","opacity","zIndex"].some(e=>t.includes(e)))return e;let n=t[t.length-1];return n.toLowerCase().indexOf("opacity")>=0?e:`${e}px`}return e};function g(t,e){let{prefix:n,shouldSkipGeneratingVar:r}=e||{},i={},a={},o={};return h(t,(t,e,l)=>{if(("string"==typeof e||"number"==typeof e)&&(!r||!r(t,e))){let r=`--${n?`${n}-`:""}${t.join("-")}`;Object.assign(i,{[r]:p(t,e)}),d(a,t,`var(${r})`,l),d(o,t,`var(${r}, ${e})`,l)}},t=>"vars"===t[0]),{css:i,vars:a,varsWithDefaults:o}}let m=["colorSchemes","components","defaultColorScheme"];var y=function(t,e){let{colorSchemes:n={},defaultColorScheme:o="light"}=t,l=(0,i.Z)(t,m),{vars:s,css:c,varsWithDefaults:u}=g(l,e),d=u,h={},{[o]:p}=n,y=(0,i.Z)(n,[o].map(f.Z));if(Object.entries(y||{}).forEach(([t,n])=>{let{vars:r,css:i,varsWithDefaults:o}=g(n,e);d=(0,a.Z)(d,o),h[t]={css:i,vars:r}}),p){let{css:t,vars:n,varsWithDefaults:r}=g(p,e);d=(0,a.Z)(d,r),h[o]={css:t,vars:n}}return{vars:d,generateCssVars:t=>{var n,i;if(!t){let n=(0,r.Z)({},c);return{css:n,vars:s,selector:(null==e||null==(i=e.getSelector)?void 0:i.call(e,t,n))||":root"}}let a=(0,r.Z)({},h[t].css);return{css:a,vars:h[t].vars,selector:(null==e||null==(n=e.getSelector)?void 0:n.call(e,t,a))||":root"}}}},v=n(86523),b=n(44920);let x=(0,r.Z)({},b.Z,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}});var O={grey:{50:"#F5F7FA",100:"#EAEEF6",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#23272B",900:"#121416"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function w(t){var e;return!!t[0].match(/^(typography|variants|breakpoints|colorInversion|colorInversionConfig)$/)||!!t[0].match(/sxConfig$/)||"palette"===t[0]&&!!(null!=(e=t[1])&&e.match(/^(mode)$/))||"focus"===t[0]&&"thickness"!==t[1]}var _=n(26821);let k=t=>t&&"object"==typeof t&&Object.keys(t).some(t=>{var e;return null==(e=t.match)?void 0:e.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),C=(t,e,n)=>{e.includes("Color")&&(t.color=n),e.includes("Bg")&&(t.backgroundColor=n),e.includes("Border")&&(t.borderColor=n)},M=(t,e,n)=>{let r={};return Object.entries(e||{}).forEach(([e,i])=>{if(e.match(RegExp(`${t}(color|bg|border)`,"i"))&&i){let t=n?n(e):i;e.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),e.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),e.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),C(r,e,t)}}),r},j=t=>e=>`--${t?`${t}-`:""}${e.replace(/^--/,"")}`,S=(t,e)=>{let n={};if(e){let{getCssVar:i,palette:a}=e;Object.entries(a).forEach(e=>{let[o,l]=e;k(l)&&"object"==typeof l&&(n=(0,r.Z)({},n,{[o]:M(t,l,t=>i(`palette-${o}-${t}`,a[o][t]))}))})}return n.context=M(t,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},A=(t,e)=>{let n=o(t.cssVarPrefix),r=j(t.cssVarPrefix),i={},a=e?e=>{var r;let i=e.split("-"),a=i[1],o=i[2];return n(e,null==(r=t.palette)||null==(r=r[a])?void 0:r[o])}:n;return Object.entries(t.palette).forEach(e=>{let[n,o]=e;k(o)&&(i[n]={"--Badge-ringColor":a(`palette-${n}-softBg`),[t.getColorSchemeSelector("dark")]:{[r("--palette-focusVisible")]:a(`palette-${n}-300`),[r("--palette-background-body")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.1)`,[r("--palette-background-surface")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,[r("--palette-background-level1")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,[r("--palette-text-primary")]:a(`palette-${n}-100`),[r("--palette-text-secondary")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.72)`,[r("--palette-text-tertiary")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.6)`,[r("--palette-text-icon")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.6)`,[r("--palette-divider")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${a(`palette-${n}-lightChannel`)} / 1)`,"--variant-plainHoverColor":a(`palette-${n}-50`),"--variant-plainHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${a(`palette-${n}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":a(`palette-${n}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":a(`palette-${n}-600`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,"--variant-softColor":a(`palette-${n}-200`),"--variant-softBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":a(`palette-${n}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":a(`palette-${n}-600`),"--variant-solidActiveBg":a(`palette-${n}-600`),"--variant-solidDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`},[t.getColorSchemeSelector("light")]:{[r("--palette-focusVisible")]:a(`palette-${n}-500`),[r("--palette-background-body")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.1)`,[r("--palette-background-surface")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,[r("--palette-background-level1")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.48)`,[r("--palette-text-primary")]:a(`palette-${n}-700`),[r("--palette-text-secondary")]:`rgba(${a(`palette-${n}-darkChannel`)} / 0.8)`,[r("--palette-text-tertiary")]:`rgba(${a(`palette-${n}-darkChannel`)} / 0.68)`,[r("--palette-text-icon")]:a(`palette-${n}-500`),[r("--palette-divider")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${a(`palette-${n}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${a(`palette-${n}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${a(`palette-${n}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":a(`palette-${n}-600`),"--variant-outlinedHoverBorder":a(`palette-${n}-300`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-softColor":a(`palette-${n}-600`),"--variant-softBg":`rgba(${a(`palette-${n}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":a(`palette-${n}-700`),"--variant-softHoverBg":a(`palette-${n}-200`),"--variant-softActiveBg":a(`palette-${n}-300`),"--variant-softDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,"--variant-solidColor":a("palette-common-white"),"--variant-solidBg":a(`palette-${n}-${"neutral"===n?"700":"500"}`),"--variant-solidHoverColor":a("palette-common-white"),"--variant-solidHoverBg":a(`palette-${n}-600`),"--variant-solidActiveBg":a(`palette-${n}-600`),"--variant-solidDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`}})}),i},E=(t,e)=>{let n=o(t.cssVarPrefix),r=j(t.cssVarPrefix),i={},a=e?e=>{let r=e.split("-"),i=r[1],a=r[2];return n(e,t.palette[i][a])}:n;return Object.entries(t.palette).forEach(t=>{let[e,n]=t;k(n)&&(i[e]={colorScheme:"dark","--Badge-ringColor":a(`palette-${e}-solidBg`),[r("--palette-focusVisible")]:a(`palette-${e}-200`),[r("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[r("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[r("--palette-background-popup")]:a(`palette-${e}-700`),[r("--palette-background-level1")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.36)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.6)`,[r("--palette-text-primary")]:a("palette-common-white"),[r("--palette-text-secondary")]:a(`palette-${e}-200`),[r("--palette-text-tertiary")]:a(`palette-${e}-300`),[r("--palette-text-icon")]:a(`palette-${e}-200`),[r("--palette-divider")]:`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":a(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":a(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${a(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":a(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":a("palette-common-white"),"--variant-softHoverColor":a("palette-common-white"),"--variant-softBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":a(`palette-${e}-${"neutral"===e?"600":"500"}`),"--variant-solidBg":a("palette-common-white"),"--variant-solidHoverBg":a("palette-common-white"),"--variant-solidActiveBg":a(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.1)`})}),i},P=["cssVarPrefix","breakpoints","spacing","components","variants","colorInversion","shouldSkipGeneratingVar"],R=["colorSchemes"],Z=(t="joy")=>o(t),T=function(t){var e,n,o,l,f,d,h,p,g,m;let b=t||{},{cssVarPrefix:k="joy",breakpoints:C,spacing:M,components:j,variants:T,colorInversion:L,shouldSkipGeneratingVar:B=w}=b,I=(0,i.Z)(b,P),N=Z(k),D={primary:O.blue,neutral:O.grey,danger:O.red,success:O.green,warning:O.yellow,common:{white:"#FCFCFD",black:"#09090B"}},z=t=>{var e;let n=t.split("-"),r=n[1],i=n[2];return N(t,null==(e=D[r])?void 0:e[i])},F=t=>({plainColor:z(`palette-${t}-500`),plainHoverBg:z(`palette-${t}-50`),plainActiveBg:z(`palette-${t}-100`),plainDisabledColor:z("palette-neutral-400"),outlinedColor:z(`palette-${t}-500`),outlinedBorder:z(`palette-${t}-300`),outlinedHoverBg:z(`palette-${t}-100`),outlinedActiveBg:z(`palette-${t}-200`),outlinedDisabledColor:z("palette-neutral-400"),outlinedDisabledBorder:z("palette-neutral-200"),softColor:z(`palette-${t}-700`),softBg:z(`palette-${t}-100`),softHoverBg:z(`palette-${t}-200`),softActiveColor:z(`palette-${t}-800`),softActiveBg:z(`palette-${t}-300`),softDisabledColor:z("palette-neutral-400"),softDisabledBg:z(`palette-${t}-50`),solidColor:z("palette-common-white"),solidBg:z(`palette-${t}-500`),solidHoverBg:z(`palette-${t}-600`),solidActiveBg:z(`palette-${t}-700`),solidDisabledColor:z("palette-neutral-400"),solidDisabledBg:z(`palette-${t}-100`)}),$=t=>({plainColor:z(`palette-${t}-300`),plainHoverBg:z(`palette-${t}-800`),plainActiveBg:z(`palette-${t}-700`),plainDisabledColor:z("palette-neutral-500"),outlinedColor:z(`palette-${t}-200`),outlinedBorder:z(`palette-${t}-700`),outlinedHoverBg:z(`palette-${t}-800`),outlinedActiveBg:z(`palette-${t}-700`),outlinedDisabledColor:z("palette-neutral-500"),outlinedDisabledBorder:z("palette-neutral-800"),softColor:z(`palette-${t}-200`),softBg:z(`palette-${t}-800`),softHoverBg:z(`palette-${t}-700`),softActiveColor:z(`palette-${t}-100`),softActiveBg:z(`palette-${t}-600`),softDisabledColor:z("palette-neutral-500"),softDisabledBg:z(`palette-${t}-900`),solidColor:z("palette-common-white"),solidBg:z(`palette-${t}-500`),solidHoverBg:z(`palette-${t}-600`),solidActiveBg:z(`palette-${t}-700`),solidDisabledColor:z("palette-neutral-500"),solidDisabledBg:z(`palette-${t}-800`)}),W={palette:{mode:"light",primary:(0,r.Z)({},D.primary,F("primary")),neutral:(0,r.Z)({},D.neutral,F("neutral"),{plainColor:z("palette-neutral-700"),outlinedColor:z("palette-neutral-700")}),danger:(0,r.Z)({},D.danger,F("danger")),success:(0,r.Z)({},D.success,F("success")),warning:(0,r.Z)({},D.warning,F("warning")),common:{white:"#FBFCFD",black:"#0E0E10"},text:{primary:z("palette-neutral-800"),secondary:z("palette-neutral-700"),tertiary:z("palette-neutral-600"),icon:z("palette-neutral-500")},background:{body:z("palette-neutral-50"),surface:z("palette-common-white"),popup:z("palette-common-white"),level1:z("palette-neutral-100"),level2:z("palette-neutral-200"),level3:z("palette-neutral-300"),tooltip:z("palette-neutral-500"),backdrop:`rgba(${N("palette-neutral-darkChannel",s(D.neutral[900]))} / 0.25)`},divider:`rgba(${N("palette-neutral-mainChannel",s(D.neutral[500]))} / 0.3)`,focusVisible:z("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},H={palette:{mode:"dark",primary:(0,r.Z)({},D.primary,$("primary")),neutral:(0,r.Z)({},D.neutral,$("neutral")),danger:(0,r.Z)({},D.danger,$("danger")),success:(0,r.Z)({},D.success,$("success")),warning:(0,r.Z)({},D.warning,$("warning")),common:{white:"#FBFCFD",black:"#0E0E10"},text:{primary:z("palette-neutral-100"),secondary:z("palette-neutral-300"),tertiary:z("palette-neutral-400"),icon:z("palette-neutral-400")},background:{body:z("palette-common-black"),surface:z("palette-neutral-900"),popup:z("palette-common-black"),level1:z("palette-neutral-800"),level2:z("palette-neutral-700"),level3:z("palette-neutral-600"),tooltip:z("palette-neutral-600"),backdrop:`rgba(${N("palette-neutral-darkChannel",s(D.neutral[50]))} / 0.25)`},divider:`rgba(${N("palette-neutral-mainChannel",s(D.neutral[500]))} / 0.16)`,focusVisible:z("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',q=(0,r.Z)({body:`"Inter", ${N(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${N(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},I.fontFamily),V=(0,r.Z)({sm:300,md:500,lg:600,xl:700},I.fontWeight),Y=(0,r.Z)({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},I.fontSize),U=(0,r.Z)({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},I.lineHeight),Q=null!=(e=null==(n=I.colorSchemes)||null==(n=n.light)?void 0:n.shadowRing)?e:W.shadowRing,X=null!=(o=null==(l=I.colorSchemes)||null==(l=l.light)?void 0:l.shadowChannel)?o:W.shadowChannel,K=null!=(f=null==(d=I.colorSchemes)||null==(d=d.light)?void 0:d.shadowOpacity)?f:W.shadowOpacity,J={colorSchemes:{light:W,dark:H},fontSize:Y,fontFamily:q,fontWeight:V,focus:{thickness:"2px",selector:`&.${(0,_.d6)("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${N("focus-thickness",null!=(h=null==(p=I.focus)?void 0:p.thickness)?h:"2px")})`,outline:`${N("focus-thickness",null!=(g=null==(m=I.focus)?void 0:m.thickness)?g:"2px")} solid ${N("palette-focusVisible",D.primary[500])}`}},lineHeight:U,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${N("shadowRing",Q)}, 0px 1px 2px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,sm:`${N("shadowRing",Q)}, 0px 1px 2px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 2px 4px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,md:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 6px 12px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,lg:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 12px 16px -4px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,xl:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 20px 24px -4px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,tooltip:1500},typography:{h1:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-xl, ${V.xl}`),fontSize:N(`fontSize-xl4, ${Y.xl4}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h2:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-xl, ${V.xl}`),fontSize:N(`fontSize-xl3, ${Y.xl3}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h3:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-xl2, ${Y.xl2}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h4:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-xl, ${Y.xl}`),lineHeight:N(`lineHeight-md, ${U.md}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-lg":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-lg, ${Y.lg}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-md":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-md, ${Y.md}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-sm":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-sm, ${Y.sm}`),lineHeight:N(`lineHeight-sm, ${U.sm}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"body-lg":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-lg, ${Y.lg}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-secondary, ${W.palette.text.secondary}`)},"body-md":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-md, ${Y.md}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-secondary, ${W.palette.text.secondary}`)},"body-sm":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-sm, ${Y.sm}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-tertiary, ${W.palette.text.tertiary}`)},"body-xs":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-xs, ${Y.xs}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-tertiary, ${W.palette.text.tertiary}`)}}},tt=I?(0,a.Z)(J,I):J,{colorSchemes:te}=tt,tn=(0,i.Z)(tt,R),tr=(0,r.Z)({colorSchemes:te},tn,{breakpoints:(0,c.Z)(null!=C?C:{}),components:(0,a.Z)({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:t,theme:e})=>{var n;let i=t.instanceFontSize;return(0,r.Z)({margin:"var(--Icon-margin)"},t.fontSize&&"inherit"!==t.fontSize&&{fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[t.fontSize]})`},!t.htmlColor&&(0,r.Z)({color:`var(--Icon-color, ${tr.vars.palette.text.icon})`},t.color&&"inherit"!==t.color&&"context"!==t.color&&e.vars.palette[t.color]&&{color:`rgba(${null==(n=e.vars.palette[t.color])?void 0:n.mainChannel} / 1)`},"context"===t.color&&{color:e.vars.palette.text.secondary}),i&&"inherit"!==i&&{"--Icon-fontSize":e.vars.fontSize[i]})}}}},j),cssVarPrefix:k,getCssVar:N,spacing:(0,u.Z)(M),colorInversionConfig:{soft:["plain","outlined","soft","solid"],solid:["plain","outlined","soft","solid"]}});Object.entries(tr.colorSchemes).forEach(([t,e])=>{!function(t,e){Object.keys(e).forEach(n=>{let r={main:"500",light:"200",dark:"700"};"dark"===t&&(r.main=400),!e[n].mainChannel&&e[n][r.main]&&(e[n].mainChannel=s(e[n][r.main])),!e[n].lightChannel&&e[n][r.light]&&(e[n].lightChannel=s(e[n][r.light])),!e[n].darkChannel&&e[n][r.dark]&&(e[n].darkChannel=s(e[n][r.dark]))})}(t,e.palette)});let{vars:ti,generateCssVars:ta}=y((0,r.Z)({colorSchemes:te},tn),{prefix:k,shouldSkipGeneratingVar:B});tr.vars=ti,tr.generateCssVars=ta,tr.unstable_sxConfig=(0,r.Z)({},x,null==t?void 0:t.unstable_sxConfig),tr.unstable_sx=function(t){return(0,v.Z)({sx:t,theme:this})},tr.getColorSchemeSelector=t=>"light"===t?"&":`&[data-joy-color-scheme="${t}"], [data-joy-color-scheme="${t}"] &`;let to={getCssVar:N,palette:tr.colorSchemes.light.palette};return tr.variants=(0,a.Z)({plain:S("plain",to),plainHover:S("plainHover",to),plainActive:S("plainActive",to),plainDisabled:S("plainDisabled",to),outlined:S("outlined",to),outlinedHover:S("outlinedHover",to),outlinedActive:S("outlinedActive",to),outlinedDisabled:S("outlinedDisabled",to),soft:S("soft",to),softHover:S("softHover",to),softActive:S("softActive",to),softDisabled:S("softDisabled",to),solid:S("solid",to),solidHover:S("solidHover",to),solidActive:S("solidActive",to),solidDisabled:S("solidDisabled",to)},T),tr.palette=(0,r.Z)({},tr.colorSchemes.light.palette,{colorScheme:"light"}),tr.shouldSkipGeneratingVar=B,tr.colorInversion="function"==typeof L?L:(0,a.Z)({soft:A(tr,!0),solid:E(tr,!0)},L||{},{clone:!1}),tr}();var L=T},2548:function(t,e){"use strict";e.Z="$$joy"},58859:function(t,e,n){"use strict";n.d(e,{V:function(){return i}});var r=n(87462);let i=({theme:t,ownerState:e},n)=>{let i={};return e.sx&&(function e(n){if("function"==typeof n){let r=n(t);e(r)}else Array.isArray(n)?n.forEach(t=>{"boolean"!=typeof t&&e(t)}):"object"==typeof n&&(i=(0,r.Z)({},i,n))}(e.sx),n.forEach(e=>{let n=i[e];if("string"==typeof n||"number"==typeof n){if("borderRadius"===e){if("number"==typeof n)i[e]=`${n}px`;else{var r;i[e]=(null==(r=t.vars)?void 0:r.radius[n])||n}}else -1!==["p","padding","m","margin"].indexOf(e)&&"number"==typeof n?i[e]=t.spacing(n):i[e]=n}else"function"==typeof n?i[e]=n(t):i[e]=void 0})),i}},74312:function(t,e,n){"use strict";var r=n(86154),i=n(67299),a=n(2548);let o=(0,r.ZP)({defaultTheme:i.Z,themeId:a.Z});e.Z=o},20407:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(87462),i=n(44065),a=n(67299),o=n(2548);function l({props:t,name:e}){return(0,i.Z)({props:t,name:e,defaultTheme:(0,r.Z)({},a.Z,{components:{}}),themeId:o.Z})}},30220:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=n(87462),i=n(63366),a=n(22760),o=n(71276),l=n(24407),s=n(10238),c=n(2226);let u=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],f=["component","slots","slotProps"],d=["component"],h=["disableColorInversion"];function p(t,e){let{className:n,elementType:p,ownerState:g,externalForwardedProps:m,getSlotOwnerState:y,internalForwardedProps:v}=e,b=(0,i.Z)(e,u),{component:x,slots:O={[t]:void 0},slotProps:w={[t]:void 0}}=m,_=(0,i.Z)(m,f),k=O[t]||p,C=(0,o.x)(w[t],g),M=(0,l.L)((0,r.Z)({className:n},b,{externalForwardedProps:"root"===t?_:void 0,externalSlotProps:C})),{props:{component:j},internalRef:S}=M,A=(0,i.Z)(M.props,d),E=(0,a.Z)(S,null==C?void 0:C.ref,e.ref),P=y?y(A):{},{disableColorInversion:R=!1}=P,Z=(0,i.Z)(P,h),T=(0,r.Z)({},g,Z),{getColor:L}=(0,c.VT)(T.variant);if("root"===t){var B;T.color=null!=(B=A.color)?B:g.color}else R||(T.color=L(A.color,T.color));let I="root"===t?j||x:j,N=(0,s.$)(k,(0,r.Z)({},"root"===t&&!x&&!O[t]&&v,"root"!==t&&!O[t]&&v,A,I&&{as:I},{ref:E}),T);return Object.keys(Z).forEach(t=>{delete N[t]}),[k,N]}},23534:function(t,e,n){"use strict";let r;n.r(e),n.d(e,{GlobalStyles:function(){return w},StyledEngineProvider:function(){return O},ThemeContext:function(){return c.T},css:function(){return v.iv},default:function(){return _},internal_processStyles:function(){return k},keyframes:function(){return v.F4}});var i=n(87462),a=n(67294),o=n(45042),l=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)(function(t){return l.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&91>t.charCodeAt(2)}),c=n(6498),u=n(70444),f=n(26346),d=n(27278),h=function(t){return"theme"!==t},p=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?s:h},g=function(t,e,n){var r;if(e){var i=e.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},m=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return(0,u.hC)(e,n,r),(0,d.L)(function(){return(0,u.My)(e,n,r)}),null},y=(function t(e,n){var r,o,l=e.__emotion_real===e,s=l&&e.__emotion_base||e;void 0!==n&&(r=n.label,o=n.target);var d=g(e,n,l),h=d||p(s),y=!h("as");return function(){var v=arguments,b=l&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&b.push("label:"+r+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var x=v.length,O=1;Oe(null==t||0===Object.keys(t).length?n:t):e;return(0,x.jsx)(v.xB,{styles:r})}function _(t,e){let n=y(t,e);return n}"object"==typeof document&&(r=(0,b.Z)({key:"css",prepend:!0}));let k=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}},95408:function(t,e,n){"use strict";n.d(e,{L7:function(){return l},VO:function(){return r},W8:function(){return o},k9:function(){return a}});let r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${r[t]}px)`};function a(t,e,n){let a=t.theme||{};if(Array.isArray(e)){let t=a.breakpoints||i;return e.reduce((r,i,a)=>(r[t.up(t.keys[a])]=n(e[a]),r),{})}if("object"==typeof e){let t=a.breakpoints||i;return Object.keys(e).reduce((i,a)=>{if(-1!==Object.keys(t.values||r).indexOf(a)){let r=t.up(a);i[r]=n(e[a],a)}else i[a]=e[a];return i},{})}let o=n(e);return o}function o(t={}){var e;let n=null==(e=t.keys)?void 0:e.reduce((e,n)=>{let r=t.up(n);return e[r]={},e},{});return n||{}}function l(t,e){return t.reduce((t,e)=>{let n=t[e],r=!n||0===Object.keys(n).length;return r&&delete t[e],t},e)}},86154:function(t,e,n){"use strict";n.d(e,{ZP:function(){return y}});var r=n(87462),i=n(63366),a=n(23534),o=n(68027),l=n(88647),s=n(86523);let c=["ownerState"],u=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}let h=(0,l.Z)(),p=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function g({defaultTheme:t,theme:e,themeId:n}){return 0===Object.keys(e).length?t:e[n]||e}function m(t,e){let{ownerState:n}=e,a=(0,i.Z)(e,c),o="function"==typeof t?t((0,r.Z)({ownerState:n},a)):t;if(Array.isArray(o))return o.flatMap(t=>m(t,(0,r.Z)({ownerState:n},a)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:t=[]}=o,e=(0,i.Z)(o,u),l=e;return t.forEach(t=>{let e=!0;"function"==typeof t.props?e=t.props((0,r.Z)({ownerState:n},a,n)):Object.keys(t.props).forEach(r=>{(null==n?void 0:n[r])!==t.props[r]&&a[r]!==t.props[r]&&(e=!1)}),e&&(Array.isArray(l)||(l=[l]),l.push("function"==typeof t.style?t.style((0,r.Z)({ownerState:n},a,n)):t.style))}),l}return o}function y(t={}){let{themeId:e,defaultTheme:n=h,rootShouldForwardProp:l=d,slotShouldForwardProp:c=d}=t,u=t=>(0,s.Z)((0,r.Z)({},t,{theme:g((0,r.Z)({},t,{defaultTheme:n,themeId:e}))}));return u.__mui_systemSx=!0,(t,s={})=>{var h;let y;(0,a.internal_processStyles)(t,t=>t.filter(t=>!(null!=t&&t.__mui_systemSx)));let{name:v,slot:b,skipVariantsResolver:x,skipSx:O,overridesResolver:w=(h=p(b))?(t,e)=>e[h]:null}=s,_=(0,i.Z)(s,f),k=void 0!==x?x:b&&"Root"!==b&&"root"!==b||!1,C=O||!1,M=d;"Root"===b||"root"===b?M=l:b?M=c:"string"==typeof t&&t.charCodeAt(0)>96&&(M=void 0);let j=(0,a.default)(t,(0,r.Z)({shouldForwardProp:M,label:y},_)),S=t=>"function"==typeof t&&t.__emotion_real!==t||(0,o.P)(t)?i=>m(t,(0,r.Z)({},i,{theme:g({theme:i.theme,defaultTheme:n,themeId:e})})):t,A=(i,...a)=>{let o=S(i),l=a?a.map(S):[];v&&w&&l.push(t=>{let i=g((0,r.Z)({},t,{defaultTheme:n,themeId:e}));if(!i.components||!i.components[v]||!i.components[v].styleOverrides)return null;let a=i.components[v].styleOverrides,o={};return Object.entries(a).forEach(([e,n])=>{o[e]=m(n,(0,r.Z)({},t,{theme:i}))}),w(t,o)}),v&&!k&&l.push(t=>{var i;let a=g((0,r.Z)({},t,{defaultTheme:n,themeId:e})),o=null==a||null==(i=a.components)||null==(i=i[v])?void 0:i.variants;return m({variants:o},(0,r.Z)({},t,{theme:a}))}),C||l.push(u);let s=l.length-a.length;if(Array.isArray(i)&&s>0){let t=Array(s).fill("");(o=[...i,...t]).raw=[...i.raw,...t]}let c=j(o,...l);return t.muiName&&(c.muiName=t.muiName),c};return j.withConfig&&(A.withConfig=j.withConfig),A}}},57064:function(t,e,n){"use strict";function r(t,e){if(this.vars&&"function"==typeof this.getColorSchemeSelector){let n=this.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:e}}return this.palette.mode===t?e:{}}n.d(e,{Z:function(){return r}})},41512:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(63366),i=n(87462);let a=["values","unit","step"],o=t=>{let e=Object.keys(t).map(e=>({key:e,val:t[e]}))||[];return e.sort((t,e)=>t.val-e.val),e.reduce((t,e)=>(0,i.Z)({},t,{[e.key]:e.val}),{})};function l(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:l=5}=t,s=(0,r.Z)(t,a),c=o(e),u=Object.keys(c);function f(t){let r="number"==typeof e[t]?e[t]:t;return`@media (min-width:${r}${n})`}function d(t){let r="number"==typeof e[t]?e[t]:t;return`@media (max-width:${r-l/100}${n})`}function h(t,r){let i=u.indexOf(r);return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==i&&"number"==typeof e[u[i]]?e[u[i]]:r)-l/100}${n})`}return(0,i.Z)({keys:u,values:c,up:f,down:d,between:h,only:function(t){return u.indexOf(t)+1{let n=0===t.length?[1]:t;return n.map(t=>{let n=e(t);return"number"==typeof n?`${n}px`:n}).join(" ")};return n.mui=!0,n}},88647:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(87462),i=n(63366),a=n(68027),o=n(41512),l={borderRadius:4},s=n(98373),c=n(86523),u=n(44920),f=n(57064);let d=["breakpoints","palette","spacing","shape"];var h=function(t={},...e){let{breakpoints:n={},palette:h={},spacing:p,shape:g={}}=t,m=(0,i.Z)(t,d),y=(0,o.Z)(n),v=(0,s.Z)(p),b=(0,a.Z)({breakpoints:y,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},h),spacing:v,shape:(0,r.Z)({},l,g)},m);return b.applyStyles=f.Z,(b=e.reduce((t,e)=>(0,a.Z)(t,e),b)).unstable_sxConfig=(0,r.Z)({},u.Z,null==m?void 0:m.unstable_sxConfig),b.unstable_sx=function(t){return(0,c.Z)({sx:t,theme:this})},b}},47730:function(t,e,n){"use strict";var r=n(68027);e.Z=function(t,e){return e?(0,r.Z)(t,e,{clone:!1}):t}},98700:function(t,e,n){"use strict";n.d(e,{hB:function(){return p},eI:function(){return h},NA:function(){return g},e6:function(){return y},o3:function(){return v}});var r=n(95408),i=n(54844),a=n(47730);let o={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(t){let e={};return n=>(void 0===e[n]&&(e[n]=t(n)),e[n])}(t=>{if(t.length>2){if(!s[t])return[t];t=s[t]}let[e,n]=t.split(""),r=o[e],i=l[n]||"";return Array.isArray(i)?i.map(t=>r+t):[r+i]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...u,...f];function h(t,e,n,r){var a;let o=null!=(a=(0,i.DW)(t,e,!1))?a:n;return"number"==typeof o?t=>"string"==typeof t?t:o*t:Array.isArray(o)?t=>"string"==typeof t?t:o[t]:"function"==typeof o?o:()=>void 0}function p(t){return h(t,"spacing",8,"spacing")}function g(t,e){if("string"==typeof e||null==e)return e;let n=Math.abs(e),r=t(n);return e>=0?r:"number"==typeof r?-r:`-${r}`}function m(t,e){let n=p(t.theme);return Object.keys(t).map(i=>(function(t,e,n,i){if(-1===e.indexOf(n))return null;let a=c(n),o=t[n];return(0,r.k9)(t,o,t=>a.reduce((e,n)=>(e[n]=g(i,t),e),{}))})(t,e,i,n)).reduce(a.Z,{})}function y(t){return m(t,u)}function v(t){return m(t,f)}function b(t){return m(t,d)}y.propTypes={},y.filterProps=u,v.propTypes={},v.filterProps=f,b.propTypes={},b.filterProps=d},54844:function(t,e,n){"use strict";n.d(e,{DW:function(){return a},Jq:function(){return o}});var r=n(62908),i=n(95408);function a(t,e,n=!0){if(!e||"string"!=typeof e)return null;if(t&&t.vars&&n){let n=`vars.${e}`.split(".").reduce((t,e)=>t&&t[e]?t[e]:null,t);if(null!=n)return n}return e.split(".").reduce((t,e)=>t&&null!=t[e]?t[e]:null,t)}function o(t,e,n,r=n){let i;return i="function"==typeof t?t(n):Array.isArray(t)?t[n]||r:a(t,n)||r,e&&(i=e(i,r,t)),i}e.ZP=function(t){let{prop:e,cssProperty:n=t.prop,themeKey:l,transform:s}=t,c=t=>{if(null==t[e])return null;let c=t[e],u=t.theme,f=a(u,l)||{};return(0,i.k9)(t,c,t=>{let i=o(f,s,t);return(t===i&&"string"==typeof t&&(i=o(f,s,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===n)?i:{[n]:i}})};return c.propTypes={},c.filterProps=[e],c}},44920:function(t,e,n){"use strict";n.d(e,{Z:function(){return Y}});var r=n(98700),i=n(54844),a=n(47730),o=function(...t){let e=t.reduce((t,e)=>(e.filterProps.forEach(n=>{t[n]=e}),t),{}),n=t=>Object.keys(t).reduce((n,r)=>e[r]?(0,a.Z)(n,e[r](t)):n,{});return n.propTypes={},n.filterProps=t.reduce((t,e)=>t.concat(e.filterProps),[]),n},l=n(95408);function s(t){return"number"!=typeof t?t:`${t}px solid`}function c(t,e){return(0,i.ZP)({prop:t,themeKey:"borders",transform:e})}let u=c("border",s),f=c("borderTop",s),d=c("borderRight",s),h=c("borderBottom",s),p=c("borderLeft",s),g=c("borderColor"),m=c("borderTopColor"),y=c("borderRightColor"),v=c("borderBottomColor"),b=c("borderLeftColor"),x=c("outline",s),O=c("outlineColor"),w=t=>{if(void 0!==t.borderRadius&&null!==t.borderRadius){let e=(0,r.eI)(t.theme,"shape.borderRadius",4,"borderRadius");return(0,l.k9)(t,t.borderRadius,t=>({borderRadius:(0,r.NA)(e,t)}))}return null};w.propTypes={},w.filterProps=["borderRadius"],o(u,f,d,h,p,g,m,y,v,b,w,x,O);let _=t=>{if(void 0!==t.gap&&null!==t.gap){let e=(0,r.eI)(t.theme,"spacing",8,"gap");return(0,l.k9)(t,t.gap,t=>({gap:(0,r.NA)(e,t)}))}return null};_.propTypes={},_.filterProps=["gap"];let k=t=>{if(void 0!==t.columnGap&&null!==t.columnGap){let e=(0,r.eI)(t.theme,"spacing",8,"columnGap");return(0,l.k9)(t,t.columnGap,t=>({columnGap:(0,r.NA)(e,t)}))}return null};k.propTypes={},k.filterProps=["columnGap"];let C=t=>{if(void 0!==t.rowGap&&null!==t.rowGap){let e=(0,r.eI)(t.theme,"spacing",8,"rowGap");return(0,l.k9)(t,t.rowGap,t=>({rowGap:(0,r.NA)(e,t)}))}return null};C.propTypes={},C.filterProps=["rowGap"];let M=(0,i.ZP)({prop:"gridColumn"}),j=(0,i.ZP)({prop:"gridRow"}),S=(0,i.ZP)({prop:"gridAutoFlow"}),A=(0,i.ZP)({prop:"gridAutoColumns"}),E=(0,i.ZP)({prop:"gridAutoRows"}),P=(0,i.ZP)({prop:"gridTemplateColumns"}),R=(0,i.ZP)({prop:"gridTemplateRows"}),Z=(0,i.ZP)({prop:"gridTemplateAreas"}),T=(0,i.ZP)({prop:"gridArea"});function L(t,e){return"grey"===e?e:t}o(_,k,C,M,j,S,A,E,P,R,Z,T);let B=(0,i.ZP)({prop:"color",themeKey:"palette",transform:L}),I=(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:L}),N=(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:L});function D(t){return t<=1&&0!==t?`${100*t}%`:t}o(B,I,N);let z=(0,i.ZP)({prop:"width",transform:D}),F=t=>void 0!==t.maxWidth&&null!==t.maxWidth?(0,l.k9)(t,t.maxWidth,e=>{var n,r;let i=(null==(n=t.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[e])||l.VO[e];return i?(null==(r=t.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:D(e)}}):null;F.filterProps=["maxWidth"];let $=(0,i.ZP)({prop:"minWidth",transform:D}),W=(0,i.ZP)({prop:"height",transform:D}),H=(0,i.ZP)({prop:"maxHeight",transform:D}),G=(0,i.ZP)({prop:"minHeight",transform:D});(0,i.ZP)({prop:"size",cssProperty:"width",transform:D}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:D});let q=(0,i.ZP)({prop:"boxSizing"});o(z,F,$,W,H,G,q);let V={border:{themeKey:"borders",transform:s},borderTop:{themeKey:"borders",transform:s},borderRight:{themeKey:"borders",transform:s},borderBottom:{themeKey:"borders",transform:s},borderLeft:{themeKey:"borders",transform:s},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:s},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:L},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:L},backgroundColor:{themeKey:"palette",transform:L},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_},rowGap:{style:C},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:D},maxWidth:{style:F},minWidth:{transform:D},height:{transform:D},maxHeight:{transform:D},minHeight:{transform:D},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var Y=V},39707:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(87462),i=n(63366),a=n(68027),o=n(44920);let l=["sx"],s=t=>{var e,n;let r={systemProps:{},otherProps:{}},i=null!=(e=null==t||null==(n=t.theme)?void 0:n.unstable_sxConfig)?e:o.Z;return Object.keys(t).forEach(e=>{i[e]?r.systemProps[e]=t[e]:r.otherProps[e]=t[e]}),r};function c(t){let e;let{sx:n}=t,o=(0,i.Z)(t,l),{systemProps:c,otherProps:u}=s(o);return e=Array.isArray(n)?[c,...n]:"function"==typeof n?(...t)=>{let e=n(...t);return(0,a.P)(e)?(0,r.Z)({},c,e):c}:(0,r.Z)({},c,n),(0,r.Z)({},u,{sx:e})}},86523:function(t,e,n){"use strict";n.d(e,{n:function(){return s}});var r=n(62908),i=n(47730),a=n(54844),o=n(95408),l=n(44920);function s(){function t(t,e,n,i){let l={[t]:e,theme:n},s=i[t];if(!s)return{[t]:e};let{cssProperty:c=t,themeKey:u,transform:f,style:d}=s;if(null==e)return null;if("typography"===u&&"inherit"===e)return{[t]:e};let h=(0,a.DW)(n,u)||{};return d?d(l):(0,o.k9)(l,e,e=>{let n=(0,a.Jq)(h,f,e);return(e===n&&"string"==typeof e&&(n=(0,a.Jq)(h,f,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===c)?n:{[c]:n}})}return function e(n){var r;let{sx:a,theme:s={}}=n||{};if(!a)return null;let c=null!=(r=s.unstable_sxConfig)?r:l.Z;function u(n){let r=n;if("function"==typeof n)r=n(s);else if("object"!=typeof n)return n;if(!r)return null;let a=(0,o.W8)(s.breakpoints),l=Object.keys(a),u=a;return Object.keys(r).forEach(n=>{var a;let l="function"==typeof(a=r[n])?a(s):a;if(null!=l){if("object"==typeof l){if(c[n])u=(0,i.Z)(u,t(n,l,s,c));else{let t=(0,o.k9)({theme:s},l,t=>({[n]:t}));(function(...t){let e=t.reduce((t,e)=>t.concat(Object.keys(e)),[]),n=new Set(e);return t.every(t=>n.size===Object.keys(t).length)})(t,l)?u[n]=e({sx:l,theme:s}):u=(0,i.Z)(u,t)}}else u=(0,i.Z)(u,t(n,l,s,c))}}),(0,o.L7)(l,u)}return Array.isArray(a)?a.map(u):u(a)}}let c=s();c.filterProps=["sx"],e.Z=c},79718:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(88647),i=n(67294),a=n(6498),o=function(t=null){let e=i.useContext(a.T);return e&&0!==Object.keys(e).length?e:t};let l=(0,r.Z)();var s=function(t=l){return o(t)}},44065:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(87462),i=n(79718);function a({props:t,name:e,defaultTheme:n,themeId:a}){let o=(0,i.Z)(n);a&&(o=o[a]||o);let l=function(t){let{theme:e,name:n,props:i}=t;return e&&e.components&&e.components[n]&&e.components[n].defaultProps?function t(e,n){let i=(0,r.Z)({},n);return Object.keys(e).forEach(a=>{if(a.toString().match(/^(components|slots)$/))i[a]=(0,r.Z)({},e[a],i[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){let o=e[a]||{},l=n[a];i[a]={},l&&Object.keys(l)?o&&Object.keys(o)?(i[a]=(0,r.Z)({},l),Object.keys(o).forEach(e=>{i[a][e]=t(o[e],l[e])})):i[a]=l:i[a]=o}else void 0===i[a]&&(i[a]=e[a])}),i}(e.components[n].defaultProps,i):i}({theme:o,name:e,props:t});return l}},31983:function(t,e){"use strict";let n;let r=t=>t,i=(n=r,{configure(t){n=t},generate:t=>n(t),reset(){n=r}});e.Z=i},62908:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(78758);function i(t){if("string"!=typeof t)throw Error((0,r.Z)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},58510:function(t,e,n){"use strict";function r(t,e,n){let r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((t,r)=>{if(r){let i=e(r);""!==i&&t.push(i),n&&n[r]&&t.push(n[r])}return t},[]).join(" ")}),r}n.d(e,{Z:function(){return r}})},68027:function(t,e,n){"use strict";n.d(e,{P:function(){return i},Z:function(){return function t(e,n,a={clone:!0}){let o=a.clone?(0,r.Z)({},e):e;return i(e)&&i(n)&&Object.keys(n).forEach(r=>{i(n[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?o[r]=t(e[r],n[r],a):a.clone?o[r]=i(n[r])?function t(e){if(!i(e))return e;let n={};return Object.keys(e).forEach(r=>{n[r]=t(e[r])}),n}(n[r]):n[r]:o[r]=n[r]}),o}}});var r=n(87462);function i(t){if("object"!=typeof t||null===t)return!1;let e=Object.getPrototypeOf(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}},78758:function(t,e,n){"use strict";function r(t){let e="https://mui.com/production-error/?code="+t;for(let t=1;t{i[e]=(0,r.ZP)(t,e,n)}),i}},16485:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(67294);function i(t,e){var n,i;return r.isValidElement(t)&&-1!==e.indexOf(null!=(n=t.type.muiName)?n:null==(i=t.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},25091:function(t,e,n){"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,{Z:function(){return r}})},22760:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(67294),i=n(25091);function a(...t){return r.useMemo(()=>t.every(t=>null==t)?null:e=>{t.forEach(t=>{(0,i.Z)(t,e)})},t)}},15746:function(t,e,n){"use strict";var r=n(21584);e.Z=r.Z},71230:function(t,e,n){"use strict";var r=n(92820);e.Z=r.Z},87760:function(t,e){"use strict";var n={protan:{x:.7465,y:.2535,m:1.273463,yi:-.073894},deutan:{x:1.4,y:-.4,m:.968437,yi:.003331},tritan:{x:.1748,y:0,m:.062921,yi:.292119},custom:{x:.735,y:.265,m:-1.059259,yi:1.026914}},r=function(t){var e={},n=t.R/255,r=t.G/255,i=t.B/255;return n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,e.X=.41242371206635076*n+.3575793401363035*r+.1804662232369621*i,e.Y=.21265606784927693*n+.715157818248362*r+.0721864539171564*i,e.Z=.019331987577444885*n+.11919267420354762*r+.9504491124870351*i,e},i=function(t){var e=t.X+t.Y+t.Z;return 0===e?{x:0,y:0,Y:t.Y}:{x:t.X/e,y:t.Y/e,Y:t.Y}};e.a=function(t,e,a){var o,l,s,c,u,f,d,h,p,g,m,y,v,b,x,O,w,_,k,C;return"achroma"===e?(o={R:o=.212656*t.R+.715158*t.G+.072186*t.B,G:o,B:o},a&&(s=(l=1.75)+1,o.R=(l*o.R+t.R)/s,o.G=(l*o.G+t.G)/s,o.B=(l*o.B+t.B)/s),o):(c=n[e],f=((u=i(r(t))).y-c.y)/(u.x-c.x),d=u.y-u.x*f,h=(c.yi-d)/(f-c.m),p=f*h+d,(o={}).X=h*u.Y/p,o.Y=u.Y,o.Z=(1-(h+p))*u.Y/p,_=.312713*u.Y/.329016,k=.358271*u.Y/.329016,y=3.240712470389558*(g=_-o.X)+-0+-.49857440415943116*(m=k-o.Z),v=-.969259258688888*g+0+.041556132211625726*m,b=.05563600315398933*g+-0+1.0570636917433989*m,o.R=3.240712470389558*o.X+-1.5372626602963142*o.Y+-.49857440415943116*o.Z,o.G=-.969259258688888*o.X+1.875996969313966*o.Y+.041556132211625726*o.Z,o.B=.05563600315398933*o.X+-.2039948802843549*o.Y+1.0570636917433989*o.Z,x=((o.R<0?0:1)-o.R)/y,O=((o.G<0?0:1)-o.G)/v,(w=(w=((o.B<0?0:1)-o.B)/b)>1||w<0?0:w)>(C=(x=x>1||x<0?0:x)>(O=O>1||O<0?0:O)?x:O)&&(C=w),o.R+=C*y,o.G+=C*v,o.B+=C*b,o.R=255*(o.R<=0?0:o.R>=1?1:Math.pow(o.R,.45454545454545453)),o.G=255*(o.G<=0?0:o.G>=1?1:Math.pow(o.G,.45454545454545453)),o.B=255*(o.B<=0?0:o.B>=1?1:Math.pow(o.B,.45454545454545453)),a&&(s=(l=1.75)+1,o.R=(l*o.R+t.R)/s,o.G=(l*o.G+t.G)/s,o.B=(l*o.B+t.B)/s),o)}},56917:function(t,e,n){"use strict";var r=n(74314),i=n(87760).a,a={protanomaly:{type:"protan",anomalize:!0},protanopia:{type:"protan"},deuteranomaly:{type:"deutan",anomalize:!0},deuteranopia:{type:"deutan"},tritanomaly:{type:"tritan",anomalize:!0},tritanopia:{type:"tritan"},achromatomaly:{type:"achroma",anomalize:!0},achromatopsia:{type:"achroma"}},o=function(t){return Math.round(255*t)},l=function(t){return function(e,n){var l=r(e);if(!l)return n?{R:0,G:0,B:0}:"#000000";var s=new i({R:o(l.red()||0),G:o(l.green()||0),B:o(l.blue()||0)},a[t].type,a[t].anomalize);return(s.R=s.R||0,s.G=s.G||0,s.B=s.B||0,n)?(delete s.X,delete s.Y,delete s.Z,s):new r.RGB(s.R%256/255,s.G%256/255,s.B%256/255,1).hex()}};for(var s in a)e[s]=l(s)},91077:function(t,e,n){"use strict";function r(t,e){return te?1:t>=e?0:NaN}n.d(e,{Z:function(){return r}})},87568:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var r=Array.prototype,i=r.slice;r.map;var a=n(44355);function o(t){return function(){return t}}var l=n(23865),s=n(10874),c=Math.sqrt(50),u=Math.sqrt(10),f=Math.sqrt(2);function d(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=c?10:a>=u?5:a>=f?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=c?10:a>=u?5:a>=f?2:1)}var h=n(89917);function p(t){return Math.ceil(Math.log((0,h.Z)(t))/Math.LN2)+1}function g(){var t=s.Z,e=l.Z,n=p;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s=r.length,c=Array(s);for(i=0;i0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(f,h,n)),(p=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=Array(i=r-n+1);++le&&--r,a=Array(i=r-n+1);++l=h){if(t>=h&&e===l.Z){let t=d(f,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=-((Math.ceil(-(h*t))+1)/t)))}else p.pop()}}for(var g=p.length;p[0]<=f;)p.shift(),--g;for(;p[g-1]>h;)p.pop(),--g;var m,y=Array(g+1);for(i=0;i<=g;++i)(m=y[i]=[]).x0=i>0?p[i-1]:f,m.x1=i>>1;0>n(t[a],e)?r=a+1:i=a}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=(e,n)=>(0,r.Z)(t(e),n)),{left:i,center:function(t,n,r,a){null==r&&(r=0),null==a&&(a=t.length);let o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[a],e)>0?i=a:r=a+1}return r}}}},89917:function(t,e,n){"use strict";function r(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}n.d(e,{Z:function(){return r}})},93209:function(t,e,n){"use strict";function r(t,e){let n=function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let l of t)null!=(l=e(l,++o,t))&&(l=+l)>=l&&(n=l-i,i+=n/++r,a+=n*(l-i))}if(r>1)return a/(r-1)}(t,e);return n?Math.sqrt(n):n}n.d(e,{Z:function(){return r}})},23865:function(t,e,n){"use strict";function r(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r=a&&(n=r=a):(n>a&&(n=a),r0){for(a=t[--e];e>0&&(a=(n=a)+(r=t[--e]),!(i=r-(a-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=a+(r=2*i),r==n-a&&(a=n))}return a}}},44022:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l},Xx:function(){return s},jJ:function(){return c},Q3:function(){return u}});class r extends Map{constructor(t,e=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(i(this,t))}has(t){return super.has(i(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(n),t.delete(r)),n}(this,t))}}function i({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function a(t){return null!==t&&"object"==typeof t?t.valueOf():t}var o=n(10874);function l(t,...e){return f(t,o.Z,o.Z,e)}function s(t,...e){return f(t,Array.from,o.Z,e)}function c(t,e,...n){return f(t,o.Z,e,n)}function u(t,e,...n){return f(t,Array.from,e,n)}function f(t,e,n,i){return function t(a,o){if(o>=i.length)return n(a);let l=new r,s=i[o++],c=-1;for(let t of a){let e=s(t,++c,a),n=l.get(e);n?n.push(t):l.set(e,[t])}for(let[e,n]of l)l.set(e,t(n,o));return e(l)}(t,0)}},28085:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(91077),i=n(44022),a=n(80732);function o(t,e,n){return(1===e.length?(0,a.Z)((0,i.jJ)(t,e,n),([t,e],[n,i])=>(0,r.Z)(e,i)||(0,r.Z)(t,n)):(0,a.Z)((0,i.ZP)(t,n),([t,n],[i,a])=>e(n,a)||(0,r.Z)(t,i))).map(([t])=>t)}},10874:function(t,e,n){"use strict";function r(t){return t}n.d(e,{Z:function(){return r}})},98823:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},11616:function(t,e,n){"use strict";function r(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n=a)&&(n=a,r=i);return r}n.d(e,{Z:function(){return r}})},71894:function(t,e,n){"use strict";function r(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}n.d(e,{Z:function(){return r}})},76132:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(51758);function i(t,e){return(0,r.Z)(t,.5,e)}},83502:function(t,e,n){"use strict";function r(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}n.d(e,{Z:function(){return r}})},47622:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},18320:function(t,e,n){"use strict";function r(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}n.d(e,{Z:function(){return r}})},62921:function(t,e,n){"use strict";function r(t){return null===t?NaN:+t}function*i(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}n.d(e,{K:function(){return i},Z:function(){return r}})},51758:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(98823),i=n(47622),a=n(91077);function o(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}var l=n(62921);function s(t,e,n){if(s=(t=Float64Array.from((0,l.K)(t,n))).length){if((e=+e)<=0||s<2)return(0,i.Z)(t);if(e>=1)return(0,r.Z)(t);var s,c=(s-1)*e,u=Math.floor(c),f=(0,r.Z)((function t(e,n,r=0,i=e.length-1,l=a.Z){for(;i>r;){if(i-r>600){let a=i-r+1,o=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),f=Math.max(r,Math.floor(n-o*c/a+u)),d=Math.min(i,Math.floor(n+(a-o)*c/a+u));t(e,n,f,d,l)}let a=e[n],s=r,c=i;for(o(e,r,n),l(e[i],a)>0&&o(e,r,i);sl(e[s],a);)++s;for(;l(e[c],a)>0;)--c}0===l(e[r],a)?o(e,r,c):o(e,++c,i),c<=n&&(r=c+1),n<=c&&(i=c-1)}return e})(t,u).subarray(0,u+1));return f+((0,i.Z)(t.subarray(u+1))-f)*(c-u)}}},80732:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(91077);function i(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n=r.Z]=e;if(1===n.length||e.length>1){var a;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let i of e){let e=(0,r.Z)(i[t],i[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>(0,r.Z)(n[t],n[e]))),a=t,Array.from(i,t=>a[t])}return t.sort(n)}},90155:function(t,e,n){"use strict";function r(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}n.d(e,{Z:function(){return r}})},52362:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(89917),i=n(93209);function a(t,e,n){return Math.ceil((n-e)/(3.5*(0,i.Z)(t)*Math.pow((0,r.Z)(t),-1/3)))}},6586:function(t,e,n){"use strict";function r(t){for(var e in t){var n,r,a=t[e].trim();if(a){if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(n=+a)){if(!(r=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;i&&r[4]&&!r[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=n}else a=null;t[e]=a}return t}n.d(e,{Z:function(){return r}});let i=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()},42132:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r={},i={};function a(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function o(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function l(t,e){var n=t+"",r=n.length;return r=l?u=!0:10===(a=t.charCodeAt(s++))?f=!0:13===a&&(f=!0,10===t.charCodeAt(s)&&++s),t.slice(o+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+l(s,6):l(s,4))+"-"+l(n.getUTCMonth()+1,2)+"-"+l(n.getUTCDate(),2)+(o?"T"+l(r,2)+":"+l(i,2)+":"+l(a,2)+"."+l(o,3)+"Z":a?"T"+l(r,2)+":"+l(i,2)+":"+l(a,2)+"Z":i||r?"T"+l(r,2)+":"+l(i,2)+"Z":"")):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,i=s(t,function(t,i){var o;if(n)return n(t,i-1);r=t,n=e?(o=a(t),function(n,r){return e(o(n),r,t)}):a(t)});return i.columns=r||[],i},parseRows:s,format:function(e,n){return null==n&&(n=o(e)),[n.map(f).join(t)].concat(c(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=o(t)),c(t,e).join("\n")},formatRows:function(t){return t.map(u).join("\n")},formatRow:u,formatValue:f}}},17694:function(t,e,n){"use strict";function r(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}n.d(e,{WU:function(){return o}});var i,a,o,l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(t){var e;if(!(e=l.exec(t)))throw Error("invalid format: "+t);return new c({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function c(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function u(t,e){var n=r(t,e);if(!n)return t+"";var i=n[0],a=n[1];return a<0?"0."+Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+Array(a-i.length+2).join("0")}s.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var f={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>u(100*t,e),r:u,s:function(t,e){var n=r(t,e);if(!n)return t+"";var a=n[0],o=n[1],l=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=a.length;return l===s?a:l>s?a+Array(l-s+1).join("0"):l>0?a.slice(0,l)+"."+a.slice(l):"0."+Array(1-l).join("0")+r(t,Math.max(0,e+l-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function d(t){return t}var h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];o=(a=function(t){var e,n,a,o=void 0===t.grouping||void 0===t.thousands?d:(e=h.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),l=void 0===t.currency?"":t.currency[0]+"",c=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",g=void 0===t.numerals?d:(a=h.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return a[+t]})}),m=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"−":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=s(t)).fill,n=t.align,r=t.sign,a=t.symbol,d=t.zero,h=t.width,b=t.comma,x=t.precision,O=t.trim,w=t.type;"n"===w?(b=!0,w="g"):f[w]||(void 0===x&&(x=12),O=!0,w="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===a?c:/[%p]/.test(w)?m:"",C=f[w],M=/[defgprs%]/.test(w);function j(t){var a,l,s,c=_,f=k;if("c"===w)f=C(t)+f,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:C(Math.abs(t),x),O&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==r&&(m=!1),c=(m?"("===r?r:y:"-"===r||"("===r?"":r)+c,f=("s"===w?p[8+i/3]:"")+f+(m&&"("===r?")":""),M){for(a=-1,l=t.length;++a(s=t.charCodeAt(a))||s>57){f=(46===s?u+t.slice(a+1):t.slice(a))+f,t=t.slice(0,a);break}}}b&&!d&&(t=o(t,1/0));var j=c.length+t.length+f.length,S=j>1)+c+t+f+S.slice(j);break;default:t=S+c+t+f}return g(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),j.toString=function(){return t+""},j}return{format:b,formatPrefix:function(t,e){var n,i=b(((t=s(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(((n=r(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-a),l=p[8+a/3];return function(t){return i(o*t)+l}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,a.formatPrefix},38627:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(11344);function i(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:r.Z,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}},85142:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(55350),i=n(38627),a=n(58684),o=n(83502);function l(t,e,n,l){function s(r,i){return t<=r&&r<=n&&e<=i&&i<=l}function c(r,i,a,o){var s=0,c=0;if(null==r||(s=u(r,a))!==(c=u(i,a))||0>d(r,i)^a>0)do o.point(0===s||3===s?t:n,s>1?l:e);while((s=(s+a+4)%4)!==c);else o.point(i[0],i[1])}function u(i,a){return(0,r.Wn)(i[0]-t)0?0:3:(0,r.Wn)(i[0]-n)0?2:1:(0,r.Wn)(i[1]-e)0?1:0:a>0?3:2}function f(t,e){return d(t.x,e.x)}function d(t,e){var n=u(t,1),r=u(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var u,d,h,p,g,m,y,v,b,x,O,w=r,_=(0,i.Z)(),k={point:C,lineStart:function(){k.point=M,d&&d.push(h=[]),x=!0,b=!1,y=v=NaN},lineEnd:function(){u&&(M(p,g),m&&b&&_.rejoin(),u.push(_.result())),k.point=C,b&&w.lineEnd()},polygonStart:function(){w=_,u=[],d=[],O=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=d.length;nl&&(f-i)*(l-a)>(h-a)*(t-i)&&++e:h<=l&&(f-i)*(l-a)<(h-a)*(t-i)&&--e;return e}(),n=O&&e,i=(u=(0,o.Z)(u)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),c(null,null,1,r),r.lineEnd()),i&&(0,a.Z)(u,f,e,c,r),r.polygonEnd()),w=r,u=d=h=null}};function C(t,e){s(t,e)&&w.point(t,e)}function M(r,i){var a=s(r,i);if(d&&h.push([r,i]),x)p=r,g=i,m=a,x=!1,a&&(w.lineStart(),w.point(r,i));else if(a&&b)w.point(r,i);else{var o=[y=Math.max(-1e9,Math.min(1e9,y)),v=Math.max(-1e9,Math.min(1e9,v))],c=[r=Math.max(-1e9,Math.min(1e9,r)),i=Math.max(-1e9,Math.min(1e9,i))];!function(t,e,n,r,i,a){var o,l=t[0],s=t[1],c=e[0],u=e[1],f=0,d=1,h=c-l,p=u-s;if(o=n-l,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>d)return;o>f&&(f=o)}if(o=i-l,h||!(o<0)){if(o/=h,h<0){if(o>d)return;o>f&&(f=o)}else if(h>0){if(o0)){if(o/=p,p<0){if(o0){if(o>d)return;o>f&&(f=o)}if(o=a-s,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>f&&(f=o)}else if(p>0){if(o0&&(t[0]=l+f*h,t[1]=s+f*p),d<1&&(e[0]=l+d*h,e[1]=s+d*p),!0}}}}}(o,c,t,e,n,l)?a&&(w.lineStart(),w.point(r,i),O=!1):(b||(w.lineStart(),w.point(o[0],o[1])),w.point(c[0],c[1]),a||w.lineEnd(),O=!1)}y=r,v=i,b=a}return k}}},58684:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(55228),i=n(55350);function a(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(t,e,n,o,s){var c,u,f=[],d=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,o=t[0],l=t[e];if((0,r.Z)(o,l)){if(!o[2]&&!l[2]){for(s.lineStart(),c=0;c=0;--c)s.point((p=h[c])[0],p[1]);else o(m.x,m.p.x,-1,s);m=m.p}h=(m=m.o).z,y=!y}while(!m.v);s.lineEnd()}}}function l(t){if(e=t.length){for(var e,n,r=0,i=t[0];++ri.Ho}).map(d)).concat(r((0,i.mD)(c/y)*y,s,y).filter(function(t){return(0,i.Wn)(t%b)>i.Ho}).map(h))}return O.lines=function(){return w().map(function(t){return{type:"LineString",coordinates:t}})},O.outline=function(){return{type:"Polygon",coordinates:[p(l).concat(g(u).slice(1),p(n).reverse().slice(1),g(f).reverse().slice(1))]}},O.extent=function(t){return arguments.length?O.extentMajor(t).extentMinor(t):O.extentMinor()},O.extentMajor=function(t){return arguments.length?(l=+t[0][0],n=+t[1][0],f=+t[0][1],u=+t[1][1],l>n&&(t=l,l=n,n=t),f>u&&(t=f,f=u,u=t),O.precision(x)):[[l,f],[n,u]]},O.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],c=+n[0][1],s=+n[1][1],e>t&&(n=e,e=t,t=n),c>s&&(n=c,c=s,s=n),O.precision(x)):[[e,c],[t,s]]},O.step=function(t){return arguments.length?O.stepMajor(t).stepMinor(t):O.stepMinor()},O.stepMajor=function(t){return arguments.length?(v=+t[0],b=+t[1],O):[v,b]},O.stepMinor=function(t){return arguments.length?(m=+t[0],y=+t[1],O):[m,y]},O.precision=function(r){return arguments.length?(x=+r,d=a(c,s,90),h=o(e,t,x),p=a(f,u,90),g=o(l,n,x),O):x},O.extentMajor([[-180,-90+i.Ho],[180,90-i.Ho]]).extentMinor([[-180,-80-i.Ho],[180,80+i.Ho]])})()()}},67423:function(t,e){"use strict";e.Z=t=>t},55350:function(t,e,n){"use strict";n.d(e,{BZ:function(){return s},Ho:function(){return r},Kh:function(){return _},O$:function(){return b},OR:function(){return w},Qq:function(){return m},RW:function(){return c},Wn:function(){return f},Xx:function(){return x},ZR:function(){return k},_b:function(){return O},aW:function(){return i},cM:function(){return y},fv:function(){return h},mC:function(){return p},mD:function(){return g},ou:function(){return o},pi:function(){return a},pu:function(){return l},sQ:function(){return v},uR:function(){return u},z4:function(){return d}});var r=1e-6,i=1e-12,a=Math.PI,o=a/2,l=a/4,s=2*a,c=180/a,u=a/180,f=Math.abs,d=Math.atan,h=Math.atan2,p=Math.cos,g=Math.ceil,m=Math.exp,y=Math.log,v=Math.pow,b=Math.sin,x=Math.sign||function(t){return t>0?1:t<0?-1:0},O=Math.sqrt,w=Math.tan;function _(t){return t>1?0:t<-1?a:Math.acos(t)}function k(t){return t>1?o:t<-1?-o:Math.asin(t)}},11344:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return r}})},3310:function(t,e,n){"use strict";var r=n(11344),i=1/0,a=1/0,o=-1/0,l=o,s={point:function(t,e){to&&(o=t),el&&(l=e)},lineStart:r.Z,lineEnd:r.Z,polygonStart:r.Z,polygonEnd:r.Z,result:function(){var t=[[i,a],[o,l]];return o=l=-(a=i=1/0),t}};e.Z=s},30348:function(t,e,n){"use strict";n.d(e,{Z:function(){return te}});var r,i,a,o,l=n(67423),s=n(23311),c=n(75801),u=n(55350),f=n(11344),d=new c.dU,h=new c.dU,p={point:f.Z,lineStart:f.Z,lineEnd:f.Z,polygonStart:function(){p.lineStart=g,p.lineEnd=v},polygonEnd:function(){p.lineStart=p.lineEnd=p.point=f.Z,d.add((0,u.Wn)(h)),h=new c.dU},result:function(){var t=d/2;return d=new c.dU,t}};function g(){p.point=m}function m(t,e){p.point=y,r=a=t,i=o=e}function y(t,e){h.add(o*t-a*e),a=t,o=e}function v(){y(r,i)}var b,x,O,w,_=n(3310),k=0,C=0,M=0,j=0,S=0,A=0,E=0,P=0,R=0,Z={point:T,lineStart:L,lineEnd:N,polygonStart:function(){Z.lineStart=D,Z.lineEnd=z},polygonEnd:function(){Z.point=T,Z.lineStart=L,Z.lineEnd=N},result:function(){var t=R?[E/R,P/R]:A?[j/A,S/A]:M?[k/M,C/M]:[NaN,NaN];return k=C=M=j=S=A=E=P=R=0,t}};function T(t,e){k+=t,C+=e,++M}function L(){Z.point=B}function B(t,e){Z.point=I,T(O=t,w=e)}function I(t,e){var n=t-O,r=e-w,i=(0,u._b)(n*n+r*r);j+=i*(O+t)/2,S+=i*(w+e)/2,A+=i,T(O=t,w=e)}function N(){Z.point=T}function D(){Z.point=F}function z(){$(b,x)}function F(t,e){Z.point=$,T(b=O=t,x=w=e)}function $(t,e){var n=t-O,r=e-w,i=(0,u._b)(n*n+r*r);j+=i*(O+t)/2,S+=i*(w+e)/2,A+=i,E+=(i=w*t-O*e)*(O+t),P+=i*(w+e),R+=3*i,T(O=t,w=e)}function W(t){this._context=t}W.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u.BZ)}},result:f.Z};var H,G,q,V,Y,U=new c.dU,Q={point:f.Z,lineStart:function(){Q.point=X},lineEnd:function(){H&&K(G,q),Q.point=f.Z},polygonStart:function(){H=!0},polygonEnd:function(){H=null},result:function(){var t=+U;return U=new c.dU,t}};function X(t,e){Q.point=K,G=V=t,q=Y=e}function K(t,e){V-=t,Y-=e,U.add((0,u._b)(V*V+Y*Y)),V=t,Y=e}function J(){this._string=[]}function tt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function te(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),(0,s.Z)(t,n(r))),r.result()}return a.area=function(t){return(0,s.Z)(t,n(p)),p.result()},a.measure=function(t){return(0,s.Z)(t,n(Q)),Q.result()},a.bounds=function(t){return(0,s.Z)(t,n(_.Z)),_.Z.result()},a.centroid=function(t){return(0,s.Z)(t,n(Z)),Z.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,l.Z):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new J):new W(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}J.prototype={_radius:4.5,_circle:tt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(!this._string.length)return null;var t=this._string.join("");return this._string=[],t}}},55228:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(55350);function i(t,e){return(0,r.Wn)(t[0]-e[0])=.12&&i<.234&&r>=-.425&&r<-.214?f:i>=.166&&i<.234&&r>=-.214&&r<-.115?d:u).invert(t)},p.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[u.stream(e=n),f.stream(n),d.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n0?e<-r.ou+r.Ho&&(e=-r.ou+r.Ho):e>r.ou-r.Ho&&(e=r.ou-r.Ho);var n=l/(0,r.sQ)(o(e),i);return[n*(0,r.O$)(i*t),l-n*(0,r.mC)(i*t)]}return s.invert=function(t,e){var n=l-e,a=(0,r.Xx)(i)*(0,r._b)(t*t+n*n),o=(0,r.fv)(t,(0,r.Wn)(n))*(0,r.Xx)(n);return n*i<0&&(o-=r.pi*(0,r.Xx)(t)*(0,r.Xx)(n)),[o/i,2*(0,r.z4)((0,r.sQ)(l/a,1/i))-r.ou]},s}function s(){return(0,i.o)(l).scale(109.5).parallels([30,30])}},26477:function(t,e,n){"use strict";n.d(e,{v:function(){return a},Z:function(){return o}});var r=n(55350),i=n(53388);function a(t,e){var n=(0,r.O$)(t),i=(n+(0,r.O$)(e))/2;if((0,r.Wn)(i)=0?1:-1,R=P*E,Z=R>a.pi,T=w*S;if(d.add((0,a.fv)(T*P*(0,a.O$)(R),_*A+T*(0,a.mC)(R))),c+=Z?E+P*a.BZ:E,Z^x>=n^M>=n){var L=u(s(b),s(C));h(L);var B=u(l,L);h(B);var I=(Z^E>=0?-1:1)*(0,a.ZR)(B[2]);(r>I||r===I&&(L[0]||L[1]))&&(f+=Z^E>=0?1:-1)}}return(c<-a.Ho||c0){for(w||(c.polygonStart(),w=!0),c.lineStart(),t=0;t1&&2&i&&a.push(a.pop().concat(a.shift())),d.push(a.filter(y))}}return _}}function y(t){return t.length>1}function v(t,e){return((t=t.x)[0]<0?t[1]-a.ou-a.Ho:a.ou-t[1])-((e=e.x)[0]<0?e[1]-a.ou-a.Ho:a.ou-e[1])}var b=m(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,l){var s,c,u,f,d,h,p=o>0?a.pi:-a.pi,g=(0,a.Wn)(o-n);(0,a.Wn)(g-a.pi)0?a.ou:-a.ou),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),t.point(o,r),e=0):i!==p&&g>=a.pi&&((0,a.Wn)(n-i)a.Ho?(0,a.z4)(((0,a.O$)(c)*(d=(0,a.mC)(l))*(0,a.O$)(u)-(0,a.O$)(l)*(f=(0,a.mC)(c))*(0,a.O$)(s))/(f*d*h)):(c+l)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),e=0),t.point(n=o,r=l),i=p},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*a.ou,r.point(-a.pi,i),r.point(0,i),r.point(a.pi,i),r.point(a.pi,0),r.point(a.pi,-i),r.point(0,-i),r.point(-a.pi,-i),r.point(-a.pi,0),r.point(-a.pi,i);else if((0,a.Wn)(t[0]-e[0])>a.Ho){var o=t[0]-e[2]?-n:n)+a.BZ-a.Ho)%a.BZ}var O=n(55228),w=n(85142),_=n(44079),k=n(67423),C=n(51613),M=n(20071),j=n(83776),S=(0,a.mC)(30*a.uR);function A(t,e){return+e?function(t,e){function n(r,i,o,l,s,c,u,f,d,h,p,g,m,y){var v=u-r,b=f-i,x=v*v+b*b;if(x>4*e&&m--){var O=l+h,w=s+p,_=c+g,k=(0,a._b)(O*O+w*w+_*_),C=(0,a.ZR)(_/=k),M=(0,a.Wn)((0,a.Wn)(_)-1)e||(0,a.Wn)((v*P+b*R)/x-.5)>.3||l*h+s*p+c*g0,i=(0,a.Wn)(e)>a.Ho;function o(t,n){return(0,a.mC)(t)*(0,a.mC)(n)>e}function h(t,n,r){var i=s(t),o=s(n),h=[1,0,0],p=u(i,o),g=c(p,p),m=p[0],y=g-m*m;if(!y)return!r&&t;var v=e*g/y,b=-e*m/y,x=u(h,p),O=d(h,v);f(O,d(p,b));var w=c(O,x),_=c(x,x),k=w*w-_*(c(O,O)-1);if(!(k<0)){var C=(0,a._b)(k),M=d(x,(-w-C)/_);if(f(M,O),M=l(M),!r)return M;var j,S=t[0],A=n[0],E=t[1],P=n[1];A0^M[1]<((0,a.Wn)(M[0]-S)a.pi^(S<=M[0]&&M[0]<=A)){var L=d(x,(-w+C)/_);return f(L,O),[M,l(L)]}}}function p(e,n){var i=r?t:a.pi-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return m(o,function(t){var e,n,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(u,f){var d,g,m=[u,f],y=o(u,f),v=r?y?0:p(u,f):y?p(u+(u<0?a.pi:-a.pi),f):0;!e&&(s=l=y)&&t.lineStart(),y!==l&&(!(g=h(e,m))||(0,O.Z)(e,g)||(0,O.Z)(m,g))&&(m[2]=1),y!==l?(c=0,y?(t.lineStart(),g=h(m,e),t.point(g[0],g[1])):(g=h(e,m),t.point(g[0],g[1],2),t.lineEnd()),e=g):i&&e&&r^y&&!(v&n)&&(d=h(m,e,!0))&&(c=0,r?(t.lineStart(),t.point(d[0][0],d[0][1]),t.point(d[1][0],d[1][1]),t.lineEnd()):(t.point(d[1][0],d[1][1]),t.lineEnd(),t.lineStart(),t.point(d[0][0],d[0][1],3))),!y||e&&(0,O.Z)(e,m)||t.point(m[0],m[1]),e=m,l=y,n=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return c|(s&&l)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var s=(0,a.mC)(e),c=(0,a.O$)(e),u=r*n;null==i?(i=e+r*a.BZ,o=e-u/2):(i=x(s,i),o=x(s,o),(r>0?io)&&(i+=r*a.BZ));for(var f,d=i;r>0?d>o:d2?t[2]%360*a.uR:0,U()):[B*a.RW,I*a.RW,N*a.RW]},V.angle=function(t){return arguments.length?(D=t%360*a.uR,U()):D*a.RW},V.reflectX=function(t){return arguments.length?(z=t?-1:1,U()):z<0},V.reflectY=function(t){return arguments.length?(F=t?-1:1,U()):F<0},V.precision=function(t){return arguments.length?(h=A(p,q=t*t),Q()):(0,a._b)(q)},V.fitExtent=function(t,e){return(0,j.qg)(V,t,e)},V.fitSize=function(t,e){return(0,j.mF)(V,t,e)},V.fitWidth=function(t,e){return(0,j.V6)(V,t,e)},V.fitHeight=function(t,e){return(0,j.rf)(V,t,e)},function(){return e=t.apply(this,arguments),V.invert=e.invert&&Y,U()}}},23007:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l},hk:function(){return o},iW:function(){return s}});var r=n(55350),i=n(51613),a=n(32427);function o(t,e){return[t,(0,r.cM)((0,r.OR)((r.ou+e)/2))]}function l(){return s(o).scale(961/r.BZ)}function s(t){var e,n,l,s=(0,a.Z)(t),c=s.center,u=s.scale,f=s.translate,d=s.clipExtent,h=null;function p(){var a=r.pi*u(),c=s((0,i.Z)(s.rotate()).invert([0,0]));return d(null==h?[[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]]:t===o?[[Math.max(c[0]-a,h),e],[Math.min(c[0]+a,n),l]]:[[h,Math.max(c[1]-a,e)],[n,Math.min(c[1]+a,l)]])}return s.scale=function(t){return arguments.length?(u(t),p()):u()},s.translate=function(t){return arguments.length?(f(t),p()):f()},s.center=function(t){return arguments.length?(c(t),p()):c()},s.clipExtent=function(t){return arguments.length?(null==t?h=e=n=l=null:(h=+t[0][0],e=+t[0][1],n=+t[1][0],l=+t[1][1]),p()):null==h?null:[[h,e],[n,l]]},p()}o.invert=function(t,e){return[t,2*(0,r.z4)((0,r.Qq)(e))-r.ou]}},38839:function(t,e,n){"use strict";n.d(e,{K:function(){return a},Z:function(){return o}});var r=n(32427),i=n(55350);function a(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function o(){return(0,r.Z)(a).scale(175.295)}a.invert=function(t,e){var n,r=e,a=25;do{var o=r*r,l=o*o;r-=n=(r*(1.007226+o*(.015085+l*(-.044475+.028874*o-.005916*l)))-e)/(1.007226+o*(.045255+l*(-.311325+.259866*o-.005916*11*l)))}while((0,i.Wn)(n)>i.Ho&&--a>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]}},50435:function(t,e,n){"use strict";n.d(e,{I:function(){return o},Z:function(){return l}});var r=n(55350),i=n(93824),a=n(32427);function o(t,e){return[(0,r.mC)(e)*(0,r.O$)(t),(0,r.O$)(e)]}function l(){return(0,a.Z)(o).scale(249.5).clipAngle(90+r.Ho)}o.invert=(0,i.O)(r.ZR)},30378:function(t,e,n){"use strict";n.d(e,{T:function(){return o},Z:function(){return l}});var r=n(55350),i=n(93824),a=n(32427);function o(t,e){var n=(0,r.mC)(e),i=1+(0,r.mC)(t)*n;return[n*(0,r.O$)(t)/i,(0,r.O$)(e)/i]}function l(){return(0,a.Z)(o).scale(250).clipAngle(142)}o.invert=(0,i.O)(function(t){return 2*(0,r.z4)(t)})},17421:function(t,e,n){"use strict";n.d(e,{F:function(){return a},Z:function(){return o}});var r=n(55350),i=n(23007);function a(t,e){return[(0,r.cM)((0,r.OR)((r.ou+e)/2)),-t]}function o(){var t=(0,i.iW)(a),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}a.invert=function(t,e){return[-e,2*(0,r.z4)((0,r.Qq)(t))-r.ou]}},51613:function(t,e,n){"use strict";n.d(e,{I:function(){return o},Z:function(){return u}});var r=n(44079),i=n(55350);function a(t,e){return[(0,i.Wn)(t)>i.pi?t+Math.round(-t/i.BZ)*i.BZ:t,e]}function o(t,e,n){return(t%=i.BZ)?e||n?(0,r.Z)(s(t),c(e,n)):s(t):e||n?c(e,n):a}function l(t){return function(e,n){return[(e+=t)>i.pi?e-i.BZ:e<-i.pi?e+i.BZ:e,n]}}function s(t){var e=l(t);return e.invert=l(-t),e}function c(t,e){var n=(0,i.mC)(t),r=(0,i.O$)(t),a=(0,i.mC)(e),o=(0,i.O$)(e);function l(t,e){var l=(0,i.mC)(e),s=(0,i.mC)(t)*l,c=(0,i.O$)(t)*l,u=(0,i.O$)(e),f=u*n+s*r;return[(0,i.fv)(c*a-f*o,s*n-u*r),(0,i.ZR)(f*a+c*o)]}return l.invert=function(t,e){var l=(0,i.mC)(e),s=(0,i.mC)(t)*l,c=(0,i.O$)(t)*l,u=(0,i.O$)(e),f=u*a-c*o;return[(0,i.fv)(c*a+u*o,s*n+f*r),(0,i.ZR)(f*n-s*r)]},l}function u(t){function e(e){return e=t(e[0]*i.uR,e[1]*i.uR),e[0]*=i.RW,e[1]*=i.RW,e}return t=o(t[0]*i.uR,t[1]*i.uR,t.length>2?t[2]*i.uR:0),e.invert=function(e){return e=t.invert(e[0]*i.uR,e[1]*i.uR),e[0]*=i.RW,e[1]*=i.RW,e},e}a.invert=a},23311:function(t,e,n){"use strict";function r(t,e){t&&a.hasOwnProperty(t.type)&&a[t.type](t,e)}n.d(e,{Z:function(){return s}});var i={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,a=n.length;++i=0;)e+=n[r].value;else e=1;t.value=e}function i(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=o)):void 0===e&&(e=a);for(var n,r,i,l,u,f=new c(t),d=[f];n=d.pop();)if((i=e(n.data))&&(u=(i=Array.from(i)).length))for(n.children=i,l=u-1;l>=0;--l)d.push(r=i[l]=new c(i[l])),r.parent=n,r.depth=n.depth+1;return f.eachBefore(s)}function a(t){return t.children}function o(t){return Array.isArray(t)?t[1]:null}function l(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function s(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}n.d(e,{NB:function(){return c},le:function(){return s},ZP:function(){return i}}),c.prototype=i.prototype={constructor:c,count:function(){return this.eachAfter(r)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],l=[],s=-1;a=o.pop();)if(l.push(a),n=a.children)for(r=0,i=n.length;r=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return i(this).eachBefore(l)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n0&&n*n>r*r+i*i}function a(t,e){for(var n=0;n(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*l-a*s,n.y=t.y-r*s+a*l):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*l-a*s,n.y=e.y+r*s+a*l)):(n.x=e.x+n.r,n.y=e.y)}function c(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function u(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function f(t){this._=t,this.next=null,this.previous=null}n.d(e,{Z:function(){return g}});var d=n(76263),h=n(40588);function p(t){return Math.sqrt(t.value)}function g(){var t=null,e=1,n=1,r=h.G;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(m(t)).eachAfter(y(r,.5)).eachBefore(v(1)):i.eachBefore(m(p)).eachAfter(y(h.G,1)).eachAfter(y(r,i.r/Math.min(e,n))).eachBefore(v(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=(0,d.j)(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:(0,h.Z)(+t),i):r},i}function m(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function y(t,e){return function(n){if(d=n.children){var d,h,p,g=d.length,m=t(n)*e||0;if(m)for(h=0;h1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(h>2))return e.r+n.r;s(n,e,d=t[2]),e=new f(e),n=new f(n),d=new f(d),e.next=d.previous=n,n.next=e.previous=d,d.next=n.previous=e;e:for(m=3;m0)throw Error("cycle");return s}return n.id=function(e){return arguments.length?(t=(0,r.C)(e),n):t},n.parentId=function(t){return arguments.length?(e=(0,r.C)(t),n):e},n}},81594:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(70569);function i(t,e){return t.parent===e.parent?1:2}function a(t){var e=t.children;return e?e[0]:t.t}function o(t){var e=t.children;return e?e[e.length-1]:t.t}function l(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function s(){var t=i,e=1,n=1,r=null;function s(i){var a=function(t){for(var e,n,r,i,a,o=new l(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new l(r[i],i)),n.parent=e;return(o.parent=new l(null,0)).children=[o],o}(i);if(a.eachAfter(c),a.parent.m=-a.z,a.eachBefore(u),r)i.eachBefore(f);else{var o=i,s=i,d=i;i.eachBefore(function(t){t.xs.x&&(s=t),t.depth>d.depth&&(d=t)});var h=o===s?1:t(o,s)/2,p=h-o.x,g=e/(s.x+h+p),m=n/(d.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*g,t.y=t.depth*m})}return i}function c(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var l=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-l):e.z=l}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,l,s,c=e,u=e,f=n,d=c.parent.children[0],h=c.m,p=u.m,g=f.m,m=d.m;f=o(f),c=a(c),f&&c;)d=a(d),(u=o(u)).a=e,(s=f.z+g-c.z-h+t(f._,c._))>0&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}((i=f,l=r,i.a.parent===e.parent?i.a:l),e,s),h+=s,p+=s),g+=f.m,h+=c.m,m+=d.m,p+=u.m;f&&!o(u)&&(u.t=f,u.m+=g-p),c&&!a(d)&&(d.t=c,d.m+=h-m,r=e)}return r}(e,i,e.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function f(t){t.x*=e,t.y=t.depth*n}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],s):r?null:[e,n]},s.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],s):r?[e,n]:null},s}l.prototype=Object.create(r.NB.prototype)},70239:function(t,e,n){"use strict";function r(t,e,n,r,i){var a,o,l=t.children,s=l.length,c=Array(s+1);for(c[0]=o=a=0;a=n-1){var u=l[e];u.x0=i,u.y0=a,u.x1=o,u.y1=s;return}for(var f=c[e],d=r/2+f,h=e+1,p=n-1;h>>1;c[g]s-a){var v=r?(i*y+o*m)/r:o;t(e,h,m,i,a,v,s),t(h,n,y,v,a,o,s)}else{var b=r?(a*y+s*m)/r:s;t(e,h,m,i,a,o,b),t(h,n,y,i,b,o,s)}}(0,s,t.value,e,n,r,i)}n.d(e,{Z:function(){return r}})},36849:function(t,e,n){"use strict";function r(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,c=t.value&&(r-e)/t.value;++l1?e:1)},n}(a.Sk)},8080:function(t,e,n){"use strict";function r(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}n.d(e,{Z:function(){return r}})},71831:function(t,e,n){"use strict";function r(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,c=t.value&&(i-n)/t.value;++lp&&(p=c),(g=Math.max(p/(v=d*d*y),v/h))>m){d-=c;break}m=g}b.push(s={value:d,dice:u1?e:1)},n}(a)},11108:function(t,e){"use strict";let n=Math.PI,r=2*n,i=r-1e-6;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,i,a){t=+t,e=+e,r=+r,i=+i,a=+a;var o=this._x1,l=this._y1,s=r-t,c=i-e,u=o-t,f=l-e,d=u*u+f*f;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>1e-6){if(Math.abs(f*s-c*u)>1e-6&&a){var h=r-o,p=i-l,g=s*s+c*c,m=Math.sqrt(g),y=Math.sqrt(d),v=a*Math.tan((n-Math.acos((g+d-(h*h+p*p))/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*h>u*p)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)}},arc:function(t,e,a,o,l,s){t=+t,e=+e,a=+a,s=!!s;var c=a*Math.cos(o),u=a*Math.sin(o),f=t+c,d=e+u,h=1^s,p=s?o-l:l-o;if(a<0)throw Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+f+","+d),a&&(p<0&&(p=p%r+r),p>i?this._+="A"+a+","+a+",0,1,"+h+","+(t-c)+","+(e-u)+"A"+a+","+a+",0,1,"+h+","+(this._x1=f)+","+(this._y1=d):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=n)+","+h+","+(this._x1=t+a*Math.cos(l))+","+(this._y1=e+a*Math.sin(l))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.Z=o},63488:function(t,e,n){"use strict";function r(t){for(var e=t.length/6|0,n=Array(e),r=0;r()=>t;function y(t,e){return function(n){return t+n*e}}function v(t,e){var n=e-t;return n?y(t,n):m(isNaN(t)?e:t)}function b(t){return function(e){var n,r,i=e.length,a=Array(i),o=Array(i),l=Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=rx(t[t.length-1]),w=[,,,].concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r),_=O(w),k=[,,,].concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r),C=O(k),M=[,,,].concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r),j=O(M),S=[,,,].concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r),A=O(S),E=[,,,].concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r),P=O(E),R=[,,,].concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r),Z=O(R),T=[,,,].concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r),L=O(T),B=[,,,].concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r),I=O(B),N=[,,,].concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r),D=O(N),z=[,,,].concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r),F=O(z),$=[,,,].concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r),W=O($),H=[,,,].concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r),G=O(H),q=[,,,].concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r),V=O(q),Y=[,,,].concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r),U=O(Y),Q=[,,,].concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r),X=O(Q),K=[,,,].concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r),J=O(K),tt=[,,,].concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r),te=O(tt),tn=[,,,].concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r),tr=O(tn),ti=[,,,].concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r),ta=O(ti),to=[,,,].concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r),tl=O(to),ts=[,,,].concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r),tc=O(ts),tu=[,,,].concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r),tf=O(tu),td=[,,,].concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r),th=O(td),tp=[,,,].concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r),tg=O(tp),tm=[,,,].concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r),ty=O(tm),tv=[,,,].concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r),tb=O(tv),tx=[,,,].concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r),tO=O(tx);function tw(t){return"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-(t=Math.max(0,Math.min(1,t)))*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}var t_=n(44087);let tk=Math.PI/180,tC=180/Math.PI;var tM=-1.78277*.29227-.1347134789;function tj(t,e,n,r){return 1==arguments.length?function(t){if(t instanceof tS)return new tS(t.h,t.s,t.l,t.opacity);t instanceof p.Ss||(t=(0,p.SU)(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(tM*r+-1.7884503806*e-3.5172982438*n)/(tM+-1.7884503806-3.5172982438),a=r-i,o=-((1.97294*(n-i)- -.29227*a)/.90649),l=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),s=l?Math.atan2(o,a)*tC-120:NaN;return new tS(s<0?s+360:s,l,i,t.opacity)}(t):new tS(t,e,n,null==r?1:r)}function tS(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function tA(t){return function e(n){function r(e,r){var i=t((e=tj(e)).h,(r=tj(r)).h),a=v(e.s,r.s),o=v(e.l,r.l),l=v(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}(0,t_.Z)(tS,tj,(0,t_.l)(p.Il,{brighter:function(t){return t=null==t?p.J5:Math.pow(p.J5,t),new tS(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?p.xV:Math.pow(p.xV,t),new tS(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*tk,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new p.Ss(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(-.29227*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}})),tA(function(t,e){var n=e-t;return n?y(t,n>180||n<-180?n-360*Math.round(n/360):n):m(isNaN(t)?e:t)});var tE=tA(v),tP=tE(tj(300,.5,0),tj(-240,.5,1)),tR=tE(tj(-100,.75,.35),tj(80,1.5,.8)),tZ=tE(tj(260,.75,.35),tj(80,1.5,.8)),tT=tj();function tL(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return tT.h=360*t-100,tT.s=1.5-1.5*e,tT.l=.8-.9*e,tT+""}var tB=(0,p.B8)(),tI=Math.PI/3,tN=2*Math.PI/3;function tD(t){var e;return t=(.5-t)*Math.PI,tB.r=255*(e=Math.sin(t))*e,tB.g=255*(e=Math.sin(t+tI))*e,tB.b=255*(e=Math.sin(t+tN))*e,tB+""}function tz(t){return"rgb("+Math.max(0,Math.min(255,Math.round(34.61+(t=Math.max(0,Math.min(1,t)))*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function tF(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var t$=tF(r("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),tW=tF(r("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tH=tF(r("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),tG=tF(r("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},10233:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(11108),i=n(93072),a=n(44915);function o(t){return t.innerRadius}function l(t){return t.outerRadius}function s(t){return t.startAngle}function c(t){return t.endAngle}function u(t){return t&&t.padAngle}function f(t,e,n,r,i,o,l){var s=t-n,c=e-r,u=(l?o:-o)/(0,a._b)(s*s+c*c),f=u*c,d=-u*s,h=t+f,p=e+d,g=n+f,m=r+d,y=(h+g)/2,v=(p+m)/2,b=g-h,x=m-p,O=b*b+x*x,w=i-o,_=h*m-g*p,k=(x<0?-1:1)*(0,a._b)((0,a.Fp)(0,w*w*O-_*_)),C=(_*x-b*k)/O,M=(-_*b-x*k)/O,j=(_*x+b*k)/O,S=(-_*b+x*k)/O,A=C-y,E=M-v,P=j-y,R=S-v;return A*A+E*E>P*P+R*R&&(C=j,M=S),{cx:C,cy:M,x01:-f,y01:-d,x11:C*(i/w-1),y11:M*(i/w-1)}}function d(){var t=o,e=l,n=(0,i.Z)(0),d=null,h=s,p=c,g=u,m=null;function y(){var i,o,l=+t.apply(this,arguments),s=+e.apply(this,arguments),c=h.apply(this,arguments)-a.ou,u=p.apply(this,arguments)-a.ou,y=(0,a.Wn)(u-c),v=u>c;if(m||(m=i=(0,r.Z)()),sa.Ho){if(y>a.BZ-a.Ho)m.moveTo(s*(0,a.mC)(c),s*(0,a.O$)(c)),m.arc(0,0,s,c,u,!v),l>a.Ho&&(m.moveTo(l*(0,a.mC)(u),l*(0,a.O$)(u)),m.arc(0,0,l,u,c,v));else{var b,x,O=c,w=u,_=c,k=u,C=y,M=y,j=g.apply(this,arguments)/2,S=j>a.Ho&&(d?+d.apply(this,arguments):(0,a._b)(l*l+s*s)),A=(0,a.VV)((0,a.Wn)(s-l)/2,+n.apply(this,arguments)),E=A,P=A;if(S>a.Ho){var R=(0,a.ZR)(S/l*(0,a.O$)(j)),Z=(0,a.ZR)(S/s*(0,a.O$)(j));(C-=2*R)>a.Ho?(R*=v?1:-1,_+=R,k-=R):(C=0,_=k=(c+u)/2),(M-=2*Z)>a.Ho?(Z*=v?1:-1,O+=Z,w-=Z):(M=0,O=w=(c+u)/2)}var T=s*(0,a.mC)(O),L=s*(0,a.O$)(O),B=l*(0,a.mC)(k),I=l*(0,a.O$)(k);if(A>a.Ho){var N,D=s*(0,a.mC)(w),z=s*(0,a.O$)(w),F=l*(0,a.mC)(_),$=l*(0,a.O$)(_);if(ya.Ho?P>a.Ho?(b=f(F,$,T,L,s,P,v),x=f(D,z,B,I,s,P,v),m.moveTo(b.cx+b.x01,b.cy+b.y01),Pa.Ho&&C>a.Ho?E>a.Ho?(b=f(B,I,D,z,l,-E,v),x=f(T,L,F,$,l,-E,v),m.lineTo(b.cx+b.x01,b.cy+b.y01),E=l;--s)h.point(v[s],b[s]);h.lineEnd(),h.areaEnd()}}y&&(v[o]=+t(p,o,a),b[o]=+e(p,o,a),h.point(c?+c(p,o,a):v[o],n?+n(p,o,a):b[o]))}if(g)return h=null,g+""||null}function g(){return(0,l.Z)().defined(u).curve(d).context(f)}return t="function"==typeof t?t:void 0===t?s.x:(0,a.Z)(+t),e="function"==typeof e?e:void 0===e?(0,a.Z)(0):(0,a.Z)(+e),n="function"==typeof n?n:void 0===n?s.y:(0,a.Z)(+n),p.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,a.Z)(+e),c=null,p):t},p.x0=function(e){return arguments.length?(t="function"==typeof e?e:(0,a.Z)(+e),p):t},p.x1=function(t){return arguments.length?(c=null==t?null:"function"==typeof t?t:(0,a.Z)(+t),p):c},p.y=function(t){return arguments.length?(e="function"==typeof t?t:(0,a.Z)(+t),n=null,p):e},p.y0=function(t){return arguments.length?(e="function"==typeof t?t:(0,a.Z)(+t),p):e},p.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:(0,a.Z)(+t),p):n},p.lineX0=p.lineY0=function(){return g().x(t).y(e)},p.lineY1=function(){return g().x(t).y(n)},p.lineX1=function(){return g().x(c).y(e)},p.defined=function(t){return arguments.length?(u="function"==typeof t?t:(0,a.Z)(!!t),p):u},p.curve=function(t){return arguments.length?(d=t,null!=f&&(h=d(f)),p):d},p.context=function(t){return arguments.length?(null==t?f=h=null:h=d(f=t),p):f},p}},53253:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(45317),i=n(37633),a=n(73671);function o(){var t=(0,i.Z)().curve(r.j),e=t.curve,n=t.lineX0,o=t.lineX1,l=t.lineY0,s=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return(0,a.X)(n())},delete t.lineX0,t.lineEndAngle=function(){return(0,a.X)(o())},delete t.lineX1,t.lineInnerRadius=function(){return(0,a.X)(l())},delete t.lineY0,t.lineOuterRadius=function(){return(0,a.X)(s())},delete t.lineY1,t.curve=function(t){return arguments.length?e((0,r.Z)(t)):e()._curve},t}},5742:function(t,e,n){"use strict";function r(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}n.d(e,{Z:function(){return r}}),Array.prototype.slice},93072:function(t,e,n){"use strict";function r(t){return function(){return t}}n.d(e,{Z:function(){return r}})},43683:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(33046);function i(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function a(t,e){this._context=t,this._k=(1-e)/6}function o(t,e){this._context=t,this._k=(1-e)/6}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:i(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:i(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new a(t,e)}return n.tension=function(e){return t(+e)},n}(0),o.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:i(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new o(t,e)}return n.tension=function(e){return t(+e)},n}(0);var l=n(44915);function s(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>l.Ho){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>l.Ho){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function c(t,e){this._context=t,this._alpha=e}function u(t,e){this._context=t,this._alpha=e}c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return e?new c(t,e):new a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),u.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var f=function t(e){function n(t){return e?new u(t,e):new o(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},18143:function(t,e,n){"use strict";function r(t){this._context=t}function i(t){return new r(t)}n.d(e,{Z:function(){return i}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}}},57481:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(33046);function i(t){this._context=t}function a(t){return new i(t)}i.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}}},65165:function(t,e,n){"use strict";function r(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function i(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function a(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function o(t){this._context=t}function l(t){this._context=new s(t)}function s(t){this._context=t}function c(t){return new o(t)}function u(t){return new l(t)}n.d(e,{Z:function(){return c},s:function(){return u}}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:a(this,this._t0,i(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,a(this,i(this,n=r(this,t,e)),n);break;default:a(this,this._t0,n=r(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(l.prototype=Object.create(o.prototype)).point=function(t,e){o.prototype.point.call(this,e,t)},s.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}}},45317:function(t,e,n){"use strict";n.d(e,{Z:function(){return a},j:function(){return r}});var r=a(n(18143).Z);function i(t){this._curve=t}function a(t){function e(e){return new i(t(e))}return e._curve=t,e}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}}},77059:function(t,e,n){"use strict";function r(t,e){this._context=t,this._t=e}function i(t){return new r(t,.5)}function a(t){return new r(t,0)}function o(t){return new r(t,1)}n.d(e,{RN:function(){return a},ZP:function(){return i},cD:function(){return o}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}}},25049:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(11108),i=n(5742),a=n(93072),o=n(18143),l=n(78260);function s(t,e){var n=(0,a.Z)(!0),s=null,c=o.Z,u=null;function f(a){var o,l,f,d=(a=(0,i.Z)(a)).length,h=!1;for(null==s&&(u=c(f=(0,r.Z)())),o=0;o<=d;++o)!(o1?0:t<-1?f:Math.acos(t)}function g(t){return t>=1?d:t<=-1?-d:Math.asin(t)}},33046:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return r}})},78260:function(t,e,n){"use strict";function r(t){return t[0]}function i(t){return t[1]}n.d(e,{x:function(){return r},y:function(){return i}})},69916:function(t,e){!function(t){"use strict";function e(t){for(var e=Array(t),n=0;nc+l*o*u||f>=g)p=o;else{if(Math.abs(h)<=-s*u)return o;h*(p-d)>=0&&(p=d),d=o,g=f}return 0}o=o||1,l=l||1e-6,s=s||.1;for(var m=0;m<10;++m){if(a(i.x,1,r.x,o,e),f=i.fx=t(i.x,i.fxprime),h=n(i.fxprime,e),f>c+l*o*u||m&&f>=d)return g(p,o,d);if(Math.abs(h)<=-s*u)break;if(h>=0)return g(o,p,f);d=f,p=o,o*=2}return o}t.bisect=function(t,e,n,r){var i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,o=t(e),l=t(n),s=n-e;if(o*l>0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===l)return n;for(var c=0;c=0&&(e=u),Math.abs(s)=g[p-1].fx){var S=!1;if(O.fx>j.fx?(a(w,1+d,x,-d,j),w.fx=t(w),w.fx=1)break;for(m=1;m=r(f.fxprime))break}return l.history&&l.history.push({x:f.x.slice(),fx:f.fx,fxprime:f.fxprime.slice(),alpha:p}),f},t.gradientDescent=function(t,e,n){for(var i=(n=n||{}).maxIterations||100*e.length,o=n.learnRate||.001,l={x:e.slice(),fx:0,fxprime:e.slice()},s=0;s=r(l.fxprime)));++s);return l},t.gradientDescentLineSearch=function(t,e,n){n=n||{};var a,l={x:e.slice(),fx:0,fxprime:e.slice()},s={x:e.slice(),fx:0,fxprime:e.slice()},c=n.maxIterations||100*e.length,u=n.learnRate||1,f=e.slice(),d=n.c1||.001,h=n.c2||.1,p=[];if(n.history){var g=t;t=function(t,e){return p.push(t.slice()),g(t,e)}}l.fx=t(l.x,l.fxprime);for(var m=0;mr(l.fxprime)));++m);return l},t.zeros=e,t.zerosM=function(t,n){return e(t).map(function(){return e(n)})},t.norm2=r,t.weightedSum=a,t.scale=i}(e)},8679:function(t,e,n){"use strict";var r=n(21296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(t){return r.isMemo(t)?o:l[t.$$typeof]||i}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(p){var i=h(n);i&&i!==p&&t(e,i,r)}var o=u(n);f&&(o=o.concat(f(n)));for(var l=s(e),g=s(n),m=0;me.distinct?-1:0}var u=["pie_chart","donut_chart"],f=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"];function d(t){var e=t.chartType,n=t.dataProps,r=t.preferences;return!!(n&&e&&r&&r.canvasLayout)}var h=["line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart"],p=["bar_chart","column_chart","grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"];function g(t){return t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])})}var m=["pie_chart","donut_chart","radar_chart","rose_chart"],y=n(96486);function v(t){return"number"==typeof t}function b(t){return"string"==typeof t||"boolean"==typeof t}function x(t){return t instanceof Date}function O(t){var e=t.encode,n=t.data,i=t.scale,a=(0,y.mapValues)(e,function(t,e){var r,a,o;return{field:t,type:void 0!==(r=null==i?void 0:i[e].type)?function(t){switch(t){case"linear":case"log":case"pow":case"sqrt":case"quantile":case"threshold":case"quantize":case"sequential":return"quantitative";case"time":return"temporal";case"ordinal":case"point":case"band":return"categorical";default:throw Error("Unkonwn scale type: ".concat(t,"."))}}(r):function(t){if(t.some(v))return"quantitative";if(t.some(b))return"categorical";if(t.some(x))return"temporal";throw Error("Unknown type: ".concat(typeof t[0]))}((a=n,"function"==typeof(o=t)?a.map(o):"string"==typeof o&&a.some(function(t){return void 0!==t[o]})?a.map(function(t){return t[o]}):a.map(function(){return o})))}});return(0,r.pi)((0,r.pi)({},t),{encode:a})}var w=["line_chart"];(0,r.ev)((0,r.ev)([],(0,r.CR)(["data-check","data-field-qty","no-redundant-field","purpose-check"]),!1),(0,r.CR)(["series-qty-limit","bar-series-qty","line-field-time-ordinal","landscape-or-portrait","diff-pie-sector","nominal-enum-combinatorial","limit-series"]),!1);var _={"data-check":{id:"data-check",type:"HARD",docs:{lintText:"Data must satisfy the data prerequisites."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){e=1;var a=i[r].dataPres||[];a.forEach(function(t){!function(t,e){var n=e.map(function(t){return t.levelOfMeasurements});if(n){var r=0;if(n.forEach(function(e){e&&s(e,t.fieldConditions)&&(r+=1)}),r>=t.minQty&&("*"===t.maxQty||r<=t.maxQty))return!0}return!1}(t,n)&&(e=0)}),n.map(function(t){return t.levelOfMeasurements}).forEach(function(t){var n=!1;a.forEach(function(e){t&&s(t,e.fieldConditions)&&(n=!0)}),n||(e=0)})}return e}},"data-field-qty":{id:"data-field-qty",type:"HARD",docs:{lintText:"Data must have at least the min qty of the prerequisite."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){e=1;var a=(i[r].dataPres||[]).map(function(t){return t.minQty}).reduce(function(t,e){return t+e});n.length&&n.length>=a&&(e=1)}return e}},"no-redundant-field":{id:"no-redundant-field",type:"HARD",docs:{lintText:"No redundant field."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,i=t.chartWIKI;if(n&&r&&i[r]){var a=(i[r].dataPres||[]).map(function(t){return"*"===t.maxQty?99:t.maxQty}).reduce(function(t,e){return t+e});n.length&&n.length<=a&&(e=1)}return e}},"purpose-check":{id:"purpose-check",type:"HARD",docs:{lintText:"Choose chart types that satisfy the purpose, if purpose is defined."},trigger:function(){return!0},validator:function(t){var e=0,n=t.chartType,r=t.purpose,i=t.chartWIKI;return r?(n&&i[n]&&r&&(i[n].purpose||"").includes(r)&&(e=1),e):e=1}},"bar-series-qty":{id:"bar-series-qty",type:"SOFT",docs:{lintText:"Bar chart should has proper number of bars or bar groups."},trigger:function(t){var e=t.chartType;return o.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n&&r){var i=n.find(function(t){return a(t.levelOfMeasurements,["Nominal"])}),o=i&&i.count?i.count:0;o>20&&(e=20/o)}return e<.1?.1:e}},"diff-pie-sector":{id:"diff-pie-sector",type:"SOFT",docs:{lintText:"The difference between sectors of a pie chart should be large enough."},trigger:function(t){var e=t.chartType;return u.includes(e)},validator:function(t){var e=1,n=t.dataProps;if(n){var r=n.find(function(t){return a(t.levelOfMeasurements,["Interval"])});if(r&&r.sum&&r.rawData){var i=1/r.sum,o=r.rawData.map(function(t){return t*i}).reduce(function(t,e){return t*e}),l=r.rawData.length,s=Math.pow(1/l,l);e=2*(Math.abs(s-Math.abs(o))/s)}}return e<.1?.1:e}},"landscape-or-portrait":{id:"landscape-or-portrait",type:"SOFT",docs:{lintText:"Recommend column charts for landscape layout and bar charts for portrait layout."},trigger:function(t){return f.includes(t.chartType)&&d(t)},validator:function(t){var e=1,n=t.chartType,r=t.preferences;return d(t)&&("portrait"===r.canvasLayout&&["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart"].includes(n)?e=5:"landscape"===r.canvasLayout&&["column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"].includes(n)&&(e=5)),e}},"limit-series":{id:"limit-series",type:"SOFT",docs:{lintText:"Avoid too many values in one series."},trigger:function(t){return t.dataProps.filter(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal"])}).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var i=n.filter(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal"])});if(i.length>=2){var a=i.sort(c)[1];a.distinct&&(e=a.distinct>10?.1:1/a.distinct,a.distinct>6&&"heatmap"===r?e=5:"heatmap"===r&&(e=1))}}return e}},"line-field-time-ordinal":{id:"line-field-time-ordinal",type:"SOFT",docs:{lintText:"Data containing time or ordinal fields are suitable for line or area charts."},trigger:function(t){var e=t.chartType;return h.includes(e)},validator:function(t){var e=1,n=t.dataProps;return n&&n.find(function(t){return s(t.levelOfMeasurements,["Ordinal","Time"])})&&(e=5),e}},"nominal-enum-combinatorial":{id:"nominal-enum-combinatorial",type:"SOFT",docs:{lintText:"Single (Basic) and Multi (Stacked, Grouped,...) charts should be optimized recommended by nominal enums combinatorial numbers."},trigger:function(t){var e=t.chartType,n=t.dataProps;return p.includes(e)&&g(n).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var i=g(n);if(i.length>=2){var a=i.sort(c),o=a[0],l=a[1];o.distinct===o.count&&["bar_chart","column_chart"].includes(r)&&(e=5),o.count&&o.distinct&&l.distinct&&o.count>o.distinct&&["grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"].includes(r)&&(e=5)}}return e}},"series-qty-limit":{id:"series-qty-limit",type:"SOFT",docs:{lintText:"Some charts should has at most N values for the series."},trigger:function(t){var e=t.chartType;return m.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType,i=t.limit;if((!Number.isInteger(i)||i<=0)&&(i=6,("pie_chart"===r||"donut_chart"===r||"rose_chart"===r)&&(i=6),"radar_chart"===r&&(i=8)),n){var o=n.find(function(t){return a(t.levelOfMeasurements,["Nominal"])}),l=o&&o.count?o.count:0;l>=2&&l<=i&&(e=5+2/l)}return e}},"x-axis-line-fading":{id:"x-axis-line-fading",type:"DESIGN",docs:{lintText:"Adjust axis to make it prettier"},trigger:function(t){var e=t.chartType;return w.includes(e)},optimizer:function(t,e){var n,r=O(e).encode;if(r&&(null===(n=r.y)||void 0===n?void 0:n.type)==="quantitative"){var i=t.find(function(t){var e;return t.name===(null===(e=r.y)||void 0===e?void 0:e.field)});if(i){var a=i.maximum-i.minimum;if(i.minimum&&i.maximum&&a<2*i.maximum/3){var o=Math.floor(i.minimum-a/5);return{axis:{x:{tick:!1}},scale:{y:{domainMin:o>0?o:0}},clip:!0}}}}return{}}},"bar-without-axis-min":{id:"bar-without-axis-min",type:"DESIGN",docs:{lintText:"It is not recommended to set the minimum value of axis for the bar or column chart.",fixText:"Remove the minimum value config of axis."},trigger:function(t){var e=t.chartType;return l.includes(e)},optimizer:function(t,e){var n,r,i=e.scale;if(!i)return{};var a=null===(n=i.x)||void 0===n?void 0:n.domainMin,o=null===(r=i.y)||void 0===r?void 0:r.domainMin;if(a||o){var l=JSON.parse(JSON.stringify(i));return a&&(l.x.domainMin=0),o&&(l.y.domainMin=0),{scale:l}}return{}}}},k=Object.keys(_),C=function(t){var e={};return t.forEach(function(t){Object.keys(_).includes(t)&&(e[t]=_[t])}),e},M=function(t){if(!t)return C(k);var e=C(k);if(t.exclude&&t.exclude.forEach(function(t){Object.keys(e).includes(t)&&delete e[t]}),t.include){var n=t.include;Object.keys(e).forEach(function(t){n.includes(t)||delete e[t]})}var i=(0,r.pi)((0,r.pi)({},e),t.custom),a=t.options;return a&&Object.keys(a).forEach(function(t){if(Object.keys(i).includes(t)){var e=a[t];i[t]=(0,r.pi)((0,r.pi)({},i[t]),{option:e})}}),i},j=function(t){if("object"!=typeof t||null===t)return t;if(Array.isArray(t)){e=[];for(var e,n=0,r=t.length;ne.distinct)return -1}return 0};function B(t){var e,n,r,i=null!==(n=null!==(e=t.find(function(t){return s(t.levelOfMeasurements,["Nominal"])}))&&void 0!==e?e:t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}))&&void 0!==n?n:t.find(function(t){return s(t.levelOfMeasurements,["Interval"])}),a=null!==(r=t.filter(function(t){return t!==i}).find(function(t){return s(t.levelOfMeasurements,["Interval"])}))&&void 0!==r?r:t.filter(function(t){return t!==i}).find(function(t){return s(t.levelOfMeasurements,["Nominal","Time","Ordinal"])});return[i,a]}function I(t){var e,n=null!==(e=t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal","Nominal"])}))&&void 0!==e?e:t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),r=t.filter(function(t){return t!==n}).find(function(t){return a(t.levelOfMeasurements,["Interval"])}),i=t.filter(function(t){return t!==n&&t!==r}).find(function(t){return s(t.levelOfMeasurements,["Nominal","Ordinal","Time"])});return[n,r,i]}function N(t){var e=t.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}),n=t.find(function(t){return a(t.levelOfMeasurements,["Nominal"])});return[e,t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),n]}function D(t){var e=t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L),n=e[0],r=e[1];return[t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),n,r]}function z(t){var e,n,i,o,l,s,c=t.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L);return(0,Z.Js)(null===(i=c[1])||void 0===i?void 0:i.rawData,null===(o=c[0])||void 0===o?void 0:o.rawData)?(s=(e=(0,r.CR)(c,2))[0],l=e[1]):(l=(n=(0,r.CR)(c,2))[0],s=n[1]),[l,t.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),s]}var F=function(t){var e=t.data,n=t.xField;return(0,y.uniq)(e.map(function(t){return t[n]})).length<=1},$=function(t,e,n){var r=n.field4Split,i=n.field4X;if((null==r?void 0:r.name)&&(null==i?void 0:i.name)){var a=t[r.name];return F({data:e.filter(function(t){return r.name&&t[r.name]===a}),xField:i.name})?5:void 0}return(null==i?void 0:i.name)&&F({data:e,xField:i.name})?5:void 0},W=n(66465);function H(t){var e,n,i,o,l,c,u,f,d,h,p,g,m,y,v,b,x,O,w,_,k,C,M,j,S,A,E,P,Z,T,F,H,G,q,V,Y,U,Q,X,K,J,tt,te,tn,tr,ti=t.chartType,ta=t.data,to=t.dataProps,tl=t.chartKnowledge;if(!R.includes(ti)&&tl)return tl.toSpec?tl.toSpec(ta,to):null;switch(ti){case"pie_chart":return n=(e=(0,r.CR)(B(to),2))[0],(i=e[1])&&n?{type:"interval",data:ta,encode:{color:n.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta"}}:null;case"donut_chart":return l=(o=(0,r.CR)(B(to),2))[0],(c=o[1])&&l?{type:"interval",data:ta,encode:{color:l.name,y:c.name},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:.6}}:null;case"line_chart":return function(t,e){var n=(0,r.CR)(I(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"line",data:t,encode:{x:i.name,y:a.name,size:function(e){return $(e,t,{field4X:i})}},legend:{size:!1}};return o&&(l.encode.color=o.name),l}(ta,to);case"step_line_chart":return function(t,e){var n=(0,r.CR)(I(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"line",data:t,encode:{x:i.name,y:a.name,shape:"hvh",size:function(e){return $(e,t,{field4X:i})}},legend:{size:!1}};return o&&(l.encode.color=o.name),l}(ta,to);case"area_chart":return u=to.find(function(t){return s(t.levelOfMeasurements,["Time","Ordinal"])}),f=to.find(function(t){return a(t.levelOfMeasurements,["Interval"])}),u&&f?{type:"area",data:ta,encode:{x:u.name,y:f.name,size:function(t){return $(t,ta,{field4X:u})}},legend:{size:!1}}:null;case"stacked_area_chart":return h=(d=(0,r.CR)(N(to),3))[0],p=d[1],g=d[2],h&&p&&g?{type:"area",data:ta,encode:{x:h.name,y:p.name,color:g.name,size:function(t){return $(t,ta,{field4Split:g,field4X:h})}},legend:{size:!1},transform:[{type:"stackY"}]}:null;case"percent_stacked_area_chart":return y=(m=(0,r.CR)(N(to),3))[0],v=m[1],b=m[2],y&&v&&b?{type:"area",data:ta,encode:{x:y.name,y:v.name,color:b.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null;case"bar_chart":return function(t,e){var n=(0,r.CR)(D(e),3),i=n[0],a=n[1],o=n[2];if(!i||!a)return null;var l={type:"interval",data:t,encode:{x:a.name,y:i.name},coordinate:{transform:[{type:"transpose"}]}};return o&&(l.encode.color=o.name,l.transform=[{type:"stackY"}]),l}(ta,to);case"grouped_bar_chart":return O=(x=(0,r.CR)(D(to),3))[0],w=x[1],_=x[2],O&&w&&_?{type:"interval",data:ta,encode:{x:w.name,y:O.name,color:_.name},transform:[{type:"dodgeX"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"stacked_bar_chart":return C=(k=(0,r.CR)(D(to),3))[0],M=k[1],j=k[2],C&&M&&j?{type:"interval",data:ta,encode:{x:M.name,y:C.name,color:j.name},transform:[{type:"stackY"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"percent_stacked_bar_chart":return A=(S=(0,r.CR)(D(to),3))[0],E=S[1],P=S[2],A&&E&&P?{type:"interval",data:ta,encode:{x:E.name,y:A.name,color:P.name},transform:[{type:"stackY"},{type:"normalizeY"}],coordinate:{transform:[{type:"transpose"}]}}:null;case"column_chart":return function(t,e){var n=e.filter(function(t){return a(t.levelOfMeasurements,["Nominal"])}).sort(L),r=n[0],i=n[1],o=e.find(function(t){return a(t.levelOfMeasurements,["Interval"])});if(!r||!o)return null;var l={type:"interval",data:t,encode:{x:r.name,y:o.name}};return i&&(l.encode.color=i.name,l.transform=[{type:"stackY"}]),l}(ta,to);case"grouped_column_chart":return T=(Z=(0,r.CR)(z(to),3))[0],F=Z[1],H=Z[2],T&&F&&H?{type:"interval",data:ta,encode:{x:T.name,y:F.name,color:H.name},transform:[{type:"dodgeX"}]}:null;case"stacked_column_chart":return q=(G=(0,r.CR)(z(to),3))[0],V=G[1],Y=G[2],q&&V&&Y?{type:"interval",data:ta,encode:{x:q.name,y:V.name,color:Y.name},transform:[{type:"stackY"}]}:null;case"percent_stacked_column_chart":return Q=(U=(0,r.CR)(z(to),3))[0],X=U[1],K=U[2],Q&&X&&K?{type:"interval",data:ta,encode:{x:Q.name,y:X.name,color:K.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null;case"scatter_plot":return function(t,e){var n=e.filter(function(t){return a(t.levelOfMeasurements,["Interval"])}).sort(L),r=n[0],i=n[1],o=e.find(function(t){return a(t.levelOfMeasurements,["Nominal"])});if(!r||!i)return null;var l={type:"point",data:t,encode:{x:r.name,y:i.name}};return o&&(l.encode.color=o.name),l}(ta,to);case"bubble_chart":return function(t,e){for(var n=e.filter(function(t){return a(t.levelOfMeasurements,["Interval"])}),i={x:n[0],y:n[1],corr:0,size:n[2]},o=function(t){for(var e=function(e){var a=(0,W.Vs)(n[t].rawData,n[e].rawData);Math.abs(a)>i.corr&&(i.x=n[t],i.y=n[e],i.corr=a,i.size=n[(0,r.ev)([],(0,r.CR)(Array(n.length).keys()),!1).find(function(n){return n!==t&&n!==e})||0])},a=t+1;ae.score?-1:0},X=function(t){var e=t.chartWIKI,n=t.dataProps,r=t.ruleBase,i=t.options;return Object.keys(e).map(function(t){return function(t,e,n,r,i){var a=i?i.purpose:"",o=i?i.preferences:void 0,l=[],s={dataProps:n,chartType:t,purpose:a,preferences:o},c=U(t,e,r,"HARD",s,l);if(0===c)return{chartType:t,score:0,log:l};var u=U(t,e,r,"SOFT",s,l);return{chartType:t,score:c*u,log:l}}(t,e,n,r,i)}).filter(function(t){return t.score>0}).sort(Q)};function K(t,e,n,r){return Object.values(n).filter(function(r){var i;return"DESIGN"===r.type&&r.trigger({dataProps:e,chartType:t})&&!(null===(i=n[r.id].option)||void 0===i?void 0:i.off)}).reduce(function(t,n){return P(t,n.optimizer(e,r))},{})}var J=n(28670),tt=n.n(J);let te=t=>!!tt().valid(t);function tn(t){let{value:e}=t;return te(e)?tt()(e).hex():""}let tr={lab:{l:[0,100],a:[-86.185,98.254],b:[-107.863,94.482]},lch:{l:[0,100],c:[0,100],h:[0,360]},rgb:{r:[0,255],g:[0,255],b:[0,255]},rgba:{r:[0,255],g:[0,255],b:[0,255],a:[0,1]},hsl:{h:[0,360],s:[0,1],l:[0,1]},hsv:{h:[0,360],s:[0,1],v:[0,1]},hsi:{h:[0,360],s:[0,1],i:[0,1]},cmyk:{c:[0,1],m:[0,1],y:[0,1],k:[0,1]}},ti={model:"rgb",value:{r:255,g:255,b:255}},ta=["normal","darken","multiply","colorBurn","linearBurn","lighten","screen","colorDodge","linearDodge","overlay","softLight","hardLight","vividLight","linearLight","pinLight","difference","exclusion"];[...ta];let to=t=>!!tt().valid(t),tl=t=>{let{value:e}=t;return to(e)?tt()(e):tt()("#000")},ts=(t,e=t.model)=>{let n=tl(t);return n?n[e]():[0,0,0]},tc=(t,e=4===t.length?"rgba":"rgb")=>{let n={};if(1===t.length){let[r]=t;for(let t=0;tt*e/255,tp=(t,e)=>t+e-t*e/255,tg=(t,e)=>t<128?th(2*t,e):tp(2*t-255,e),tm={normal:t=>t,darken:(t,e)=>Math.min(t,e),multiply:th,colorBurn:(t,e)=>0===t?0:Math.max(0,255*(1-(255-e)/t)),lighten:(t,e)=>Math.max(t,e),screen:tp,colorDodge:(t,e)=>255===t?255:Math.min(255,255*(e/(255-t))),overlay:(t,e)=>tg(e,t),softLight:(t,e)=>{if(t<128)return e-(1-2*t/255)*e*(1-e/255);let n=e<64?((16*(e/255)-12)*(e/255)+4)*(e/255):Math.sqrt(e/255);return e+255*(2*t/255-1)*(n-e/255)},hardLight:tg,difference:(t,e)=>Math.abs(t-e),exclusion:(t,e)=>t+e-2*t*e/255,linearBurn:(t,e)=>Math.max(t+e-255,0),linearDodge:(t,e)=>Math.min(255,t+e),linearLight:(t,e)=>Math.max(e+2*t-255,0),vividLight:(t,e)=>t<128?255*(1-(1-e/255)/(2*t/255)):255*(e/2/(255-t)),pinLight:(t,e)=>t<128?Math.min(e,2*t):Math.max(e,2*t-255)},ty=t=>.3*t[0]+.58*t[1]+.11*t[2],tv=t=>{let e=ty(t),n=Math.min(...t),r=Math.max(...t),i=[...t];return n<0&&(i=i.map(t=>e+(t-e)*e/(e-n))),r>255&&(i=i.map(t=>e+(t-e)*(255-e)/(r-e))),i},tb=(t,e)=>{let n=e-ty(t);return tv(t.map(t=>t+n))},tx=t=>Math.max(...t)-Math.min(...t),tO=(t,e)=>{let n=t.map((t,e)=>({value:t,index:e}));n.sort((t,e)=>t.value-e.value);let r=n[0].index,i=n[1].index,a=n[2].index,o=[...t];return o[a]>o[r]?(o[i]=(o[i]-o[r])*e/(o[a]-o[r]),o[a]=e):(o[i]=0,o[a]=0),o[r]=0,o},tw={hue:(t,e)=>tb(tO(t,tx(e)),ty(e)),saturation:(t,e)=>tb(tO(e,tx(t)),ty(e)),color:(t,e)=>tb(t,ty(e)),luminosity:(t,e)=>tb(e,ty(t))},t_=(t,e,n="normal")=>{let r;let[i,a,o,l]=ts(t,"rgba"),[s,c,u,f]=ts(e,"rgba"),d=[i,a,o],h=[s,c,u];if(ta.includes(n)){let t=tm[n];r=d.map((e,n)=>Math.floor(t(e,h[n])))}else r=tw[n](d,h);let p=l+f*(1-l),g=Math.round((l*(1-f)*i+l*f*r[0]+(1-l)*f*s)/p),m=Math.round((l*(1-f)*a+l*f*r[1]+(1-l)*f*c)/p),y=Math.round((l*(1-f)*o+l*f*r[2]+(1-l)*f*u)/p);return 1===p?{model:"rgb",value:{r:g,g:m,b:y}}:{model:"rgba",value:{r:g,g:m,b:y,a:p}}},tk=(t,e)=>{let n=(t+e)%360;return n<0?n+=360:n>=360&&(n-=360),n},tC=(t=1,e=0)=>{let n=Math.min(t,e),r=Math.max(t,e);return n+Math.random()*(r-n)},tM=(t=1,e=0)=>{let n=Math.ceil(Math.min(t,e)),r=Math.floor(Math.max(t,e));return Math.floor(n+Math.random()*(r-n+1))},tj=t=>{if(t&&"object"==typeof t){let e=Array.isArray(t);if(e){let e=t.map(t=>tj(t));return e}let n={},r=Object.keys(t);return r.forEach(e=>{n[e]=tj(t[e])}),n}return t};function tS(t){return t*(Math.PI/180)}var tA=n(56917),tE=n.n(tA);let tP=(t,e="normal")=>{if("normal"===e)return{...t};let n=tn(t),r=tE()[e](n);return td(r)},tR=t=>{let e=tu(t),[,,,n=1]=ts(t,"rgba");return tf(e,n)},tZ=(t,e="normal")=>"grayscale"===e?tR(t):tP(t,e),tT=(t,e,n=[tM(5,10),tM(90,95)])=>{let[r,i,a]=ts(t,"lab"),o=r<=15?r:n[0],l=r>=85?r:n[1],s=(l-o)/(e-1),c=Math.ceil((r-o)/s);return s=0===c?s:(r-o)/c,Array(e).fill(0).map((t,e)=>tc([s*e+o,i,a],"lab"))},tL=t=>{let{count:e,color:n,tendency:r}=t,i=tT(n,e),a={name:"monochromatic",semantic:null,type:"discrete-scale",colors:"tint"===r?i:i.reverse()};return a},tB={model:"rgb",value:{r:0,g:0,b:0}},tI={model:"rgb",value:{r:255,g:255,b:255}},tN=(t,e,n="lab")=>tt().distance(tl(t),tl(e),n),tD=(t,e)=>{let n=Math.atan2(t,e)*(180/Math.PI);return n>=0?n:n+360},tz=(t,e)=>{let n,r;let[i,a,o]=ts(t,"lab"),[l,s,c]=ts(e,"lab"),u=Math.sqrt(a**2+o**2),f=Math.sqrt(s**2+c**2),d=(u+f)/2,h=.5*(1-Math.sqrt(d**7/(d**7+6103515625))),p=(1+h)*a,g=(1+h)*s,m=Math.sqrt(p**2+o**2),y=Math.sqrt(g**2+c**2),v=tD(o,p),b=tD(c,g),x=y-m;n=180>=Math.abs(b-v)?b-v:b-v<-180?b-v+360:b-v-360;let O=2*Math.sqrt(m*y)*Math.sin(tS(n)/2);r=180>=Math.abs(v-b)?(v+b)/2:Math.abs(v-b)>180&&v+b<360?(v+b+360)/2:(v+b-360)/2;let w=(i+l)/2,_=(m+y)/2,k=1-.17*Math.cos(tS(r-30))+.24*Math.cos(tS(2*r))+.32*Math.cos(tS(3*r+6))-.2*Math.cos(tS(4*r-63)),C=1+.015*(w-50)**2/Math.sqrt(20+(w-50)**2),M=1+.045*_,j=1+.015*_*k,S=-2*Math.sqrt(_**7/(_**7+6103515625))*Math.sin(tS(60*Math.exp(-(((r-275)/25)**2)))),A=Math.sqrt(((l-i)/(1*C))**2+(x/(1*M))**2+(O/(1*j))**2+S*(x/(1*M))*(O/(1*j)));return A},tF=t=>{let e=t/255;return e<=.03928?e/12.92:((e+.055)/1.055)**2.4},t$=t=>{let[e,n,r]=ts(t);return .2126*tF(e)+.7152*tF(n)+.0722*tF(r)},tW=(t,e)=>{let n=t$(t),r=t$(e);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},tH=(t,e,n={measure:"euclidean"})=>{let{measure:r="euclidean",backgroundColor:i=ti}=n,a=t_(t,i),o=t_(e,i);switch(r){case"CIEDE2000":return tz(a,o);case"euclidean":return tN(a,o,n.colorModel);case"contrastRatio":return tW(a,o);default:return tN(a,o)}},tG=[.8,1.2],tq={rouletteWheel:t=>{let e=t.reduce((t,e)=>t+e),n=0,r=tC(e),i=0;for(let e=0;e{let e=-1,n=0;for(let r=0;r<3;r+=1){let i=tM(t.length-1);t[i]>n&&(e=r,n=t[i])}return e}},tV=(t,e="tournament")=>tq[e](t),tY=(t,e)=>{let n=tj(t),r=tj(e);for(let i=1;i{let i=tj(t),a=e[tM(e.length-1)],o=tM(t[0].length-1),l=i[a][o]*tC(...tG),s=[15,240];"grayscale"!==n&&(s=tr[r][r.split("")[o]]);let[c,u]=s;return lu&&(l=u),i[a][o]=l,i},tQ=(t,e,n,r,i,a)=>{let o;o="grayscale"===n?t.map(([t])=>tf(t)):t.map(t=>tZ(tc(t,r),n));let l=1/0;for(let t=0;t{if(Math.round(tQ(t,e,n,i,a,o))>r)return t;let l=Array(t.length).fill(0).map((t,e)=>e).filter((t,n)=>!e[n]),s=Array(50).fill(0).map(()=>tU(t,l,n,i)),c=s.map(t=>tQ(t,e,n,i,a,o)),u=Math.max(...c),f=s[c.findIndex(t=>t===u)],d=1;for(;d<100&&Math.round(u)tC()?tY(e,r):[e,r];a=a.map(t=>.1>tC()?tU(t,l,n,i):t),t.push(...a)}c=(s=t).map(t=>tQ(t,e,n,i,a,o));let r=Math.max(...c);u=r,f=s[c.findIndex(t=>t===r)],d+=1}return f},tK={euclidean:30,CIEDE2000:20,contrastRatio:4.5},tJ={euclidean:291.48,CIEDE2000:100,contrastRatio:21},t0=(t,e={})=>{let{locked:n=[],simulationType:r="normal",threshold:i,colorModel:a="hsv",colorDifferenceMeasure:o="euclidean",backgroundColor:l=ti}=e,s=i;if(s||(s=tK[o]),"grayscale"===r){let e=tJ[o];s=Math.min(s,e/t.colors.length)}let c=tj(t);if("matrix"!==c.type&&"continuous-scale"!==c.type){if("grayscale"===r){let t=c.colors.map(t=>[tu(t)]),e=tX(t,n,r,s,a,o,l);c.colors.forEach((t,n)=>Object.assign(t,function(t,e){let n;let[,r,i]=ts(e,"lab"),[,,,a=1]=ts(e,"rgba"),o=100*t,l=Math.round(o),s=tu(tc([l,r,i],"lab")),c=25;for(;Math.round(o)!==Math.round(s/255*100)&&c>0;)o>s/255*100?l+=1:l-=1,c-=1,s=tu(tc([l,r,i],"lab"));if(Math.round(o)ts(t,a)),e=tX(t,n,r,s,a,o,l);c.colors.forEach((t,n)=>{Object.assign(t,tc(e[n],a))})}}return c},t1=[.3,.9],t2=[.5,1],t5=(t,e,n,r=[])=>{let[i]=ts(t,"hsv"),a=Array(n).fill(!1),o=-1===r.findIndex(e=>e&&e.model===t.model&&e.value===t.value),l=Array(n).fill(0).map((n,l)=>{let s=r[l];return s?(a[l]=!0,s):o?(o=!1,a[l]=!0,t):tc([tk(i,e*l),tC(...t1),tC(...t2)],"hsv")});return{newColors:l,locked:a}};function t3(){let t=tM(255),e=tM(255),n=tM(255);return tc([t,e,n],"rgb")}let t4=t=>{let{count:e,colors:n}=t,r=[],i={name:"random",semantic:null,type:"categorical",colors:Array(e).fill(0).map((t,e)=>{let i=n[e];return i?(r[e]=!0,i):t3()})};return t0(i,{locked:r})},t6=["monochromatic"],t8=(t,e)=>{let{count:n=8,tendency:r="tint"}=e,{colors:i=[],color:a}=e;return a||(a=i.find(t=>!!t&&!!t.model&&!!t.value)||t3()),t6.includes(t)&&(i=[]),{color:a,colors:i,count:n,tendency:r}},t7={monochromatic:tL,analogous:t=>{let{count:e,color:n,tendency:r}=t,[i,a,o]=ts(n,"hsv"),l=Math.floor(e/2),s=60/(e-1);i>=60&&i<=240&&(s=-s);let c=(a-.1)/3/(e-l-1),u=(o-.4)/3/l,f=Array(e).fill(0).map((t,e)=>{let n=tk(i,s*(e-l)),r=e<=l?Math.min(a+c*(l-e),1):a+3*c*(l-e),f=e<=l?o-3*u*(l-e):Math.min(o-u*(l-e),1);return tc([n,r,f],"hsv")}),d={name:"analogous",semantic:null,type:"discrete-scale",colors:"tint"===r?f:f.reverse()};return d},achromatic:t=>{let{tendency:e}=t,n={...t,color:"tint"===e?tB:tI},r=tL(n);return{...r,name:"achromatic"}},complementary:t=>{let e;let{count:n,color:r}=t,[i,a,o]=ts(r,"hsv"),l=tc([tk(i,180),a,o],"hsv"),s=tM(80,90),c=tM(15,25),u=Math.floor(n/2),f=tT(r,u,[c,s]),d=tT(l,u,[c,s]).reverse();if(n%2==1){let t=tc([(tk(i,180)+i)/2,tC(.05,.1),tC(.9,.95)],"hsv");e=[...f,t,...d]}else e=[...f,...d];let h={name:"complementary",semantic:null,type:"discrete-scale",colors:e};return h},"split-complementary":t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,180,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},triadic:t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,120,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},tetradic:t=>{let{count:e,color:n,colors:r}=t,{newColors:i,locked:a}=t5(n,90,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:a})},polychromatic:t=>{let{count:e,color:n,colors:r}=t,i=360/e,{newColors:a,locked:o}=t5(n,i,e,r);return t0({name:"tetradic",semantic:null,type:"categorical",colors:a},{locked:o})},customized:t4},t9=(t="monochromatic",e={})=>{let n=t8(t,e);try{return t7[t](n)}catch(t){return t4(n)}};function et(t,e,n){var r,i=O(e),a=n.primaryColor,o=i.encode;if(a&&o){var l=td(a);if(o.color){var s=o.color,c=s.type,u=s.field;return{scale:{color:{range:t9("quantitative"===c?G[Math.floor(Math.random()*G.length)]:q[Math.floor(Math.random()*q.length)],{color:l,count:null===(r=t.find(function(t){return t.name===u}))||void 0===r?void 0:r.count}).colors.map(function(t){return tn(t)})}}}}return"line"===e.type?{style:{stroke:tn(l)}}:{style:{fill:tn(l)}}}return{}}function ee(t,e,n,r,i){var a,o=O(e).encode;if(n&&o){var l=td(n);if(o.color){var s=o.color,c=s.type,u=s.field,f=r;return f||(f="quantitative"===c?"monochromatic":"polychromatic"),{scale:{color:{range:t9(f,{color:l,count:null===(a=t.find(function(t){return t.name===u}))||void 0===a?void 0:a.count}).colors.map(function(t){return tn(i?tZ(t,i):t)})}}}}return"line"===e.type?{style:{stroke:tn(l)}}:{style:{fill:tn(l)}}}return{}}n(16243);var en=n(8625);function er(t,e,n){try{i=e?new en.Z(t,{columns:e}):new en.Z(t)}catch(t){return console.error("failed to transform the input data into DataFrame: ",t),[]}var i,a=i.info();return n?a.map(function(t){var e=n.find(function(e){return e.name===t.name});return(0,r.pi)((0,r.pi)({},t),e)}):a}var ei=function(t){var e=t.data,n=t.fields;return n?e.map(function(t){return Object.keys(t).forEach(function(e){n.includes(e)||delete t[e]}),t}):e};function ea(t){var e=t.adviseParams,n=t.ckb,r=t.ruleBase,i=e.data,a=e.dataProps,o=e.smartColor,l=e.options,s=e.colorOptions,c=e.fields,u=l||{},f=u.refine,d=void 0!==f&&f,h=u.requireSpec,p=void 0===h||h,g=u.theme,m=s||{},y=m.themeColor,v=void 0===y?V:y,b=m.colorSchemeType,x=m.simulationType,O=j(i),w=er(O,c,a),_=ei({data:O,fields:c}),k=X({dataProps:w,ruleBase:r,chartWIKI:n});return{advices:k.map(function(t){var e=t.score,i=t.chartType,a=H({chartType:i,data:_,dataProps:w,chartKnowledge:n[i]});if(a&&d){var l=K(i,w,r,a);P(a,l)}if(a){if(g&&!o){var l=et(w,a,g);P(a,l)}else if(o){var l=ee(w,a,v,b,x);P(a,l)}}return{type:i,spec:a,score:e}}).filter(function(t){return!p||t.spec}),log:k}}var eo=function(t){var e,n=t.coordinate;if((null==n?void 0:n.type)==="theta")return(null==n?void 0:n.innerRadius)?"donut_chart":"pie_chart";var r=t.transform,i=null===(e=null==n?void 0:n.transform)||void 0===e?void 0:e.some(function(t){return"transpose"===t.type}),a=null==r?void 0:r.some(function(t){return"normalizeY"===t.type}),o=null==r?void 0:r.some(function(t){return"stackY"===t.type}),l=null==r?void 0:r.some(function(t){return"dodgeX"===t.type});return i?l?"grouped_bar_chart":a?"stacked_bar_chart":o?"percent_stacked_bar_chart":"bar_chart":l?"grouped_column_chart":a?"stacked_column_chart":o?"percent_stacked_column_chart":"column_chart"},el=function(t){var e=t.transform,n=null==e?void 0:e.some(function(t){return"stackY"===t.type}),r=null==e?void 0:e.some(function(t){return"normalizeY"===t.type});return n?r?"percent_stacked_area_chart":"stacked_area_chart":"area_chart"},es=function(t){var e=t.encode;return e.shape&&"hvh"===e.shape?"step_line_chart":"line_chart"},ec=function(t){var e;switch(t.type){case"area":e=el(t);break;case"interval":e=eo(t);break;case"line":e=es(t);break;case"point":e=t.encode.size?"bubble_chart":"scatter_plot";break;case"rect":e="histogram";break;case"cell":e="heatmap";break;default:e=""}return e};function eu(t,e,n,i,a,o,l){Object.values(t).filter(function(t){var i,a,l=t.option||{},s=l.weight,c=l.extra;return i=t.type,("DESIGN"===e?"DESIGN"===i:"DESIGN"!==i)&&!(null===(a=t.option)||void 0===a?void 0:a.off)&&t.trigger((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},n),{weight:s}),c),{chartWIKI:o}))}).forEach(function(t){var s,c=t.type,u=t.id,f=t.docs;if("DESIGN"===e){var d=t.optimizer(n.dataProps,l);s=0===Object.keys(d).length?1:0,a.push({type:c,id:u,score:s,fix:d,docs:f})}else{var h=t.option||{},p=h.weight,g=h.extra;s=t.validator((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},n),{weight:p}),g),{chartWIKI:o})),a.push({type:c,id:u,score:s,docs:f})}i.push({phase:"LINT",ruleId:u,score:s,base:s,weight:1,ruleType:c})})}function ef(t,e,n){var r=t.spec,i=t.options,a=t.dataProps,o=null==i?void 0:i.purpose,l=null==i?void 0:i.preferences,s=ec(r),c=[],u=[];if(!r||!s)return{lints:c,log:u};if(!a||!a.length)try{a=new en.Z(r.data).info()}catch(t){return console.error("error: ",t),{lints:c,log:u}}var f={dataProps:a,chartType:s,purpose:o,preferences:l};return eu(e,"notDESIGN",f,u,c,n),eu(e,"DESIGN",f,u,c,n,r),{lints:c=c.filter(function(t){return t.score<1}),log:u}}var ed=n(89991),eh=function(){function t(t,e){var n,r,i,a=this;this.plugins=[],this.name=t,this.afterPluginsExecute=null!==(n=null==e?void 0:e.afterPluginsExecute)&&void 0!==n?n:this.defaultAfterPluginsExecute,this.pluginManager=new ed.AsyncParallelHook(["data","results"]),this.syncPluginManager=new ed.SyncHook(["data","results"]),this.context=null==e?void 0:e.context,this.hasAsyncPlugin=!!(null===(r=null==e?void 0:e.plugins)||void 0===r?void 0:r.find(function(t){return a.isPluginAsync(t)})),null===(i=null==e?void 0:e.plugins)||void 0===i||i.forEach(function(t){a.registerPlugin(t)})}return t.prototype.defaultAfterPluginsExecute=function(t){return(0,y.last)(Object.values(t))},t.prototype.isPluginAsync=function(t){return"AsyncFunction"===t.execute.constructor.name},t.prototype.registerPlugin=function(t){var e,n=this;null===(e=t.onLoad)||void 0===e||e.call(t,this.context),this.plugins.push(t),this.isPluginAsync(t)&&(this.hasAsyncPlugin=!0),this.hasAsyncPlugin?this.pluginManager.tapPromise(t.name,function(e,i){return void 0===i&&(i={}),(0,r.mG)(n,void 0,void 0,function(){var n,a,o;return(0,r.Jh)(this,function(r){switch(r.label){case 0:return null===(a=t.onBeforeExecute)||void 0===a||a.call(t,e,this.context),[4,t.execute(e,this.context)];case 1:return n=r.sent(),null===(o=t.onAfterExecute)||void 0===o||o.call(t,n,this.context),i[t.name]=n,[2]}})})}):this.syncPluginManager.tap(t.name,function(e,r){void 0===r&&(r={}),null===(i=t.onBeforeExecute)||void 0===i||i.call(t,e,n.context);var i,a,o=t.execute(e,n.context);return null===(a=t.onAfterExecute)||void 0===a||a.call(t,o,n.context),r[t.name]=o,o})},t.prototype.unloadPlugin=function(t){var e,n=this.plugins.find(function(e){return e.name===t});n&&(null===(e=n.onUnload)||void 0===e||e.call(n,this.context),this.plugins=this.plugins.filter(function(e){return e.name!==t}))},t.prototype.execute=function(t){var e,n=this;if(this.hasAsyncPlugin){var i={};return this.pluginManager.promise(t,i).then(function(){return(0,r.mG)(n,void 0,void 0,function(){var t;return(0,r.Jh)(this,function(e){return[2,null===(t=this.afterPluginsExecute)||void 0===t?void 0:t.call(this,i)]})})})}var a={};return this.syncPluginManager.call(t,a),null===(e=this.afterPluginsExecute)||void 0===e?void 0:e.call(this,a)},t}(),ep=function(){function t(t){var e=t.components,n=this;this.components=e,this.componentsManager=new ed.AsyncSeriesWaterfallHook(["initialParams"]),e.forEach(function(t){t&&n.componentsManager.tapPromise(t.name,function(e){return(0,r.mG)(n,void 0,void 0,function(){var n,i;return(0,r.Jh)(this,function(a){switch(a.label){case 0:return n=e,[4,t.execute(n||{})];case 1:return i=a.sent(),[2,(0,r.pi)((0,r.pi)({},n),i)]}})})})})}return t.prototype.execute=function(t){return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){switch(e.label){case 0:return[4,this.componentsManager.promise(t)];case 1:return[2,e.sent()]}})})},t}(),eg={name:"defaultDataProcessor",stage:["dataAnalyze"],execute:function(t,e){var n=t.data,r=t.customDataProps,i=((null==e?void 0:e.options)||{}).fields,a=(0,y.cloneDeep)(n),o=er(a,i,r);return{data:ei({data:a,fields:i}),dataProps:o}}},em={name:"defaultChartTypeRecommend",stage:["chartTypeRecommend"],execute:function(t,e){var n=t.dataProps,r=e||{},i=r.advisor,a=r.options;return{chartTypeRecommendations:X({dataProps:n,chartWIKI:i.ckb,ruleBase:i.ruleBase,options:a})}}},ey={name:"defaultSpecGenerator",stage:["specGenerate"],execute:function(t,e){var n=t.chartTypeRecommendations,r=t.dataProps,i=t.data,a=e||{},o=a.options,l=a.advisor,s=o||{},c=s.refine,u=void 0!==c&&c,f=s.theme,d=s.colorOptions,h=s.smartColor,p=d||{},g=p.themeColor,m=void 0===g?V:g,y=p.colorSchemeType,v=p.simulationType;return{advices:null==n?void 0:n.map(function(t){var e=t.chartType,n=H({chartType:e,data:i,dataProps:r,chartKnowledge:l.ckb[e]});if(n&&u){var a=K(e,r,l.ruleBase,n);P(n,a)}if(n){if(f&&!h){var a=et(r,n,f);P(n,a)}else if(h){var a=ee(r,n,m,y,v);P(n,a)}}return{type:t.chartType,spec:n,score:t.score}}).filter(function(t){return t.spec})}}},ev=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.ckb=(n=t.ckbCfg,a=JSON.parse(JSON.stringify(i)),n?(o=n.exclude,l=n.include,s=n.custom,o&&o.forEach(function(t){Object.keys(a).includes(t)&&delete a[t]}),l&&Object.keys(a).forEach(function(t){l.includes(t)||delete a[t]}),(0,r.pi)((0,r.pi)({},a),s)):a),this.ruleBase=M(t.ruleCfg),this.context={advisor:this},this.initDefaultComponents();var n,a,o,l,s,c=[this.dataAnalyzer,this.chartTypeRecommender,this.chartEncoder,this.specGenerator],u=e.plugins,f=e.components;this.plugins=u,this.pipeline=new ep({components:null!=f?f:c})}return t.prototype.initDefaultComponents=function(){this.dataAnalyzer=new eh("data",{plugins:[eg],context:this.context}),this.chartTypeRecommender=new eh("chartType",{plugins:[em],context:this.context}),this.specGenerator=new eh("specGenerate",{plugins:[ey],context:this.context})},t.prototype.advise=function(t){return ea({adviseParams:t,ckb:this.ckb,ruleBase:this.ruleBase}).advices},t.prototype.adviseAsync=function(t){return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){switch(e.label){case 0:return this.context=(0,r.pi)((0,r.pi)({},this.context),{data:t.data,options:t.options}),[4,this.pipeline.execute(t)];case 1:return[2,e.sent().advices]}})})},t.prototype.adviseWithLog=function(t){return ea({adviseParams:t,ckb:this.ckb,ruleBase:this.ruleBase})},t.prototype.lint=function(t){return ef(t,this.ruleBase,this.ckb).lints},t.prototype.lintWithLog=function(t){return ef(t,this.ruleBase,this.ckb)},t.prototype.registerPlugins=function(t){var e={dataAnalyze:this.dataAnalyzer,chartTypeRecommend:this.chartTypeRecommender,encode:this.chartEncoder,specGenerate:this.specGenerator};t.forEach(function(t){"string"==typeof t.stage&&e[t.stage].registerPlugin(t)})},t}()},8625:function(t,e,n){"use strict";n.d(e,{Z:function(){return O}});var r=n(97582),i=n(66465),a=n(61839),o=n(7813),l=function(t){var e,n,i=(void 0===(e=t)&&(e=!0),["".concat(o.oP),"".concat(o.oP).concat(o.cF).concat(e?"":"?","W").concat(o.ps,"(").concat(o.cF).concat(e?"":"?").concat(o.NO,")?"),"".concat(o.vc).concat(o.cF).concat(e?"":"?").concat(o.x4).concat(o.cF).concat(e?"":"?").concat(o.oP),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.vc).concat(o.cF).concat(e?"":"?").concat(o.x4),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.vc),"".concat(o.oP).concat(o.cF).concat(e?"":"?").concat(o.IY)]),a=(void 0===(n=t)&&(n=!0),["".concat(o.kr,":").concat(n?"":"?").concat(o.EB,":").concat(n?"":"?").concat(o.sh,"([.,]").concat(o.KP,")?").concat(o.ew,"?"),"".concat(o.kr,":").concat(n?"":"?").concat(o.EB,"?").concat(o.ew)]),l=(0,r.ev)((0,r.ev)([],(0,r.CR)(i),!1),(0,r.CR)(a),!1);return i.forEach(function(t){a.forEach(function(e){l.push("".concat(t,"[T\\s]").concat(e))})}),l.map(function(t){return new RegExp("^".concat(t,"$"))})};function s(t,e){if((0,a.HD)(t)){for(var n=l(e),r=0;r0&&(m.generateColumns([0],null==n?void 0:n.columns),m.colData=[m.data],m.data=m.data.map(function(t){return[t]})),(0,a.kJ)(b)){var x=(0,c.w6)(b.length);m.generateDataAndColDataFromArray(!1,e,x,null==n?void 0:n.fillValue,null==n?void 0:n.columnTypes),m.generateColumns(x,null==n?void 0:n.columns)}if((0,a.Kn)(b)){for(var O=[],y=0;y=0&&b>=0||O.length>0,"The rowLoc is not found in the indexes."),v>=0&&b>=0&&(E=this.data.slice(v,b),P=this.indexes.slice(v,b)),O.length>0)for(var s=0;s=0&&_>=0){for(var s=0;s0){for(var R=[],Z=E.slice(),s=0;s=0&&y>=0||v.length>0,"The colLoc is illegal"),(0,a.U)(n)&&(0,c.w6)(this.columns.length).includes(n)&&(b=n,O=n+1),(0,a.kJ)(n))for(var s=0;s=0&&y>=0||v.length>0,"The rowLoc is not found in the indexes.");var S=[],A=[];if(m>=0&&y>=0)S=this.data.slice(m,y),A=this.indexes.slice(m,y);else if(v.length>0)for(var s=0;s=0&&O>=0||w.length>0,"The colLoc is not found in the columns index."),b>=0&&O>=0){for(var s=0;s0){for(var E=[],P=S.slice(),s=0;s1){var _={},k=y;b.forEach(function(e){"date"===e?(_.date=t(k.filter(function(t){return s(t)}),n),k=k.filter(function(t){return!s(t)})):"integer"===e?(_.integer=t(k.filter(function(t){return(0,a.Cf)(t)&&!s(t)}),n),k=k.filter(function(t){return!(0,a.Cf)(t)})):"float"===e?(_.float=t(k.filter(function(t){return(0,a.vn)(t)&&!s(t)}),n),k=k.filter(function(t){return!(0,a.vn)(t)})):"string"===e&&(_.string=t(k.filter(function(t){return"string"===f(t,n)})),k=k.filter(function(t){return"string"!==f(t,n)}))}),w.meta=_}2===w.distinct&&"date"!==w.recommendation&&(g.length>=100?w.recommendation="boolean":(0,a.jn)(O,!0)&&(w.recommendation="boolean")),"string"===p&&Object.assign(w,(o=(r=y.map(function(t){return"".concat(t)})).map(function(t){return t.length}),{maxLength:(0,i.Fp)(o),minLength:(0,i.VV)(o),meanLength:(0,i.J6)(o),containsChar:r.some(function(t){return/[A-z]/.test(t)}),containsDigit:r.some(function(t){return/[0-9]/.test(t)}),containsSpace:r.some(function(t){return/\s/.test(t)})})),("integer"===p||"float"===p)&&Object.assign(w,(l=y.map(function(t){return 1*t}),{minimum:(0,i.VV)(l),maximum:(0,i.Fp)(l),mean:(0,i.J6)(l),percentile5:(0,i.VR)(l,5),percentile25:(0,i.VR)(l,25),percentile50:(0,i.VR)(l,50),percentile75:(0,i.VR)(l,75),percentile95:(0,i.VR)(l,95),sum:(0,i.Sm)(l),variance:(0,i.CA)(l),standardDeviation:(0,i.IN)(l),zeros:l.filter(function(t){return 0===t}).length})),"date"===p&&Object.assign(w,(d="integer"===w.type,h=y.map(function(t){if(d){var e="".concat(t);if(8===e.length)return new Date("".concat(e.substring(0,4),"/").concat(e.substring(4,2),"/").concat(e.substring(6,2))).getTime()}return new Date(t).getTime()}),{minimum:y[(0,i._D)(h)],maximum:y[(0,i.F_)(h)]}));var C=[];return"boolean"!==w.recommendation&&("string"!==w.recommendation||u(w))||C.push("Nominal"),u(w)&&C.push("Ordinal"),("integer"===w.recommendation||"float"===w.recommendation)&&C.push("Interval"),"integer"===w.recommendation&&C.push("Discrete"),"float"===w.recommendation&&C.push("Continuous"),"date"===w.recommendation&&C.push("Time"),w.levelOfMeasurements=C,w}(this.colData[n],this.extra.strictDatePattern)),{name:String(o)}))}return e},e.prototype.toString=function(){for(var t=this,e=Array(this.columns.length+1).fill(0),n=0;ne[0]&&(e[0]=r)}for(var n=0;ne[n+1]&&(e[n+1]=r)}for(var n=0;ne[n+1]&&(e[n+1]=r)}return"".concat(g(e[0])).concat(this.columns.map(function(n,r){return"".concat(n).concat(r!==t.columns.length?g(e[r+1]-y(n)+2):"")}).join(""),"\n").concat(this.indexes.map(function(n,r){var i;return"".concat(n).concat(g(e[0]-y(n))).concat(null===(i=t.data[r])||void 0===i?void 0:i.map(function(n,r){return"".concat(m(n)).concat(r!==t.columns.length?g(e[r+1]-y(n)):"")}).join("")).concat(r!==t.indexes.length?"\n":"")}).join(""))},e}(b)},66465:function(t,e,n){"use strict";n.d(e,{Fp:function(){return u},F_:function(){return f},J6:function(){return h},VV:function(){return s},_D:function(){return c},Vs:function(){return y},VR:function(){return p},IN:function(){return m},Sm:function(){return d},Gn:function(){return v},CA:function(){return g}});var r=n(97582),i=n(84813),a=new WeakMap;function o(t,e,n){return a.get(t)||a.set(t,new Map),a.get(t).set(e,n),n}function l(t,e){var n=a.get(t);if(n)return n.get(e)}function s(t){var e=l(t,"min");return void 0!==e?e:o(t,"min",Math.min.apply(Math,(0,r.ev)([],(0,r.CR)(t),!1)))}function c(t){var e=l(t,"minIndex");return void 0!==e?e:o(t,"minIndex",function(t){for(var e=t[0],n=0,r=0;re&&(n=r,e=t[r]);return n}(t))}function d(t){var e=l(t,"sum");return void 0!==e?e:o(t,"sum",t.reduce(function(t,e){return e+t},0))}function h(t){return d(t)/t.length}function p(t,e,n){return void 0===n&&(n=!1),(0,i.hu)(e>0&&e<100,"The percent cannot be between (0, 100)."),(n?t:t.sort(function(t,e){return t>e?1:-1}))[Math.ceil(t.length*e/100)-1]}function g(t){var e=h(t),n=l(t,"variance");return void 0!==n?n:o(t,"variance",t.reduce(function(t,n){return t+Math.pow(n-e,2)},0)/t.length)}function m(t){return Math.sqrt(g(t))}function y(t,e){return(0,i.hu)(t.length===e.length,"The x and y must has same length."),(h(t.map(function(t,n){return t*e[n]}))-h(t)*h(e))/(m(t)*m(e))}function v(t){var e={};return t.forEach(function(t){var n="".concat(t);e[n]?e[n]+=1:e[n]=1}),e}},84813:function(t,e,n){"use strict";n.d(e,{Js:function(){return s},Tw:function(){return a},hu:function(){return l},w6:function(){return o}});var r=n(97582),i=n(61839);function a(t){return Array.from(new Set(t))}function o(t){return(0,r.ev)([],(0,r.CR)(Array(t).keys()),!1)}function l(t,e){if(!t)throw Error(e)}function s(t,e){if(!(0,i.kJ)(t)||0===t.length||!(0,i.kJ)(e)||0===e.length||t.length!==e.length)return!1;for(var n={},r=0;r(18|19|20)\\d{2})",o="(?0?[1-9]|1[012])",l="(?0?[1-9]|[12]\\d|3[01])",s="(?[0-4]\\d|5[0-2])",c="(?[1-7])",u="(0?\\d|[012345]\\d)",f="(?".concat(u,")"),d="(?".concat(u,")"),h="(?".concat(u,")"),p="(?\\d{1,4})",g="(?(([0-2]\\d|3[0-5])\\d)|36[0-6])",m="(?Z|[+-]".concat("(0?\\d|1\\d|2[0-4])","(:").concat(u,")?)")},61839:function(t,e,n){"use strict";n.d(e,{Cf:function(){return c},HD:function(){return a},J_:function(){return f},Kn:function(){return h},M1:function(){return g},U:function(){return s},hj:function(){return o},i1:function(){return l},jn:function(){return d},kJ:function(){return p},kK:function(){return i},vn:function(){return u}});var r=n(7813);function i(t){return null==t||""===t||Number.isNaN(t)||"null"===t}function a(t){return"string"==typeof t}function o(t){return"number"==typeof t}function l(t){if(a(t)){var e=!1,n=t;/^[+-]/.test(n)&&(n=n.slice(1));for(var r=0;r=t.length?void 0:t)&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0n=>t(e(n)),t)}function k(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}Z=new p(3),p!=Float32Array&&(Z[0]=0,Z[1]=0,Z[2]=0),Z=new p(4),p!=Float32Array&&(Z[0]=0,Z[1]=0,Z[2]=0,Z[3]=0);let C=Math.sqrt(50),M=Math.sqrt(10),j=Math.sqrt(2);function S(t,e,n){return t=Math.floor(Math.log(e=(e-t)/Math.max(0,n))/Math.LN10),n=e/10**t,0<=t?(n>=C?10:n>=M?5:n>=j?2:1)*10**t:-(10**-t)/(n>=C?10:n>=M?5:n>=j?2:1)}let A=(t,e,n=5)=>{let r=0,i=(t=[t,e]).length-1,a=t[r],o=t[i],l;return o{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){var e=this.options.interpolator;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){var{domain:r,interpolator:i,round:a}=this.getOptions(),r=e(r.map(t)),a=a?t=>l(t=i(t),"Number")?Math.round(t):t:i;this.output=_(a,r,n,t)},n.prototype.invert=void 0}}var R,Z={exports:{}},T={exports:{}},L=Array.prototype.concat,B=Array.prototype.slice,I=T.exports=function(t){for(var e=[],n=0,r=t.length;nn=>t*(1-n)+e*n,U=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Y(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{let n=V(t),r=V(e);return null===n||null===r?n?()=>t:()=>e:t=>{var e=[,,,,];for(let o=0;o<4;o+=1){var i=n[o],a=r[o];e[o]=i*(1-t)+a*t}var[o,l,s,c]=e;return`rgba(${Math.round(o)}, ${Math.round(l)}, ${Math.round(s)}, ${c})`}}},Q=(t,e)=>{let n=Y(t,e);return t=>Math.round(n(t))};function X({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function K(t){return"object"==typeof t?t.valueOf():t}class J extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=K,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(X({map:this.map,initKey:this.initKey},t))}has(t){return super.has(X({map:this.map,initKey:this.initKey},t))}set(t,e){var n,r;return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e)}delete(t){var e,n;return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n))}}class tt{constructor(t){this.options=f({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=f({},this.options,t),this.rescale(t)}rescale(t){}}let te=Symbol("defaultUnknown");function tn(t,e,n){for(let r=0;r""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class ta extends tt{getDefaultOptions(){return{domain:[],range:[],unknown:te}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&tn(this.domainIndexMap,this.getDomain(),this.domainKey),tr({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&tn(this.rangeIndexMap,this.getRange(),this.rangeKey),tr({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=ti(e),this.rangeKey=ti(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new ta(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}class to extends ta{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:te,flex:[]}}constructor(t){super(t)}clone(){return new to(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0t/e)}(c),p=f/h.reduce((t,e)=>t+e);var c=new J(e.map((t,e)=>(e=h[e]*p,[t,o?Math.floor(e):e]))),g=new J(e.map((t,e)=>(e=h[e]*p+d,[t,o?Math.floor(e):e]))),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/s*i))*l;let m=o?Math.round(t):t;var y=Array(s);for(let t=0;ts+e*o),{valueStep:o,valueBandWidth:l,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}let tl=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0{let r;var[t,i]=t,[e,a]=e;return _(t{let r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r);var o=t[0]>t[r],l=o?[...t].reverse():t,s=o?[...e].reverse():e;for(let t=0;t{var n=function(t,e,n,r,i){let a=1,o=r||t.length;for(var l=t=>t;ae?o=s:a=s+1}return a}(t,e,0,r)-1,o=i[n];return _(a[n],o)(e)}},tu=(t,e,n,r)=>(2Math.min(Math.max(r,t),i)}return d}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=tu(n.map(t),r,a,i);this.output=_(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=tu(i,r.map(t),Y);this.input=_(e,n,i)}}class td extends tf{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:U,tickMethod:tl,tickCount:5}}chooseTransforms(){return[d,d]}clone(){return new td(this.options)}}class th extends to{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:te,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new th(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function tp(t,e){for(var n=[],r=0,i=t.length;r{var[t,e]=t;return _(Y(0,1),k(t,e))})],ty);let tv=a=class extends td{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:d,tickMethod:tl,tickCount:5}}constructor(t){super(t)}clone(){return new a(this.options)}};function tb(t,e,r,i,a){var o=new td({range:[e,e+i]}),l=new td({range:[r,r+a]});return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.map(e),l.map(t)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[o.invert(e),l.invert(t)]}}}function tx(t,e,r,i,a){return(0,n(t,1)[0])(e,r,i,a)}function tO(t,e,r,i,a){return n(t,1)[0]}function tw(t,e,r,i,a){var o=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],c=new td({range:[s,t]}),u=new td({range:[o,l]}),f=1<(s=a/i)?1:s,d=1{let[e,n,r]=t,i=_(Y(0,.5),k(e,n)),a=_(Y(.5,1),k(n,r));return t=>(e>r?te=>-t(-e),o=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?a(r):r},l=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?a(n):n};var s=n(7847);let c=(t,e,n,r=10)=>{let i=t<0,a=l(r,i),c=o(r,i),u=e=1;e-=1){let n=t*e;if(n>d)break;n>=f&&g.push(n)}}else for(;h<=p;h+=1){let t=a(h);for(let e=1;ed)break;n>=f&&g.push(n)}}2*g.length{let i=t<0,a=o(r,i),s=l(r,i),c=t>e,u=[s(Math.floor(a(c?e:t))),s(Math.ceil(a(c?t:e)))];return c?u.reverse():u};class f extends r.V{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:i.wp,tickMethod:c,tickCount:5}}chooseNice(){return u}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[o(t,n),l(t,n)]}clone(){return new f(this.options)}}},64117:function(t,e,n){"use strict";n.d(e,{E:function(){return a}});var r=n(88944),i=n(8064);class a extends r.t{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:i.z,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new a(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}},23331:function(t,e,n){"use strict";n.d(e,{p:function(){return u}});var r=n(67128),i=n(63025),a=n(25338),o=n(7847);let l=t=>e=>e<0?-((-e)**t):e**t,s=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),c=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class u extends i.V{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:a.wp,tickMethod:o.Z,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;if(1===t)return[r.Z,r.Z];let e=.5===t?c:l(t),n=s(t);return[e,n]}clone(){return new u(this.options)}}},15203:function(t,e,n){"use strict";n.d(e,{c:function(){return a}});var r=n(90314),i=n(88073);class a extends r.M{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:i.GX}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){n||t.sort((t,e)=>t-e);let r=[];for(let n=1;ne=>{let n=t(e);return(0,u.Z)(n)?Math.round(n):n};var d=n(36380);let h=i=class extends d.b{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:a.Z,tickMethod:o.Z,tickCount:5}}constructor(t){super(t)}clone(){return new i(this.options)}};h=i=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}([(r=t=>{let[e,n]=t,r=(0,l.q)((0,s.fv)(0,1),(0,c.I)(e,n));return r},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=[t(0),t(1)]},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:i,round:a}=this.getOptions(),o=r(n.map(t)),s=a?f(i):i;this.output=(0,l.q)(s,o,e,t)},t.prototype.invert=void 0})],h)},69437:function(t,e,n){"use strict";n.d(e,{F:function(){return o}});var r=n(25338),i=n(23331),a=n(7847);class o extends i.p{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:r.wp,tickMethod:a.Z,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new o(this.options)}}},90314:function(t,e,n){"use strict";n.d(e,{M:function(){return o}});var r=n(74271),i=n(13393),a=n(33338);class o extends r.X{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!(0,i.J)(t))return this.options.unknown;let e=(0,a.b)(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new o(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}},27527:function(t,e,n){"use strict";n.d(e,{q:function(){return Y}});var r=n(67128),i=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,a=/\[([^]*?)\]/gm;function o(t,e){for(var n=[],r=0,i=t.length;r-1?r:null}};function s(t){for(var e=[],n=1;n3?0:(t-t%10!=10?1:0)*t%10]}}),h=function(t,e){for(void 0===e&&(e=2),t=String(t);t.lengtht.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+h(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+h(Math.floor(Math.abs(e)/60),2)+":"+h(Math.abs(e)%60,2)}};l("monthNamesShort"),l("monthNames");var g={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},m=function(t,e,n){if(void 0===e&&(e=g.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=g[e]||e;var r=[];e=e.replace(a,function(t,e){return r.push(e),"@@@"});var o=s(s({},d),n);return(e=e.replace(i,function(e){return p[e](t,o)})).replace(/@@@/g,function(){return r.shift()})},y=n(63025);let v=864e5,b=7*v,x=30*v,O=365*v;function w(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,a=e;for(;a&&!i(t);)n(t,-1),a-=1;return t},a=(t,n)=>{n&&i(t,n),e(t)},o=(t,e)=>{let r=new Date(+t-1);return a(r,e),n(r,e),a(r),r};return{ceil:o,floor:(t,e)=>{let n=new Date(+t);return a(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),c=i?o(t,r):o(t);for(;ct,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),k=w(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),C=w(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),M=w(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),j=w(v,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v*e)},t=>t.getDate()-1),S=w(x,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),A=w(b,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=S.floor(t),n=new Date(+t);return Math.floor((+n-+e)/b)}),E=w(O,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),P={millisecond:_,second:k,minute:C,hour:M,day:j,week:A,month:S,year:E},R=w(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Z=w(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),T=w(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),L=w(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),B=w(v,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v*e)},t=>t.getUTCDate()-1),I=w(x,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),N=w(b,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+b*e)},t=>{let e=I.floor(t),n=new Date(+t);return Math.floor((+n-+e)/b)}),D=w(O,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),z={millisecond:R,second:Z,minute:T,hour:L,day:B,week:N,month:I,year:D};var F=n(33338),$=n(72478);function W(t,e,n,r,i){let a;let o=+t,l=+e,{tickIntervals:s,year:c,millisecond:u}=function(t){let{year:e,month:n,week:r,day:i,hour:a,minute:o,second:l,millisecond:s}=t?z:P;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[o,1],[o,5],[o,15],[o,30],[a,1],[a,3],[a,6],[a,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,d=r?(l-o)/r:n||5,h=r||(l-o)/d,p=s.length,g=(0,F.b)(s,h,0,p,f);if(g===p){let t=(0,$.l)(o/c.duration,l/c.duration,d);a=[c,t]}else if(g){let t=h/f(s[g-1]){let a=t>e,o=a?e:t,l=a?t:e,[s,c]=W(o,l,n,r,i),u=s.range(o,new Date(+l+1),c,!0);return a?u.reverse():u};var G=n(25338);let q=(t,e,n,r,i)=>{let a=t>e,o=a?e:t,l=a?t:e,[s,c]=W(o,l,n,r,i),u=[s.floor(o,c),s.ceil(l,c)];return a?u.reverse():u};function V(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Y extends y.V{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:H,interpolate:G.fv,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return q}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options,i=t[0],a=t[t.length-1];return[i,a,e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?z:P,i=e?V:r.Z;return e=>m(i(e),t||function(t,e){let{second:n,minute:r,hour:i,day:a,week:o,month:l,year:s}=e;return n.floor(t)Math.abs(t)?t:parseFloat(t.toFixed(14))}let l=[1,5,2,2.5,4,3],s=100*Number.EPSILON,c=(t,e,n=5,i=!0,c=l,u=[.25,.2,.5,.05])=>{let f=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!f)return[];if(e-t<1e-15||1===f)return[t];let d={score:-2,lmin:0,lmax:0,lstep:0},h=1;for(;h<1/0;){for(let n=0;n=f?2-(p-1)/(f-1):1;if(u[0]*l+u[1]+u[2]*n+u[3]r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,p*(g-1));if(u[0]*l+u[1]*m+u[2]*n+u[3]=0&&(f=1),1-u/(c-1)-n+f}(o,c,h,m,y,p),x=1-.5*((e-y)**2+(t-m)**2)/(.1*(e-t))**2,O=function(t,e,n,r,i,a){let o=(t-1)/(a-i),l=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/l,l/o)}(g,f,t,e,m,y),w=u[0]*b+u[1]*x+u[2]*O+1*u[3];w>d.score&&(!i||m<=t&&y>=e)&&(d.lmin=m,d.lmax=y,d.lstep=p,d.score=w)}}y+=1}g+=1}}h+=1}let g=o(d.lmax),m=o(d.lmin),y=o(d.lstep),v=Math.floor(Math.round(1e12*((g-m)/y))/1e12)+1,b=Array(v);b[0]=o(m);for(let t=1;t0?g[O]+" "+w:l(w,/&\f/g,g[O])).trim())&&(f[x++]=_);return b(t,e,n,0===a?E:c,f,d,h)}function B(t,e,n,r){return b(t,e,n,P,u(t,0,r),u(t,r+1,-1),r)}var I=function(t,e,n){for(var r=0,i=0;r=i,i=w(),38===r&&12===i&&(e[n]=1),!_(i);)O();return u(v,t,m)},N=function(t,e){var n=-1,r=44;do switch(_(r)){case 0:38===r&&12===w()&&(e[n]=1),t[n]+=I(m-1,e,n);break;case 2:t[n]+=C(r);break;case 4:if(44===r){t[++n]=58===w()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=a(r)}while(r=O());return t},D=function(t,e){var n;return n=N(k(t),e),v="",n},z=new WeakMap,F=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||z.get(n))&&!r){z.set(t,!0);for(var i=[],a=D(e,i),o=n.props,l=0,s=0;l-1&&!t.return)switch(t.type){case P:t.return=function t(e,n){switch(45^c(e,0)?(((n<<2^c(e,0))<<2^c(e,1))<<2^c(e,2))<<2^c(e,3):0){case 5103:return S+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return S+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return S+e+j+e+M+e+e;case 6828:case 4268:return S+e+M+e+e;case 6165:return S+e+M+"flex-"+e+e;case 5187:return S+e+l(e,/(\w+).+(:[^]+)/,S+"box-$1$2"+M+"flex-$1$2")+e;case 5443:return S+e+M+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return S+e+M+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return S+e+M+l(e,"shrink","negative")+e;case 5292:return S+e+M+l(e,"basis","preferred-size")+e;case 6060:return S+"box-"+l(e,"-grow","")+S+e+M+l(e,"grow","positive")+e;case 4554:return S+l(e,/([^-])(transform)/g,"$1"+S+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,S+"$1"),/(image-set)/,S+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,S+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,S+"box-pack:$3"+M+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+S+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,S+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(e)-1-n>6)switch(c(e,n+1)){case 109:if(45!==c(e,n+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+S+"$2-$3$1"+j+(108==c(e,n+3)?"$3":"$2-$3"))+e;case 115:return~s(e,"stretch")?t(l(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(115!==c(e,n+1))break;case 6444:switch(c(e,f(e)-3-(~s(e,"!important")&&10))){case 107:return l(e,":",":"+S)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+S+(45===c(e,14)?"inline-":"")+"box$3$1"+S+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(c(e,n+11)){case 114:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return S+e+M+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return S+e+M+e+e}return e}(t.value,t.length);break;case R:return Z([x(t,{value:l(t.value,"@","@"+S)})],r);case E:if(t.length)return t.props.map(function(e){var n;switch(n=e,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return Z([x(t,{props:[l(e,/:(read-\w+)/,":"+j+"$1")]})],r);case"::placeholder":return Z([x(t,{props:[l(e,/:(plac\w+)/,":"+S+"input-$1")]}),x(t,{props:[l(e,/:(plac\w+)/,":"+j+"$1")]}),x(t,{props:[l(e,/:(plac\w+)/,M+"input-$1")]})],r)}return""}).join("")}}],H=function(t){var e,n,i,o,g,x=t.key;if("css"===x){var M=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(M,function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))})}var j=t.stylisPlugins||W,S={},E=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+x+' "]'),function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n2||_(y)>3?"":" "}(T);break;case 92:G+=function(t,e){for(var n;--e&&O()&&!(y<48)&&!(y>102)&&(!(y>57)||!(y<65))&&(!(y>70)||!(y<97)););return n=m+(e<6&&32==w()&&32==O()),u(v,t,n)}(m-1,7);continue;case 47:switch(w()){case 42:case 47:d(b(j=function(t,e){for(;O();)if(t+y===57)break;else if(t+y===84&&47===w())break;return"/*"+u(v,e,m-1)+"*"+a(47===t?t:O())}(O(),m),n,r,A,a(y),u(j,2,-2),0),M);break;default:G+="/"}break;case 123*I:k[S++]=f(G)*D;case 125*I:case 59:case 0:switch(z){case 0:case 125:N=0;case 59+E:-1==D&&(G=l(G,/\f/g,"")),Z>0&&f(G)-P&&d(Z>32?B(G+";",i,r,P-1):B(l(G," ","")+";",i,r,P-2),M);break;case 59:G+=";";default:if(d(H=L(G,n,r,S,E,o,k,F,$=[],W=[],P),g),123===z){if(0===E)t(G,n,H,H,$,g,P,k,W);else switch(99===R&&110===c(G,3)?100:R){case 100:case 108:case 109:case 115:t(e,H,H,i&&d(L(e,H,H,0,0,o,k,F,o,$=[],P),W),o,W,P,k,i?$:W);break;default:t(G,H,H,H,[""],W,0,k,W)}}}S=E=Z=0,I=D=1,F=G="",P=x;break;case 58:P=1+f(G),Z=T;default:if(I<1){if(123==z)--I;else if(125==z&&0==I++&&125==(y=m>0?c(v,--m):0,p--,10===y&&(p=1,h--),y))continue}switch(G+=a(z),z*I){case 38:D=E>0?1:(G+="\f",-1);break;case 44:k[S++]=(f(G)-1)*D,D=1;break;case 64:45===w()&&(G+=C(O())),R=w(),E=P=f(F=G+=function(t){for(;!_(w());)O();return u(v,t,m)}(m)),z++;break;case 45:45===T&&2==f(G)&&(I=0)}}return g}("",null,null,null,[""],e=k(e=t),0,[0],e),v="",n),P)},I={key:x,sheet:new r({key:x,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:S,registered:{},insert:function(t,e,n,r){g=n,R(t?t+"{"+e.styles+"}":e.styles),r&&(I.inserted[e.name]=!0)}};return I.sheet.hydrate(E),I}},45042:function(t,e,n){"use strict";function r(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,{Z:function(){return r}})},6498:function(t,e,n){"use strict";n.d(e,{C:function(){return l},T:function(){return c},i:function(){return a},w:function(){return s}});var r=n(67294),i=n(8417);n(26346),n(27278);var a=!0,o=r.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),l=o.Provider,s=function(t){return(0,r.forwardRef)(function(e,n){return t(e,(0,r.useContext)(o),n)})};a||(s=function(t){return function(e){var n=(0,r.useContext)(o);return null===n?(n=(0,i.Z)({key:"css"}),r.createElement(o.Provider,{value:n},t(e,n))):t(e,n)}});var c=r.createContext({})},70917:function(t,e,n){"use strict";n.d(e,{F4:function(){return u},iv:function(){return c},xB:function(){return s}});var r=n(6498),i=n(67294),a=n(70444),o=n(27278),l=n(26346);n(8417),n(8679);var s=(0,r.w)(function(t,e){var n=t.styles,s=(0,l.O)([n],void 0,i.useContext(r.T));if(!r.i){for(var c,u=s.name,f=s.styles,d=s.next;void 0!==d;)u+=" "+d.name,f+=d.styles,d=d.next;var h=!0===e.compat,p=e.insert("",{name:u,styles:f},e.sheet,h);return h?null:i.createElement("style",((c={})["data-emotion"]=e.key+"-global "+u,c.dangerouslySetInnerHTML={__html:p},c.nonce=e.sheet.nonce,c))}var g=i.useRef();return(0,o.j)(function(){var t=e.key+"-global",n=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+t+" "+s.name+'"]');return e.sheet.tags.length&&(n.before=e.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",t),n.hydrate([i])),g.current=[n,r],function(){n.flush()}},[e]),(0,o.j)(function(){var t=g.current,n=t[0];if(t[1]){t[1]=!1;return}if(void 0!==s.next&&(0,a.My)(e,s.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}e.insert("",s,n,!1)},[e,s.name]),null});function c(){for(var t=arguments.length,e=Array(t),n=0;n=4;++r,i-=4)e=(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))*1540483477+((e>>>16)*59797<<16),e^=e>>>24,n=(65535&e)*1540483477+((e>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n^=255&t.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+c,styles:o,next:r}}},94371:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},27278:function(t,e,n){"use strict";n.d(e,{L:function(){return o},j:function(){return l}});var r,i=n(67294),a=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,o=a||function(t){return t()},l=a||i.useLayoutEffect},70444:function(t,e,n){"use strict";function r(t,e,n){var r="";return n.split(" ").forEach(function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "}),r}n.d(e,{My:function(){return a},fp:function(){return r},hC:function(){return i}});var i=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},a=function(t,e,n){i(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var a=e;do t.insert(e===a?"."+r:"",a,t.sheet,!0),a=a.next;while(void 0!==a)}}},10238:function(t,e,n){"use strict";n.d(e,{$:function(){return a}});var r=n(87462),i=n(28442);function a(t,e,n){return void 0===t||(0,i.X)(t)?e:(0,r.Z)({},e,{ownerState:(0,r.Z)({},e.ownerState,n)})}},30437:function(t,e,n){"use strict";function r(t,e=[]){if(void 0===t)return{};let n={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof t[n]&&!e.includes(n)).forEach(e=>{n[e]=t[e]}),n}n.d(e,{_:function(){return r}})},28442:function(t,e,n){"use strict";function r(t){return"string"==typeof t}n.d(e,{X:function(){return r}})},24407:function(t,e,n){"use strict";n.d(e,{L:function(){return l}});var r=n(87462),i=n(90512),a=n(30437);function o(t){if(void 0===t)return{};let e={};return Object.keys(t).filter(e=>!(e.match(/^on[A-Z]/)&&"function"==typeof t[e])).forEach(n=>{e[n]=t[n]}),e}function l(t){let{getSlotProps:e,additionalProps:n,externalSlotProps:l,externalForwardedProps:s,className:c}=t;if(!e){let t=(0,i.Z)(null==s?void 0:s.className,null==l?void 0:l.className,c,null==n?void 0:n.className),e=(0,r.Z)({},null==n?void 0:n.style,null==s?void 0:s.style,null==l?void 0:l.style),a=(0,r.Z)({},n,s,l);return t.length>0&&(a.className=t),Object.keys(e).length>0&&(a.style=e),{props:a,internalRef:void 0}}let u=(0,a._)((0,r.Z)({},s,l)),f=o(l),d=o(s),h=e(u),p=(0,i.Z)(null==h?void 0:h.className,null==n?void 0:n.className,c,null==s?void 0:s.className,null==l?void 0:l.className),g=(0,r.Z)({},null==h?void 0:h.style,null==n?void 0:n.style,null==s?void 0:s.style,null==l?void 0:l.style),m=(0,r.Z)({},h,n,d,f);return p.length>0&&(m.className=p),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:h.ref}}},71276:function(t,e,n){"use strict";function r(t,e,n){return"function"==typeof t?t(e,n):t}n.d(e,{x:function(){return r}})},30208:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=n(87462),i=n(63366),a=n(67294),o=n(90512),l=n(58510),s=n(20407),c=n(74312),u=n(26821);function f(t){return(0,u.d6)("MuiCardContent",t)}(0,u.sI)("MuiCardContent",["root"]);let d=(0,u.sI)("MuiCardOverflow",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var h=n(30220),p=n(85893);let g=["className","component","children","orientation","slots","slotProps"],m=()=>(0,l.Z)({root:["root"]},f,{}),y=(0,c.Z)("div",{name:"JoyCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({display:"flex",flexDirection:"horizontal"===t.orientation?"row":"column",flex:9999,zIndex:1,columnGap:"var(--Card-padding)",rowGap:"max(2px, calc(0.1875 * var(--Card-padding)))",padding:"var(--unstable_padding)",[`.${d.root} > &`]:{"--unstable_padding":"calc(var(--Card-padding) * 0.75) 0px"}})),v=a.forwardRef(function(t,e){let n=(0,s.Z)({props:t,name:"JoyCardContent"}),{className:a,component:l="div",children:c,orientation:u="vertical",slots:f={},slotProps:d={}}=n,v=(0,i.Z)(n,g),b=(0,r.Z)({},v,{component:l,slots:f,slotProps:d}),x=(0,r.Z)({},n,{component:l,orientation:u}),O=m(),[w,_]=(0,h.Z)("root",{ref:e,className:(0,o.Z)(O.root,a),elementType:y,externalForwardedProps:b,ownerState:x});return(0,p.jsx)(w,(0,r.Z)({},_,{children:c}))});var b=v},41118:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(63366),i=n(87462),a=n(67294),o=n(90512),l=n(58510),s=n(62908),c=n(16485),u=n(20407),f=n(74312),d=n(2226),h=n(26821);function p(t){return(0,h.d6)("MuiCard",t)}(0,h.sI)("MuiCard",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","horizontal","vertical"]);var g=n(58859),m=n(30220),y=n(85893);let v=["className","color","component","invertedColors","size","variant","children","orientation","slots","slotProps"],b=t=>{let{size:e,variant:n,color:r,orientation:i}=t,a={root:["root",i,n&&`variant${(0,s.Z)(n)}`,r&&`color${(0,s.Z)(r)}`,e&&`size${(0,s.Z)(e)}`]};return(0,l.Z)(a,p,{})},x=(0,f.Z)("div",{name:"JoyCard",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r;let{p:a,padding:o,borderRadius:l}=(0,g.V)({theme:t,ownerState:e},["p","padding","borderRadius"]);return[(0,i.Z)({"--Icon-color":"neutral"!==e.color||"solid"===e.variant?"currentColor":t.vars.palette.text.icon,"--Card-childRadius":"max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))","--AspectRatio-radius":"var(--Card-childRadius)","--unstable_actionMargin":"calc(-1 * var(--variant-borderWidth, 0px))","--unstable_actionRadius":"var(--Card-radius)","--CardCover-radius":"calc(var(--Card-radius) - var(--variant-borderWidth, 0px))","--CardOverflow-offset":"calc(-1 * var(--Card-padding))","--CardOverflow-radius":"calc(var(--Card-radius) - var(--variant-borderWidth, 0px))","--Divider-inset":"calc(-1 * var(--Card-padding))"},"sm"===e.size&&{"--Card-radius":t.vars.radius.sm,"--Card-padding":"0.625rem",gap:"0.5rem"},"md"===e.size&&{"--Card-radius":t.vars.radius.md,"--Card-padding":"1rem",gap:"0.75rem 1rem"},"lg"===e.size&&{"--Card-radius":t.vars.radius.lg,"--Card-padding":"1.5rem",gap:"1rem 1.5rem"},{padding:"var(--Card-padding)",borderRadius:"var(--Card-radius)",backgroundColor:t.vars.palette.background.surface,position:"relative",display:"flex",flexDirection:"horizontal"===e.orientation?"row":"column"},t.typography[`body-${e.size}`],null==(n=t.variants[e.variant])?void 0:n[e.color]),"context"!==e.color&&e.invertedColors&&(null==(r=t.colorInversion[e.variant])?void 0:r[e.color]),void 0!==a&&{"--Card-padding":a},void 0!==o&&{"--Card-padding":o},void 0!==l&&{"--Card-radius":l}]}),O=a.forwardRef(function(t,e){let n=(0,u.Z)({props:t,name:"JoyCard"}),{className:l,color:s="neutral",component:f="div",invertedColors:h=!1,size:p="md",variant:g="outlined",children:O,orientation:w="vertical",slots:_={},slotProps:k={}}=n,C=(0,r.Z)(n,v),{getColor:M}=(0,d.VT)(g),j=M(t.color,s),S=(0,i.Z)({},n,{color:j,component:f,orientation:w,size:p,variant:g}),A=b(S),E=(0,i.Z)({},C,{component:f,slots:_,slotProps:k}),[P,R]=(0,m.Z)("root",{ref:e,className:(0,o.Z)(A.root,l),elementType:x,externalForwardedProps:E,ownerState:S}),Z=(0,y.jsx)(P,(0,i.Z)({},R,{children:a.Children.map(O,(t,e)=>{if(!a.isValidElement(t))return t;let n={};if((0,c.Z)(t,["Divider"])){n.inset="inset"in t.props?t.props.inset:"context";let e="vertical"===w?"horizontal":"vertical";n.orientation="orientation"in t.props?t.props.orientation:e}return(0,c.Z)(t,["CardOverflow"])&&("horizontal"===w&&(n["data-parent"]="Card-horizontal"),"vertical"===w&&(n["data-parent"]="Card-vertical")),0===e&&(n["data-first-child"]=""),e===a.Children.count(O)-1&&(n["data-last-child"]=""),a.cloneElement(t,n)})}));return h?(0,y.jsx)(d.do,{variant:g,children:Z}):Z});var w=O},61685:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(63366),i=n(87462),a=n(67294),o=n(90512),l=n(62908),s=n(58510),c=n(20407),u=n(2226),f=n(74312),d=n(26821);function h(t){return(0,d.d6)("MuiTable",t)}(0,d.sI)("MuiTable",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","stickyHeader","stickyFooter","noWrap","hoverRow","borderAxisNone","borderAxisX","borderAxisXBetween","borderAxisY","borderAxisYBetween","borderAxisBoth","borderAxisBothBetween"]);var p=n(40911),g=n(30220),m=n(85893);let y=["className","component","children","borderAxis","hoverRow","noWrap","size","variant","color","stripe","stickyHeader","stickyFooter","slots","slotProps"],v=t=>{let{size:e,variant:n,color:r,borderAxis:i,stickyHeader:a,stickyFooter:o,noWrap:c,hoverRow:u}=t,f={root:["root",a&&"stickyHeader",o&&"stickyFooter",c&&"noWrap",u&&"hoverRow",i&&`borderAxis${(0,l.Z)(i)}`,n&&`variant${(0,l.Z)(n)}`,r&&`color${(0,l.Z)(r)}`,e&&`size${(0,l.Z)(e)}`]};return(0,s.Z)(f,h,{})},b={getColumnExceptFirst:()=>"& tr > *:not(:first-of-type), & tr > th + td, & tr > td + th",getCell:()=>"& th, & td",getHeadCell:()=>"& th",getHeaderCell:()=>"& thead th",getHeaderCellOfRow:t=>`& thead tr:nth-of-type(${t}) th`,getBottomHeaderCell:()=>"& thead th:not([colspan])",getHeaderNestedFirstColumn:()=>"& thead tr:not(:first-of-type) th:not([colspan]):first-of-type",getDataCell:()=>"& td",getDataCellExceptLastRow:()=>"& tr:not(:last-of-type) > td",getBodyCellExceptLastRow(){return`${this.getDataCellExceptLastRow()}, & tr:not(:last-of-type) > th[scope="row"]`},getBodyCellOfRow:t=>"number"==typeof t&&t<0?`& tbody tr:nth-last-of-type(${Math.abs(t)}) td, & tbody tr:nth-last-of-type(${Math.abs(t)}) th[scope="row"]`:`& tbody tr:nth-of-type(${t}) td, & tbody tr:nth-of-type(${t}) th[scope="row"]`,getBodyRow:t=>void 0===t?"& tbody tr":`& tbody tr:nth-of-type(${t})`,getFooterCell:()=>"& tfoot th, & tfoot td",getFooterFirstRowCell:()=>"& tfoot tr:not(:last-of-type) th, & tfoot tr:not(:last-of-type) td"},x=(0,f.Z)("table",{name:"JoyTable",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r,a,o,l,s,c;let u=null==(n=t.variants[e.variant])?void 0:n[e.color];return[(0,i.Z)({"--Table-headerUnderlineThickness":"2px","--TableCell-borderColor":null!=(r=null==u?void 0:u.borderColor)?r:t.vars.palette.divider,"--TableCell-headBackground":`var(--Sheet-background, ${t.vars.palette.background.surface})`},"sm"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 32px)","--TableCell-paddingX":"0.25rem","--TableCell-paddingY":"0.25rem"},"md"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 40px)","--TableCell-paddingX":"0.5rem","--TableCell-paddingY":"0.375rem"},"lg"===e.size&&{"--unstable_TableCell-height":"var(--TableCell-height, 48px)","--TableCell-paddingX":"0.75rem","--TableCell-paddingY":"0.5rem"},{tableLayout:"fixed",width:"100%",borderSpacing:"0px",borderCollapse:"separate",borderRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},t.typography[`body-${({sm:"xs",md:"sm",lg:"md"})[e.size]}`],null==(a=t.variants[e.variant])?void 0:a[e.color],{"& caption":{color:t.vars.palette.text.tertiary,padding:"calc(2 * var(--TableCell-paddingY)) var(--TableCell-paddingX)"},[b.getDataCell()]:(0,i.Z)({padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",height:"var(--unstable_TableCell-height)",borderColor:"var(--TableCell-borderColor)",backgroundColor:"var(--TableCell-dataBackground)"},e.noWrap&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}),[b.getHeadCell()]:{textAlign:"left",padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",backgroundColor:"var(--TableCell-headBackground)",height:"var(--unstable_TableCell-height)",fontWeight:t.vars.fontWeight.lg,borderColor:"var(--TableCell-borderColor)",color:t.vars.palette.text.secondary,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},[b.getHeaderCell()]:{verticalAlign:"bottom","&:first-of-type":{borderTopLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderTopRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}},"& tfoot tr > *":{backgroundColor:`var(--TableCell-footBackground, ${t.vars.palette.background.level1})`,"&:first-of-type":{borderBottomLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderBottomRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}}}),((null==(o=e.borderAxis)?void 0:o.startsWith("x"))||(null==(l=e.borderAxis)?void 0:l.startsWith("both")))&&{[b.getHeaderCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getBottomHeaderCell()]:{borderBottomWidth:"var(--Table-headerUnderlineThickness)",borderBottomStyle:"solid"},[b.getBodyCellExceptLastRow()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getFooterCell()]:{borderTopWidth:1,borderTopStyle:"solid"}},((null==(s=e.borderAxis)?void 0:s.startsWith("y"))||(null==(c=e.borderAxis)?void 0:c.startsWith("both")))&&{[`${b.getColumnExceptFirst()}, ${b.getHeaderNestedFirstColumn()}`]:{borderLeftWidth:1,borderLeftStyle:"solid"}},("x"===e.borderAxis||"both"===e.borderAxis)&&{[b.getHeaderCellOfRow(1)]:{borderTopWidth:1,borderTopStyle:"solid"},[b.getBodyCellOfRow(-1)]:{borderBottomWidth:1,borderBottomStyle:"solid"},[b.getFooterCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"}},("y"===e.borderAxis||"both"===e.borderAxis)&&{"& tr > *:first-of-type":{borderLeftWidth:1,borderLeftStyle:"solid"},"& tr > *:last-of-type:not(:first-of-type)":{borderRightWidth:1,borderRightStyle:"solid"}},e.stripe&&{[b.getBodyRow(e.stripe)]:{background:`var(--TableRow-stripeBackground, ${t.vars.palette.background.level2})`,color:t.vars.palette.text.primary}},e.hoverRow&&{[b.getBodyRow()]:{"&:hover":{background:`var(--TableRow-hoverBackground, ${t.vars.palette.background.level3})`}}},e.stickyHeader&&{[b.getHeaderCell()]:{position:"sticky",top:0,zIndex:t.vars.zIndex.table},[b.getHeaderCellOfRow(2)]:{top:"var(--unstable_TableCell-height)"}},e.stickyFooter&&{[b.getFooterCell()]:{position:"sticky",bottom:0,zIndex:t.vars.zIndex.table,color:t.vars.palette.text.secondary,fontWeight:t.vars.fontWeight.lg},[b.getFooterFirstRowCell()]:{bottom:"var(--unstable_TableCell-height)"}}]}),O=a.forwardRef(function(t,e){let n=(0,c.Z)({props:t,name:"JoyTable"}),{className:a,component:l,children:s,borderAxis:f="xBetween",hoverRow:d=!1,noWrap:h=!1,size:b="md",variant:O="plain",color:w="neutral",stripe:_,stickyHeader:k=!1,stickyFooter:C=!1,slots:M={},slotProps:j={}}=n,S=(0,r.Z)(n,y),{getColor:A}=(0,u.VT)(O),E=A(t.color,w),P=(0,i.Z)({},n,{borderAxis:f,hoverRow:d,noWrap:h,component:l,size:b,color:E,variant:O,stripe:_,stickyHeader:k,stickyFooter:C}),R=v(P),Z=(0,i.Z)({},S,{component:l,slots:M,slotProps:j}),[T,L]=(0,g.Z)("root",{ref:e,className:(0,o.Z)(R.root,a),elementType:x,externalForwardedProps:Z,ownerState:P});return(0,m.jsx)(p.eu.Provider,{value:!0,children:(0,m.jsx)(T,(0,i.Z)({},L,{children:s}))})});var w=O},40911:function(t,e,n){"use strict";n.d(e,{eu:function(){return x},ZP:function(){return j}});var r=n(63366),i=n(87462),a=n(67294),o=n(62908),l=n(16485),s=n(39707),c=n(58510),u=n(74312),f=n(20407),d=n(2226),h=n(30220),p=n(26821);function g(t){return(0,p.d6)("MuiTypography",t)}(0,p.sI)("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=n(85893);let y=["color","textColor"],v=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],b=a.createContext(!1),x=a.createContext(!1),O=t=>{let{gutterBottom:e,noWrap:n,level:r,color:i,variant:a}=t,l={root:["root",r,e&&"gutterBottom",n&&"noWrap",i&&`color${(0,o.Z)(i)}`,a&&`variant${(0,o.Z)(a)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,c.Z)(l,g,{})},w=(0,u.Z)("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(t,e)=>e.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),_=(0,u.Z)("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(t,e)=>e.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),k=(0,u.Z)("span",{name:"JoyTypography",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{var n,r,a,o,l;let s="inherit"!==e.level?null==(n=t.typography[e.level])?void 0:n.lineHeight:"1";return(0,i.Z)({"--Icon-fontSize":`calc(1em * ${s})`},e.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},e.nesting?{display:"inline"}:(0,i.Z)({display:"block"},e.unstable_hasSkeleton&&{position:"relative"}),(e.startDecorator||e.endDecorator)&&(0,i.Z)({display:"flex",alignItems:"center"},e.nesting&&(0,i.Z)({display:"inline-flex"},e.startDecorator&&{verticalAlign:"bottom"})),e.level&&"inherit"!==e.level&&t.typography[e.level],{fontSize:`var(--Typography-fontSize, ${e.level&&"inherit"!==e.level&&null!=(r=null==(a=t.typography[e.level])?void 0:a.fontSize)?r:"inherit"})`},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.color&&"context"!==e.color&&{color:`rgba(${null==(o=t.vars.palette[e.color])?void 0:o.mainChannel} / 1)`},e.variant&&(0,i.Z)({borderRadius:t.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!e.nesting&&{marginInline:"-0.25em"},null==(l=t.variants[e.variant])?void 0:l[e.color]))}),C={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},M=a.forwardRef(function(t,e){let n=(0,f.Z)({props:t,name:"JoyTypography"}),{color:o,textColor:c}=n,u=(0,r.Z)(n,y),p=a.useContext(b),g=a.useContext(x),M=(0,s.Z)((0,i.Z)({},u,{color:c})),{component:j,gutterBottom:S=!1,noWrap:A=!1,level:E="body-md",levelMapping:P=C,children:R,endDecorator:Z,startDecorator:T,variant:L,slots:B={},slotProps:I={}}=M,N=(0,r.Z)(M,v),{getColor:D}=(0,d.VT)(L),z=D(t.color,L?null!=o?o:"neutral":o),F=p||g?t.level||"inherit":E,$=(0,l.Z)(R,["Skeleton"]),W=j||(p?"span":P[F]||C[F]||"span"),H=(0,i.Z)({},M,{level:F,component:W,color:z,gutterBottom:S,noWrap:A,nesting:p,variant:L,unstable_hasSkeleton:$}),G=O(H),q=(0,i.Z)({},N,{component:W,slots:B,slotProps:I}),[V,Y]=(0,h.Z)("root",{ref:e,className:G.root,elementType:k,externalForwardedProps:q,ownerState:H}),[U,Q]=(0,h.Z)("startDecorator",{className:G.startDecorator,elementType:w,externalForwardedProps:q,ownerState:H}),[X,K]=(0,h.Z)("endDecorator",{className:G.endDecorator,elementType:_,externalForwardedProps:q,ownerState:H});return(0,m.jsx)(b.Provider,{value:!0,children:(0,m.jsxs)(V,(0,i.Z)({},Y,{children:[T&&(0,m.jsx)(U,(0,i.Z)({},Q,{children:T})),$?a.cloneElement(R,{variant:R.props.variant||"inline"}):R,Z&&(0,m.jsx)(X,(0,i.Z)({},K,{children:Z}))]}))})});M.muiName="Typography";var j=M},26821:function(t,e,n){"use strict";n.d(e,{d6:function(){return a},sI:function(){return o}});var r=n(8027),i=n(1977);let a=(t,e)=>(0,r.ZP)(t,e,"Mui"),o=(t,e)=>(0,i.Z)(t,e,"Mui")},2226:function(t,e,n){"use strict";n.d(e,{do:function(){return f},ZP:function(){return d},VT:function(){return u}});var r=n(67294),i=n(79718),a=n(67299),o=n(2548),l=n(85893);let s=()=>{let t=(0,i.Z)(a.Z);return t[o.Z]||t},c=r.createContext(void 0),u=t=>{let e=r.useContext(c);return{getColor:(n,r)=>e&&t&&e.includes(t)?n||"context":n||r}};function f({children:t,variant:e}){var n;let r=s();return(0,l.jsx)(c.Provider,{value:e?(null!=(n=r.colorInversionConfig)?n:a.Z.colorInversionConfig)[e]:void 0,children:t})}var d=c},67299:function(t,e,n){"use strict";n.d(e,{Z:function(){return L}});var r=n(87462),i=n(63366),a=n(68027);function o(t=""){return(e,...n)=>`var(--${t?`${t}-`:""}${e}${function e(...n){if(!n.length)return"";let r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${t?`${t}-`:""}${r}${e(...n.slice(1))})`}(...n)})`}var l=n(78758);let s=t=>{let e=function t(e){let n;if(e.type)return e;if("#"===e.charAt(0))return t(function(t){t=t.slice(1);let e=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map(t=>t+t)),n?`rgb${4===n.length?"a":""}(${n.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),i=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(i))throw Error((0,l.Z)(9,e));let a=e.substring(r+1,e.length-1);if("color"===i){if(n=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw Error((0,l.Z)(10,n))}else a=a.split(",");return{type:i,values:a=a.map(t=>parseFloat(t)),colorSpace:n}}(t);return e.values.slice(0,3).map((t,n)=>-1!==e.type.indexOf("hsl")&&0!==n?`${t}%`:t).join(" ")};var c=n(41512),u=n(98373),f=n(83997);let d=(t,e,n,r=[])=>{let i=t;e.forEach((t,a)=>{a===e.length-1?Array.isArray(i)?i[Number(t)]=n:i&&"object"==typeof i&&(i[t]=n):i&&"object"==typeof i&&(i[t]||(i[t]=r.includes(t)?[]:{}),i=i[t])})},h=(t,e,n)=>{!function t(r,i=[],a=[]){Object.entries(r).forEach(([r,o])=>{n&&(!n||n([...i,r]))||null==o||("object"==typeof o&&Object.keys(o).length>0?t(o,[...i,r],Array.isArray(o)?[...a,r]:a):e([...i,r],o,a))})}(t)},p=(t,e)=>{if("number"==typeof e){if(["lineHeight","fontWeight","opacity","zIndex"].some(e=>t.includes(e)))return e;let n=t[t.length-1];return n.toLowerCase().indexOf("opacity")>=0?e:`${e}px`}return e};function g(t,e){let{prefix:n,shouldSkipGeneratingVar:r}=e||{},i={},a={},o={};return h(t,(t,e,l)=>{if(("string"==typeof e||"number"==typeof e)&&(!r||!r(t,e))){let r=`--${n?`${n}-`:""}${t.join("-")}`;Object.assign(i,{[r]:p(t,e)}),d(a,t,`var(${r})`,l),d(o,t,`var(${r}, ${e})`,l)}},t=>"vars"===t[0]),{css:i,vars:a,varsWithDefaults:o}}let m=["colorSchemes","components","defaultColorScheme"];var y=function(t,e){let{colorSchemes:n={},defaultColorScheme:o="light"}=t,l=(0,i.Z)(t,m),{vars:s,css:c,varsWithDefaults:u}=g(l,e),d=u,h={},{[o]:p}=n,y=(0,i.Z)(n,[o].map(f.Z));if(Object.entries(y||{}).forEach(([t,n])=>{let{vars:r,css:i,varsWithDefaults:o}=g(n,e);d=(0,a.Z)(d,o),h[t]={css:i,vars:r}}),p){let{css:t,vars:n,varsWithDefaults:r}=g(p,e);d=(0,a.Z)(d,r),h[o]={css:t,vars:n}}return{vars:d,generateCssVars:t=>{var n,i;if(!t){let n=(0,r.Z)({},c);return{css:n,vars:s,selector:(null==e||null==(i=e.getSelector)?void 0:i.call(e,t,n))||":root"}}let a=(0,r.Z)({},h[t].css);return{css:a,vars:h[t].vars,selector:(null==e||null==(n=e.getSelector)?void 0:n.call(e,t,a))||":root"}}}},v=n(86523),b=n(44920);let x=(0,r.Z)({},b.Z,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}});var O={grey:{50:"#F5F7FA",100:"#EAEEF6",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#23272B",900:"#121416"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function w(t){var e;return!!t[0].match(/^(typography|variants|breakpoints|colorInversion|colorInversionConfig)$/)||!!t[0].match(/sxConfig$/)||"palette"===t[0]&&!!(null!=(e=t[1])&&e.match(/^(mode)$/))||"focus"===t[0]&&"thickness"!==t[1]}var _=n(26821);let k=t=>t&&"object"==typeof t&&Object.keys(t).some(t=>{var e;return null==(e=t.match)?void 0:e.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),C=(t,e,n)=>{e.includes("Color")&&(t.color=n),e.includes("Bg")&&(t.backgroundColor=n),e.includes("Border")&&(t.borderColor=n)},M=(t,e,n)=>{let r={};return Object.entries(e||{}).forEach(([e,i])=>{if(e.match(RegExp(`${t}(color|bg|border)`,"i"))&&i){let t=n?n(e):i;e.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),e.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),e.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),C(r,e,t)}}),r},j=t=>e=>`--${t?`${t}-`:""}${e.replace(/^--/,"")}`,S=(t,e)=>{let n={};if(e){let{getCssVar:i,palette:a}=e;Object.entries(a).forEach(e=>{let[o,l]=e;k(l)&&"object"==typeof l&&(n=(0,r.Z)({},n,{[o]:M(t,l,t=>i(`palette-${o}-${t}`,a[o][t]))}))})}return n.context=M(t,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},A=(t,e)=>{let n=o(t.cssVarPrefix),r=j(t.cssVarPrefix),i={},a=e?e=>{var r;let i=e.split("-"),a=i[1],o=i[2];return n(e,null==(r=t.palette)||null==(r=r[a])?void 0:r[o])}:n;return Object.entries(t.palette).forEach(e=>{let[n,o]=e;k(o)&&(i[n]={"--Badge-ringColor":a(`palette-${n}-softBg`),[t.getColorSchemeSelector("dark")]:{[r("--palette-focusVisible")]:a(`palette-${n}-300`),[r("--palette-background-body")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.1)`,[r("--palette-background-surface")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,[r("--palette-background-level1")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,[r("--palette-text-primary")]:a(`palette-${n}-100`),[r("--palette-text-secondary")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.72)`,[r("--palette-text-tertiary")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.6)`,[r("--palette-text-icon")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.6)`,[r("--palette-divider")]:`rgba(${a(`palette-${n}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${a(`palette-${n}-lightChannel`)} / 1)`,"--variant-plainHoverColor":a(`palette-${n}-50`),"--variant-plainHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${a(`palette-${n}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":a(`palette-${n}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":a(`palette-${n}-600`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,"--variant-softColor":a(`palette-${n}-200`),"--variant-softBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":a(`palette-${n}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":a(`palette-${n}-600`),"--variant-solidActiveBg":a(`palette-${n}-600`),"--variant-solidDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`},[t.getColorSchemeSelector("light")]:{[r("--palette-focusVisible")]:a(`palette-${n}-500`),[r("--palette-background-body")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.1)`,[r("--palette-background-surface")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,[r("--palette-background-level1")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.48)`,[r("--palette-text-primary")]:a(`palette-${n}-700`),[r("--palette-text-secondary")]:`rgba(${a(`palette-${n}-darkChannel`)} / 0.8)`,[r("--palette-text-tertiary")]:`rgba(${a(`palette-${n}-darkChannel`)} / 0.68)`,[r("--palette-text-icon")]:a(`palette-${n}-500`),[r("--palette-divider")]:`rgba(${a(`palette-${n}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${a(`palette-${n}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${a(`palette-${n}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${a(`palette-${n}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":a(`palette-${n}-600`),"--variant-outlinedHoverBorder":a(`palette-${n}-300`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${a(`palette-${n}-mainChannel`)} / 0.12)`,"--variant-softColor":a(`palette-${n}-600`),"--variant-softBg":`rgba(${a(`palette-${n}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":a(`palette-${n}-700`),"--variant-softHoverBg":a(`palette-${n}-200`),"--variant-softActiveBg":a(`palette-${n}-300`),"--variant-softDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`,"--variant-solidColor":a("palette-common-white"),"--variant-solidBg":a(`palette-${n}-${"neutral"===n?"700":"500"}`),"--variant-solidHoverColor":a("palette-common-white"),"--variant-solidHoverBg":a(`palette-${n}-600`),"--variant-solidActiveBg":a(`palette-${n}-600`),"--variant-solidDisabledColor":`rgba(${a(`palette-${n}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${n}-mainChannel`)} / 0.08)`}})}),i},E=(t,e)=>{let n=o(t.cssVarPrefix),r=j(t.cssVarPrefix),i={},a=e?e=>{let r=e.split("-"),i=r[1],a=r[2];return n(e,t.palette[i][a])}:n;return Object.entries(t.palette).forEach(t=>{let[e,n]=t;k(n)&&(i[e]={colorScheme:"dark","--Badge-ringColor":a(`palette-${e}-solidBg`),[r("--palette-focusVisible")]:a(`palette-${e}-200`),[r("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[r("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[r("--palette-background-popup")]:a(`palette-${e}-700`),[r("--palette-background-level1")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.2)`,[r("--palette-background-level2")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.36)`,[r("--palette-background-level3")]:`rgba(${a(`palette-${e}-darkChannel`)} / 0.6)`,[r("--palette-text-primary")]:a("palette-common-white"),[r("--palette-text-secondary")]:a(`palette-${e}-200`),[r("--palette-text-tertiary")]:a(`palette-${e}-300`),[r("--palette-text-icon")]:a(`palette-${e}-200`),[r("--palette-divider")]:`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":a(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":a(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${a(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":a(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":a("palette-common-white"),"--variant-softHoverColor":a("palette-common-white"),"--variant-softBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":a(`palette-${e}-${"neutral"===e?"600":"500"}`),"--variant-solidBg":a("palette-common-white"),"--variant-solidHoverBg":a("palette-common-white"),"--variant-solidActiveBg":a(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${a(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${a(`palette-${e}-lightChannel`)} / 0.1)`})}),i},P=["cssVarPrefix","breakpoints","spacing","components","variants","colorInversion","shouldSkipGeneratingVar"],R=["colorSchemes"],Z=(t="joy")=>o(t),T=function(t){var e,n,o,l,f,d,h,p,g,m;let b=t||{},{cssVarPrefix:k="joy",breakpoints:C,spacing:M,components:j,variants:T,colorInversion:L,shouldSkipGeneratingVar:B=w}=b,I=(0,i.Z)(b,P),N=Z(k),D={primary:O.blue,neutral:O.grey,danger:O.red,success:O.green,warning:O.yellow,common:{white:"#FCFCFD",black:"#09090B"}},z=t=>{var e;let n=t.split("-"),r=n[1],i=n[2];return N(t,null==(e=D[r])?void 0:e[i])},F=t=>({plainColor:z(`palette-${t}-500`),plainHoverBg:z(`palette-${t}-50`),plainActiveBg:z(`palette-${t}-100`),plainDisabledColor:z("palette-neutral-400"),outlinedColor:z(`palette-${t}-500`),outlinedBorder:z(`palette-${t}-300`),outlinedHoverBg:z(`palette-${t}-100`),outlinedActiveBg:z(`palette-${t}-200`),outlinedDisabledColor:z("palette-neutral-400"),outlinedDisabledBorder:z("palette-neutral-200"),softColor:z(`palette-${t}-700`),softBg:z(`palette-${t}-100`),softHoverBg:z(`palette-${t}-200`),softActiveColor:z(`palette-${t}-800`),softActiveBg:z(`palette-${t}-300`),softDisabledColor:z("palette-neutral-400"),softDisabledBg:z(`palette-${t}-50`),solidColor:z("palette-common-white"),solidBg:z(`palette-${t}-500`),solidHoverBg:z(`palette-${t}-600`),solidActiveBg:z(`palette-${t}-700`),solidDisabledColor:z("palette-neutral-400"),solidDisabledBg:z(`palette-${t}-100`)}),$=t=>({plainColor:z(`palette-${t}-300`),plainHoverBg:z(`palette-${t}-800`),plainActiveBg:z(`palette-${t}-700`),plainDisabledColor:z("palette-neutral-500"),outlinedColor:z(`palette-${t}-200`),outlinedBorder:z(`palette-${t}-700`),outlinedHoverBg:z(`palette-${t}-800`),outlinedActiveBg:z(`palette-${t}-700`),outlinedDisabledColor:z("palette-neutral-500"),outlinedDisabledBorder:z("palette-neutral-800"),softColor:z(`palette-${t}-200`),softBg:z(`palette-${t}-800`),softHoverBg:z(`palette-${t}-700`),softActiveColor:z(`palette-${t}-100`),softActiveBg:z(`palette-${t}-600`),softDisabledColor:z("palette-neutral-500"),softDisabledBg:z(`palette-${t}-900`),solidColor:z("palette-common-white"),solidBg:z(`palette-${t}-500`),solidHoverBg:z(`palette-${t}-600`),solidActiveBg:z(`palette-${t}-700`),solidDisabledColor:z("palette-neutral-500"),solidDisabledBg:z(`palette-${t}-800`)}),W={palette:{mode:"light",primary:(0,r.Z)({},D.primary,F("primary")),neutral:(0,r.Z)({},D.neutral,F("neutral"),{plainColor:z("palette-neutral-700"),outlinedColor:z("palette-neutral-700")}),danger:(0,r.Z)({},D.danger,F("danger")),success:(0,r.Z)({},D.success,F("success")),warning:(0,r.Z)({},D.warning,F("warning")),common:{white:"#FBFCFD",black:"#0E0E10"},text:{primary:z("palette-neutral-800"),secondary:z("palette-neutral-700"),tertiary:z("palette-neutral-600"),icon:z("palette-neutral-500")},background:{body:z("palette-neutral-50"),surface:z("palette-common-white"),popup:z("palette-common-white"),level1:z("palette-neutral-100"),level2:z("palette-neutral-200"),level3:z("palette-neutral-300"),tooltip:z("palette-neutral-500"),backdrop:`rgba(${N("palette-neutral-darkChannel",s(D.neutral[900]))} / 0.25)`},divider:`rgba(${N("palette-neutral-mainChannel",s(D.neutral[500]))} / 0.3)`,focusVisible:z("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},H={palette:{mode:"dark",primary:(0,r.Z)({},D.primary,$("primary")),neutral:(0,r.Z)({},D.neutral,$("neutral")),danger:(0,r.Z)({},D.danger,$("danger")),success:(0,r.Z)({},D.success,$("success")),warning:(0,r.Z)({},D.warning,$("warning")),common:{white:"#FBFCFD",black:"#0E0E10"},text:{primary:z("palette-neutral-100"),secondary:z("palette-neutral-300"),tertiary:z("palette-neutral-400"),icon:z("palette-neutral-400")},background:{body:z("palette-common-black"),surface:z("palette-neutral-900"),popup:z("palette-common-black"),level1:z("palette-neutral-800"),level2:z("palette-neutral-700"),level3:z("palette-neutral-600"),tooltip:z("palette-neutral-600"),backdrop:`rgba(${N("palette-neutral-darkChannel",s(D.neutral[50]))} / 0.25)`},divider:`rgba(${N("palette-neutral-mainChannel",s(D.neutral[500]))} / 0.16)`,focusVisible:z("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',q=(0,r.Z)({body:`"Inter", ${N(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${N(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},I.fontFamily),V=(0,r.Z)({sm:300,md:500,lg:600,xl:700},I.fontWeight),Y=(0,r.Z)({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},I.fontSize),U=(0,r.Z)({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},I.lineHeight),Q=null!=(e=null==(n=I.colorSchemes)||null==(n=n.light)?void 0:n.shadowRing)?e:W.shadowRing,X=null!=(o=null==(l=I.colorSchemes)||null==(l=l.light)?void 0:l.shadowChannel)?o:W.shadowChannel,K=null!=(f=null==(d=I.colorSchemes)||null==(d=d.light)?void 0:d.shadowOpacity)?f:W.shadowOpacity,J={colorSchemes:{light:W,dark:H},fontSize:Y,fontFamily:q,fontWeight:V,focus:{thickness:"2px",selector:`&.${(0,_.d6)("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${N("focus-thickness",null!=(h=null==(p=I.focus)?void 0:p.thickness)?h:"2px")})`,outline:`${N("focus-thickness",null!=(g=null==(m=I.focus)?void 0:m.thickness)?g:"2px")} solid ${N("palette-focusVisible",D.primary[500])}`}},lineHeight:U,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${N("shadowRing",Q)}, 0px 1px 2px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,sm:`${N("shadowRing",Q)}, 0px 1px 2px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 2px 4px 0px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,md:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 6px 12px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,lg:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 12px 16px -4px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`,xl:`${N("shadowRing",Q)}, 0px 2px 8px -2px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)}), 0px 20px 24px -4px rgba(${N("shadowChannel",X)} / ${N("shadowOpacity",K)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,tooltip:1500},typography:{h1:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-xl, ${V.xl}`),fontSize:N(`fontSize-xl4, ${Y.xl4}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h2:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-xl, ${V.xl}`),fontSize:N(`fontSize-xl3, ${Y.xl3}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h3:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-xl2, ${Y.xl2}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},h4:{fontFamily:N(`fontFamily-display, ${q.display}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-xl, ${Y.xl}`),lineHeight:N(`lineHeight-md, ${U.md}`),letterSpacing:"-0.025em",color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-lg":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-lg, ${V.lg}`),fontSize:N(`fontSize-lg, ${Y.lg}`),lineHeight:N(`lineHeight-xs, ${U.xs}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-md":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-md, ${Y.md}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"title-sm":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-sm, ${Y.sm}`),lineHeight:N(`lineHeight-sm, ${U.sm}`),color:N(`palette-text-primary, ${W.palette.text.primary}`)},"body-lg":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-lg, ${Y.lg}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-secondary, ${W.palette.text.secondary}`)},"body-md":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-md, ${Y.md}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-secondary, ${W.palette.text.secondary}`)},"body-sm":{fontFamily:N(`fontFamily-body, ${q.body}`),fontSize:N(`fontSize-sm, ${Y.sm}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-tertiary, ${W.palette.text.tertiary}`)},"body-xs":{fontFamily:N(`fontFamily-body, ${q.body}`),fontWeight:N(`fontWeight-md, ${V.md}`),fontSize:N(`fontSize-xs, ${Y.xs}`),lineHeight:N(`lineHeight-md, ${U.md}`),color:N(`palette-text-tertiary, ${W.palette.text.tertiary}`)}}},tt=I?(0,a.Z)(J,I):J,{colorSchemes:te}=tt,tn=(0,i.Z)(tt,R),tr=(0,r.Z)({colorSchemes:te},tn,{breakpoints:(0,c.Z)(null!=C?C:{}),components:(0,a.Z)({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:t,theme:e})=>{var n;let i=t.instanceFontSize;return(0,r.Z)({margin:"var(--Icon-margin)"},t.fontSize&&"inherit"!==t.fontSize&&{fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[t.fontSize]})`},!t.htmlColor&&(0,r.Z)({color:`var(--Icon-color, ${tr.vars.palette.text.icon})`},t.color&&"inherit"!==t.color&&"context"!==t.color&&e.vars.palette[t.color]&&{color:`rgba(${null==(n=e.vars.palette[t.color])?void 0:n.mainChannel} / 1)`},"context"===t.color&&{color:e.vars.palette.text.secondary}),i&&"inherit"!==i&&{"--Icon-fontSize":e.vars.fontSize[i]})}}}},j),cssVarPrefix:k,getCssVar:N,spacing:(0,u.Z)(M),colorInversionConfig:{soft:["plain","outlined","soft","solid"],solid:["plain","outlined","soft","solid"]}});Object.entries(tr.colorSchemes).forEach(([t,e])=>{!function(t,e){Object.keys(e).forEach(n=>{let r={main:"500",light:"200",dark:"700"};"dark"===t&&(r.main=400),!e[n].mainChannel&&e[n][r.main]&&(e[n].mainChannel=s(e[n][r.main])),!e[n].lightChannel&&e[n][r.light]&&(e[n].lightChannel=s(e[n][r.light])),!e[n].darkChannel&&e[n][r.dark]&&(e[n].darkChannel=s(e[n][r.dark]))})}(t,e.palette)});let{vars:ti,generateCssVars:ta}=y((0,r.Z)({colorSchemes:te},tn),{prefix:k,shouldSkipGeneratingVar:B});tr.vars=ti,tr.generateCssVars=ta,tr.unstable_sxConfig=(0,r.Z)({},x,null==t?void 0:t.unstable_sxConfig),tr.unstable_sx=function(t){return(0,v.Z)({sx:t,theme:this})},tr.getColorSchemeSelector=t=>"light"===t?"&":`&[data-joy-color-scheme="${t}"], [data-joy-color-scheme="${t}"] &`;let to={getCssVar:N,palette:tr.colorSchemes.light.palette};return tr.variants=(0,a.Z)({plain:S("plain",to),plainHover:S("plainHover",to),plainActive:S("plainActive",to),plainDisabled:S("plainDisabled",to),outlined:S("outlined",to),outlinedHover:S("outlinedHover",to),outlinedActive:S("outlinedActive",to),outlinedDisabled:S("outlinedDisabled",to),soft:S("soft",to),softHover:S("softHover",to),softActive:S("softActive",to),softDisabled:S("softDisabled",to),solid:S("solid",to),solidHover:S("solidHover",to),solidActive:S("solidActive",to),solidDisabled:S("solidDisabled",to)},T),tr.palette=(0,r.Z)({},tr.colorSchemes.light.palette,{colorScheme:"light"}),tr.shouldSkipGeneratingVar=B,tr.colorInversion="function"==typeof L?L:(0,a.Z)({soft:A(tr,!0),solid:E(tr,!0)},L||{},{clone:!1}),tr}();var L=T},2548:function(t,e){"use strict";e.Z="$$joy"},58859:function(t,e,n){"use strict";n.d(e,{V:function(){return i}});var r=n(87462);let i=({theme:t,ownerState:e},n)=>{let i={};return e.sx&&(function e(n){if("function"==typeof n){let r=n(t);e(r)}else Array.isArray(n)?n.forEach(t=>{"boolean"!=typeof t&&e(t)}):"object"==typeof n&&(i=(0,r.Z)({},i,n))}(e.sx),n.forEach(e=>{let n=i[e];if("string"==typeof n||"number"==typeof n){if("borderRadius"===e){if("number"==typeof n)i[e]=`${n}px`;else{var r;i[e]=(null==(r=t.vars)?void 0:r.radius[n])||n}}else -1!==["p","padding","m","margin"].indexOf(e)&&"number"==typeof n?i[e]=t.spacing(n):i[e]=n}else"function"==typeof n?i[e]=n(t):i[e]=void 0})),i}},74312:function(t,e,n){"use strict";var r=n(86154),i=n(67299),a=n(2548);let o=(0,r.ZP)({defaultTheme:i.Z,themeId:a.Z});e.Z=o},20407:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(87462),i=n(44065),a=n(67299),o=n(2548);function l({props:t,name:e}){return(0,i.Z)({props:t,name:e,defaultTheme:(0,r.Z)({},a.Z,{components:{}}),themeId:o.Z})}},30220:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=n(87462),i=n(63366),a=n(22760),o=n(71276),l=n(24407),s=n(10238),c=n(2226);let u=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],f=["component","slots","slotProps"],d=["component"],h=["disableColorInversion"];function p(t,e){let{className:n,elementType:p,ownerState:g,externalForwardedProps:m,getSlotOwnerState:y,internalForwardedProps:v}=e,b=(0,i.Z)(e,u),{component:x,slots:O={[t]:void 0},slotProps:w={[t]:void 0}}=m,_=(0,i.Z)(m,f),k=O[t]||p,C=(0,o.x)(w[t],g),M=(0,l.L)((0,r.Z)({className:n},b,{externalForwardedProps:"root"===t?_:void 0,externalSlotProps:C})),{props:{component:j},internalRef:S}=M,A=(0,i.Z)(M.props,d),E=(0,a.Z)(S,null==C?void 0:C.ref,e.ref),P=y?y(A):{},{disableColorInversion:R=!1}=P,Z=(0,i.Z)(P,h),T=(0,r.Z)({},g,Z),{getColor:L}=(0,c.VT)(T.variant);if("root"===t){var B;T.color=null!=(B=A.color)?B:g.color}else R||(T.color=L(A.color,T.color));let I="root"===t?j||x:j,N=(0,s.$)(k,(0,r.Z)({},"root"===t&&!x&&!O[t]&&v,"root"!==t&&!O[t]&&v,A,I&&{as:I},{ref:E}),T);return Object.keys(Z).forEach(t=>{delete N[t]}),[k,N]}},23534:function(t,e,n){"use strict";let r;n.r(e),n.d(e,{GlobalStyles:function(){return w},StyledEngineProvider:function(){return O},ThemeContext:function(){return c.T},css:function(){return v.iv},default:function(){return _},internal_processStyles:function(){return k},keyframes:function(){return v.F4}});var i=n(87462),a=n(67294),o=n(45042),l=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)(function(t){return l.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&91>t.charCodeAt(2)}),c=n(6498),u=n(70444),f=n(26346),d=n(27278),h=function(t){return"theme"!==t},p=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?s:h},g=function(t,e,n){var r;if(e){var i=e.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof r&&n&&(r=t.__emotion_forwardProp),r},m=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return(0,u.hC)(e,n,r),(0,d.L)(function(){return(0,u.My)(e,n,r)}),null},y=(function t(e,n){var r,o,l=e.__emotion_real===e,s=l&&e.__emotion_base||e;void 0!==n&&(r=n.label,o=n.target);var d=g(e,n,l),h=d||p(s),y=!h("as");return function(){var v=arguments,b=l&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==r&&b.push("label:"+r+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var x=v.length,O=1;Oe(null==t||0===Object.keys(t).length?n:t):e;return(0,x.jsx)(v.xB,{styles:r})}function _(t,e){let n=y(t,e);return n}"object"==typeof document&&(r=(0,b.Z)({key:"css",prepend:!0}));let k=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}},95408:function(t,e,n){"use strict";n.d(e,{L7:function(){return l},VO:function(){return r},W8:function(){return o},k9:function(){return a}});let r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${r[t]}px)`};function a(t,e,n){let a=t.theme||{};if(Array.isArray(e)){let t=a.breakpoints||i;return e.reduce((r,i,a)=>(r[t.up(t.keys[a])]=n(e[a]),r),{})}if("object"==typeof e){let t=a.breakpoints||i;return Object.keys(e).reduce((i,a)=>{if(-1!==Object.keys(t.values||r).indexOf(a)){let r=t.up(a);i[r]=n(e[a],a)}else i[a]=e[a];return i},{})}let o=n(e);return o}function o(t={}){var e;let n=null==(e=t.keys)?void 0:e.reduce((e,n)=>{let r=t.up(n);return e[r]={},e},{});return n||{}}function l(t,e){return t.reduce((t,e)=>{let n=t[e],r=!n||0===Object.keys(n).length;return r&&delete t[e],t},e)}},86154:function(t,e,n){"use strict";n.d(e,{ZP:function(){return y}});var r=n(87462),i=n(63366),a=n(23534),o=n(68027),l=n(88647),s=n(86523);let c=["ownerState"],u=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}let h=(0,l.Z)(),p=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function g({defaultTheme:t,theme:e,themeId:n}){return 0===Object.keys(e).length?t:e[n]||e}function m(t,e){let{ownerState:n}=e,a=(0,i.Z)(e,c),o="function"==typeof t?t((0,r.Z)({ownerState:n},a)):t;if(Array.isArray(o))return o.flatMap(t=>m(t,(0,r.Z)({ownerState:n},a)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:t=[]}=o,e=(0,i.Z)(o,u),l=e;return t.forEach(t=>{let e=!0;"function"==typeof t.props?e=t.props((0,r.Z)({ownerState:n},a,n)):Object.keys(t.props).forEach(r=>{(null==n?void 0:n[r])!==t.props[r]&&a[r]!==t.props[r]&&(e=!1)}),e&&(Array.isArray(l)||(l=[l]),l.push("function"==typeof t.style?t.style((0,r.Z)({ownerState:n},a,n)):t.style))}),l}return o}function y(t={}){let{themeId:e,defaultTheme:n=h,rootShouldForwardProp:l=d,slotShouldForwardProp:c=d}=t,u=t=>(0,s.Z)((0,r.Z)({},t,{theme:g((0,r.Z)({},t,{defaultTheme:n,themeId:e}))}));return u.__mui_systemSx=!0,(t,s={})=>{var h;let y;(0,a.internal_processStyles)(t,t=>t.filter(t=>!(null!=t&&t.__mui_systemSx)));let{name:v,slot:b,skipVariantsResolver:x,skipSx:O,overridesResolver:w=(h=p(b))?(t,e)=>e[h]:null}=s,_=(0,i.Z)(s,f),k=void 0!==x?x:b&&"Root"!==b&&"root"!==b||!1,C=O||!1,M=d;"Root"===b||"root"===b?M=l:b?M=c:"string"==typeof t&&t.charCodeAt(0)>96&&(M=void 0);let j=(0,a.default)(t,(0,r.Z)({shouldForwardProp:M,label:y},_)),S=t=>"function"==typeof t&&t.__emotion_real!==t||(0,o.P)(t)?i=>m(t,(0,r.Z)({},i,{theme:g({theme:i.theme,defaultTheme:n,themeId:e})})):t,A=(i,...a)=>{let o=S(i),l=a?a.map(S):[];v&&w&&l.push(t=>{let i=g((0,r.Z)({},t,{defaultTheme:n,themeId:e}));if(!i.components||!i.components[v]||!i.components[v].styleOverrides)return null;let a=i.components[v].styleOverrides,o={};return Object.entries(a).forEach(([e,n])=>{o[e]=m(n,(0,r.Z)({},t,{theme:i}))}),w(t,o)}),v&&!k&&l.push(t=>{var i;let a=g((0,r.Z)({},t,{defaultTheme:n,themeId:e})),o=null==a||null==(i=a.components)||null==(i=i[v])?void 0:i.variants;return m({variants:o},(0,r.Z)({},t,{theme:a}))}),C||l.push(u);let s=l.length-a.length;if(Array.isArray(i)&&s>0){let t=Array(s).fill("");(o=[...i,...t]).raw=[...i.raw,...t]}let c=j(o,...l);return t.muiName&&(c.muiName=t.muiName),c};return j.withConfig&&(A.withConfig=j.withConfig),A}}},57064:function(t,e,n){"use strict";function r(t,e){if(this.vars&&"function"==typeof this.getColorSchemeSelector){let n=this.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:e}}return this.palette.mode===t?e:{}}n.d(e,{Z:function(){return r}})},41512:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(63366),i=n(87462);let a=["values","unit","step"],o=t=>{let e=Object.keys(t).map(e=>({key:e,val:t[e]}))||[];return e.sort((t,e)=>t.val-e.val),e.reduce((t,e)=>(0,i.Z)({},t,{[e.key]:e.val}),{})};function l(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:l=5}=t,s=(0,r.Z)(t,a),c=o(e),u=Object.keys(c);function f(t){let r="number"==typeof e[t]?e[t]:t;return`@media (min-width:${r}${n})`}function d(t){let r="number"==typeof e[t]?e[t]:t;return`@media (max-width:${r-l/100}${n})`}function h(t,r){let i=u.indexOf(r);return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==i&&"number"==typeof e[u[i]]?e[u[i]]:r)-l/100}${n})`}return(0,i.Z)({keys:u,values:c,up:f,down:d,between:h,only:function(t){return u.indexOf(t)+1{let n=0===t.length?[1]:t;return n.map(t=>{let n=e(t);return"number"==typeof n?`${n}px`:n}).join(" ")};return n.mui=!0,n}},88647:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(87462),i=n(63366),a=n(68027),o=n(41512),l={borderRadius:4},s=n(98373),c=n(86523),u=n(44920),f=n(57064);let d=["breakpoints","palette","spacing","shape"];var h=function(t={},...e){let{breakpoints:n={},palette:h={},spacing:p,shape:g={}}=t,m=(0,i.Z)(t,d),y=(0,o.Z)(n),v=(0,s.Z)(p),b=(0,a.Z)({breakpoints:y,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},h),spacing:v,shape:(0,r.Z)({},l,g)},m);return b.applyStyles=f.Z,(b=e.reduce((t,e)=>(0,a.Z)(t,e),b)).unstable_sxConfig=(0,r.Z)({},u.Z,null==m?void 0:m.unstable_sxConfig),b.unstable_sx=function(t){return(0,c.Z)({sx:t,theme:this})},b}},47730:function(t,e,n){"use strict";var r=n(68027);e.Z=function(t,e){return e?(0,r.Z)(t,e,{clone:!1}):t}},98700:function(t,e,n){"use strict";n.d(e,{hB:function(){return p},eI:function(){return h},NA:function(){return g},e6:function(){return y},o3:function(){return v}});var r=n(95408),i=n(54844),a=n(47730);let o={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(t){let e={};return n=>(void 0===e[n]&&(e[n]=t(n)),e[n])}(t=>{if(t.length>2){if(!s[t])return[t];t=s[t]}let[e,n]=t.split(""),r=o[e],i=l[n]||"";return Array.isArray(i)?i.map(t=>r+t):[r+i]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...u,...f];function h(t,e,n,r){var a;let o=null!=(a=(0,i.DW)(t,e,!1))?a:n;return"number"==typeof o?t=>"string"==typeof t?t:o*t:Array.isArray(o)?t=>"string"==typeof t?t:o[t]:"function"==typeof o?o:()=>void 0}function p(t){return h(t,"spacing",8,"spacing")}function g(t,e){if("string"==typeof e||null==e)return e;let n=Math.abs(e),r=t(n);return e>=0?r:"number"==typeof r?-r:`-${r}`}function m(t,e){let n=p(t.theme);return Object.keys(t).map(i=>(function(t,e,n,i){if(-1===e.indexOf(n))return null;let a=c(n),o=t[n];return(0,r.k9)(t,o,t=>a.reduce((e,n)=>(e[n]=g(i,t),e),{}))})(t,e,i,n)).reduce(a.Z,{})}function y(t){return m(t,u)}function v(t){return m(t,f)}function b(t){return m(t,d)}y.propTypes={},y.filterProps=u,v.propTypes={},v.filterProps=f,b.propTypes={},b.filterProps=d},54844:function(t,e,n){"use strict";n.d(e,{DW:function(){return a},Jq:function(){return o}});var r=n(62908),i=n(95408);function a(t,e,n=!0){if(!e||"string"!=typeof e)return null;if(t&&t.vars&&n){let n=`vars.${e}`.split(".").reduce((t,e)=>t&&t[e]?t[e]:null,t);if(null!=n)return n}return e.split(".").reduce((t,e)=>t&&null!=t[e]?t[e]:null,t)}function o(t,e,n,r=n){let i;return i="function"==typeof t?t(n):Array.isArray(t)?t[n]||r:a(t,n)||r,e&&(i=e(i,r,t)),i}e.ZP=function(t){let{prop:e,cssProperty:n=t.prop,themeKey:l,transform:s}=t,c=t=>{if(null==t[e])return null;let c=t[e],u=t.theme,f=a(u,l)||{};return(0,i.k9)(t,c,t=>{let i=o(f,s,t);return(t===i&&"string"==typeof t&&(i=o(f,s,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===n)?i:{[n]:i}})};return c.propTypes={},c.filterProps=[e],c}},44920:function(t,e,n){"use strict";n.d(e,{Z:function(){return Y}});var r=n(98700),i=n(54844),a=n(47730),o=function(...t){let e=t.reduce((t,e)=>(e.filterProps.forEach(n=>{t[n]=e}),t),{}),n=t=>Object.keys(t).reduce((n,r)=>e[r]?(0,a.Z)(n,e[r](t)):n,{});return n.propTypes={},n.filterProps=t.reduce((t,e)=>t.concat(e.filterProps),[]),n},l=n(95408);function s(t){return"number"!=typeof t?t:`${t}px solid`}function c(t,e){return(0,i.ZP)({prop:t,themeKey:"borders",transform:e})}let u=c("border",s),f=c("borderTop",s),d=c("borderRight",s),h=c("borderBottom",s),p=c("borderLeft",s),g=c("borderColor"),m=c("borderTopColor"),y=c("borderRightColor"),v=c("borderBottomColor"),b=c("borderLeftColor"),x=c("outline",s),O=c("outlineColor"),w=t=>{if(void 0!==t.borderRadius&&null!==t.borderRadius){let e=(0,r.eI)(t.theme,"shape.borderRadius",4,"borderRadius");return(0,l.k9)(t,t.borderRadius,t=>({borderRadius:(0,r.NA)(e,t)}))}return null};w.propTypes={},w.filterProps=["borderRadius"],o(u,f,d,h,p,g,m,y,v,b,w,x,O);let _=t=>{if(void 0!==t.gap&&null!==t.gap){let e=(0,r.eI)(t.theme,"spacing",8,"gap");return(0,l.k9)(t,t.gap,t=>({gap:(0,r.NA)(e,t)}))}return null};_.propTypes={},_.filterProps=["gap"];let k=t=>{if(void 0!==t.columnGap&&null!==t.columnGap){let e=(0,r.eI)(t.theme,"spacing",8,"columnGap");return(0,l.k9)(t,t.columnGap,t=>({columnGap:(0,r.NA)(e,t)}))}return null};k.propTypes={},k.filterProps=["columnGap"];let C=t=>{if(void 0!==t.rowGap&&null!==t.rowGap){let e=(0,r.eI)(t.theme,"spacing",8,"rowGap");return(0,l.k9)(t,t.rowGap,t=>({rowGap:(0,r.NA)(e,t)}))}return null};C.propTypes={},C.filterProps=["rowGap"];let M=(0,i.ZP)({prop:"gridColumn"}),j=(0,i.ZP)({prop:"gridRow"}),S=(0,i.ZP)({prop:"gridAutoFlow"}),A=(0,i.ZP)({prop:"gridAutoColumns"}),E=(0,i.ZP)({prop:"gridAutoRows"}),P=(0,i.ZP)({prop:"gridTemplateColumns"}),R=(0,i.ZP)({prop:"gridTemplateRows"}),Z=(0,i.ZP)({prop:"gridTemplateAreas"}),T=(0,i.ZP)({prop:"gridArea"});function L(t,e){return"grey"===e?e:t}o(_,k,C,M,j,S,A,E,P,R,Z,T);let B=(0,i.ZP)({prop:"color",themeKey:"palette",transform:L}),I=(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:L}),N=(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:L});function D(t){return t<=1&&0!==t?`${100*t}%`:t}o(B,I,N);let z=(0,i.ZP)({prop:"width",transform:D}),F=t=>void 0!==t.maxWidth&&null!==t.maxWidth?(0,l.k9)(t,t.maxWidth,e=>{var n,r;let i=(null==(n=t.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[e])||l.VO[e];return i?(null==(r=t.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:D(e)}}):null;F.filterProps=["maxWidth"];let $=(0,i.ZP)({prop:"minWidth",transform:D}),W=(0,i.ZP)({prop:"height",transform:D}),H=(0,i.ZP)({prop:"maxHeight",transform:D}),G=(0,i.ZP)({prop:"minHeight",transform:D});(0,i.ZP)({prop:"size",cssProperty:"width",transform:D}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:D});let q=(0,i.ZP)({prop:"boxSizing"});o(z,F,$,W,H,G,q);let V={border:{themeKey:"borders",transform:s},borderTop:{themeKey:"borders",transform:s},borderRight:{themeKey:"borders",transform:s},borderBottom:{themeKey:"borders",transform:s},borderLeft:{themeKey:"borders",transform:s},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:s},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:L},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:L},backgroundColor:{themeKey:"palette",transform:L},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_},rowGap:{style:C},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:D},maxWidth:{style:F},minWidth:{transform:D},height:{transform:D},maxHeight:{transform:D},minHeight:{transform:D},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var Y=V},39707:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(87462),i=n(63366),a=n(68027),o=n(44920);let l=["sx"],s=t=>{var e,n;let r={systemProps:{},otherProps:{}},i=null!=(e=null==t||null==(n=t.theme)?void 0:n.unstable_sxConfig)?e:o.Z;return Object.keys(t).forEach(e=>{i[e]?r.systemProps[e]=t[e]:r.otherProps[e]=t[e]}),r};function c(t){let e;let{sx:n}=t,o=(0,i.Z)(t,l),{systemProps:c,otherProps:u}=s(o);return e=Array.isArray(n)?[c,...n]:"function"==typeof n?(...t)=>{let e=n(...t);return(0,a.P)(e)?(0,r.Z)({},c,e):c}:(0,r.Z)({},c,n),(0,r.Z)({},u,{sx:e})}},86523:function(t,e,n){"use strict";n.d(e,{n:function(){return s}});var r=n(62908),i=n(47730),a=n(54844),o=n(95408),l=n(44920);function s(){function t(t,e,n,i){let l={[t]:e,theme:n},s=i[t];if(!s)return{[t]:e};let{cssProperty:c=t,themeKey:u,transform:f,style:d}=s;if(null==e)return null;if("typography"===u&&"inherit"===e)return{[t]:e};let h=(0,a.DW)(n,u)||{};return d?d(l):(0,o.k9)(l,e,e=>{let n=(0,a.Jq)(h,f,e);return(e===n&&"string"==typeof e&&(n=(0,a.Jq)(h,f,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===c)?n:{[c]:n}})}return function e(n){var r;let{sx:a,theme:s={}}=n||{};if(!a)return null;let c=null!=(r=s.unstable_sxConfig)?r:l.Z;function u(n){let r=n;if("function"==typeof n)r=n(s);else if("object"!=typeof n)return n;if(!r)return null;let a=(0,o.W8)(s.breakpoints),l=Object.keys(a),u=a;return Object.keys(r).forEach(n=>{var a;let l="function"==typeof(a=r[n])?a(s):a;if(null!=l){if("object"==typeof l){if(c[n])u=(0,i.Z)(u,t(n,l,s,c));else{let t=(0,o.k9)({theme:s},l,t=>({[n]:t}));(function(...t){let e=t.reduce((t,e)=>t.concat(Object.keys(e)),[]),n=new Set(e);return t.every(t=>n.size===Object.keys(t).length)})(t,l)?u[n]=e({sx:l,theme:s}):u=(0,i.Z)(u,t)}}else u=(0,i.Z)(u,t(n,l,s,c))}}),(0,o.L7)(l,u)}return Array.isArray(a)?a.map(u):u(a)}}let c=s();c.filterProps=["sx"],e.Z=c},79718:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(88647),i=n(67294),a=n(6498),o=function(t=null){let e=i.useContext(a.T);return e&&0!==Object.keys(e).length?e:t};let l=(0,r.Z)();var s=function(t=l){return o(t)}},44065:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(87462),i=n(79718);function a({props:t,name:e,defaultTheme:n,themeId:a}){let o=(0,i.Z)(n);a&&(o=o[a]||o);let l=function(t){let{theme:e,name:n,props:i}=t;return e&&e.components&&e.components[n]&&e.components[n].defaultProps?function t(e,n){let i=(0,r.Z)({},n);return Object.keys(e).forEach(a=>{if(a.toString().match(/^(components|slots)$/))i[a]=(0,r.Z)({},e[a],i[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){let o=e[a]||{},l=n[a];i[a]={},l&&Object.keys(l)?o&&Object.keys(o)?(i[a]=(0,r.Z)({},l),Object.keys(o).forEach(e=>{i[a][e]=t(o[e],l[e])})):i[a]=l:i[a]=o}else void 0===i[a]&&(i[a]=e[a])}),i}(e.components[n].defaultProps,i):i}({theme:o,name:e,props:t});return l}},31983:function(t,e){"use strict";let n;let r=t=>t,i=(n=r,{configure(t){n=t},generate:t=>n(t),reset(){n=r}});e.Z=i},62908:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(78758);function i(t){if("string"!=typeof t)throw Error((0,r.Z)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},58510:function(t,e,n){"use strict";function r(t,e,n){let r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((t,r)=>{if(r){let i=e(r);""!==i&&t.push(i),n&&n[r]&&t.push(n[r])}return t},[]).join(" ")}),r}n.d(e,{Z:function(){return r}})},68027:function(t,e,n){"use strict";n.d(e,{P:function(){return i},Z:function(){return function t(e,n,a={clone:!0}){let o=a.clone?(0,r.Z)({},e):e;return i(e)&&i(n)&&Object.keys(n).forEach(r=>{i(n[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?o[r]=t(e[r],n[r],a):a.clone?o[r]=i(n[r])?function t(e){if(!i(e))return e;let n={};return Object.keys(e).forEach(r=>{n[r]=t(e[r])}),n}(n[r]):n[r]:o[r]=n[r]}),o}}});var r=n(87462);function i(t){if("object"!=typeof t||null===t)return!1;let e=Object.getPrototypeOf(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}},78758:function(t,e,n){"use strict";function r(t){let e="https://mui.com/production-error/?code="+t;for(let t=1;t{i[e]=(0,r.ZP)(t,e,n)}),i}},16485:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(67294);function i(t,e){var n,i;return r.isValidElement(t)&&-1!==e.indexOf(null!=(n=t.type.muiName)?n:null==(i=t.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},25091:function(t,e,n){"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,{Z:function(){return r}})},22760:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(67294),i=n(25091);function a(...t){return r.useMemo(()=>t.every(t=>null==t)?null:e=>{t.forEach(t=>{(0,i.Z)(t,e)})},t)}},15746:function(t,e,n){"use strict";var r=n(21584);e.Z=r.Z},71230:function(t,e,n){"use strict";var r=n(92820);e.Z=r.Z},87760:function(t,e){"use strict";var n={protan:{x:.7465,y:.2535,m:1.273463,yi:-.073894},deutan:{x:1.4,y:-.4,m:.968437,yi:.003331},tritan:{x:.1748,y:0,m:.062921,yi:.292119},custom:{x:.735,y:.265,m:-1.059259,yi:1.026914}},r=function(t){var e={},n=t.R/255,r=t.G/255,i=t.B/255;return n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,e.X=.41242371206635076*n+.3575793401363035*r+.1804662232369621*i,e.Y=.21265606784927693*n+.715157818248362*r+.0721864539171564*i,e.Z=.019331987577444885*n+.11919267420354762*r+.9504491124870351*i,e},i=function(t){var e=t.X+t.Y+t.Z;return 0===e?{x:0,y:0,Y:t.Y}:{x:t.X/e,y:t.Y/e,Y:t.Y}};e.a=function(t,e,a){var o,l,s,c,u,f,d,h,p,g,m,y,v,b,x,O,w,_,k,C;return"achroma"===e?(o={R:o=.212656*t.R+.715158*t.G+.072186*t.B,G:o,B:o},a&&(s=(l=1.75)+1,o.R=(l*o.R+t.R)/s,o.G=(l*o.G+t.G)/s,o.B=(l*o.B+t.B)/s),o):(c=n[e],f=((u=i(r(t))).y-c.y)/(u.x-c.x),d=u.y-u.x*f,h=(c.yi-d)/(f-c.m),p=f*h+d,(o={}).X=h*u.Y/p,o.Y=u.Y,o.Z=(1-(h+p))*u.Y/p,_=.312713*u.Y/.329016,k=.358271*u.Y/.329016,y=3.240712470389558*(g=_-o.X)+-0+-.49857440415943116*(m=k-o.Z),v=-.969259258688888*g+0+.041556132211625726*m,b=.05563600315398933*g+-0+1.0570636917433989*m,o.R=3.240712470389558*o.X+-1.5372626602963142*o.Y+-.49857440415943116*o.Z,o.G=-.969259258688888*o.X+1.875996969313966*o.Y+.041556132211625726*o.Z,o.B=.05563600315398933*o.X+-.2039948802843549*o.Y+1.0570636917433989*o.Z,x=((o.R<0?0:1)-o.R)/y,O=((o.G<0?0:1)-o.G)/v,(w=(w=((o.B<0?0:1)-o.B)/b)>1||w<0?0:w)>(C=(x=x>1||x<0?0:x)>(O=O>1||O<0?0:O)?x:O)&&(C=w),o.R+=C*y,o.G+=C*v,o.B+=C*b,o.R=255*(o.R<=0?0:o.R>=1?1:Math.pow(o.R,.45454545454545453)),o.G=255*(o.G<=0?0:o.G>=1?1:Math.pow(o.G,.45454545454545453)),o.B=255*(o.B<=0?0:o.B>=1?1:Math.pow(o.B,.45454545454545453)),a&&(s=(l=1.75)+1,o.R=(l*o.R+t.R)/s,o.G=(l*o.G+t.G)/s,o.B=(l*o.B+t.B)/s),o)}},56917:function(t,e,n){"use strict";var r=n(74314),i=n(87760).a,a={protanomaly:{type:"protan",anomalize:!0},protanopia:{type:"protan"},deuteranomaly:{type:"deutan",anomalize:!0},deuteranopia:{type:"deutan"},tritanomaly:{type:"tritan",anomalize:!0},tritanopia:{type:"tritan"},achromatomaly:{type:"achroma",anomalize:!0},achromatopsia:{type:"achroma"}},o=function(t){return Math.round(255*t)},l=function(t){return function(e,n){var l=r(e);if(!l)return n?{R:0,G:0,B:0}:"#000000";var s=new i({R:o(l.red()||0),G:o(l.green()||0),B:o(l.blue()||0)},a[t].type,a[t].anomalize);return(s.R=s.R||0,s.G=s.G||0,s.B=s.B||0,n)?(delete s.X,delete s.Y,delete s.Z,s):new r.RGB(s.R%256/255,s.G%256/255,s.B%256/255,1).hex()}};for(var s in a)e[s]=l(s)},91077:function(t,e,n){"use strict";function r(t,e){return te?1:t>=e?0:NaN}n.d(e,{Z:function(){return r}})},87568:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var r=Array.prototype,i=r.slice;r.map;var a=n(44355);function o(t){return function(){return t}}var l=n(23865),s=n(10874),c=Math.sqrt(50),u=Math.sqrt(10),f=Math.sqrt(2);function d(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=c?10:a>=u?5:a>=f?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=c?10:a>=u?5:a>=f?2:1)}var h=n(89917);function p(t){return Math.ceil(Math.log((0,h.Z)(t))/Math.LN2)+1}function g(){var t=s.Z,e=l.Z,n=p;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s=r.length,c=Array(s);for(i=0;i0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(f,h,n)),(p=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=Array(i=r-n+1);++le&&--r,a=Array(i=r-n+1);++l=h){if(t>=h&&e===l.Z){let t=d(f,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=-((Math.ceil(-(h*t))+1)/t)))}else p.pop()}}for(var g=p.length;p[0]<=f;)p.shift(),--g;for(;p[g-1]>h;)p.pop(),--g;var m,y=Array(g+1);for(i=0;i<=g;++i)(m=y[i]=[]).x0=i>0?p[i-1]:f,m.x1=i>>1;0>n(t[a],e)?r=a+1:i=a}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=(e,n)=>(0,r.Z)(t(e),n)),{left:i,center:function(t,n,r,a){null==r&&(r=0),null==a&&(a=t.length);let o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[a],e)>0?i=a:r=a+1}return r}}}},89917:function(t,e,n){"use strict";function r(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}n.d(e,{Z:function(){return r}})},93209:function(t,e,n){"use strict";function r(t,e){let n=function(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let l of t)null!=(l=e(l,++o,t))&&(l=+l)>=l&&(n=l-i,i+=n/++r,a+=n*(l-i))}if(r>1)return a/(r-1)}(t,e);return n?Math.sqrt(n):n}n.d(e,{Z:function(){return r}})},23865:function(t,e,n){"use strict";function r(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r=a&&(n=r=a):(n>a&&(n=a),r0){for(a=t[--e];e>0&&(a=(n=a)+(r=t[--e]),!(i=r-(a-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=a+(r=2*i),r==n-a&&(a=n))}return a}}},44022:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l},Xx:function(){return s},jJ:function(){return c},Q3:function(){return u}});class r extends Map{constructor(t,e=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(i(this,t))}has(t){return super.has(i(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(n),t.delete(r)),n}(this,t))}}function i({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function a(t){return null!==t&&"object"==typeof t?t.valueOf():t}var o=n(10874);function l(t,...e){return f(t,o.Z,o.Z,e)}function s(t,...e){return f(t,Array.from,o.Z,e)}function c(t,e,...n){return f(t,o.Z,e,n)}function u(t,e,...n){return f(t,Array.from,e,n)}function f(t,e,n,i){return function t(a,o){if(o>=i.length)return n(a);let l=new r,s=i[o++],c=-1;for(let t of a){let e=s(t,++c,a),n=l.get(e);n?n.push(t):l.set(e,[t])}for(let[e,n]of l)l.set(e,t(n,o));return e(l)}(t,0)}},28085:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(91077),i=n(44022),a=n(80732);function o(t,e,n){return(1===e.length?(0,a.Z)((0,i.jJ)(t,e,n),([t,e],[n,i])=>(0,r.Z)(e,i)||(0,r.Z)(t,n)):(0,a.Z)((0,i.ZP)(t,n),([t,n],[i,a])=>e(n,a)||(0,r.Z)(t,i))).map(([t])=>t)}},10874:function(t,e,n){"use strict";function r(t){return t}n.d(e,{Z:function(){return r}})},98823:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},11616:function(t,e,n){"use strict";function r(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n=a)&&(n=a,r=i);return r}n.d(e,{Z:function(){return r}})},71894:function(t,e,n){"use strict";function r(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}n.d(e,{Z:function(){return r}})},76132:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(51758);function i(t,e){return(0,r.Z)(t,.5,e)}},83502:function(t,e,n){"use strict";function r(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}n.d(e,{Z:function(){return r}})},47622:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},18320:function(t,e,n){"use strict";function r(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}n.d(e,{Z:function(){return r}})},62921:function(t,e,n){"use strict";function r(t){return null===t?NaN:+t}function*i(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}n.d(e,{K:function(){return i},Z:function(){return r}})},51758:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(98823),i=n(47622),a=n(91077);function o(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}var l=n(62921);function s(t,e,n){if(s=(t=Float64Array.from((0,l.K)(t,n))).length){if((e=+e)<=0||s<2)return(0,i.Z)(t);if(e>=1)return(0,r.Z)(t);var s,c=(s-1)*e,u=Math.floor(c),f=(0,r.Z)((function t(e,n,r=0,i=e.length-1,l=a.Z){for(;i>r;){if(i-r>600){let a=i-r+1,o=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),f=Math.max(r,Math.floor(n-o*c/a+u)),d=Math.min(i,Math.floor(n+(a-o)*c/a+u));t(e,n,f,d,l)}let a=e[n],s=r,c=i;for(o(e,r,n),l(e[i],a)>0&&o(e,r,i);sl(e[s],a);)++s;for(;l(e[c],a)>0;)--c}0===l(e[r],a)?o(e,r,c):o(e,++c,i),c<=n&&(r=c+1),n<=c&&(i=c-1)}return e})(t,u).subarray(0,u+1));return f+((0,i.Z)(t.subarray(u+1))-f)*(c-u)}}},80732:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(91077);function i(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n=r.Z]=e;if(1===n.length||e.length>1){var a;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let i of e){let e=(0,r.Z)(i[t],i[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>(0,r.Z)(n[t],n[e]))),a=t,Array.from(i,t=>a[t])}return t.sort(n)}},90155:function(t,e,n){"use strict";function r(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}n.d(e,{Z:function(){return r}})},52362:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(89917),i=n(93209);function a(t,e,n){return Math.ceil((n-e)/(3.5*(0,i.Z)(t)*Math.pow((0,r.Z)(t),-1/3)))}},6586:function(t,e,n){"use strict";function r(t){for(var e in t){var n,r,a=t[e].trim();if(a){if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(n=+a)){if(!(r=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;i&&r[4]&&!r[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=n}else a=null;t[e]=a}return t}n.d(e,{Z:function(){return r}});let i=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()},42132:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r={},i={};function a(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function o(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function l(t,e){var n=t+"",r=n.length;return r=l?u=!0:10===(a=t.charCodeAt(s++))?f=!0:13===a&&(f=!0,10===t.charCodeAt(s)&&++s),t.slice(o+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+l(s,6):l(s,4))+"-"+l(n.getUTCMonth()+1,2)+"-"+l(n.getUTCDate(),2)+(o?"T"+l(r,2)+":"+l(i,2)+":"+l(a,2)+"."+l(o,3)+"Z":a?"T"+l(r,2)+":"+l(i,2)+":"+l(a,2)+"Z":i||r?"T"+l(r,2)+":"+l(i,2)+"Z":"")):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,i=s(t,function(t,i){var o;if(n)return n(t,i-1);r=t,n=e?(o=a(t),function(n,r){return e(o(n),r,t)}):a(t)});return i.columns=r||[],i},parseRows:s,format:function(e,n){return null==n&&(n=o(e)),[n.map(f).join(t)].concat(c(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=o(t)),c(t,e).join("\n")},formatRows:function(t){return t.map(u).join("\n")},formatRow:u,formatValue:f}}},17694:function(t,e,n){"use strict";function r(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}n.d(e,{WU:function(){return o}});var i,a,o,l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(t){var e;if(!(e=l.exec(t)))throw Error("invalid format: "+t);return new c({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function c(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function u(t,e){var n=r(t,e);if(!n)return t+"";var i=n[0],a=n[1];return a<0?"0."+Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+Array(a-i.length+2).join("0")}s.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var f={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>u(100*t,e),r:u,s:function(t,e){var n=r(t,e);if(!n)return t+"";var a=n[0],o=n[1],l=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=a.length;return l===s?a:l>s?a+Array(l-s+1).join("0"):l>0?a.slice(0,l)+"."+a.slice(l):"0."+Array(1-l).join("0")+r(t,Math.max(0,e+l-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function d(t){return t}var h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];o=(a=function(t){var e,n,a,o=void 0===t.grouping||void 0===t.thousands?d:(e=h.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),l=void 0===t.currency?"":t.currency[0]+"",c=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",g=void 0===t.numerals?d:(a=h.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return a[+t]})}),m=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"−":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=s(t)).fill,n=t.align,r=t.sign,a=t.symbol,d=t.zero,h=t.width,b=t.comma,x=t.precision,O=t.trim,w=t.type;"n"===w?(b=!0,w="g"):f[w]||(void 0===x&&(x=12),O=!0,w="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===a?c:/[%p]/.test(w)?m:"",C=f[w],M=/[defgprs%]/.test(w);function j(t){var a,l,s,c=_,f=k;if("c"===w)f=C(t)+f,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:C(Math.abs(t),x),O&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==r&&(m=!1),c=(m?"("===r?r:y:"-"===r||"("===r?"":r)+c,f=("s"===w?p[8+i/3]:"")+f+(m&&"("===r?")":""),M){for(a=-1,l=t.length;++a(s=t.charCodeAt(a))||s>57){f=(46===s?u+t.slice(a+1):t.slice(a))+f,t=t.slice(0,a);break}}}b&&!d&&(t=o(t,1/0));var j=c.length+t.length+f.length,S=j>1)+c+t+f+S.slice(j);break;default:t=S+c+t+f}return g(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),j.toString=function(){return t+""},j}return{format:b,formatPrefix:function(t,e){var n,i=b(((t=s(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(((n=r(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-a),l=p[8+a/3];return function(t){return i(o*t)+l}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,a.formatPrefix},38627:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(11344);function i(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:r.Z,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}},85142:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(55350),i=n(38627),a=n(58684),o=n(83502);function l(t,e,n,l){function s(r,i){return t<=r&&r<=n&&e<=i&&i<=l}function c(r,i,a,o){var s=0,c=0;if(null==r||(s=u(r,a))!==(c=u(i,a))||0>d(r,i)^a>0)do o.point(0===s||3===s?t:n,s>1?l:e);while((s=(s+a+4)%4)!==c);else o.point(i[0],i[1])}function u(i,a){return(0,r.Wn)(i[0]-t)0?0:3:(0,r.Wn)(i[0]-n)0?2:1:(0,r.Wn)(i[1]-e)0?1:0:a>0?3:2}function f(t,e){return d(t.x,e.x)}function d(t,e){var n=u(t,1),r=u(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var u,d,h,p,g,m,y,v,b,x,O,w=r,_=(0,i.Z)(),k={point:C,lineStart:function(){k.point=M,d&&d.push(h=[]),x=!0,b=!1,y=v=NaN},lineEnd:function(){u&&(M(p,g),m&&b&&_.rejoin(),u.push(_.result())),k.point=C,b&&w.lineEnd()},polygonStart:function(){w=_,u=[],d=[],O=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=d.length;nl&&(f-i)*(l-a)>(h-a)*(t-i)&&++e:h<=l&&(f-i)*(l-a)<(h-a)*(t-i)&&--e;return e}(),n=O&&e,i=(u=(0,o.Z)(u)).length;(n||i)&&(r.polygonStart(),n&&(r.lineStart(),c(null,null,1,r),r.lineEnd()),i&&(0,a.Z)(u,f,e,c,r),r.polygonEnd()),w=r,u=d=h=null}};function C(t,e){s(t,e)&&w.point(t,e)}function M(r,i){var a=s(r,i);if(d&&h.push([r,i]),x)p=r,g=i,m=a,x=!1,a&&(w.lineStart(),w.point(r,i));else if(a&&b)w.point(r,i);else{var o=[y=Math.max(-1e9,Math.min(1e9,y)),v=Math.max(-1e9,Math.min(1e9,v))],c=[r=Math.max(-1e9,Math.min(1e9,r)),i=Math.max(-1e9,Math.min(1e9,i))];!function(t,e,n,r,i,a){var o,l=t[0],s=t[1],c=e[0],u=e[1],f=0,d=1,h=c-l,p=u-s;if(o=n-l,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>d)return;o>f&&(f=o)}if(o=i-l,h||!(o<0)){if(o/=h,h<0){if(o>d)return;o>f&&(f=o)}else if(h>0){if(o0)){if(o/=p,p<0){if(o0){if(o>d)return;o>f&&(f=o)}if(o=a-s,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>f&&(f=o)}else if(p>0){if(o0&&(t[0]=l+f*h,t[1]=s+f*p),d<1&&(e[0]=l+d*h,e[1]=s+d*p),!0}}}}}(o,c,t,e,n,l)?a&&(w.lineStart(),w.point(r,i),O=!1):(b||(w.lineStart(),w.point(o[0],o[1])),w.point(c[0],c[1]),a||w.lineEnd(),O=!1)}y=r,v=i,b=a}return k}}},58684:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(55228),i=n(55350);function a(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function o(t,e,n,o,s){var c,u,f=[],d=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,o=t[0],l=t[e];if((0,r.Z)(o,l)){if(!o[2]&&!l[2]){for(s.lineStart(),c=0;c=0;--c)s.point((p=h[c])[0],p[1]);else o(m.x,m.p.x,-1,s);m=m.p}h=(m=m.o).z,y=!y}while(!m.v);s.lineEnd()}}}function l(t){if(e=t.length){for(var e,n,r=0,i=t[0];++ri.Ho}).map(d)).concat(r((0,i.mD)(c/y)*y,s,y).filter(function(t){return(0,i.Wn)(t%b)>i.Ho}).map(h))}return O.lines=function(){return w().map(function(t){return{type:"LineString",coordinates:t}})},O.outline=function(){return{type:"Polygon",coordinates:[p(l).concat(g(u).slice(1),p(n).reverse().slice(1),g(f).reverse().slice(1))]}},O.extent=function(t){return arguments.length?O.extentMajor(t).extentMinor(t):O.extentMinor()},O.extentMajor=function(t){return arguments.length?(l=+t[0][0],n=+t[1][0],f=+t[0][1],u=+t[1][1],l>n&&(t=l,l=n,n=t),f>u&&(t=f,f=u,u=t),O.precision(x)):[[l,f],[n,u]]},O.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],c=+n[0][1],s=+n[1][1],e>t&&(n=e,e=t,t=n),c>s&&(n=c,c=s,s=n),O.precision(x)):[[e,c],[t,s]]},O.step=function(t){return arguments.length?O.stepMajor(t).stepMinor(t):O.stepMinor()},O.stepMajor=function(t){return arguments.length?(v=+t[0],b=+t[1],O):[v,b]},O.stepMinor=function(t){return arguments.length?(m=+t[0],y=+t[1],O):[m,y]},O.precision=function(r){return arguments.length?(x=+r,d=a(c,s,90),h=o(e,t,x),p=a(f,u,90),g=o(l,n,x),O):x},O.extentMajor([[-180,-90+i.Ho],[180,90-i.Ho]]).extentMinor([[-180,-80-i.Ho],[180,80+i.Ho]])})()()}},67423:function(t,e){"use strict";e.Z=t=>t},55350:function(t,e,n){"use strict";n.d(e,{BZ:function(){return s},Ho:function(){return r},Kh:function(){return _},O$:function(){return b},OR:function(){return w},Qq:function(){return m},RW:function(){return c},Wn:function(){return f},Xx:function(){return x},ZR:function(){return k},_b:function(){return O},aW:function(){return i},cM:function(){return y},fv:function(){return h},mC:function(){return p},mD:function(){return g},ou:function(){return o},pi:function(){return a},pu:function(){return l},sQ:function(){return v},uR:function(){return u},z4:function(){return d}});var r=1e-6,i=1e-12,a=Math.PI,o=a/2,l=a/4,s=2*a,c=180/a,u=a/180,f=Math.abs,d=Math.atan,h=Math.atan2,p=Math.cos,g=Math.ceil,m=Math.exp,y=Math.log,v=Math.pow,b=Math.sin,x=Math.sign||function(t){return t>0?1:t<0?-1:0},O=Math.sqrt,w=Math.tan;function _(t){return t>1?0:t<-1?a:Math.acos(t)}function k(t){return t>1?o:t<-1?-o:Math.asin(t)}},11344:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return r}})},3310:function(t,e,n){"use strict";var r=n(11344),i=1/0,a=1/0,o=-1/0,l=o,s={point:function(t,e){to&&(o=t),el&&(l=e)},lineStart:r.Z,lineEnd:r.Z,polygonStart:r.Z,polygonEnd:r.Z,result:function(){var t=[[i,a],[o,l]];return o=l=-(a=i=1/0),t}};e.Z=s},30348:function(t,e,n){"use strict";n.d(e,{Z:function(){return te}});var r,i,a,o,l=n(67423),s=n(23311),c=n(75801),u=n(55350),f=n(11344),d=new c.dU,h=new c.dU,p={point:f.Z,lineStart:f.Z,lineEnd:f.Z,polygonStart:function(){p.lineStart=g,p.lineEnd=v},polygonEnd:function(){p.lineStart=p.lineEnd=p.point=f.Z,d.add((0,u.Wn)(h)),h=new c.dU},result:function(){var t=d/2;return d=new c.dU,t}};function g(){p.point=m}function m(t,e){p.point=y,r=a=t,i=o=e}function y(t,e){h.add(o*t-a*e),a=t,o=e}function v(){y(r,i)}var b,x,O,w,_=n(3310),k=0,C=0,M=0,j=0,S=0,A=0,E=0,P=0,R=0,Z={point:T,lineStart:L,lineEnd:N,polygonStart:function(){Z.lineStart=D,Z.lineEnd=z},polygonEnd:function(){Z.point=T,Z.lineStart=L,Z.lineEnd=N},result:function(){var t=R?[E/R,P/R]:A?[j/A,S/A]:M?[k/M,C/M]:[NaN,NaN];return k=C=M=j=S=A=E=P=R=0,t}};function T(t,e){k+=t,C+=e,++M}function L(){Z.point=B}function B(t,e){Z.point=I,T(O=t,w=e)}function I(t,e){var n=t-O,r=e-w,i=(0,u._b)(n*n+r*r);j+=i*(O+t)/2,S+=i*(w+e)/2,A+=i,T(O=t,w=e)}function N(){Z.point=T}function D(){Z.point=F}function z(){$(b,x)}function F(t,e){Z.point=$,T(b=O=t,x=w=e)}function $(t,e){var n=t-O,r=e-w,i=(0,u._b)(n*n+r*r);j+=i*(O+t)/2,S+=i*(w+e)/2,A+=i,E+=(i=w*t-O*e)*(O+t),P+=i*(w+e),R+=3*i,T(O=t,w=e)}function W(t){this._context=t}W.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u.BZ)}},result:f.Z};var H,G,q,V,Y,U=new c.dU,Q={point:f.Z,lineStart:function(){Q.point=X},lineEnd:function(){H&&K(G,q),Q.point=f.Z},polygonStart:function(){H=!0},polygonEnd:function(){H=null},result:function(){var t=+U;return U=new c.dU,t}};function X(t,e){Q.point=K,G=V=t,q=Y=e}function K(t,e){V-=t,Y-=e,U.add((0,u._b)(V*V+Y*Y)),V=t,Y=e}function J(){this._string=[]}function tt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function te(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),(0,s.Z)(t,n(r))),r.result()}return a.area=function(t){return(0,s.Z)(t,n(p)),p.result()},a.measure=function(t){return(0,s.Z)(t,n(Q)),Q.result()},a.bounds=function(t){return(0,s.Z)(t,n(_.Z)),_.Z.result()},a.centroid=function(t){return(0,s.Z)(t,n(Z)),Z.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,l.Z):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new J):new W(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}J.prototype={_radius:4.5,_circle:tt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(!this._string.length)return null;var t=this._string.join("");return this._string=[],t}}},55228:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(55350);function i(t,e){return(0,r.Wn)(t[0]-e[0])=.12&&i<.234&&r>=-.425&&r<-.214?f:i>=.166&&i<.234&&r>=-.214&&r<-.115?d:u).invert(t)},p.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[u.stream(e=n),f.stream(n),d.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n0?e<-r.ou+r.Ho&&(e=-r.ou+r.Ho):e>r.ou-r.Ho&&(e=r.ou-r.Ho);var n=l/(0,r.sQ)(o(e),i);return[n*(0,r.O$)(i*t),l-n*(0,r.mC)(i*t)]}return s.invert=function(t,e){var n=l-e,a=(0,r.Xx)(i)*(0,r._b)(t*t+n*n),o=(0,r.fv)(t,(0,r.Wn)(n))*(0,r.Xx)(n);return n*i<0&&(o-=r.pi*(0,r.Xx)(t)*(0,r.Xx)(n)),[o/i,2*(0,r.z4)((0,r.sQ)(l/a,1/i))-r.ou]},s}function s(){return(0,i.o)(l).scale(109.5).parallels([30,30])}},26477:function(t,e,n){"use strict";n.d(e,{v:function(){return a},Z:function(){return o}});var r=n(55350),i=n(53388);function a(t,e){var n=(0,r.O$)(t),i=(n+(0,r.O$)(e))/2;if((0,r.Wn)(i)=0?1:-1,R=P*E,Z=R>a.pi,T=w*S;if(d.add((0,a.fv)(T*P*(0,a.O$)(R),_*A+T*(0,a.mC)(R))),c+=Z?E+P*a.BZ:E,Z^x>=n^M>=n){var L=u(s(b),s(C));h(L);var B=u(l,L);h(B);var I=(Z^E>=0?-1:1)*(0,a.ZR)(B[2]);(r>I||r===I&&(L[0]||L[1]))&&(f+=Z^E>=0?1:-1)}}return(c<-a.Ho||c0){for(w||(c.polygonStart(),w=!0),c.lineStart(),t=0;t1&&2&i&&a.push(a.pop().concat(a.shift())),d.push(a.filter(y))}}return _}}function y(t){return t.length>1}function v(t,e){return((t=t.x)[0]<0?t[1]-a.ou-a.Ho:a.ou-t[1])-((e=e.x)[0]<0?e[1]-a.ou-a.Ho:a.ou-e[1])}var b=m(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,l){var s,c,u,f,d,h,p=o>0?a.pi:-a.pi,g=(0,a.Wn)(o-n);(0,a.Wn)(g-a.pi)0?a.ou:-a.ou),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),t.point(o,r),e=0):i!==p&&g>=a.pi&&((0,a.Wn)(n-i)a.Ho?(0,a.z4)(((0,a.O$)(c)*(d=(0,a.mC)(l))*(0,a.O$)(u)-(0,a.O$)(l)*(f=(0,a.mC)(c))*(0,a.O$)(s))/(f*d*h)):(c+l)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(p,r),e=0),t.point(n=o,r=l),i=p},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*a.ou,r.point(-a.pi,i),r.point(0,i),r.point(a.pi,i),r.point(a.pi,0),r.point(a.pi,-i),r.point(0,-i),r.point(-a.pi,-i),r.point(-a.pi,0),r.point(-a.pi,i);else if((0,a.Wn)(t[0]-e[0])>a.Ho){var o=t[0]-e[2]?-n:n)+a.BZ-a.Ho)%a.BZ}var O=n(55228),w=n(85142),_=n(44079),k=n(67423),C=n(51613),M=n(20071),j=n(83776),S=(0,a.mC)(30*a.uR);function A(t,e){return+e?function(t,e){function n(r,i,o,l,s,c,u,f,d,h,p,g,m,y){var v=u-r,b=f-i,x=v*v+b*b;if(x>4*e&&m--){var O=l+h,w=s+p,_=c+g,k=(0,a._b)(O*O+w*w+_*_),C=(0,a.ZR)(_/=k),M=(0,a.Wn)((0,a.Wn)(_)-1)e||(0,a.Wn)((v*P+b*R)/x-.5)>.3||l*h+s*p+c*g0,i=(0,a.Wn)(e)>a.Ho;function o(t,n){return(0,a.mC)(t)*(0,a.mC)(n)>e}function h(t,n,r){var i=s(t),o=s(n),h=[1,0,0],p=u(i,o),g=c(p,p),m=p[0],y=g-m*m;if(!y)return!r&&t;var v=e*g/y,b=-e*m/y,x=u(h,p),O=d(h,v);f(O,d(p,b));var w=c(O,x),_=c(x,x),k=w*w-_*(c(O,O)-1);if(!(k<0)){var C=(0,a._b)(k),M=d(x,(-w-C)/_);if(f(M,O),M=l(M),!r)return M;var j,S=t[0],A=n[0],E=t[1],P=n[1];A0^M[1]<((0,a.Wn)(M[0]-S)a.pi^(S<=M[0]&&M[0]<=A)){var L=d(x,(-w+C)/_);return f(L,O),[M,l(L)]}}}function p(e,n){var i=r?t:a.pi-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return m(o,function(t){var e,n,l,s,c;return{lineStart:function(){s=l=!1,c=1},point:function(u,f){var d,g,m=[u,f],y=o(u,f),v=r?y?0:p(u,f):y?p(u+(u<0?a.pi:-a.pi),f):0;!e&&(s=l=y)&&t.lineStart(),y!==l&&(!(g=h(e,m))||(0,O.Z)(e,g)||(0,O.Z)(m,g))&&(m[2]=1),y!==l?(c=0,y?(t.lineStart(),g=h(m,e),t.point(g[0],g[1])):(g=h(e,m),t.point(g[0],g[1],2),t.lineEnd()),e=g):i&&e&&r^y&&!(v&n)&&(d=h(m,e,!0))&&(c=0,r?(t.lineStart(),t.point(d[0][0],d[0][1]),t.point(d[1][0],d[1][1]),t.lineEnd()):(t.point(d[1][0],d[1][1]),t.lineEnd(),t.lineStart(),t.point(d[0][0],d[0][1],3))),!y||e&&(0,O.Z)(e,m)||t.point(m[0],m[1]),e=m,l=y,n=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return c|(s&&l)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var s=(0,a.mC)(e),c=(0,a.O$)(e),u=r*n;null==i?(i=e+r*a.BZ,o=e-u/2):(i=x(s,i),o=x(s,o),(r>0?io)&&(i+=r*a.BZ));for(var f,d=i;r>0?d>o:d2?t[2]%360*a.uR:0,U()):[B*a.RW,I*a.RW,N*a.RW]},V.angle=function(t){return arguments.length?(D=t%360*a.uR,U()):D*a.RW},V.reflectX=function(t){return arguments.length?(z=t?-1:1,U()):z<0},V.reflectY=function(t){return arguments.length?(F=t?-1:1,U()):F<0},V.precision=function(t){return arguments.length?(h=A(p,q=t*t),Q()):(0,a._b)(q)},V.fitExtent=function(t,e){return(0,j.qg)(V,t,e)},V.fitSize=function(t,e){return(0,j.mF)(V,t,e)},V.fitWidth=function(t,e){return(0,j.V6)(V,t,e)},V.fitHeight=function(t,e){return(0,j.rf)(V,t,e)},function(){return e=t.apply(this,arguments),V.invert=e.invert&&Y,U()}}},23007:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l},hk:function(){return o},iW:function(){return s}});var r=n(55350),i=n(51613),a=n(32427);function o(t,e){return[t,(0,r.cM)((0,r.OR)((r.ou+e)/2))]}function l(){return s(o).scale(961/r.BZ)}function s(t){var e,n,l,s=(0,a.Z)(t),c=s.center,u=s.scale,f=s.translate,d=s.clipExtent,h=null;function p(){var a=r.pi*u(),c=s((0,i.Z)(s.rotate()).invert([0,0]));return d(null==h?[[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]]:t===o?[[Math.max(c[0]-a,h),e],[Math.min(c[0]+a,n),l]]:[[h,Math.max(c[1]-a,e)],[n,Math.min(c[1]+a,l)]])}return s.scale=function(t){return arguments.length?(u(t),p()):u()},s.translate=function(t){return arguments.length?(f(t),p()):f()},s.center=function(t){return arguments.length?(c(t),p()):c()},s.clipExtent=function(t){return arguments.length?(null==t?h=e=n=l=null:(h=+t[0][0],e=+t[0][1],n=+t[1][0],l=+t[1][1]),p()):null==h?null:[[h,e],[n,l]]},p()}o.invert=function(t,e){return[t,2*(0,r.z4)((0,r.Qq)(e))-r.ou]}},38839:function(t,e,n){"use strict";n.d(e,{K:function(){return a},Z:function(){return o}});var r=n(32427),i=n(55350);function a(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function o(){return(0,r.Z)(a).scale(175.295)}a.invert=function(t,e){var n,r=e,a=25;do{var o=r*r,l=o*o;r-=n=(r*(1.007226+o*(.015085+l*(-.044475+.028874*o-.005916*l)))-e)/(1.007226+o*(.045255+l*(-.311325+.259866*o-.005916*11*l)))}while((0,i.Wn)(n)>i.Ho&&--a>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]}},50435:function(t,e,n){"use strict";n.d(e,{I:function(){return o},Z:function(){return l}});var r=n(55350),i=n(93824),a=n(32427);function o(t,e){return[(0,r.mC)(e)*(0,r.O$)(t),(0,r.O$)(e)]}function l(){return(0,a.Z)(o).scale(249.5).clipAngle(90+r.Ho)}o.invert=(0,i.O)(r.ZR)},30378:function(t,e,n){"use strict";n.d(e,{T:function(){return o},Z:function(){return l}});var r=n(55350),i=n(93824),a=n(32427);function o(t,e){var n=(0,r.mC)(e),i=1+(0,r.mC)(t)*n;return[n*(0,r.O$)(t)/i,(0,r.O$)(e)/i]}function l(){return(0,a.Z)(o).scale(250).clipAngle(142)}o.invert=(0,i.O)(function(t){return 2*(0,r.z4)(t)})},17421:function(t,e,n){"use strict";n.d(e,{F:function(){return a},Z:function(){return o}});var r=n(55350),i=n(23007);function a(t,e){return[(0,r.cM)((0,r.OR)((r.ou+e)/2)),-t]}function o(){var t=(0,i.iW)(a),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}a.invert=function(t,e){return[-e,2*(0,r.z4)((0,r.Qq)(t))-r.ou]}},51613:function(t,e,n){"use strict";n.d(e,{I:function(){return o},Z:function(){return u}});var r=n(44079),i=n(55350);function a(t,e){return[(0,i.Wn)(t)>i.pi?t+Math.round(-t/i.BZ)*i.BZ:t,e]}function o(t,e,n){return(t%=i.BZ)?e||n?(0,r.Z)(s(t),c(e,n)):s(t):e||n?c(e,n):a}function l(t){return function(e,n){return[(e+=t)>i.pi?e-i.BZ:e<-i.pi?e+i.BZ:e,n]}}function s(t){var e=l(t);return e.invert=l(-t),e}function c(t,e){var n=(0,i.mC)(t),r=(0,i.O$)(t),a=(0,i.mC)(e),o=(0,i.O$)(e);function l(t,e){var l=(0,i.mC)(e),s=(0,i.mC)(t)*l,c=(0,i.O$)(t)*l,u=(0,i.O$)(e),f=u*n+s*r;return[(0,i.fv)(c*a-f*o,s*n-u*r),(0,i.ZR)(f*a+c*o)]}return l.invert=function(t,e){var l=(0,i.mC)(e),s=(0,i.mC)(t)*l,c=(0,i.O$)(t)*l,u=(0,i.O$)(e),f=u*a-c*o;return[(0,i.fv)(c*a+u*o,s*n+f*r),(0,i.ZR)(f*n-s*r)]},l}function u(t){function e(e){return e=t(e[0]*i.uR,e[1]*i.uR),e[0]*=i.RW,e[1]*=i.RW,e}return t=o(t[0]*i.uR,t[1]*i.uR,t.length>2?t[2]*i.uR:0),e.invert=function(e){return e=t.invert(e[0]*i.uR,e[1]*i.uR),e[0]*=i.RW,e[1]*=i.RW,e},e}a.invert=a},23311:function(t,e,n){"use strict";function r(t,e){t&&a.hasOwnProperty(t.type)&&a[t.type](t,e)}n.d(e,{Z:function(){return s}});var i={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,a=n.length;++i=0;)e+=n[r].value;else e=1;t.value=e}function i(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=o)):void 0===e&&(e=a);for(var n,r,i,l,u,f=new c(t),d=[f];n=d.pop();)if((i=e(n.data))&&(u=(i=Array.from(i)).length))for(n.children=i,l=u-1;l>=0;--l)d.push(r=i[l]=new c(i[l])),r.parent=n,r.depth=n.depth+1;return f.eachBefore(s)}function a(t){return t.children}function o(t){return Array.isArray(t)?t[1]:null}function l(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function s(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}n.d(e,{NB:function(){return c},le:function(){return s},ZP:function(){return i}}),c.prototype=i.prototype={constructor:c,count:function(){return this.eachAfter(r)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],l=[],s=-1;a=o.pop();)if(l.push(a),n=a.children)for(r=0,i=n.length;r=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return i(this).eachBefore(l)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n0&&n*n>r*r+i*i}function a(t,e){for(var n=0;n(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*l-a*s,n.y=t.y-r*s+a*l):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*l-a*s,n.y=e.y+r*s+a*l)):(n.x=e.x+n.r,n.y=e.y)}function c(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function u(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function f(t){this._=t,this.next=null,this.previous=null}n.d(e,{Z:function(){return g}});var d=n(76263),h=n(40588);function p(t){return Math.sqrt(t.value)}function g(){var t=null,e=1,n=1,r=h.G;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(m(t)).eachAfter(y(r,.5)).eachBefore(v(1)):i.eachBefore(m(p)).eachAfter(y(h.G,1)).eachAfter(y(r,i.r/Math.min(e,n))).eachBefore(v(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=(0,d.j)(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:(0,h.Z)(+t),i):r},i}function m(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function y(t,e){return function(n){if(d=n.children){var d,h,p,g=d.length,m=t(n)*e||0;if(m)for(h=0;h1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(h>2))return e.r+n.r;s(n,e,d=t[2]),e=new f(e),n=new f(n),d=new f(d),e.next=d.previous=n,n.next=e.previous=d,d.next=n.previous=e;e:for(m=3;m0)throw Error("cycle");return s}return n.id=function(e){return arguments.length?(t=(0,r.C)(e),n):t},n.parentId=function(t){return arguments.length?(e=(0,r.C)(t),n):e},n}},81594:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(70569);function i(t,e){return t.parent===e.parent?1:2}function a(t){var e=t.children;return e?e[0]:t.t}function o(t){var e=t.children;return e?e[e.length-1]:t.t}function l(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function s(){var t=i,e=1,n=1,r=null;function s(i){var a=function(t){for(var e,n,r,i,a,o=new l(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new l(r[i],i)),n.parent=e;return(o.parent=new l(null,0)).children=[o],o}(i);if(a.eachAfter(c),a.parent.m=-a.z,a.eachBefore(u),r)i.eachBefore(f);else{var o=i,s=i,d=i;i.eachBefore(function(t){t.xs.x&&(s=t),t.depth>d.depth&&(d=t)});var h=o===s?1:t(o,s)/2,p=h-o.x,g=e/(s.x+h+p),m=n/(d.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*g,t.y=t.depth*m})}return i}function c(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var l=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-l):e.z=l}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,l,s,c=e,u=e,f=n,d=c.parent.children[0],h=c.m,p=u.m,g=f.m,m=d.m;f=o(f),c=a(c),f&&c;)d=a(d),(u=o(u)).a=e,(s=f.z+g-c.z-h+t(f._,c._))>0&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}((i=f,l=r,i.a.parent===e.parent?i.a:l),e,s),h+=s,p+=s),g+=f.m,h+=c.m,m+=d.m,p+=u.m;f&&!o(u)&&(u.t=f,u.m+=g-p),c&&!a(d)&&(d.t=c,d.m+=h-m,r=e)}return r}(e,i,e.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function f(t){t.x*=e,t.y=t.depth*n}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],s):r?null:[e,n]},s.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],s):r?[e,n]:null},s}l.prototype=Object.create(r.NB.prototype)},70239:function(t,e,n){"use strict";function r(t,e,n,r,i){var a,o,l=t.children,s=l.length,c=Array(s+1);for(c[0]=o=a=0;a=n-1){var u=l[e];u.x0=i,u.y0=a,u.x1=o,u.y1=s;return}for(var f=c[e],d=r/2+f,h=e+1,p=n-1;h>>1;c[g]s-a){var v=r?(i*y+o*m)/r:o;t(e,h,m,i,a,v,s),t(h,n,y,v,a,o,s)}else{var b=r?(a*y+s*m)/r:s;t(e,h,m,i,a,o,b),t(h,n,y,i,b,o,s)}}(0,s,t.value,e,n,r,i)}n.d(e,{Z:function(){return r}})},36849:function(t,e,n){"use strict";function r(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,c=t.value&&(r-e)/t.value;++l1?e:1)},n}(a.Sk)},8080:function(t,e,n){"use strict";function r(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}n.d(e,{Z:function(){return r}})},71831:function(t,e,n){"use strict";function r(t,e,n,r,i){for(var a,o=t.children,l=-1,s=o.length,c=t.value&&(i-n)/t.value;++lp&&(p=c),(g=Math.max(p/(v=d*d*y),v/h))>m){d-=c;break}m=g}b.push(s={value:d,dice:u1?e:1)},n}(a)},11108:function(t,e){"use strict";let n=Math.PI,r=2*n,i=r-1e-6;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,i,a){t=+t,e=+e,r=+r,i=+i,a=+a;var o=this._x1,l=this._y1,s=r-t,c=i-e,u=o-t,f=l-e,d=u*u+f*f;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>1e-6){if(Math.abs(f*s-c*u)>1e-6&&a){var h=r-o,p=i-l,g=s*s+c*c,m=Math.sqrt(g),y=Math.sqrt(d),v=a*Math.tan((n-Math.acos((g+d-(h*h+p*p))/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*h>u*p)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)}},arc:function(t,e,a,o,l,s){t=+t,e=+e,a=+a,s=!!s;var c=a*Math.cos(o),u=a*Math.sin(o),f=t+c,d=e+u,h=1^s,p=s?o-l:l-o;if(a<0)throw Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+f+","+d),a&&(p<0&&(p=p%r+r),p>i?this._+="A"+a+","+a+",0,1,"+h+","+(t-c)+","+(e-u)+"A"+a+","+a+",0,1,"+h+","+(this._x1=f)+","+(this._y1=d):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=n)+","+h+","+(this._x1=t+a*Math.cos(l))+","+(this._y1=e+a*Math.sin(l))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.Z=o},63488:function(t,e,n){"use strict";function r(t){for(var e=t.length/6|0,n=Array(e),r=0;r()=>t;function y(t,e){return function(n){return t+n*e}}function v(t,e){var n=e-t;return n?y(t,n):m(isNaN(t)?e:t)}function b(t){return function(e){var n,r,i=e.length,a=Array(i),o=Array(i),l=Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=rx(t[t.length-1]),w=[,,,].concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r),_=O(w),k=[,,,].concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r),C=O(k),M=[,,,].concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r),j=O(M),S=[,,,].concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r),A=O(S),E=[,,,].concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r),P=O(E),R=[,,,].concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r),Z=O(R),T=[,,,].concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r),L=O(T),B=[,,,].concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r),I=O(B),N=[,,,].concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r),D=O(N),z=[,,,].concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r),F=O(z),$=[,,,].concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r),W=O($),H=[,,,].concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r),G=O(H),q=[,,,].concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r),V=O(q),Y=[,,,].concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r),U=O(Y),Q=[,,,].concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r),X=O(Q),K=[,,,].concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r),J=O(K),tt=[,,,].concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r),te=O(tt),tn=[,,,].concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r),tr=O(tn),ti=[,,,].concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r),ta=O(ti),to=[,,,].concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r),tl=O(to),ts=[,,,].concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r),tc=O(ts),tu=[,,,].concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r),tf=O(tu),td=[,,,].concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r),th=O(td),tp=[,,,].concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r),tg=O(tp),tm=[,,,].concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r),ty=O(tm),tv=[,,,].concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r),tb=O(tv),tx=[,,,].concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r),tO=O(tx);function tw(t){return"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-(t=Math.max(0,Math.min(1,t)))*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}var t_=n(44087);let tk=Math.PI/180,tC=180/Math.PI;var tM=-1.78277*.29227-.1347134789;function tj(t,e,n,r){return 1==arguments.length?function(t){if(t instanceof tS)return new tS(t.h,t.s,t.l,t.opacity);t instanceof p.Ss||(t=(0,p.SU)(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(tM*r+-1.7884503806*e-3.5172982438*n)/(tM+-1.7884503806-3.5172982438),a=r-i,o=-((1.97294*(n-i)- -.29227*a)/.90649),l=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),s=l?Math.atan2(o,a)*tC-120:NaN;return new tS(s<0?s+360:s,l,i,t.opacity)}(t):new tS(t,e,n,null==r?1:r)}function tS(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function tA(t){return function e(n){function r(e,r){var i=t((e=tj(e)).h,(r=tj(r)).h),a=v(e.s,r.s),o=v(e.l,r.l),l=v(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}(0,t_.Z)(tS,tj,(0,t_.l)(p.Il,{brighter:function(t){return t=null==t?p.J5:Math.pow(p.J5,t),new tS(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?p.xV:Math.pow(p.xV,t),new tS(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*tk,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new p.Ss(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(-.29227*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}})),tA(function(t,e){var n=e-t;return n?y(t,n>180||n<-180?n-360*Math.round(n/360):n):m(isNaN(t)?e:t)});var tE=tA(v),tP=tE(tj(300,.5,0),tj(-240,.5,1)),tR=tE(tj(-100,.75,.35),tj(80,1.5,.8)),tZ=tE(tj(260,.75,.35),tj(80,1.5,.8)),tT=tj();function tL(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return tT.h=360*t-100,tT.s=1.5-1.5*e,tT.l=.8-.9*e,tT+""}var tB=(0,p.B8)(),tI=Math.PI/3,tN=2*Math.PI/3;function tD(t){var e;return t=(.5-t)*Math.PI,tB.r=255*(e=Math.sin(t))*e,tB.g=255*(e=Math.sin(t+tI))*e,tB.b=255*(e=Math.sin(t+tN))*e,tB+""}function tz(t){return"rgb("+Math.max(0,Math.min(255,Math.round(34.61+(t=Math.max(0,Math.min(1,t)))*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function tF(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var t$=tF(r("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),tW=tF(r("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tH=tF(r("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),tG=tF(r("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},10233:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(11108),i=n(93072),a=n(44915);function o(t){return t.innerRadius}function l(t){return t.outerRadius}function s(t){return t.startAngle}function c(t){return t.endAngle}function u(t){return t&&t.padAngle}function f(t,e,n,r,i,o,l){var s=t-n,c=e-r,u=(l?o:-o)/(0,a._b)(s*s+c*c),f=u*c,d=-u*s,h=t+f,p=e+d,g=n+f,m=r+d,y=(h+g)/2,v=(p+m)/2,b=g-h,x=m-p,O=b*b+x*x,w=i-o,_=h*m-g*p,k=(x<0?-1:1)*(0,a._b)((0,a.Fp)(0,w*w*O-_*_)),C=(_*x-b*k)/O,M=(-_*b-x*k)/O,j=(_*x+b*k)/O,S=(-_*b+x*k)/O,A=C-y,E=M-v,P=j-y,R=S-v;return A*A+E*E>P*P+R*R&&(C=j,M=S),{cx:C,cy:M,x01:-f,y01:-d,x11:C*(i/w-1),y11:M*(i/w-1)}}function d(){var t=o,e=l,n=(0,i.Z)(0),d=null,h=s,p=c,g=u,m=null;function y(){var i,o,l=+t.apply(this,arguments),s=+e.apply(this,arguments),c=h.apply(this,arguments)-a.ou,u=p.apply(this,arguments)-a.ou,y=(0,a.Wn)(u-c),v=u>c;if(m||(m=i=(0,r.Z)()),sa.Ho){if(y>a.BZ-a.Ho)m.moveTo(s*(0,a.mC)(c),s*(0,a.O$)(c)),m.arc(0,0,s,c,u,!v),l>a.Ho&&(m.moveTo(l*(0,a.mC)(u),l*(0,a.O$)(u)),m.arc(0,0,l,u,c,v));else{var b,x,O=c,w=u,_=c,k=u,C=y,M=y,j=g.apply(this,arguments)/2,S=j>a.Ho&&(d?+d.apply(this,arguments):(0,a._b)(l*l+s*s)),A=(0,a.VV)((0,a.Wn)(s-l)/2,+n.apply(this,arguments)),E=A,P=A;if(S>a.Ho){var R=(0,a.ZR)(S/l*(0,a.O$)(j)),Z=(0,a.ZR)(S/s*(0,a.O$)(j));(C-=2*R)>a.Ho?(R*=v?1:-1,_+=R,k-=R):(C=0,_=k=(c+u)/2),(M-=2*Z)>a.Ho?(Z*=v?1:-1,O+=Z,w-=Z):(M=0,O=w=(c+u)/2)}var T=s*(0,a.mC)(O),L=s*(0,a.O$)(O),B=l*(0,a.mC)(k),I=l*(0,a.O$)(k);if(A>a.Ho){var N,D=s*(0,a.mC)(w),z=s*(0,a.O$)(w),F=l*(0,a.mC)(_),$=l*(0,a.O$)(_);if(ya.Ho?P>a.Ho?(b=f(F,$,T,L,s,P,v),x=f(D,z,B,I,s,P,v),m.moveTo(b.cx+b.x01,b.cy+b.y01),Pa.Ho&&C>a.Ho?E>a.Ho?(b=f(B,I,D,z,l,-E,v),x=f(T,L,F,$,l,-E,v),m.lineTo(b.cx+b.x01,b.cy+b.y01),E=l;--s)h.point(v[s],b[s]);h.lineEnd(),h.areaEnd()}}y&&(v[o]=+t(p,o,a),b[o]=+e(p,o,a),h.point(c?+c(p,o,a):v[o],n?+n(p,o,a):b[o]))}if(g)return h=null,g+""||null}function g(){return(0,l.Z)().defined(u).curve(d).context(f)}return t="function"==typeof t?t:void 0===t?s.x:(0,a.Z)(+t),e="function"==typeof e?e:void 0===e?(0,a.Z)(0):(0,a.Z)(+e),n="function"==typeof n?n:void 0===n?s.y:(0,a.Z)(+n),p.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,a.Z)(+e),c=null,p):t},p.x0=function(e){return arguments.length?(t="function"==typeof e?e:(0,a.Z)(+e),p):t},p.x1=function(t){return arguments.length?(c=null==t?null:"function"==typeof t?t:(0,a.Z)(+t),p):c},p.y=function(t){return arguments.length?(e="function"==typeof t?t:(0,a.Z)(+t),n=null,p):e},p.y0=function(t){return arguments.length?(e="function"==typeof t?t:(0,a.Z)(+t),p):e},p.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:(0,a.Z)(+t),p):n},p.lineX0=p.lineY0=function(){return g().x(t).y(e)},p.lineY1=function(){return g().x(t).y(n)},p.lineX1=function(){return g().x(c).y(e)},p.defined=function(t){return arguments.length?(u="function"==typeof t?t:(0,a.Z)(!!t),p):u},p.curve=function(t){return arguments.length?(d=t,null!=f&&(h=d(f)),p):d},p.context=function(t){return arguments.length?(null==t?f=h=null:h=d(f=t),p):f},p}},53253:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(45317),i=n(37633),a=n(73671);function o(){var t=(0,i.Z)().curve(r.j),e=t.curve,n=t.lineX0,o=t.lineX1,l=t.lineY0,s=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return(0,a.X)(n())},delete t.lineX0,t.lineEndAngle=function(){return(0,a.X)(o())},delete t.lineX1,t.lineInnerRadius=function(){return(0,a.X)(l())},delete t.lineY0,t.lineOuterRadius=function(){return(0,a.X)(s())},delete t.lineY1,t.curve=function(t){return arguments.length?e((0,r.Z)(t)):e()._curve},t}},5742:function(t,e,n){"use strict";function r(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}n.d(e,{Z:function(){return r}}),Array.prototype.slice},93072:function(t,e,n){"use strict";function r(t){return function(){return t}}n.d(e,{Z:function(){return r}})},43683:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(33046);function i(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function a(t,e){this._context=t,this._k=(1-e)/6}function o(t,e){this._context=t,this._k=(1-e)/6}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:i(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:i(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new a(t,e)}return n.tension=function(e){return t(+e)},n}(0),o.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:i(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new o(t,e)}return n.tension=function(e){return t(+e)},n}(0);var l=n(44915);function s(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>l.Ho){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>l.Ho){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function c(t,e){this._context=t,this._alpha=e}function u(t,e){this._context=t,this._alpha=e}c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return e?new c(t,e):new a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),u.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var f=function t(e){function n(t){return e?new u(t,e):new o(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},18143:function(t,e,n){"use strict";function r(t){this._context=t}function i(t){return new r(t)}n.d(e,{Z:function(){return i}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}}},57481:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(33046);function i(t){this._context=t}function a(t){return new i(t)}i.prototype={areaStart:r.Z,areaEnd:r.Z,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}}},65165:function(t,e,n){"use strict";function r(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function i(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function a(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function o(t){this._context=t}function l(t){this._context=new s(t)}function s(t){this._context=t}function c(t){return new o(t)}function u(t){return new l(t)}n.d(e,{Z:function(){return c},s:function(){return u}}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:a(this,this._t0,i(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,a(this,i(this,n=r(this,t,e)),n);break;default:a(this,this._t0,n=r(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(l.prototype=Object.create(o.prototype)).point=function(t,e){o.prototype.point.call(this,e,t)},s.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}}},45317:function(t,e,n){"use strict";n.d(e,{Z:function(){return a},j:function(){return r}});var r=a(n(18143).Z);function i(t){this._curve=t}function a(t){function e(e){return new i(t(e))}return e._curve=t,e}i.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}}},77059:function(t,e,n){"use strict";function r(t,e){this._context=t,this._t=e}function i(t){return new r(t,.5)}function a(t){return new r(t,0)}function o(t){return new r(t,1)}n.d(e,{RN:function(){return a},ZP:function(){return i},cD:function(){return o}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}}},25049:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(11108),i=n(5742),a=n(93072),o=n(18143),l=n(78260);function s(t,e){var n=(0,a.Z)(!0),s=null,c=o.Z,u=null;function f(a){var o,l,f,d=(a=(0,i.Z)(a)).length,h=!1;for(null==s&&(u=c(f=(0,r.Z)())),o=0;o<=d;++o)!(o1?0:t<-1?f:Math.acos(t)}function g(t){return t>=1?d:t<=-1?-d:Math.asin(t)}},33046:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return r}})},78260:function(t,e,n){"use strict";function r(t){return t[0]}function i(t){return t[1]}n.d(e,{x:function(){return r},y:function(){return i}})},69916:function(t,e){!function(t){"use strict";function e(t){for(var e=Array(t),n=0;nc+l*o*u||f>=g)p=o;else{if(Math.abs(h)<=-s*u)return o;h*(p-d)>=0&&(p=d),d=o,g=f}return 0}o=o||1,l=l||1e-6,s=s||.1;for(var m=0;m<10;++m){if(a(i.x,1,r.x,o,e),f=i.fx=t(i.x,i.fxprime),h=n(i.fxprime,e),f>c+l*o*u||m&&f>=d)return g(p,o,d);if(Math.abs(h)<=-s*u)break;if(h>=0)return g(o,p,f);d=f,p=o,o*=2}return o}t.bisect=function(t,e,n,r){var i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,o=t(e),l=t(n),s=n-e;if(o*l>0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===l)return n;for(var c=0;c=0&&(e=u),Math.abs(s)=g[p-1].fx){var S=!1;if(O.fx>j.fx?(a(w,1+d,x,-d,j),w.fx=t(w),w.fx=1)break;for(m=1;m=r(f.fxprime))break}return l.history&&l.history.push({x:f.x.slice(),fx:f.fx,fxprime:f.fxprime.slice(),alpha:p}),f},t.gradientDescent=function(t,e,n){for(var i=(n=n||{}).maxIterations||100*e.length,o=n.learnRate||.001,l={x:e.slice(),fx:0,fxprime:e.slice()},s=0;s=r(l.fxprime)));++s);return l},t.gradientDescentLineSearch=function(t,e,n){n=n||{};var a,l={x:e.slice(),fx:0,fxprime:e.slice()},s={x:e.slice(),fx:0,fxprime:e.slice()},c=n.maxIterations||100*e.length,u=n.learnRate||1,f=e.slice(),d=n.c1||.001,h=n.c2||.1,p=[];if(n.history){var g=t;t=function(t,e){return p.push(t.slice()),g(t,e)}}l.fx=t(l.x,l.fxprime);for(var m=0;mr(l.fxprime)));++m);return l},t.zeros=e,t.zerosM=function(t,n){return e(t).map(function(){return e(n)})},t.norm2=r,t.weightedSum=a,t.scale=i}(e)},8679:function(t,e,n){"use strict";var r=n(21296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(t){return r.isMemo(t)?o:l[t.$$typeof]||i}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(p){var i=h(n);i&&i!==p&&t(e,i,r)}var o=u(n);f&&(o=o.concat(f(n)));for(var l=s(e),g=s(n),m=0;m{var e;let{appInfo:t}=(0,d.useContext)(u.MobileChatContext),{message:l}=i.Z.useApp(),[s,m]=(0,d.useState)(0);if(!(null==t?void 0:t.app_code))return null;let v=async()=>{let e=c()("dingtalk://dingtalkclient/page/link?url=".concat(encodeURIComponent(location.href),"&pc_slide=true"));l[e?"success":"error"](e?"复制成功":"复制失败")};return s>6&&l.info(JSON.stringify(window.navigator.userAgent),2,()=>{m(0)}),(0,n.jsxs)("header",{className:"flex w-full items-center justify-between bg-[rgba(255,255,255,0.9)] border dark:bg-black dark:border-[rgba(255,255,255,0.6)] rounded-xl mx-auto px-4 py-2 mb-4 sticky top-4 z-50 mt-4 shadow-md",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",onClick:()=>m(s+1),children:[(0,n.jsx)(r.Z,{scene:(null==t?void 0:null===(e=t.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent",width:8,height:8}),(0,n.jsxs)("div",{className:"flex flex-col ml-2",children:[(0,n.jsx)(o.Z.Text,{className:"text-md font-bold line-clamp-2",children:null==t?void 0:t.app_name}),(0,n.jsx)(o.Z.Text,{className:"text-sm line-clamp-2",children:null==t?void 0:t.app_describe})]})]}),(0,n.jsx)("div",{onClick:v,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,n.jsx)(a.Z,{className:"text-lg"})})]})})},74638:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(62418),i=l(25519),o=l(30159),s=l(87740),c=l(50888),d=l(52645),u=l(27496),m=l(1375),v=l(65654),x=l(66309),p=l(55241),h=l(74330),f=l(25278),g=l(14726),b=l(93967),j=l.n(b),y=l(39332),w=l(67294),_=l(73913),N=l(7001),k=l(73749),C=l(97109),Z=l(83454);let S=["magenta","orange","geekblue","purple","cyan","green"];t.default=()=>{var e,t;let l=(0,y.useSearchParams)(),b=null!==(t=null==l?void 0:l.get("ques"))&&void 0!==t?t:"",{history:R,model:E,scene:M,temperature:O,resource:A,conv_uid:L,appInfo:z,scrollViewRef:P,order:T,userInput:V,ctrl:D,canAbort:H,canNewChat:I,setHistory:J,setCanNewChat:U,setCarAbort:q,setUserInput:B}=(0,w.useContext)(_.MobileChatContext),[W,$]=(0,w.useState)(!1),[F,K]=(0,w.useState)(!1),G=async e=>{var t,l,n;B(""),D.current=new AbortController;let r={chat_mode:M,model_name:E,user_input:e||V,conv_uid:L,temperature:O,app_code:null==z?void 0:z.app_code,...A&&{select_param:JSON.stringify(A)}};if(R&&R.length>0){let e=null==R?void 0:R.filter(e=>"view"===e.role);T.current=e[e.length-1].order+1}let o=[{role:"human",context:e||V,model_name:E,order:T.current,time_stamp:0},{role:"view",context:"",model_name:E,order:T.current,time_stamp:0,thinking:!0}],s=o.length-1;J([...R,...o]),U(!1);try{await (0,m.L)("".concat(null!==(t=Z.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[i.gp]:null!==(l=(0,a.n5)())&&void 0!==l?l:""},signal:D.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===m.a)return},onclose(){var e;null===(e=D.current)||void 0===e||e.abort(),U(!0),q(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(U(!0),q(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(o[s].context=null==t?void 0:t.replace("[ERROR]",""),o[s].thinking=!1,J([...R,...o]),U(!0),q(!1)):(q(!0),o[s].context=t,o[s].thinking=!1,J([...R,...o]))}})}catch(e){null===(n=D.current)||void 0===n||n.abort(),o[s].context="Sorry, we meet some error, please try again later.",o[s].thinking=!1,J([...o]),U(!0),q(!1)}},Q=async()=>{V.trim()&&I&&await G()};(0,w.useEffect)(()=>{var e,t;null===(e=P.current)||void 0===e||e.scrollTo({top:null===(t=P.current)||void 0===t?void 0:t.scrollHeight,behavior:"auto"})},[R,P]);let X=(0,w.useMemo)(()=>{if(!z)return[];let{param_need:e=[]}=z;return null==e?void 0:e.map(e=>e.type)},[z]),Y=(0,w.useMemo)(()=>{var e;return 0===R.length&&z&&!!(null==z?void 0:null===(e=z.recommend_questions)||void 0===e?void 0:e.length)},[R,z]),{run:ee,loading:et}=(0,v.Z)(async()=>await (0,r.Vx)((0,r.zR)(L)),{manual:!0,onSuccess:()=>{J([])}});return(0,w.useEffect)(()=>{b&&E&&L&&z&&G(b)},[z,L,E,b]),(0,n.jsxs)("div",{className:"flex flex-col",children:[Y&&(0,n.jsx)("ul",{children:null==z?void 0:null===(e=z.recommend_questions)||void 0===e?void 0:e.map((e,t)=>(0,n.jsx)("li",{className:"mb-3",children:(0,n.jsx)(x.Z,{color:S[t],className:"p-2 rounded-xl",onClick:async()=>{G(e.question)},children:e.question})},e.id))}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 mb-1 w-full overflow-x-auto",children:[(null==X?void 0:X.includes("model"))&&(0,n.jsx)(N.default,{}),(null==X?void 0:X.includes("resource"))&&(0,n.jsx)(k.default,{}),(null==X?void 0:X.includes("temperature"))&&(0,n.jsx)(C.default,{})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-lg font-bold",children:[(0,n.jsx)(p.Z,{content:"暂停回复",trigger:["hover"],children:(0,n.jsx)(o.Z,{className:j()("p-2 cursor-pointer",{"text-[#0c75fc]":H,"text-gray-400":!H}),onClick:()=>{var e;H&&(null===(e=D.current)||void 0===e||e.abort(),setTimeout(()=>{q(!1),U(!0)},100))}})}),(0,n.jsx)(p.Z,{content:"再来一次",trigger:["hover"],children:(0,n.jsx)(s.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!I}),onClick:()=>{var e,t;if(!I||0===R.length)return;let l=null===(e=null===(t=R.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];G((null==l?void 0:l.context)||"")}})}),et?(0,n.jsx)(h.Z,{spinning:et,indicator:(0,n.jsx)(c.Z,{style:{fontSize:18},spin:!0}),className:"p-2"}):(0,n.jsx)(p.Z,{content:"清除历史",trigger:["hover"],children:(0,n.jsx)(d.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!I}),onClick:()=>{I&&ee()}})})]})]}),(0,n.jsxs)("div",{className:j()("flex py-2 px-3 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border",{"border-[#0c75fc] dark:border-[rgba(12,117,252,0.8)]":W}),children:[(0,n.jsx)(f.default.TextArea,{placeholder:"可以问我任何问题",className:"w-full resize-none border-0 p-0 focus:shadow-none",value:V,autoSize:{minRows:1},onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(F){e.preventDefault();return}V.trim()&&(e.preventDefault(),Q())}},onChange:e=>{B(e.target.value)},onFocus:()=>{$(!0)},onBlur:()=>$(!1),onCompositionStartCapture:()=>{K(!0)},onCompositionEndCapture:()=>{setTimeout(()=>{K(!1)},0)}}),(0,n.jsx)(g.ZP,{type:"primary",className:j()("flex items-center justify-center rounded-lg bg-button-gradient border-0 ml-2",{"opacity-40 cursor-not-allowed":!V.trim()||!I}),onClick:Q,children:I?(0,n.jsx)(u.Z,{}):(0,n.jsx)(h.Z,{indicator:(0,n.jsx)(c.Z,{className:"text-white"})})})]})]})}},7001:function(e,t,l){l.r(t);var n=l(85893),r=l(41468),a=l(39718),i=l(94668),o=l(85418),s=l(55241),c=l(67294),d=l(73913);t.default=()=>{let{modelList:e}=(0,c.useContext)(r.p),{model:t,setModel:l}=(0,c.useContext)(d.MobileChatContext),u=(0,c.useMemo)(()=>e.length>0?e.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{l(e)},children:[(0,n.jsx)(a.Z,{width:14,height:14,model:e}),(0,n.jsx)("span",{className:"text-xs",children:e})]}),key:e})):[],[e,l]);return(0,n.jsx)(o.Z,{menu:{items:u},placement:"top",trigger:["click"],children:(0,n.jsx)(s.Z,{content:t,children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(a.Z,{width:16,height:16,model:t}),(0,n.jsx)("span",{className:"text-xs font-medium line-clamp-1",style:{maxWidth:96},children:t}),(0,n.jsx)(i.Z,{rotate:90})]})})})}},46568:function(e,t,l){l.r(t);var n=l(85893),r=l(25675),a=l.n(r),i=l(67294);t.default=(0,i.memo)(e=>{let{width:t,height:l,src:r,label:i}=e;return(0,n.jsx)(a(),{width:t||14,height:l||14,src:r,alt:i||"db-icon",priority:!0})})},73749:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(57249),i=l(62418),o=l(50888),s=l(94668),c=l(83266),d=l(65654),u=l(74330),m=l(23799),v=l(85418),x=l(67294),p=l(73913),h=l(46568);t.default=()=>{let{appInfo:e,resourceList:t,scene:l,model:f,conv_uid:g,getChatHistoryRun:b,setResource:j,resource:y}=(0,x.useContext)(p.MobileChatContext),{temperatureValue:w,maxNewTokensValue:_}=(0,x.useContext)(a.ChatContentContext),[N,k]=(0,x.useState)(null),C=(0,x.useMemo)(()=>{var t,l,n;return null===(t=null==e?void 0:null===(l=e.param_need)||void 0===l?void 0:l.filter(e=>"resource"===e.type))||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.value},[e]),Z=(0,x.useMemo)(()=>t&&t.length>0?t.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{k(e),j(e.space_id||e.param)},children:[(0,n.jsx)(h.default,{width:14,height:14,src:i.S$[e.type].icon,label:i.S$[e.type].label}),(0,n.jsx)("span",{className:"text-xs",children:e.param})]}),key:e.space_id||e.param})):[],[t,j]),{run:S,loading:R}=(0,d.Z)(async e=>{let[,t]=await (0,r.Vx)((0,r.qn)({convUid:g,chatMode:l,data:e,model:f,temperatureValue:w,maxNewTokensValue:_,config:{timeout:36e5}}));return j(t),t},{manual:!0,onSuccess:async()=>{await b()}}),E=async e=>{let t=new FormData;t.append("doc_file",null==e?void 0:e.file),await S(t)},M=(0,x.useMemo)(()=>R?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(u.Z,{size:"small",indicator:(0,n.jsx)(o.Z,{spin:!0})}),(0,n.jsx)("span",{className:"text-xs",children:"上传中"})]}):y?(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("span",{className:"text-xs",children:y.file_name}),(0,n.jsx)(s.Z,{rotate:90})]}):(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(c.Z,{className:"text-base"}),(0,n.jsx)("span",{className:"text-xs",children:"上传文件"})]}),[R,y]);return(0,n.jsx)(n.Fragment,{children:(()=>{switch(C){case"excel_file":case"text_file":case"image_file":return(0,n.jsx)("div",{className:"flex items-center justify-center gap-1 border rounded-xl bg-white dark:bg-black px-2 flex-shrink-0",children:(0,n.jsx)(m.default,{name:"file",accept:".xlsx,.xls",maxCount:1,showUploadList:!1,beforeUpload:()=>!1,onChange:E,className:"flex h-full w-full items-center justify-center",children:M})});case"database":case"knowledge":case"plugin":case"awel_flow":var e,l,r,a,o;if(!(null==t?void 0:t.length))return null;return(0,n.jsx)(v.Z,{menu:{items:Z},placement:"top",trigger:["click"],children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(h.default,{width:14,height:14,src:null===(e=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(l=t[0])||void 0===l?void 0:l.type)])||void 0===e?void 0:e.icon,label:null===(r=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(a=t[0])||void 0===a?void 0:a.type)])||void 0===r?void 0:r.label}),(0,n.jsx)("span",{className:"text-xs font-medium",children:(null==N?void 0:N.param)||(null==t?void 0:null===(o=t[0])||void 0===o?void 0:o.param)}),(0,n.jsx)(s.Z,{rotate:90})]})})}})()})}},97109:function(e,t,l){l.r(t);var n=l(85893),r=l(70065),a=l(85418),i=l(30568),o=l(67294),s=l(73913);t.default=()=>{let{temperature:e,setTemperature:t}=(0,o.useContext)(s.MobileChatContext),l=e=>{isNaN(e)||t(e)};return(0,n.jsx)(a.Z,{trigger:["click"],dropdownRender:()=>(0,n.jsx)("div",{className:"flex h-28 bg-white dark:bg-[rgba(255,255,255,0.5)] items-center justify-center rounded-xl py-3",children:(0,n.jsx)(i.Z,{defaultValue:.5,max:1,min:0,step:.1,vertical:!0,onChange:l,value:e})}),placement:"top",children:(0,n.jsxs)("div",{className:"flex items-center justify-between border rounded-xl bg-white dark:bg-black w-14 p-2 flex-shrink-0",children:[(0,n.jsx)(r.Z,{type:"icon-icons-temperature",className:"text-sm"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:e})]})})}},73913:function(e,t,l){l.r(t),l.d(t,{MobileChatContext:function(){return j}});var n=l(85893),r=l(41468),a=l(76212),i=l(2440),o=l(62418),s=l(25519),c=l(1375),d=l(65654),u=l(74330),m=l(5152),v=l.n(m),x=l(39332),p=l(67294),h=l(56397),f=l(74638),g=l(83454);let b=v()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(1154),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3768),l.e(5789),l.e(6818)]).then(l.bind(l,36818)),{loadableGenerated:{webpack:()=>[36818]},ssr:!1}),j=(0,p.createContext)({model:"",temperature:.5,resource:null,setModel:()=>{},setTemperature:()=>{},setResource:()=>{},scene:"",history:[],setHistory:()=>{},scrollViewRef:{current:null},appInfo:{},conv_uid:"",resourceList:[],order:{current:1},handleChat:()=>Promise.resolve(),canAbort:!1,setCarAbort:()=>{},canNewChat:!1,setCanNewChat:()=>{},ctrl:{current:void 0},userInput:"",setUserInput:()=>{},getChatHistoryRun:()=>{}});t.default=()=>{var e,t;let l=(0,x.useSearchParams)(),m=null!==(e=null==l?void 0:l.get("chat_scene"))&&void 0!==e?e:"",v=null!==(t=null==l?void 0:l.get("app_code"))&&void 0!==t?t:"",{modelList:y}=(0,p.useContext)(r.p),[w,_]=(0,p.useState)([]),[N,k]=(0,p.useState)(""),[C,Z]=(0,p.useState)(.5),[S,R]=(0,p.useState)(null),E=(0,p.useRef)(null),[M,O]=(0,p.useState)(""),[A,L]=(0,p.useState)(!1),[z,P]=(0,p.useState)(!0),T=(0,p.useRef)(),V=(0,p.useRef)(1),D=(0,i.Z)(),H=(0,p.useMemo)(()=>"".concat(null==D?void 0:D.user_no,"_").concat(v),[v,D]),{run:I,loading:J}=(0,d.Z)(async()=>await (0,a.Vx)((0,a.$i)("".concat(null==D?void 0:D.user_no,"_").concat(v))),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(V.current=l[l.length-1].order+1),_(t||[])}}),{data:U,run:q,loading:B}=(0,d.Z)(async e=>{let[,t]=await (0,a.Vx)((0,a.BN)(e));return null!=t?t:{}},{manual:!0}),{run:W,data:$,loading:F}=(0,d.Z)(async()=>{var e,t;let[,l]=await (0,a.Vx)((0,a.vD)(m));return R((null==l?void 0:null===(e=l[0])||void 0===e?void 0:e.space_id)||(null==l?void 0:null===(t=l[0])||void 0===t?void 0:t.param)),null!=l?l:[]},{manual:!0}),{run:K,loading:G}=(0,d.Z)(async()=>{let[,e]=await (0,a.Vx)((0,a.iP)());return null!=e?e:[]},{manual:!0,onSuccess:e=>{var t;let l=null===(t=null==e?void 0:e.filter(e=>e.conv_uid===H))||void 0===t?void 0:t[0];(null==l?void 0:l.select_param)&&R(JSON.parse(null==l?void 0:l.select_param))}});(0,p.useEffect)(()=>{m&&v&&y.length&&q({chat_scene:m,app_code:v})},[v,m,q,y]),(0,p.useEffect)(()=>{v&&I()},[v]),(0,p.useEffect)(()=>{if(y.length>0){var e,t,l;let n=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"model"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;k(n||y[0])}},[y,U]),(0,p.useEffect)(()=>{var e,t,l;let n=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;Z(n||.5)},[U]),(0,p.useEffect)(()=>{if(m&&(null==U?void 0:U.app_code)){var e,t,l,n,r,a;let i=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value,o=null===(n=null==U?void 0:null===(r=U.param_need)||void 0===r?void 0:r.filter(e=>"resource"===e.type))||void 0===n?void 0:null===(a=n[0])||void 0===a?void 0:a.bind_value;o&&R(o),["database","knowledge","plugin","awel_flow"].includes(i)&&!o&&W()}},[U,m,W]);let Q=async e=>{var t,l,n;O(""),T.current=new AbortController;let r={chat_mode:m,model_name:N,user_input:e||M,conv_uid:H,temperature:C,app_code:null==U?void 0:U.app_code,...S&&{select_param:S}};if(w&&w.length>0){let e=null==w?void 0:w.filter(e=>"view"===e.role);V.current=e[e.length-1].order+1}let a=[{role:"human",context:e||M,model_name:N,order:V.current,time_stamp:0},{role:"view",context:"",model_name:N,order:V.current,time_stamp:0,thinking:!0}],i=a.length-1;_([...w,...a]),P(!1);try{await (0,c.L)("".concat(null!==(t=g.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[s.gp]:null!==(l=(0,o.n5)())&&void 0!==l?l:""},signal:T.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===c.a)return},onclose(){var e;null===(e=T.current)||void 0===e||e.abort(),P(!0),L(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(P(!0),L(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(a[i].context=null==t?void 0:t.replace("[ERROR]",""),a[i].thinking=!1,_([...w,...a]),P(!0),L(!1)):(L(!0),a[i].context=t,a[i].thinking=!1,_([...w,...a]))}})}catch(e){null===(n=T.current)||void 0===n||n.abort(),a[i].context="Sorry, we meet some error, please try again later.",a[i].thinking=!1,_([...a]),P(!0),L(!1)}};return(0,p.useEffect)(()=>{m&&"chat_agent"!==m&&K()},[m,K]),(0,n.jsx)(j.Provider,{value:{model:N,resource:S,setModel:k,setTemperature:Z,setResource:R,temperature:C,appInfo:U,conv_uid:H,scene:m,history:w,scrollViewRef:E,setHistory:_,resourceList:$,order:V,handleChat:Q,setCanNewChat:P,ctrl:T,canAbort:A,setCarAbort:L,canNewChat:z,userInput:M,setUserInput:O,getChatHistoryRun:I},children:(0,n.jsx)(u.Z,{size:"large",className:"flex h-screen w-screen justify-center items-center max-h-screen",spinning:J||B||F||G,children:(0,n.jsxs)("div",{className:"flex flex-col h-screen bg-gradient-light dark:bg-gradient-dark p-4 pt-0",children:[(0,n.jsxs)("div",{ref:E,className:"flex flex-col flex-1 overflow-y-auto mb-3",children:[(0,n.jsx)(h.default,{}),(0,n.jsx)(b,{})]}),(null==U?void 0:U.app_code)&&(0,n.jsx)(f.default,{})]})})})}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9618,3913],{27496:function(e,t,l){l.d(t,{Z:function(){return o}});var n=l(87462),r=l(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},i=l(13401),o=r.forwardRef(function(e,t){return r.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},94668:function(e,t,l){l.d(t,{Z:function(){return o}});var n=l(87462),r=l(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},i=l(13401),o=r.forwardRef(function(e,t){return r.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},56397:function(e,t,l){l.r(t);var n=l(85893),r=l(48218),a=l(58638),i=l(31418),o=l(45030),s=l(20640),c=l.n(s),d=l(67294),u=l(73913);t.default=(0,d.memo)(()=>{var e;let{appInfo:t}=(0,d.useContext)(u.MobileChatContext),{message:l}=i.Z.useApp(),[s,m]=(0,d.useState)(0);if(!(null==t?void 0:t.app_code))return null;let v=async()=>{let e=c()("dingtalk://dingtalkclient/page/link?url=".concat(encodeURIComponent(location.href),"&pc_slide=true"));l[e?"success":"error"](e?"复制成功":"复制失败")};return s>6&&l.info(JSON.stringify(window.navigator.userAgent),2,()=>{m(0)}),(0,n.jsxs)("header",{className:"flex w-full items-center justify-between bg-[rgba(255,255,255,0.9)] border dark:bg-black dark:border-[rgba(255,255,255,0.6)] rounded-xl mx-auto px-4 py-2 mb-4 sticky top-4 z-50 mt-4 shadow-md",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",onClick:()=>m(s+1),children:[(0,n.jsx)(r.Z,{scene:(null==t?void 0:null===(e=t.team_context)||void 0===e?void 0:e.chat_scene)||"chat_agent",width:8,height:8}),(0,n.jsxs)("div",{className:"flex flex-col ml-2",children:[(0,n.jsx)(o.Z.Text,{className:"text-md font-bold line-clamp-2",children:null==t?void 0:t.app_name}),(0,n.jsx)(o.Z.Text,{className:"text-sm line-clamp-2",children:null==t?void 0:t.app_describe})]})]}),(0,n.jsx)("div",{onClick:v,className:"flex items-center justify-center w-10 h-10 bg-[#ffffff99] dark:bg-[rgba(255,255,255,0.2)] border border-white dark:border-[rgba(255,255,255,0.2)] rounded-[50%] cursor-pointer",children:(0,n.jsx)(a.Z,{className:"text-lg"})})]})})},74638:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(62418),i=l(25519),o=l(30159),s=l(87740),c=l(50888),d=l(52645),u=l(27496),m=l(1375),v=l(65654),x=l(66309),p=l(55241),h=l(74330),f=l(25278),g=l(14726),b=l(93967),j=l.n(b),y=l(39332),w=l(67294),_=l(73913),N=l(7001),k=l(73749),C=l(97109),Z=l(83454);let S=["magenta","orange","geekblue","purple","cyan","green"];t.default=()=>{var e,t;let l=(0,y.useSearchParams)(),b=null!==(t=null==l?void 0:l.get("ques"))&&void 0!==t?t:"",{history:R,model:E,scene:M,temperature:O,resource:A,conv_uid:L,appInfo:z,scrollViewRef:P,order:T,userInput:V,ctrl:D,canAbort:H,canNewChat:I,setHistory:J,setCanNewChat:U,setCarAbort:q,setUserInput:B}=(0,w.useContext)(_.MobileChatContext),[W,$]=(0,w.useState)(!1),[F,K]=(0,w.useState)(!1),G=async e=>{var t,l,n;B(""),D.current=new AbortController;let r={chat_mode:M,model_name:E,user_input:e||V,conv_uid:L,temperature:O,app_code:null==z?void 0:z.app_code,...A&&{select_param:JSON.stringify(A)}};if(R&&R.length>0){let e=null==R?void 0:R.filter(e=>"view"===e.role);T.current=e[e.length-1].order+1}let o=[{role:"human",context:e||V,model_name:E,order:T.current,time_stamp:0},{role:"view",context:"",model_name:E,order:T.current,time_stamp:0,thinking:!0}],s=o.length-1;J([...R,...o]),U(!1);try{await (0,m.L)("".concat(null!==(t=Z.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[i.gp]:null!==(l=(0,a.n5)())&&void 0!==l?l:""},signal:D.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===m.a)return},onclose(){var e;null===(e=D.current)||void 0===e||e.abort(),U(!0),q(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(U(!0),q(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(o[s].context=null==t?void 0:t.replace("[ERROR]",""),o[s].thinking=!1,J([...R,...o]),U(!0),q(!1)):(q(!0),o[s].context=t,o[s].thinking=!1,J([...R,...o]))}})}catch(e){null===(n=D.current)||void 0===n||n.abort(),o[s].context="Sorry, we meet some error, please try again later.",o[s].thinking=!1,J([...o]),U(!0),q(!1)}},Q=async()=>{V.trim()&&I&&await G()};(0,w.useEffect)(()=>{var e,t;null===(e=P.current)||void 0===e||e.scrollTo({top:null===(t=P.current)||void 0===t?void 0:t.scrollHeight,behavior:"auto"})},[R,P]);let X=(0,w.useMemo)(()=>{if(!z)return[];let{param_need:e=[]}=z;return null==e?void 0:e.map(e=>e.type)},[z]),Y=(0,w.useMemo)(()=>{var e;return 0===R.length&&z&&!!(null==z?void 0:null===(e=z.recommend_questions)||void 0===e?void 0:e.length)},[R,z]),{run:ee,loading:et}=(0,v.Z)(async()=>await (0,r.Vx)((0,r.zR)(L)),{manual:!0,onSuccess:()=>{J([])}});return(0,w.useEffect)(()=>{b&&E&&L&&z&&G(b)},[z,L,E,b]),(0,n.jsxs)("div",{className:"flex flex-col",children:[Y&&(0,n.jsx)("ul",{children:null==z?void 0:null===(e=z.recommend_questions)||void 0===e?void 0:e.map((e,t)=>(0,n.jsx)("li",{className:"mb-3",children:(0,n.jsx)(x.Z,{color:S[t],className:"p-2 rounded-xl",onClick:async()=>{G(e.question)},children:e.question})},e.id))}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 mb-1 w-full overflow-x-auto",children:[(null==X?void 0:X.includes("model"))&&(0,n.jsx)(N.default,{}),(null==X?void 0:X.includes("resource"))&&(0,n.jsx)(k.default,{}),(null==X?void 0:X.includes("temperature"))&&(0,n.jsx)(C.default,{})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between text-lg font-bold",children:[(0,n.jsx)(p.Z,{content:"暂停回复",trigger:["hover"],children:(0,n.jsx)(o.Z,{className:j()("p-2 cursor-pointer",{"text-[#0c75fc]":H,"text-gray-400":!H}),onClick:()=>{var e;H&&(null===(e=D.current)||void 0===e||e.abort(),setTimeout(()=>{q(!1),U(!0)},100))}})}),(0,n.jsx)(p.Z,{content:"再来一次",trigger:["hover"],children:(0,n.jsx)(s.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!I}),onClick:()=>{var e,t;if(!I||0===R.length)return;let l=null===(e=null===(t=R.filter(e=>"human"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];G((null==l?void 0:l.context)||"")}})}),et?(0,n.jsx)(h.Z,{spinning:et,indicator:(0,n.jsx)(c.Z,{style:{fontSize:18},spin:!0}),className:"p-2"}):(0,n.jsx)(p.Z,{content:"清除历史",trigger:["hover"],children:(0,n.jsx)(d.Z,{className:j()("p-2 cursor-pointer",{"text-gray-400":!R.length||!I}),onClick:()=>{I&&ee()}})})]})]}),(0,n.jsxs)("div",{className:j()("flex py-2 px-3 items-center justify-between bg-white dark:bg-[#242733] dark:border-[#6f7f95] rounded-xl border",{"border-[#0c75fc] dark:border-[rgba(12,117,252,0.8)]":W}),children:[(0,n.jsx)(f.default.TextArea,{placeholder:"可以问我任何问题",className:"w-full resize-none border-0 p-0 focus:shadow-none",value:V,autoSize:{minRows:1},onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(F){e.preventDefault();return}V.trim()&&(e.preventDefault(),Q())}},onChange:e=>{B(e.target.value)},onFocus:()=>{$(!0)},onBlur:()=>$(!1),onCompositionStartCapture:()=>{K(!0)},onCompositionEndCapture:()=>{setTimeout(()=>{K(!1)},0)}}),(0,n.jsx)(g.ZP,{type:"primary",className:j()("flex items-center justify-center rounded-lg bg-button-gradient border-0 ml-2",{"opacity-40 cursor-not-allowed":!V.trim()||!I}),onClick:Q,children:I?(0,n.jsx)(u.Z,{}):(0,n.jsx)(h.Z,{indicator:(0,n.jsx)(c.Z,{className:"text-white"})})})]})]})}},7001:function(e,t,l){l.r(t);var n=l(85893),r=l(41468),a=l(39718),i=l(94668),o=l(85418),s=l(55241),c=l(67294),d=l(73913);t.default=()=>{let{modelList:e}=(0,c.useContext)(r.p),{model:t,setModel:l}=(0,c.useContext)(d.MobileChatContext),u=(0,c.useMemo)(()=>e.length>0?e.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{l(e)},children:[(0,n.jsx)(a.Z,{width:14,height:14,model:e}),(0,n.jsx)("span",{className:"text-xs",children:e})]}),key:e})):[],[e,l]);return(0,n.jsx)(o.Z,{menu:{items:u},placement:"top",trigger:["click"],children:(0,n.jsx)(s.Z,{content:t,children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(a.Z,{width:16,height:16,model:t}),(0,n.jsx)("span",{className:"text-xs font-medium line-clamp-1",style:{maxWidth:96},children:t}),(0,n.jsx)(i.Z,{rotate:90})]})})})}},46568:function(e,t,l){l.r(t);var n=l(85893),r=l(25675),a=l.n(r),i=l(67294);t.default=(0,i.memo)(e=>{let{width:t,height:l,src:r,label:i}=e;return(0,n.jsx)(a(),{width:t||14,height:l||14,src:r,alt:i||"db-icon",priority:!0})})},73749:function(e,t,l){l.r(t);var n=l(85893),r=l(76212),a=l(57249),i=l(62418),o=l(50888),s=l(94668),c=l(83266),d=l(65654),u=l(74330),m=l(23799),v=l(85418),x=l(67294),p=l(73913),h=l(46568);t.default=()=>{let{appInfo:e,resourceList:t,scene:l,model:f,conv_uid:g,getChatHistoryRun:b,setResource:j,resource:y}=(0,x.useContext)(p.MobileChatContext),{temperatureValue:w,maxNewTokensValue:_}=(0,x.useContext)(a.ChatContentContext),[N,k]=(0,x.useState)(null),C=(0,x.useMemo)(()=>{var t,l,n;return null===(t=null==e?void 0:null===(l=e.param_need)||void 0===l?void 0:l.filter(e=>"resource"===e.type))||void 0===t?void 0:null===(n=t[0])||void 0===n?void 0:n.value},[e]),Z=(0,x.useMemo)(()=>t&&t.length>0?t.map(e=>({label:(0,n.jsxs)("div",{className:"flex items-center gap-2",onClick:()=>{k(e),j(e.space_id||e.param)},children:[(0,n.jsx)(h.default,{width:14,height:14,src:i.S$[e.type].icon,label:i.S$[e.type].label}),(0,n.jsx)("span",{className:"text-xs",children:e.param})]}),key:e.space_id||e.param})):[],[t,j]),{run:S,loading:R}=(0,d.Z)(async e=>{let[,t]=await (0,r.Vx)((0,r.qn)({convUid:g,chatMode:l,data:e,model:f,temperatureValue:w,maxNewTokensValue:_,config:{timeout:36e5}}));return j(t),t},{manual:!0,onSuccess:async()=>{await b()}}),E=async e=>{let t=new FormData;t.append("doc_file",null==e?void 0:e.file),await S(t)},M=(0,x.useMemo)(()=>R?(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(u.Z,{size:"small",indicator:(0,n.jsx)(o.Z,{spin:!0})}),(0,n.jsx)("span",{className:"text-xs",children:"上传中"})]}):y?(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("span",{className:"text-xs",children:y.file_name}),(0,n.jsx)(s.Z,{rotate:90})]}):(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(c.Z,{className:"text-base"}),(0,n.jsx)("span",{className:"text-xs",children:"上传文件"})]}),[R,y]);return(0,n.jsx)(n.Fragment,{children:(()=>{switch(C){case"excel_file":case"text_file":case"image_file":return(0,n.jsx)("div",{className:"flex items-center justify-center gap-1 border rounded-xl bg-white dark:bg-black px-2 flex-shrink-0",children:(0,n.jsx)(m.default,{name:"file",accept:".xlsx,.xls",maxCount:1,showUploadList:!1,beforeUpload:()=>!1,onChange:E,className:"flex h-full w-full items-center justify-center",children:M})});case"database":case"knowledge":case"plugin":case"awel_flow":var e,l,r,a,o;if(!(null==t?void 0:t.length))return null;return(0,n.jsx)(v.Z,{menu:{items:Z},placement:"top",trigger:["click"],children:(0,n.jsxs)("div",{className:"flex items-center gap-1 border rounded-xl bg-white dark:bg-black p-2 flex-shrink-0",children:[(0,n.jsx)(h.default,{width:14,height:14,src:null===(e=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(l=t[0])||void 0===l?void 0:l.type)])||void 0===e?void 0:e.icon,label:null===(r=i.S$[(null==N?void 0:N.type)||(null==t?void 0:null===(a=t[0])||void 0===a?void 0:a.type)])||void 0===r?void 0:r.label}),(0,n.jsx)("span",{className:"text-xs font-medium",children:(null==N?void 0:N.param)||(null==t?void 0:null===(o=t[0])||void 0===o?void 0:o.param)}),(0,n.jsx)(s.Z,{rotate:90})]})})}})()})}},97109:function(e,t,l){l.r(t);var n=l(85893),r=l(70065),a=l(85418),i=l(30568),o=l(67294),s=l(73913);t.default=()=>{let{temperature:e,setTemperature:t}=(0,o.useContext)(s.MobileChatContext),l=e=>{isNaN(e)||t(e)};return(0,n.jsx)(a.Z,{trigger:["click"],dropdownRender:()=>(0,n.jsx)("div",{className:"flex h-28 bg-white dark:bg-[rgba(255,255,255,0.5)] items-center justify-center rounded-xl py-3",children:(0,n.jsx)(i.Z,{defaultValue:.5,max:1,min:0,step:.1,vertical:!0,onChange:l,value:e})}),placement:"top",children:(0,n.jsxs)("div",{className:"flex items-center justify-between border rounded-xl bg-white dark:bg-black w-14 p-2 flex-shrink-0",children:[(0,n.jsx)(r.Z,{type:"icon-icons-temperature",className:"text-sm"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:e})]})})}},73913:function(e,t,l){l.r(t),l.d(t,{MobileChatContext:function(){return j}});var n=l(85893),r=l(41468),a=l(76212),i=l(2440),o=l(62418),s=l(25519),c=l(1375),d=l(65654),u=l(74330),m=l(5152),v=l.n(m),x=l(39332),p=l(67294),h=l(56397),f=l(74638),g=l(83454);let b=v()(()=>Promise.all([l.e(7034),l.e(6106),l.e(8674),l.e(3166),l.e(2837),l.e(2168),l.e(8163),l.e(1265),l.e(7728),l.e(4567),l.e(2398),l.e(9773),l.e(4035),l.e(9473),l.e(2510),l.e(3345),l.e(9202),l.e(5265),l.e(2640),l.e(3768),l.e(5789),l.e(6818)]).then(l.bind(l,36818)),{loadableGenerated:{webpack:()=>[36818]},ssr:!1}),j=(0,p.createContext)({model:"",temperature:.5,resource:null,setModel:()=>{},setTemperature:()=>{},setResource:()=>{},scene:"",history:[],setHistory:()=>{},scrollViewRef:{current:null},appInfo:{},conv_uid:"",resourceList:[],order:{current:1},handleChat:()=>Promise.resolve(),canAbort:!1,setCarAbort:()=>{},canNewChat:!1,setCanNewChat:()=>{},ctrl:{current:void 0},userInput:"",setUserInput:()=>{},getChatHistoryRun:()=>{}});t.default=()=>{var e,t;let l=(0,x.useSearchParams)(),m=null!==(e=null==l?void 0:l.get("chat_scene"))&&void 0!==e?e:"",v=null!==(t=null==l?void 0:l.get("app_code"))&&void 0!==t?t:"",{modelList:y}=(0,p.useContext)(r.p),[w,_]=(0,p.useState)([]),[N,k]=(0,p.useState)(""),[C,Z]=(0,p.useState)(.5),[S,R]=(0,p.useState)(null),E=(0,p.useRef)(null),[M,O]=(0,p.useState)(""),[A,L]=(0,p.useState)(!1),[z,P]=(0,p.useState)(!0),T=(0,p.useRef)(),V=(0,p.useRef)(1),D=(0,i.Z)(),H=(0,p.useMemo)(()=>"".concat(null==D?void 0:D.user_no,"_").concat(v),[v,D]),{run:I,loading:J}=(0,d.Z)(async()=>await (0,a.Vx)((0,a.$i)("".concat(null==D?void 0:D.user_no,"_").concat(v))),{manual:!0,onSuccess:e=>{let[,t]=e,l=null==t?void 0:t.filter(e=>"view"===e.role);l&&l.length>0&&(V.current=l[l.length-1].order+1),_(t||[])}}),{data:U,run:q,loading:B}=(0,d.Z)(async e=>{let[,t]=await (0,a.Vx)((0,a.BN)(e));return null!=t?t:{}},{manual:!0}),{run:W,data:$,loading:F}=(0,d.Z)(async()=>{var e,t;let[,l]=await (0,a.Vx)((0,a.vD)(m));return R((null==l?void 0:null===(e=l[0])||void 0===e?void 0:e.space_id)||(null==l?void 0:null===(t=l[0])||void 0===t?void 0:t.param)),null!=l?l:[]},{manual:!0}),{run:K,loading:G}=(0,d.Z)(async()=>{let[,e]=await (0,a.Vx)((0,a.iP)());return null!=e?e:[]},{manual:!0,onSuccess:e=>{var t;let l=null===(t=null==e?void 0:e.filter(e=>e.conv_uid===H))||void 0===t?void 0:t[0];(null==l?void 0:l.select_param)&&R(JSON.parse(null==l?void 0:l.select_param))}});(0,p.useEffect)(()=>{m&&v&&y.length&&q({chat_scene:m,app_code:v})},[v,m,q,y]),(0,p.useEffect)(()=>{v&&I()},[v]),(0,p.useEffect)(()=>{if(y.length>0){var e,t,l;let n=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"model"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;k(n||y[0])}},[y,U]),(0,p.useEffect)(()=>{var e,t,l;let n=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"temperature"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value;Z(n||.5)},[U]),(0,p.useEffect)(()=>{if(m&&(null==U?void 0:U.app_code)){var e,t,l,n,r,a;let i=null===(e=null==U?void 0:null===(t=U.param_need)||void 0===t?void 0:t.filter(e=>"resource"===e.type))||void 0===e?void 0:null===(l=e[0])||void 0===l?void 0:l.value,o=null===(n=null==U?void 0:null===(r=U.param_need)||void 0===r?void 0:r.filter(e=>"resource"===e.type))||void 0===n?void 0:null===(a=n[0])||void 0===a?void 0:a.bind_value;o&&R(o),["database","knowledge","plugin","awel_flow"].includes(i)&&!o&&W()}},[U,m,W]);let Q=async e=>{var t,l,n;O(""),T.current=new AbortController;let r={chat_mode:m,model_name:N,user_input:e||M,conv_uid:H,temperature:C,app_code:null==U?void 0:U.app_code,...S&&{select_param:S}};if(w&&w.length>0){let e=null==w?void 0:w.filter(e=>"view"===e.role);V.current=e[e.length-1].order+1}let a=[{role:"human",context:e||M,model_name:N,order:V.current,time_stamp:0},{role:"view",context:"",model_name:N,order:V.current,time_stamp:0,thinking:!0}],i=a.length-1;_([...w,...a]),P(!1);try{await (0,c.L)("".concat(null!==(t=g.env.API_BASE_URL)&&void 0!==t?t:"","/api/v1/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",[s.gp]:null!==(l=(0,o.n5)())&&void 0!==l?l:""},signal:T.current.signal,body:JSON.stringify(r),openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===c.a)return},onclose(){var e;null===(e=T.current)||void 0===e||e.abort(),P(!0),L(!1)},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t=JSON.parse(t).vis}catch(e){t.replaceAll("\\n","\n")}"[DONE]"===t?(P(!0),L(!1)):(null==t?void 0:t.startsWith("[ERROR]"))?(a[i].context=null==t?void 0:t.replace("[ERROR]",""),a[i].thinking=!1,_([...w,...a]),P(!0),L(!1)):(L(!0),a[i].context=t,a[i].thinking=!1,_([...w,...a]))}})}catch(e){null===(n=T.current)||void 0===n||n.abort(),a[i].context="Sorry, we meet some error, please try again later.",a[i].thinking=!1,_([...a]),P(!0),L(!1)}};return(0,p.useEffect)(()=>{m&&"chat_agent"!==m&&K()},[m,K]),(0,n.jsx)(j.Provider,{value:{model:N,resource:S,setModel:k,setTemperature:Z,setResource:R,temperature:C,appInfo:U,conv_uid:H,scene:m,history:w,scrollViewRef:E,setHistory:_,resourceList:$,order:V,handleChat:Q,setCanNewChat:P,ctrl:T,canAbort:A,setCarAbort:L,canNewChat:z,userInput:M,setUserInput:O,getChatHistoryRun:I},children:(0,n.jsx)(u.Z,{size:"large",className:"flex h-screen w-screen justify-center items-center max-h-screen",spinning:J||B||F||G,children:(0,n.jsxs)("div",{className:"flex flex-col h-screen bg-gradient-light dark:bg-gradient-dark p-4 pt-0",children:[(0,n.jsxs)("div",{ref:E,className:"flex flex-col flex-1 overflow-y-auto mb-3",children:[(0,n.jsx)(h.default,{}),(0,n.jsx)(b,{})]}),(null==U?void 0:U.app_code)&&(0,n.jsx)(f.default,{})]})})})}}}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-5909ee1afdc8664d.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-5909ee1afdc8664d.js new file mode 100644 index 000000000..ffb49fc5d --- /dev/null +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-5909ee1afdc8664d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{40037:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})})},66318:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return o}});let n=r(62478),a=r(25731);function o(e,t){return(0,a.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27521:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(25731);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,a="";if(n){let{children:e}=n.props;a="string"==typeof e?e:Array.isArray(e)?e.join(""):""}a!==document.title&&(document.title=a),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),i=Number(n.content),l=[];for(let t=0,r=n.previousElementSibling;t{for(let t=0,r=l.length;t{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>r.insertBefore(e,n)),n.content=(i-l.length+s.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84473:function(e,t,r){"use strict";let n,a,o,i,l,u,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let m=r(61757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{version:function(){return G},router:function(){return n},emitter:function(){return V},initialize:function(){return Q},hydrate:function(){return ec}});let g=r(38754);r(40037);let y=g._(r(67294)),_=g._(r(20745)),v=r(19307),b=g._(r(28829)),P=r(44293),E=r(85913),w=r(80396),S=r(85342),O=r(66452),j=r(95514),x=r(26039),R=g._(r(81100)),A=g._(r(2959)),C=g._(r(7660)),M=r(9702),T=r(75919),L=r(80676),I=r(76226),N=r(21847),k=r(52501),D=r(27473),H=r(26119),U=r(35802),B=g._(r(53015)),F=e=>t=>e(t)+"",q=r.u;r.u=F(q);let W=r.k;r.k=F(W);let z=r.miniCssF;r.miniCssF=F(z);let G="13.4.7",V=(0,b.default)(),$=e=>[].slice.call(e),X=!1;self.__next_require__=r;class Y extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(a.isFallback||a.nextExport&&((0,w.isDynamicRoute)(n.pathname)||location.search,1)||a.props&&a.props.__N_SSG&&(location.search,1))&&n.replace(n.pathname+"?"+String((0,S.assign)((0,S.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),o,{_h:1,shallow:!a.isFallback&&!X}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function Q(e){void 0===e&&(e={}),a=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=a,h=a.defaultLocale;let t=a.assetPrefix||"";if(r.p=""+t+"/_next/",(0,O.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:a.runtimeConfig||{}}),o=(0,j.getURL)(),(0,k.hasBasePath)(o)&&(o=(0,N.removeBasePath)(o)),a.scriptLoader){let{initScriptLoader:e}=r(64104);e(a.scriptLoader)}i=new A.default(a.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(u=(0,R.default)()).getIsSsr=()=>n.isSsr,l=document.getElementById("__next"),{assetPrefix:t}}function K(e,t){return y.default.createElement(e,t)}function J(e){var t;let{children:r}=e;return y.default.createElement(Y,{fn:e=>ee({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e))},y.default.createElement(D.AppRouterContext.Provider,{value:(0,H.adaptForAppRouterInstance)(n)},y.default.createElement(U.SearchParamsContext.Provider,{value:(0,H.adaptForSearchParams)(n)},y.default.createElement(H.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t},y.default.createElement(P.RouterContext.Provider,{value:(0,T.makePublicRouterInstance)(n)},y.default.createElement(v.HeadManagerContext.Provider,{value:u},y.default.createElement(I.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}},r)))))))}let Z=e=>t=>{let r={...t,Component:p,err:a.err,router:n};return y.default.createElement(J,null,K(e,r))};function ee(e){let{App:t,err:l}=e;return console.error(l),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:a,styleSheets:o}=n;return(null==s?void 0:s.Component)===a?Promise.resolve().then(()=>m._(r(14600))).then(n=>Promise.resolve().then(()=>m._(r(55366))).then(r=>(t=r.default,e.App=t,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:a,styleSheets:o}}).then(r=>{var i;let{ErrorComponent:u,styleSheets:s}=r,c=Z(t),f={Component:u,AppTree:c,router:n,ctx:{err:l,pathname:a.page,query:a.query,asPath:o,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,j.loadGetInitialProps)(t,f)).then(t=>eu({...e,err:l,Component:u,styleSheets:s,props:t}))})}function et(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let er=null,en=!0;function ea(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach(e=>performance.clearMarks(e))}function eo(){j.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),d&&performance.getEntriesByName("Next.js-hydration").forEach(d),ea())}function ei(){if(!j.ST)return;performance.mark("afterRender");let e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),d&&(performance.getEntriesByName("Next.js-render").forEach(d),performance.getEntriesByName("Next.js-route-change-to-render").forEach(d)),ea(),["Next.js-route-change-to-render","Next.js-render"].forEach(e=>performance.clearMeasures(e)))}function el(e){let{callbacks:t,children:r}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,C.default)(d)},[]),r}function eu(e){let t,{App:r,Component:a,props:o,err:i}=e,u="initial"in e?void 0:e.styleSheets;a=a||s.Component,o=o||s.props;let f={...o,Component:a,err:i,router:n};s=f;let d=!1,p=new Promise((e,r)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,r(e)}});function h(){t()}!function(){if(!u)return;let e=$(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map(e=>e.getAttribute("data-n-href"))),r=document.querySelector("noscript[data-n-css]"),n=null==r?void 0:r.getAttribute("data-n-css");u.forEach(e=>{let{href:r,text:a}=e;if(!t.has(r)){let e=document.createElement("style");e.setAttribute("data-n-href",r),e.setAttribute("media","x"),n&&e.setAttribute("nonce",n),document.head.appendChild(e),e.appendChild(document.createTextNode(a))}})}();let m=y.default.createElement(y.default.Fragment,null,y.default.createElement(et,{callback:function(){if(u&&!d){let e=new Set(u.map(e=>e.href)),t=$(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),$(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,E.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),y.default.createElement(J,null,K(r,f),y.default.createElement(x.Portal,{type:"next-route-announcer"},y.default.createElement(M.RouteAnnouncer,null))));return!function(e,t){j.ST&&performance.mark("beforeRender");let r=t(en?eo:ei);if(er){let e=y.default.startTransition;e(()=>{er.render(r)})}else er=_.default.hydrateRoot(e,r,{onRecoverableError:B.default}),en=!1}(l,e=>y.default.createElement(el,{callbacks:[e,h]},m)),p}async function es(e){if(e.err){await ee(e);return}try{await eu(e)}catch(r){let t=(0,L.getProperError)(r);if(t.cancelled)throw t;await ee({...e,err:t})}}async function ec(e){let t=a.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:a,startTime:o,value:i,duration:l,entryType:u,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:a,startTime:o||t,value:null==i?l:i,label:"mark"===u||"measure"===u?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(a.page);if("error"in n)throw n.error;p=n.component}catch(e){t=(0,L.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(a.dynamicIds),n=(0,T.createRouter)(a.page,a.query,o,{initialProps:a.props,pageLoader:i,App:f,Component:p,wrapApp:Z,err:t,isFallback:!!a.isFallback,subscription:(e,t,r)=>es(Object.assign({},e,{App:t,scroll:r})),locale:a.locale,locales:a.locales,defaultLocale:h,domainLocales:a.domainLocales,isPreview:a.isPreview}),X=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:p,props:a.props,err:t};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),es(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},87206:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(84473);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25731:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return n}}),r(59152),r(62551);let n=e=>(e.startsWith("/"),e);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53015:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(7483);function a(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};e.digest!==n.NEXT_DYNAMIC_NO_SSR_CODE&&t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2959:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(38754),a=r(66318),o=r(86680),i=n._(r(83413)),l=r(27521),u=r(80396),s=r(59325),c=r(59152),f=r(98116);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(r),{pathname:h}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,i.default)((0,c.removeTrailingSlash)((0,l.addLocale)(e,n)),".json");return(0,a.addBasePath)("/_next/data/"+this.buildId+t+p,!0)})(e.skipInterpolation?h:(0,u.isDynamicRoute)(m)?(0,o.interpolateAs)(f,h,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7660:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let a=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let o=!1;function i(e){n&&n(e)}let l=e=>{if(n=e,!o)for(let e of(o=!0,a))try{let t;t||(t=r(78018)),t["on"+e](i)}catch(t){console.warn("Failed to track "+e+" web-vital",t)}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26039:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return o}});let n=r(67294),a=r(73935),o=e=>{let{children:t,type:r}=e,[o,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),o?(0,a.createPortal)(t,o):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},21847:function(e,t,r){"use strict";function n(e){return(e=e.slice(0)).startsWith("/")||(e="/"+e),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(52501),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67169:function(e,t,r){"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(62551),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82997:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{requestIdleCallback:function(){return r},cancelIdleCallback:function(){return n}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9702:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return l},default:function(){return u}});let n=r(38754),a=n._(r(67294)),o=r(75919),i={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},l=()=>{let{asPath:e}=(0,o.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e){if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1"),a=null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent;r(a||e)}}},[e]),a.default.createElement("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:i},t)},u=l;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98116:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{markAssetError:function(){return l},isAssetError:function(){return u},getClientBuildManifest:function(){return d},createRouteLoader:function(){return h}}),r(38754),r(83413);let n=r(41290),a=r(82997);function o(e,t,r){let n,a=t.get(e);if(a)return"future"in a?a.future:Promise.resolve(a);let o=new Promise(e=>{n=e});return t.set(e,a={resolve:n,future:o}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):o}let i=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,i,{})}function u(e){return e&&i in e}let s=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),c=()=>"";function f(e,t,r){return new Promise((n,o)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(o),(0,a.requestIdleCallback)(()=>setTimeout(()=>{i||o(r)},t))})}function d(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);let e=new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}});return f(e,3800,l(Error("Failed to load client build manifest")))}function p(e,t){return d().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let a=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:a.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+c()),css:a.filter(e=>e.endsWith(".css")).map(e=>e+c())}})}function h(e){let t=new Map,r=new Map,n=new Map,i=new Map;function u(e){{var t;let n=r.get(e.toString());return n||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n))}}function c(e){let t=n.get(e);return t||n.set(e,t=fetch(e).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>o(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),i.delete(e))})},loadRoute(r,n){return o(r,i,()=>{let a;return f(p(e,r).then(e=>{let{scripts:n,css:a}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(u)),Promise.all(a.map(c))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==a?void 0:a())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():p(e,t).then(e=>Promise.all(s?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,a)=>{let o='\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]';if(document.querySelector(o))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>a(l(Error("Failed to prefetch: "+t))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,a.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return o.default},default:function(){return p},withRouter:function(){return u.default},useRouter:function(){return h},createRouter:function(){return m},makePublicRouterInstance:function(){return g}});let n=r(38754),a=n._(r(67294)),o=n._(r(20530)),i=r(44293),l=n._(r(80676)),u=n._(r(48441)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>o.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get(){let t=d();return t[e]}})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n{s.ready(()=>{o.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;ne()),s.readyCallbacks=[],s.router}function g(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=o.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),a=0;a{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:o,children:i="",strategy:l="afterInteractive",onError:s}=e,p=r||t;if(p&&f.has(p))return;if(c.has(t)){f.add(p),c.get(t).then(n,s);return}let h=()=>{a&&a(),f.add(p)},m=document.createElement("script"),g=new Promise((e,t)=>{m.addEventListener("load",function(t){e(),n&&n.call(this,t),h()}),m.addEventListener("error",function(e){t(e)})}).catch(function(e){s&&s(e)});for(let[r,n]of(o?(m.innerHTML=o.__html||"",h()):i?(m.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",h()):t&&(m.src=t,c.set(t,g)),Object.entries(e))){if(void 0===n||d.includes(r))continue;let e=u.DOMAttributeNames[r]||r.toLowerCase();m.setAttribute(e,n)}"worker"===l&&m.setAttribute("type","text/partytown"),m.setAttribute("data-nscript",l),document.body.appendChild(m)};function h(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>p(e))}):p(e)}function m(e){e.forEach(h),function(){let e=[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')];e.forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}()}function g(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:u="afterInteractive",onError:c,...d}=e,{updateScripts:h,scripts:m,getIsSsr:g,appDir:y,nonce:_}=(0,i.useContext)(l.HeadManagerContext),v=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=t||r;v.current||(a&&e&&f.has(e)&&a(),v.current=!0)},[a,t,r]);let b=(0,i.useRef)(!1);if((0,i.useEffect)(()=>{!b.current&&("afterInteractive"===u?p(e):"lazyOnload"===u&&("complete"===document.readyState?(0,s.requestIdleCallback)(()=>p(e)):window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>p(e))})),b.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(h?(m[u]=(m[u]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:c,...d}]),h(m)):g&&g()?f.add(t||r):g&&!g()&&p(e)),y){if("beforeInteractive"===u)return r?(o.default.preload(r,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"}),i.default.createElement("script",{nonce:_,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r])+")"}})):(d.dangerouslySetInnerHTML&&(d.children=d.dangerouslySetInnerHTML.__html,delete d.dangerouslySetInnerHTML),i.default.createElement("script",{nonce:_,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...d}])+")"}}));"afterInteractive"===u&&r&&o.default.preload(r,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let y=g;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41290:function(e,t){"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48441:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(38754),a=n._(r(67294)),o=r(75919);function i(e){function t(t){return a.default.createElement(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55366:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(38754),a=n._(r(67294)),o=r(95514);async function i(e){let{Component:t,ctx:r}=e,n=await (0,o.loadGetInitialProps)(t,r);return{pageProps:n}}class l extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return a.default.createElement(e,t)}}l.origGetInitialProps=i,l.getInitialProps=i,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14600:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(38754),a=n._(r(67294)),o=n._(r(68965)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e,n=t&&t.statusCode?t.statusCode:r?r.statusCode:404;return{statusCode:n}}let u={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class s extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||i[e]||"An unexpected error has occurred";return a.default.createElement("div",{style:u.error},a.default.createElement(o.default,null,a.default.createElement("title",null,e?e+": "+r:"Application error: a client-side exception has occurred")),a.default.createElement("div",{style:u.desc},a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?a.default.createElement("h1",{className:"next-error-h1",style:u.h1},e):null,a.default.createElement("div",{style:u.wrap},a.default.createElement("h2",{style:u.h2},this.props.title||e?r:a.default.createElement(a.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}}s.displayName="ErrorPage",s.getInitialProps=l,s.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext({})},64171:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},27473:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{CacheStates:function(){return n},AppRouterContext:function(){return l},LayoutRouterContext:function(){return u},GlobalLayoutRouterContext:function(){return s},TemplateContext:function(){return c}});let o=r(38754),i=o._(r(67294));(a=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",a.DATA_FETCH="DATAFETCH",a.READY="READY";let l=i.default.createContext(null),u=i.default.createContext(null),s=i.default.createContext(null),c=i.default.createContext(null)},46088:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=.01);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){let e={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};return e}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){let t=this.getHashValues(e);t.forEach(e=>{this.bitArray[e]=1})}contains(e){let t=this.getHashValues(e);return t.every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r>>13,t=Math.imul(t,1540483477)}return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},17266:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return a}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function a(e){return r.test(e)?e.replace(n,"\\$&"):e}},19307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext({})},68965:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{defaultHead:function(){return c},default:function(){return h}});let n=r(38754),a=r(61757),o=a._(r(67294)),i=n._(r(89034)),l=r(63853),u=r(19307),s=r(64171);function c(e){void 0===e&&(e=!1);let t=[o.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(59941);let d=["name","httpEquiv","charSet","itemProp"];function p(e,t){let{inAmpMode:r}=t;return e.reduce(f,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return a=>{let o=!0,i=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){i=!0;let t=a.key.slice(a.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(a.type){case"title":case"base":t.has(a.type)?o=!1:t.add(a.type);break;case"meta":for(let e=0,t=d.length;e{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,o.default.cloneElement(e,t)}return o.default.cloneElement(e,{key:n})})}let h=function(e){let{children:t}=e,r=(0,o.useContext)(l.AmpStateContext),n=(0,o.useContext)(u.HeadManagerContext);return o.default.createElement(i.default,{reduceComponentsToState:p,headManager:n,inAmpMode:(0,s.isInAmpMode)(r)},t)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35802:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{SearchParamsContext:function(){return a},PathnameContext:function(){return o}});let n=r(67294),a=(0,n.createContext)(null),o=(0,n.createContext)(null)},7150:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},76226:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let n=r(38754),a=n._(r(67294)),o=r(2478),i=a.default.createContext(o.imageConfigDefault)},2478:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},20189:function(e,t){"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},7483:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return r}});let r="NEXT_DYNAMIC_NO_SSR_CODE"},28829:function(e,t){"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},99245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return o}});let n=r(84546),a=r(968);function o(e){let t=(0,a.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},87903:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},968:function(e,t){"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},44293:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext(null)},26119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{adaptForAppRouterInstance:function(){return l},adaptForSearchParams:function(){return u},PathnameContextProviderAdapter:function(){return s}});let n=r(61757),a=n._(r(67294)),o=r(35802),i=r(84546);function l(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},push(t){e.push(t)},replace(t){e.replace(t)},prefetch(t){e.prefetch(t)}}}function u(e){return e.isReady&&e.query?function(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,e);else void 0!==n&&t.append(r,n);return t}(e.query):new URLSearchParams}function s(e){let{children:t,router:r,...n}=e,l=(0,a.useRef)(n.isAutoExport),u=(0,a.useMemo)(()=>{let e;let t=l.current;if(t&&(l.current=!1),(0,i.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return a.default.createElement(o.PathnameContext.Provider,{value:u},t)}},20530:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return $},matchesMiddleware:function(){return k},createKey:function(){return z}});let n=r(38754),a=r(61757),o=r(59152),i=r(98116),l=r(64104),u=a._(r(80676)),s=r(99245),c=r(7150),f=n._(r(28829)),d=r(95514),p=r(80396),h=r(59325),m=n._(r(25036)),g=r(19917),y=r(6047),_=r(28904);r(72081);let v=r(62551),b=r(27521),P=r(67169),E=r(21847),w=r(66318),S=r(52501),O=r(79423),j=r(42666),x=r(85622),R=r(36965),A=r(65723),C=r(78001),M=r(48321),T=r(65722),L=r(86680),I=r(85913);function N(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function k(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,v.parsePath)(e.asPath),n=(0,S.hasBasePath)(r)?(0,E.removeBasePath)(r):r,a=(0,w.addBasePath)((0,b.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(a))}function D(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function H(e,t,r){let[n,a]=(0,T.resolveHref)(e,t,!0),o=(0,d.getLocationOrigin)(),i=n.startsWith(o),l=a&&a.startsWith(o);n=D(n),a=a?D(a):a;let u=i?n:(0,w.addBasePath)(n),s=r?D((0,T.resolveHref)(e,r)):a||n;return{url:u,as:l?s:(0,w.addBasePath)(s)}}function U(e,t){let r=(0,o.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,y.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,o.removeTrailingSlash)(e))}async function B(e){let t=await k(e);if(!t||!e.fetchData)return null;try{let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!0},a=t.headers.get("x-nextjs-rewrite"),l=a||t.headers.get("x-nextjs-matched-path"),u=t.headers.get("x-matched-path");if(!u||l||u.includes("__next_data_catchall")||u.includes("/_error")||u.includes("/404")||(l=u),l){if(l.startsWith("/")){let t=(0,h.parseRelativeUrl)(l),u=(0,j.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,o.removeTrailingSlash)(u.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(n=>{let[o,{__rewrites:i}]=n,l=(0,b.addLocale)(u.pathname,u.locale);if((0,p.isDynamicRoute)(l)||!a&&o.includes((0,c.normalizeLocalePath)((0,E.removeBasePath)(l),r.router.locales).pathname)){let r=(0,j.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:void 0,parseData:!0});l=(0,w.addBasePath)(r.pathname),t.pathname=l}{let e=(0,m.default)(l,o,i,t.query,e=>U(e,o),r.router.locales);e.matchedPage&&(t.pathname=e.parsedAs.pathname,l=t.pathname,Object.assign(t.query,e.parsedAs.query))}let f=o.includes(s)?s:U((0,c.normalizeLocalePath)((0,E.removeBasePath)(t.pathname),r.router.locales).pathname,o);if((0,p.isDynamicRoute)(f)){let e=(0,g.getRouteMatcher)((0,y.getRouteRegex)(f))(l);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:f}})}let t=(0,v.parsePath)(e),u=(0,x.formatNextPathnameInfo)({...(0,j.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-external",destination:""+u+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,v.parsePath)(s),t=(0,x.formatNextPathnameInfo)({...(0,j.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}catch(e){return null}}let F=Symbol("SSG_DATA_NOT_FOUND");function q(e){try{return JSON.parse(e)}catch(e){return null}}function W(e){var t;let{dataHref:r,inflightCache:n,isPrefetch:a,hasMiddleware:o,isServerRender:l,parseJSON:u,persistCache:s,isBackground:c,unstable_skipClientCache:f}=e,{href:d}=new URL(r,window.location.href),p=e=>(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(a=>!a.ok&&r>1&&a.status>=500?e(t,r-1,n):a)})(r,l?3:1,{headers:Object.assign({},a?{purpose:"prefetch"}:{},a&&o?{"x-middleware-prefetch":"1"}:{}),method:null!=(t=null==e?void 0:e.method)?t:"GET"}).then(t=>t.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:r,response:t,text:"",json:{},cacheKey:d}:t.text().then(e=>{if(!t.ok){if(o&&[301,302,307,308].includes(t.status))return{dataHref:r,response:t,text:e,json:{},cacheKey:d};if(404===t.status){var n;if(null==(n=q(e))?void 0:n.notFound)return{dataHref:r,json:{notFound:F},response:t,text:e,cacheKey:d}}let a=Error("Failed to load static props");throw l||(0,i.markAssetError)(a),a}return{dataHref:r,json:u?q(e):null,response:t,text:e,cacheKey:d}})).then(e=>(s&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete n[d],e)).catch(e=>{throw f||delete n[d],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e});return f&&s?p({}).then(e=>(n[d]=Promise.resolve(e),e)):void 0!==n[d]?n[d]:n[d]=p(c?{method:"HEAD"}:{})}function z(){return Math.random().toString(36).slice(2,10)}function G(e){let{url:t,router:r}=e;if(t===(0,w.addBasePath)((0,b.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let V=e=>{let{route:t,router:r}=e,n=!1,a=r.clc=()=>{n=!0};return()=>{if(n){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}a===r.clc&&(r.clc=null)}};class ${reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=H(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=H(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,n){{let u=!1,s=!1;for(let c of[e,t])if(c){let t=(0,o.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,w.addBasePath)((0,b.addLocale)(t,r||this.locale));if(t!==(0,o.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var a,i,l;for(let e of(u=u||!!(null==(a=this._bfl_s)?void 0:a.contains(t))||!!(null==(i=this._bfl_s)?void 0:i.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e{})}}}}return!1}async change(e,t,r,n,a){var s,c,f,O,j,x,C,T,I;let D,B;if(!(0,A.isLocalURL)(t))return G({url:t,router:this}),!1;let q=1===n._h;q||n.shallow||await this._bfl(r,void 0,n.locale);let W=q||n._shouldResolveHref||(0,v.parsePath)(t).pathname===(0,v.parsePath)(r).pathname,z={...this.state},V=!0!==this.isReady;this.isReady=!0;let X=this.isSsr;if(q||(this.isSsr=!1),q&&this.clc)return!1;let Y=z.locale;d.ST&&performance.mark("routeChange");let{shallow:Q=!1,scroll:K=!0}=n,J={shallow:Q};this._inFlightRoute&&this.clc&&(X||$.events.emit("routeChangeError",N(),this._inFlightRoute,J),this.clc(),this.clc=null),r=(0,w.addBasePath)((0,b.addLocale)((0,S.hasBasePath)(r)?(0,E.removeBasePath)(r):r,n.locale,this.defaultLocale));let Z=(0,P.removeLocale)((0,S.hasBasePath)(r)?(0,E.removeBasePath)(r):r,z.locale);this._inFlightRoute=r;let ee=Y!==z.locale;if(!q&&this.onlyAHashChange(Z)&&!ee){z.asPath=Z,$.events.emit("hashChangeStart",r,J),this.changeState(e,t,r,{...n,scroll:!1}),K&&this.scrollToHash(Z);try{await this.set(z,this.components[z.route],null)}catch(e){throw(0,u.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,Z,J),e}return $.events.emit("hashChangeComplete",r,J),!0}let et=(0,h.parseRelativeUrl)(t),{pathname:er,query:en}=et;if(null==(s=this.components[er])?void 0:s.__appRouter)return G({url:r,router:this}),new Promise(()=>{});try{[D,{__rewrites:B}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return G({url:r,router:this}),!1}this.urlIsNew(Z)||ee||(e="replaceState");let ea=r;er=er?(0,o.removeTrailingSlash)((0,E.removeBasePath)(er)):er;let eo=(0,o.removeTrailingSlash)(er),ei=r.startsWith("/")&&(0,h.parseRelativeUrl)(r).pathname,el=!!(ei&&eo!==ei&&(!(0,p.isDynamicRoute)(eo)||!(0,g.getRouteMatcher)((0,y.getRouteRegex)(eo))(ei))),eu=!n.shallow&&await k({asPath:r,locale:z.locale,router:this});if(q&&eu&&(W=!1),W&&"/_error"!==er){if(n._shouldResolveHref=!0,r.startsWith("/")){let e=(0,m.default)((0,w.addBasePath)((0,b.addLocale)(Z,z.locale),!0),D,B,en,e=>U(e,D),this.locales);if(e.externalDest)return G({url:r,router:this}),!0;eu||(ea=e.asPath),e.matchedPage&&e.resolvedHref&&(er=e.resolvedHref,et.pathname=(0,w.addBasePath)(er),eu||(t=(0,_.formatWithValidation)(et)))}else et.pathname=U(er,D),et.pathname===er||(er=et.pathname,et.pathname=(0,w.addBasePath)(er),eu||(t=(0,_.formatWithValidation)(et)))}if(!(0,A.isLocalURL)(r))return G({url:r,router:this}),!1;ea=(0,P.removeLocale)((0,E.removeBasePath)(ea),z.locale),eo=(0,o.removeTrailingSlash)(er);let es=!1;if((0,p.isDynamicRoute)(eo)){let e=(0,h.parseRelativeUrl)(ea),n=e.pathname,a=(0,y.getRouteRegex)(eo);es=(0,g.getRouteMatcher)(a)(n);let o=eo===n,i=o?(0,L.interpolateAs)(eo,n,en):{};if(es&&(!o||i.result))o?r=(0,_.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,M.omit)(en,i.params)})):Object.assign(en,es);else{let e=Object.keys(a.groups).filter(e=>!en[e]&&!a.groups[e].optional);if(e.length>0&&!eu)throw Error((o?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+eo+"). ")+"Read more: https://nextjs.org/docs/messages/"+(o?"href-interpolation-failed":"incompatible-href-as"))}}q||$.events.emit("routeChangeStart",r,J);let ec="/404"===this.pathname||"/_error"===this.pathname;try{let o=await this.getRouteInfo({route:eo,pathname:er,query:en,as:r,resolvedAs:ea,routeProps:J,locale:z.locale,isPreview:z.isPreview,hasMiddleware:eu,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:q&&!this.isFallback,isMiddlewareRewrite:el});if(q||n.shallow||await this._bfl(r,"resolvedAs"in o?o.resolvedAs:void 0,z.locale),"route"in o&&eu){eo=er=o.route||eo,J.shallow||(en=Object.assign({},o.query||{},en));let e=(0,S.hasBasePath)(et.pathname)?(0,E.removeBasePath)(et.pathname):et.pathname;if(es&&er!==e&&Object.keys(es).forEach(e=>{es&&en[e]===es[e]&&delete en[e]}),(0,p.isDynamicRoute)(er)){let e=!J.shallow&&o.resolvedAs?o.resolvedAs:(0,w.addBasePath)((0,b.addLocale)(new URL(r,location.href).pathname,z.locale),!0),t=e;(0,S.hasBasePath)(t)&&(t=(0,E.removeBasePath)(t));let n=(0,y.getRouteRegex)(er),a=(0,g.getRouteMatcher)(n)(new URL(t,location.href).pathname);a&&Object.assign(en,a)}}if("type"in o){if("redirect-internal"===o.type)return this.change(e,o.newUrl,o.newAs,n);return G({url:o.destination,router:this}),new Promise(()=>{})}let i=o.Component;if(i&&i.unstable_scriptLoader){let e=[].concat(i.unstable_scriptLoader());e.forEach(e=>{(0,l.handleClientScriptLoad)(e.props)})}if((o.__N_SSG||o.__N_SSP)&&o.props){if(o.props.pageProps&&o.props.pageProps.__N_REDIRECT){n.locale=!1;let t=o.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==o.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,h.parseRelativeUrl)(t);r.pathname=U(r.pathname,D);let{url:a,as:o}=H(this,t,t);return this.change(e,a,o,n)}return G({url:t,router:this}),new Promise(()=>{})}if(z.isPreview=!!o.props.__N_PREVIEW,o.props.notFound===F){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(o=await this.getRouteInfo({route:e,pathname:e,query:en,as:r,resolvedAs:ea,routeProps:{shallow:!1},locale:z.locale,isPreview:z.isPreview,isNotFound:!0}),"type"in o)throw Error("Unexpected middleware effect on /404")}}q&&"/_error"===this.pathname&&(null==(c=self.__NEXT_DATA__.props)?void 0:null==(f=c.pageProps)?void 0:f.statusCode)===500&&(null==(O=o.props)?void 0:O.pageProps)&&(o.props.pageProps.statusCode=500);let s=n.shallow&&z.route===(null!=(j=o.route)?j:eo),d=null!=(x=n.scroll)?x:!q&&!s,m=null!=a?a:d?{x:0,y:0}:null,_={...z,route:eo,pathname:er,query:en,asPath:Z,isFallback:!1};if(q&&ec){if(o=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:en,as:r,resolvedAs:ea,routeProps:{shallow:!1},locale:z.locale,isPreview:z.isPreview,isQueryUpdating:q&&!this.isFallback}),"type"in o)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(C=self.__NEXT_DATA__.props)?void 0:null==(T=C.pageProps)?void 0:T.statusCode)===500&&(null==(I=o.props)?void 0:I.pageProps)&&(o.props.pageProps.statusCode=500);try{await this.set(_,o,m)}catch(e){throw(0,u.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,Z,J),e}return!0}$.events.emit("beforeHistoryChange",r,J),this.changeState(e,t,r,n);let v=q&&!m&&!V&&!ee&&(0,R.compareRouterStates)(_,this.state);if(!v){try{await this.set(_,o,m)}catch(e){if(e.cancelled)o.error=o.error||e;else throw e}if(o.error)throw q||$.events.emit("routeChangeError",o.error,Z,J),o.error;q||$.events.emit("routeChangeComplete",r,J),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,u.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:z()},"",r))}async handleRouteInfoError(e,t,r,n,a,o){if(console.error(e),e.cancelled)throw e;if((0,i.isAssetError)(e)||o)throw $.events.emit("routeChangeError",e,n,a),G({url:n,router:this}),N();try{let n;let{page:a,styleSheets:o}=await this.fetchComponent("/_error"),i={props:n,Component:a,styleSheets:o,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(a,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,u.default)(e)?e:Error(e+""),t,r,n,a,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:a,resolvedAs:i,routeProps:l,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:m,isNotFound:g}=e,y=t;try{var v,b,P,w;let e=V({route:y,router:this}),t=this.components[y];if(l.shallow&&t&&this.route===y)return t;f&&(t=void 0);let u=!t||"initial"in t?void 0:t,S={dataHref:this.pageLoader.getDataHref({href:(0,_.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:g?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},j=h&&!m?null:await B({fetchData:()=>W(S),asPath:g?"/404":i,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(j&&("/_error"===r||"/404"===r)&&(j.effect=void 0),h&&(j?j.json=self.__NEXT_DATA__.props:j={json:self.__NEXT_DATA__.props}),e(),(null==j?void 0:null==(v=j.effect)?void 0:v.type)==="redirect-internal"||(null==j?void 0:null==(b=j.effect)?void 0:b.type)==="redirect-external")return j.effect;if((null==j?void 0:null==(P=j.effect)?void 0:P.type)==="rewrite"){let e=(0,o.removeTrailingSlash)(j.effect.resolvedHref),a=await this.pageLoader.getPageList();if((!h||a.includes(e))&&(y=e,r=j.effect.resolvedHref,n={...n,...j.effect.parsedAs.query},i=(0,E.removeBasePath)((0,c.normalizeLocalePath)(j.effect.parsedAs.pathname,this.locales).pathname),t=this.components[y],l.shallow&&t&&this.route===y&&!f))return{...t,route:y}}if((0,O.isAPIRoute)(y))return G({url:a,router:this}),new Promise(()=>{});let x=u||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),R=null==j?void 0:null==(w=j.response)?void 0:w.headers.get("x-middleware-skip"),A=x.__N_SSG||x.__N_SSP;R&&(null==j?void 0:j.dataHref)&&delete this.sdc[j.dataHref];let{props:C,cacheKey:M}=await this._getData(async()=>{if(A){if((null==j?void 0:j.json)&&!R)return{cacheKey:j.cacheKey,props:j.json};let e=(null==j?void 0:j.dataHref)?j.dataHref:this.pageLoader.getDataHref({href:(0,_.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await W({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:R?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(x.Component,{pathname:r,query:n,asPath:a,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return x.__N_SSP&&S.dataHref&&M&&delete this.sdc[M],this.isPreview||!x.__N_SSG||h||W(Object.assign({},S,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),C.pageProps=Object.assign({},C.pageProps),x.props=C,x.route=y,x.query=n,x.resolvedAs=i,this.components[y]=x,x}catch(e){return this.handleRouteInfoError((0,u.getProperError)(e),r,n,a,l)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#"),[n,a]=e.split("#");return!!a&&t===n&&r===a||t===n&&r!==a}scrollToHash(e){let[,t=""]=e.split("#");if(""===t||"top"===t){(0,I.handleSmoothScroll)(()=>window.scrollTo(0,0));return}let r=decodeURIComponent(t),n=document.getElementById(r);if(n){(0,I.handleSmoothScroll)(()=>n.scrollIntoView());return}let a=document.getElementsByName(r)[0];a&&(0,I.handleSmoothScroll)(()=>a.scrollIntoView())}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,C.isBot)(window.navigator.userAgent))return;let n=(0,h.parseRelativeUrl)(e),a=n.pathname,{pathname:l,query:u}=n,s=l,c=await this.pageLoader.getPageList(),f=t,d=void 0!==r.locale?r.locale||void 0:this.locale,S=await k({asPath:t,locale:d,router:this});if(t.startsWith("/")){let r;({__rewrites:r}=await (0,i.getClientBuildManifest)());let a=(0,m.default)((0,w.addBasePath)((0,b.addLocale)(t,this.locale),!0),c,r,n.query,e=>U(e,c),this.locales);if(a.externalDest)return;S||(f=(0,P.removeLocale)((0,E.removeBasePath)(a.asPath),this.locale)),a.matchedPage&&a.resolvedHref&&(l=a.resolvedHref,n.pathname=l,S||(e=(0,_.formatWithValidation)(n)))}n.pathname=U(n.pathname,c),(0,p.isDynamicRoute)(n.pathname)&&(l=n.pathname,n.pathname=l,Object.assign(u,(0,g.getRouteMatcher)((0,y.getRouteRegex)(n.pathname))((0,v.parsePath)(t).pathname)||{}),S||(e=(0,_.formatWithValidation)(n)));let O=await B({fetchData:()=>W({dataHref:this.pageLoader.getDataHref({href:(0,_.formatWithValidation)({pathname:s,query:u}),skipInterpolation:!0,asPath:f,locale:d}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:d,router:this});if((null==O?void 0:O.effect.type)==="rewrite"&&(n.pathname=O.effect.resolvedHref,l=O.effect.resolvedHref,u={...u,...O.effect.parsedAs.query},f=O.effect.parsedAs.pathname,e=(0,_.formatWithValidation)(n)),(null==O?void 0:O.effect.type)==="redirect-external")return;let j=(0,o.removeTrailingSlash)(l);await this._bfl(t,f,r.locale,!0)&&(this.components[a]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(j).then(t=>!!t&&W({dataHref:(null==O?void 0:O.json)?null==O?void 0:O.dataHref:this.pageLoader.getDataHref({href:e,asPath:f,locale:d}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](j)])}async fetchComponent(e){let t=V({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return W({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,n,{initialProps:a,pageLoader:i,App:l,wrapApp:u,Component:s,err:c,subscription:f,isFallback:m,locale:g,locales:y,defaultLocale:v,domainLocales:b,isPreview:P}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=z(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,_.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA){window.location.reload();return}if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:a,as:o,options:i,key:l}=n;this._key=l;let{pathname:u}=(0,h.parseRelativeUrl)(a);(!this.isSsr||o!==(0,w.addBasePath)(this.asPath)||u!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",a,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let E=(0,o.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[E]={Component:s,initial:!0,props:a,err:c,__N_SSG:a&&a.__N_SSG,__N_SSP:a&&a.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]};{let{BloomFilter:e}=r(46088),t={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]},n={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==n?void 0:n.numHashes)&&(this._bfl_d=new e(n.numItems,n.errorRate),this._bfl_d.import(n))}this.events=$.events,this.pageLoader=i;let S=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=f,this.clc=null,this._wrapApp=u,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||(S||self.location.search,0)),this.state={route:E,pathname:e,query:t,asPath:S?e:n,isPreview:!!P,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!n.startsWith("//")){let r={locale:g},a=(0,d.getURL)();this._initialMatchesMiddlewarePromise=k({router:this,locale:g,asPath:a}).then(o=>(r._shouldResolveHref=n!==e,this.changeState("replaceState",o?a:(0,_.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),a,r),o))}window.addEventListener("popstate",this.onPopState)}}$.events=(0,f.default)()},66355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return o}});let n=r(62478),a=r(53488);function o(e,t,r,o){if(!t||t===r)return e;let i=e.toLowerCase();return!o&&((0,a.pathHasPrefix)(i,"/api")||(0,a.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},62478:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:a,hash:o}=(0,n.parsePath)(e);return""+t+r+a+o}},42774:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:a,hash:o}=(0,n.parsePath)(e);return""+r+t+a+o}},97113:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return a},normalizeRscPath:function(){return o}});let n=r(87903);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||t.startsWith("(")&&t.endsWith(")")||t.startsWith("@")||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function o(e,t){return t?e.replace(/\.rsc($|\?)/,"$1"):e}},36965:function(e,t){"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let a=r[n];if("query"===a){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let a=r[n];if(!t.query.hasOwnProperty(a)||e.query[a]!==t.query[a])return!1}}else if(!t.hasOwnProperty(a)||e[a]!==t[a])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},85622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return l}});let n=r(59152),a=r(62478),o=r(42774),i=r(66355);function l(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,o.addPathSuffix)((0,a.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,a.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,o.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},28904:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return i},urlObjectKeys:function(){return l},formatWithValidation:function(){return u}});let n=r(61757),a=n._(r(85342)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",l=e.hash||"",u=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&"?"+u||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),""+n+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+l}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},83413:function(e,t){"use strict";function r(e,t){void 0===t&&(t="");let r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:""+e;return r+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},42666:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(7150),a=r(50563),o=r(53488);function i(e,t){var r,i,l;let{basePath:u,i18n:s,trailingSlash:c}=null!=(r=t.nextConfig)?r:{},f={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):c};if(u&&(0,o.pathHasPrefix)(f.pathname,u)&&(f.pathname=(0,a.removePathPrefix)(f.pathname,u),f.basePath=u),!0===t.parseData&&f.pathname.startsWith("/_next/data/")&&f.pathname.endsWith(".json")){let e=f.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),t=e[0];f.pathname="index"!==e[1]?"/"+e.slice(1).join("/"):"/",f.buildId=t}if(t.i18nProvider){let e=t.i18nProvider.analyze(f.pathname);f.locale=e.detectedLocale,f.pathname=null!=(i=e.pathname)?i:f.pathname}else if(s){let e=(0,n.normalizeLocalePath)(f.pathname,s.locales);f.locale=e.detectedLocale,f.pathname=null!=(l=e.pathname)?l:f.pathname}return f}},85913:function(e,t){"use strict";function r(e,t){void 0===t&&(t={});let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},84546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return a.isDynamicRoute}});let n=r(47235),a=r(80396)},86680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return o}});let n=r(19917),a=r(6047);function o(e,t,r){let o="",i=(0,a.getRouteRegex)(e),l=i.groups,u=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;o=e;let s=Object.keys(l);return s.every(e=>{let t=u[e]||"",{repeat:r,optional:n}=l[e],a="["+(r?"...":"")+e+"]";return n&&(a=(t?"":"/")+"["+a+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in u)&&(o=o.replace(a,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:s,result:o}}},78001:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},80396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return n}});let r=/\/\[[^/]+?\](?=\/|$)/;function n(e){return r.test(e)}},65723:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=r(95514),a=r(52501);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},48321:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},62551:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},59325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return o}});let n=r(95514),a=r(85342);function o(e,t){let r=new URL((0,n.getLocationOrigin)()),o=t?new URL(t,r):e.startsWith(".")?new URL(window.location.href):r,{pathname:i,searchParams:l,search:u,hash:s,href:c,origin:f}=new URL(e,o);if(f!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,a.searchParamsToUrlQuery)(l),search:u,hash:s,href:c.slice(r.origin.length)}}},83278:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseUrl",{enumerable:!0,get:function(){return o}});let n=r(85342),a=r(59325);function o(e){if(e.startsWith("/"))return(0,a.parseRelativeUrl)(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:(0,n.searchParamsToUrlQuery)(t.searchParams),search:t.search}}},53488:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},79113:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPathMatch",{enumerable:!0,get:function(){return a}});let n=r(74329);function a(e,t){let r=[],a=(0,n.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof(null==t?void 0:t.sensitive)&&t.sensitive,strict:null==t?void 0:t.strict}),o=(0,n.regexpToFunction)((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(a.source),a.flags):a,r);return(e,n)=>{let a=null!=e&&o(e);if(!a)return!1;if(null==t?void 0:t.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete a.params[e.name];return{...n,...a.params}}}},16742:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{matchHas:function(){return s},compileNonPath:function(){return c},prepareDestination:function(){return f}});let n=r(74329),a=r(17266),o=r(83278),i=r(92407),l=r(74185);function u(e){return e.replace(/__ESC_COLON_/gi,":")}function s(e,t,r,n){void 0===r&&(r=[]),void 0===n&&(n=[]);let a={},o=r=>{let n;let o=r.key;switch(r.type){case"header":o=o.toLowerCase(),n=e.headers[o];break;case"cookie":n=e.cookies[r.key];break;case"query":n=t[o];break;case"host":{let{host:t}=(null==e?void 0:e.headers)||{},r=null==t?void 0:t.split(":")[0].toLowerCase();n=r}}if(!r.value&&n)return a[function(e){let t="";for(let r=0;r64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(o)]=n,!0;if(n){let e=RegExp("^"+r.value+"$"),t=Array.isArray(n)?n.slice(-1)[0].match(e):n.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{a[e]=t.groups[e]}):"host"===r.type&&t[0]&&(a.host=t[0])),!0}return!1},i=r.every(e=>o(e))&&!n.some(e=>o(e));return!!i&&a}function c(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(":"+r)&&(e=e.replace(RegExp(":"+r+"\\*","g"),":"+r+"--ESCAPED_PARAM_ASTERISKS").replace(RegExp(":"+r+"\\?","g"),":"+r+"--ESCAPED_PARAM_QUESTION").replace(RegExp(":"+r+"\\+","g"),":"+r+"--ESCAPED_PARAM_PLUS").replace(RegExp(":"+r+"(?!\\w)","g"),"--ESCAPED_PARAM_COLON"+r));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),(0,n.compile)("/"+e,{validate:!1})(t).slice(1)}function f(e){let t;let r=Object.assign({},e.query);delete r.__nextLocale,delete r.__nextDefaultLocale,delete r.__nextDataReq,delete r.__nextInferredLocaleFromDefault,delete r[l.NEXT_RSC_UNION_QUERY];let s=e.destination;for(let t of Object.keys({...e.params,...r}))s=s.replace(RegExp(":"+(0,a.escapeStringRegexp)(t),"g"),"__ESC_COLON_"+t);let f=(0,o.parseUrl)(s),d=f.query,p=u(""+f.pathname+(f.hash||"")),h=u(f.hostname||""),m=[],g=[];(0,n.pathToRegexp)(p,m),(0,n.pathToRegexp)(h,g);let y=[];m.forEach(e=>y.push(e.name)),g.forEach(e=>y.push(e.name));let _=(0,n.compile)(p,{validate:!1}),v=(0,n.compile)(h,{validate:!1});for(let[t,r]of Object.entries(d))Array.isArray(r)?d[t]=r.map(t=>c(u(t),e.params)):"string"==typeof r&&(d[t]=c(u(r),e.params));let b=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!b.some(e=>y.includes(e)))for(let t of b)t in d||(d[t]=e.params[t]);if((0,i.isInterceptionRouteAppPath)(p))for(let t of p.split("/")){let r=i.INTERCEPTION_ROUTE_MARKERS.find(e=>t.startsWith(e));if(r){e.params["0"]=r;break}}try{t=_(e.params);let[r,n]=t.split("#");f.hostname=v(e.params),f.pathname=r,f.hash=(n?"#":"")+(n||""),delete f.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return f.query={...r,...f.query},{newUrl:t,destQuery:d,parsedDestination:f}}},85342:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,a]=e;Array.isArray(a)?a.forEach(e=>t.append(r,n(e))):t.set(r,n(a))}),t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return a},assign:function(){return o}})},50563:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return a}});let n=r(53488);function a(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},59152:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},65722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(85342),a=r(28904),o=r(48321),i=r(95514),l=r(25731),u=r(65723),s=r(80396),c=r(86680);function f(e,t,r){let f;let d="string"==typeof t?t:(0,a.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d,m=h.split("?");if((m[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,u.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,l.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:l}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,a.formatWithValidation)({pathname:i,hash:e.hash,query:(0,o.omit)(r,l)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}},25036:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(79113),a=r(16742),o=r(59152),i=r(7150),l=r(21847),u=r(59325);function s(e,t,r,s,c,f){let d,p=!1,h=!1,m=(0,u.parseRelativeUrl)(e),g=(0,o.removeTrailingSlash)((0,i.normalizeLocalePath)((0,l.removeBasePath)(m.pathname),f).pathname),y=r=>{let u=(0,n.getPathMatch)(r.source+"(/)?",{removeUnnamedParams:!0,strict:!0}),y=u(m.pathname);if((r.has||r.missing)&&y){let e=(0,a.matchHas)({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce((e,t)=>{let[r,...n]=t.split("=");return e[r]=n.join("="),e},{})},m.query,r.has,r.missing);e?Object.assign(y,e):y=!1}if(y){if(!r.destination)return h=!0,!0;let n=(0,a.prepareDestination)({appendParamsToQuery:!0,destination:r.destination,params:y,query:s});if(m=n.parsedDestination,e=n.newUrl,Object.assign(s,n.parsedDestination.query),g=(0,o.removeTrailingSlash)((0,i.normalizeLocalePath)((0,l.removeBasePath)(e),f).pathname),t.includes(g))return p=!0,d=g,!0;if((d=c(g))!==e&&t.includes(d))return p=!0,!0}},_=!1;for(let e=0;e{let a=t.exec(e);if(!a)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=a[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>o(e)):t.repeat?[o(n)]:o(n))}),i}}},6047:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return c},getNamedMiddlewareRegex:function(){return f}});let n=r(17266),a=r(59152),o="nxtP";function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function l(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),r={},o=1;return{parameterizedRoute:t.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,n.escapeStringRegexp)(e);{let{key:t,optional:n,repeat:a}=i(e.slice(1,-1));return r[t]={pos:o++,repeat:a,optional:n},a?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function u(e){let{parameterizedRoute:t,groups:r}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e,t){let r,l;let u=(0,a.removeTrailingSlash)(e).slice(1).split("/"),s=(r=97,l=1,()=>{let e="";for(let t=0;t122&&(l++,r=97);return e}),c={};return{namedParameterizedRoute:u.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,n.escapeStringRegexp)(e);{let{key:r,optional:n,repeat:a}=i(e.slice(1,-1)),l=r.replace(/\W/g,"");t&&(l=""+o+l);let u=!1;return(0===l.length||l.length>30)&&(u=!0),isNaN(parseInt(l.slice(0,1)))||(u=!0),u&&(l=s()),t?c[l]=""+o+r:c[l]=""+r,a?n?"(?:/(?<"+l+">.+?))?":"/(?<"+l+">.+?)":"/(?<"+l+">[^/]+?)"}}).join(""),routeKeys:c}}function c(e,t){let r=s(e,t);return{...u(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function f(e,t){let{parameterizedRoute:r}=l(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:a}=s(e,!1);return{namedRegex:"^"+a+(n?"(?:(/.*)?)":"")+"$"}}},47235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let a=e[0];if(a.startsWith("[")&&a.endsWith("]")){let r=a.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function o(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===a.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,r),this.optionalRestSlugName=r,a="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,r),this.restSlugName=r,a="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,r),this.slugName=r,a="[]"}}this.children.has(a)||this.children.set(a,new r),this.children.get(a)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},66452:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return a}});let n=()=>r;function a(e){r=e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89034:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(61757),a=n._(r(67294)),o=a.useLayoutEffect,i=a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let n=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(n,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},95514:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return o},getLocationOrigin:function(){return i},getURL:function(){return l},getDisplayName:function(){return u},isResSent:function(){return s},normalizeRepeatedSlashes:function(){return c},loadGetInitialProps:function(){return f},SP:function(){return d},ST:function(){return p},DecodeError:function(){return h},NormalizeError:function(){return m},PageNotFoundError:function(){return g},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return _}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,a=Array(n),o=0;oa.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function l(){let{href:e}=window.location,t=i();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?"),r=t[0];return r.replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n){let t='"'+u(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.';throw Error(t)}return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class _ extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}},59941:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},74329:function(e,t){"use strict";function r(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||95===i){a+=e[o++];continue}break}if(!a)throw TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:a}),r=o;continue}if("("===n){var l=1,u="",o=r+1;if("?"===e[o])throw TypeError('Pattern cannot start with "?" at '+o);for(;o-1:void 0===v;a||(p+="(?:"+d+"(?="+f+"))?"),b||(p+="(?="+d+"|"+f+")")}return new RegExp(p,i(r))}function u(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n=0?n="back-forward-cache":r&&(n=document.prerendering||f()>0?"prerender":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},p=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){t(e.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},h=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},m=function(e,t,r,n){var a,o;return function(i){var l;t.value>=0&&(i||n)&&((o=t.value-(a||0))||void 0===a)&&(a=t.value,t.delta=o,t.rating=(l=t.value)>r[1]?"poor":l>r[0]?"needs-improvement":"good",e(t))}},g=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},_=function(){h(function(e){g=e.timeStamp},!0)},v=function(){return g<0&&(g=y(),_(),s(function(){setTimeout(function(){g=y(),_()},0)})),{get firstHiddenTime(){return g}}},b=function(e,t){t=t||{};var r,n=[1800,3e3],a=v(),o=d("FCP"),i=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(u&&u.disconnect(),e.startTime-1&&e(t)},o=d("CLS",0),i=0,l=[],u=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=l[0],r=l[l.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,l.push(e)):(i=e.value,l=[e]),i>o.value&&(o.value=i,o.entries=l,n())}})},c=p("layout-shift",u);c&&(n=m(a,o,r,t.reportAllChanges),h(function(){u(c.takeRecords()),n(!0)}),s(function(){i=0,E=-1,n=m(a,o=d("CLS",0),r,t.reportAllChanges)}))},S={passive:!0,capture:!0},O=new Date,j=function(e,t){n||(n=t,a=e,o=new Date,A(removeEventListener),x())},x=function(){if(a>=0&&a1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){j(a,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,S),removeEventListener("pointercancel",r,S)},addEventListener("pointerup",t,S),addEventListener("pointercancel",r,S)):j(a,e)}},A=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,R,S)})},C=function(e,t){t=t||{};var r,o=[100,300],l=v(),u=d("FID"),c=function(e){e.startTimet.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};B[n.id]=n,U.push(n)}U.sort(function(e,t){return t.latency-e.latency}),U.splice(10).forEach(function(e){delete B[e.id]})}},q=function(e,t){t=t||{};var r=[200,500];k();var n,a=d("INP"),o=function(e){e.forEach(function(e){e.interactionId&&F(e),"first-input"!==e.entryType||U.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||F(e)});var t,r=(t=Math.min(U.length-1,Math.floor(H()/50)),U[t]);r&&r.latency!==a.value&&(a.value=r.latency,a.entries=r.entries,n())},i=p("event",o,{durationThreshold:t.durationThreshold||40});n=m(e,a,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),h(function(){o(i.takeRecords()),a.value<0&&H()>0&&(a.value=0,a.entries=[]),n(!0)}),s(function(){U=[],D=N(),n=m(e,a=d("INP"),r,t.reportAllChanges)}))},W={},z=function(e,t){t=t||{};var r,n=[2500,4e3],a=v(),o=d("LCP"),i=function(e){var t=e[e.length-1];if(t){var n=t.startTime-f();nperformance.now())return;n.entries=[o],a(!0),s(function(){(a=m(e,n=d("TTFB",0),r,t.reportAllChanges))(!0)})}})},e.exports=r},79423:function(e,t){"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},80676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return a},getProperError:function(){return o}});let n=r(20189);function a(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function o(e){return a(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},92407:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return a},isInterceptionRouteAppPath:function(){return o},extractInterceptionRouteInformation:function(){return i}});let n=r(97113),a=["(..)(..)","(.)","(..)","(...)"];function o(e){return void 0!==e.split("/").find(e=>a.find(t=>e.startsWith(t)))}function i(e){let t,r,o;for(let n of e.split("/"))if(r=a.find(e=>n.startsWith(e))){[t,o]=e.split(r,2);break}if(!t||!r||!o)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":o="/"===t?`/${o}`:t+"/"+o;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);o=t.split("/").slice(0,-1).concat(o).join("/");break;case"(...)":o="/"+o;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=i.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},38754:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},61757:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}r.r(t),r.d(t,{_:function(){return a},_interop_require_wildcard:function(){return a}})}},function(e){e.O(0,[9774],function(){return e(e.s=87206)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-6c4c7f5b8c9b1320.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-6c4c7f5b8c9b1320.js deleted file mode 100644 index 6df96ea0d..000000000 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/main-6c4c7f5b8c9b1320.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{40037:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})})},66318:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return o}});let n=r(62478),a=r(25731);function o(e,t){return(0,a.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27521:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(25731);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,a="";if(n){let{children:e}=n.props;a="string"==typeof e?e:Array.isArray(e)?e.join(""):""}a!==document.title&&(document.title=a),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),i=Number(n.content),l=[];for(let t=0,r=n.previousElementSibling;t{for(let t=0,r=l.length;t{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>r.insertBefore(e,n)),n.content=(i-l.length+s.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84473:function(e,t,r){"use strict";let n,a,o,i,l,u,s,c,f,d,h,p;Object.defineProperty(t,"__esModule",{value:!0});let m=r(61757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{version:function(){return G},router:function(){return n},emitter:function(){return V},initialize:function(){return J},hydrate:function(){return ec}});let g=r(38754);r(40037);let y=g._(r(67294)),_=g._(r(20745)),b=r(19307),v=g._(r(28829)),P=r(44293),w=r(85913),S=r(80396),j=r(85342),O=r(66452),E=r(95514),x=r(26039),R=g._(r(81100)),C=g._(r(2959)),M=g._(r(7660)),A=r(9702),L=r(75919),T=r(80676),I=r(76226),N=r(21847),k=r(52501),D=r(27473),B=r(26119),H=r(35802),U=g._(r(53015)),F=e=>t=>e(t)+"",q=r.u;r.u=F(q);let W=r.k;r.k=F(W);let z=r.miniCssF;r.miniCssF=F(z);let G="13.4.7",V=(0,v.default)(),X=e=>[].slice.call(e),Y=!1;self.__next_require__=r;class $ extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(a.isFallback||a.nextExport&&((0,S.isDynamicRoute)(n.pathname)||location.search||Y)||a.props&&a.props.__N_SSG&&(location.search||Y))&&n.replace(n.pathname+"?"+String((0,j.assign)((0,j.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),o,{_h:1,shallow:!a.isFallback&&!Y}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function J(e){void 0===e&&(e={}),a=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=a,p=a.defaultLocale;let t=a.assetPrefix||"";if(r.p=""+t+"/_next/",(0,O.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:a.runtimeConfig||{}}),o=(0,E.getURL)(),(0,k.hasBasePath)(o)&&(o=(0,N.removeBasePath)(o)),a.scriptLoader){let{initScriptLoader:e}=r(64104);e(a.scriptLoader)}i=new C.default(a.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(u=(0,R.default)()).getIsSsr=()=>n.isSsr,l=document.getElementById("__next"),{assetPrefix:t}}function K(e,t){return y.default.createElement(e,t)}function Q(e){var t;let{children:r}=e;return y.default.createElement($,{fn:e=>ee({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e))},y.default.createElement(D.AppRouterContext.Provider,{value:(0,B.adaptForAppRouterInstance)(n)},y.default.createElement(H.SearchParamsContext.Provider,{value:(0,B.adaptForSearchParams)(n)},y.default.createElement(B.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t},y.default.createElement(P.RouterContext.Provider,{value:(0,L.makePublicRouterInstance)(n)},y.default.createElement(b.HeadManagerContext.Provider,{value:u},y.default.createElement(I.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}},r)))))))}let Z=e=>t=>{let r={...t,Component:h,err:a.err,router:n};return y.default.createElement(Q,null,K(e,r))};function ee(e){let{App:t,err:l}=e;return console.error(l),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:a,styleSheets:o}=n;return(null==s?void 0:s.Component)===a?Promise.resolve().then(()=>m._(r(14600))).then(n=>Promise.resolve().then(()=>m._(r(55366))).then(r=>(t=r.default,e.App=t,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:a,styleSheets:o}}).then(r=>{var i;let{ErrorComponent:u,styleSheets:s}=r,c=Z(t),f={Component:u,AppTree:c,router:n,ctx:{err:l,pathname:a.page,query:a.query,asPath:o,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,E.loadGetInitialProps)(t,f)).then(t=>eu({...e,err:l,Component:u,styleSheets:s,props:t}))})}function et(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let er=null,en=!0;function ea(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach(e=>performance.clearMarks(e))}function eo(){E.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),d&&performance.getEntriesByName("Next.js-hydration").forEach(d),ea())}function ei(){if(!E.ST)return;performance.mark("afterRender");let e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),d&&(performance.getEntriesByName("Next.js-render").forEach(d),performance.getEntriesByName("Next.js-route-change-to-render").forEach(d)),ea(),["Next.js-route-change-to-render","Next.js-render"].forEach(e=>performance.clearMeasures(e)))}function el(e){let{callbacks:t,children:r}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,M.default)(d)},[]),r}function eu(e){let t,{App:r,Component:a,props:o,err:i}=e,u="initial"in e?void 0:e.styleSheets;a=a||s.Component,o=o||s.props;let f={...o,Component:a,err:i,router:n};s=f;let d=!1,h=new Promise((e,r)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,r(e)}});function p(){t()}!function(){if(!u)return;let e=X(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map(e=>e.getAttribute("data-n-href"))),r=document.querySelector("noscript[data-n-css]"),n=null==r?void 0:r.getAttribute("data-n-css");u.forEach(e=>{let{href:r,text:a}=e;if(!t.has(r)){let e=document.createElement("style");e.setAttribute("data-n-href",r),e.setAttribute("media","x"),n&&e.setAttribute("nonce",n),document.head.appendChild(e),e.appendChild(document.createTextNode(a))}})}();let m=y.default.createElement(y.default.Fragment,null,y.default.createElement(et,{callback:function(){if(u&&!d){let e=new Set(u.map(e=>e.href)),t=X(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),X(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,w.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),y.default.createElement(Q,null,K(r,f),y.default.createElement(x.Portal,{type:"next-route-announcer"},y.default.createElement(A.RouteAnnouncer,null))));return!function(e,t){E.ST&&performance.mark("beforeRender");let r=t(en?eo:ei);if(er){let e=y.default.startTransition;e(()=>{er.render(r)})}else er=_.default.hydrateRoot(e,r,{onRecoverableError:U.default}),en=!1}(l,e=>y.default.createElement(el,{callbacks:[e,p]},m)),h}async function es(e){if(e.err){await ee(e);return}try{await eu(e)}catch(r){let t=(0,T.getProperError)(r);if(t.cancelled)throw t;await ee({...e,err:t})}}async function ec(e){let t=a.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:a,startTime:o,value:i,duration:l,entryType:u,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:a,startTime:o||t,value:null==i?l:i,label:"mark"===u||"measure"===u?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(a.page);if("error"in n)throw n.error;h=n.component}catch(e){t=(0,T.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(a.dynamicIds),n=(0,L.createRouter)(a.page,a.query,o,{initialProps:a.props,pageLoader:i,App:f,Component:h,wrapApp:Z,err:t,isFallback:!!a.isFallback,subscription:(e,t,r)=>es(Object.assign({},e,{App:t,scroll:r})),locale:a.locale,locales:a.locales,defaultLocale:p,domainLocales:a.domainLocales,isPreview:a.isPreview}),Y=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:h,props:a.props,err:t};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),es(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},87206:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(84473);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25731:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return n}}),r(59152),r(62551);let n=e=>(e.startsWith("/"),e);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53015:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(7483);function a(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};e.digest!==n.NEXT_DYNAMIC_NO_SSR_CODE&&t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2959:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(38754),a=r(66318),o=r(86680),i=n._(r(83413)),l=r(27521),u=r(80396),s=r(59325),c=r(59152),f=r(98116);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:h}=(0,s.parseRelativeUrl)(r),{pathname:p}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,i.default)((0,c.removeTrailingSlash)((0,l.addLocale)(e,n)),".json");return(0,a.addBasePath)("/_next/data/"+this.buildId+t+h,!0)})(e.skipInterpolation?p:(0,u.isDynamicRoute)(m)?(0,o.interpolateAs)(f,p,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7660:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let a=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let o=!1;function i(e){n&&n(e)}let l=e=>{if(n=e,!o)for(let e of(o=!0,a))try{let t;t||(t=r(78018)),t["on"+e](i)}catch(t){console.warn("Failed to track "+e+" web-vital",t)}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26039:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return o}});let n=r(67294),a=r(73935),o=e=>{let{children:t,type:r}=e,[o,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),o?(0,a.createPortal)(t,o):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},21847:function(e,t,r){"use strict";function n(e){return(e=e.slice(0)).startsWith("/")||(e="/"+e),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(52501),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67169:function(e,t,r){"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(62551),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82997:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{requestIdleCallback:function(){return r},cancelIdleCallback:function(){return n}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9702:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return l},default:function(){return u}});let n=r(38754),a=n._(r(67294)),o=r(75919),i={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},l=()=>{let{asPath:e}=(0,o.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e){if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1"),a=null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent;r(a||e)}}},[e]),a.default.createElement("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:i},t)},u=l;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98116:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{markAssetError:function(){return l},isAssetError:function(){return u},getClientBuildManifest:function(){return d},createRouteLoader:function(){return p}}),r(38754),r(83413);let n=r(41290),a=r(82997);function o(e,t,r){let n,a=t.get(e);if(a)return"future"in a?a.future:Promise.resolve(a);let o=new Promise(e=>{n=e});return t.set(e,a={resolve:n,future:o}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):o}let i=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,i,{})}function u(e){return e&&i in e}let s=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),c=()=>"";function f(e,t,r){return new Promise((n,o)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(o),(0,a.requestIdleCallback)(()=>setTimeout(()=>{i||o(r)},t))})}function d(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);let e=new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}});return f(e,3800,l(Error("Failed to load client build manifest")))}function h(e,t){return d().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let a=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:a.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+c()),css:a.filter(e=>e.endsWith(".css")).map(e=>e+c())}})}function p(e){let t=new Map,r=new Map,n=new Map,i=new Map;function u(e){{var t;let n=r.get(e.toString());return n||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n))}}function c(e){let t=n.get(e);return t||n.set(e,t=fetch(e).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>o(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),i.delete(e))})},loadRoute(r,n){return o(r,i,()=>{let a;return f(h(e,r).then(e=>{let{scripts:n,css:a}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(u)),Promise.all(a.map(c))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==a?void 0:a())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():h(e,t).then(e=>Promise.all(s?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,a)=>{let o='\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]';if(document.querySelector(o))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>a(l(Error("Failed to prefetch: "+t))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,a.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return o.default},default:function(){return h},withRouter:function(){return u.default},useRouter:function(){return p},createRouter:function(){return m},makePublicRouterInstance:function(){return g}});let n=r(38754),a=n._(r(67294)),o=n._(r(20530)),i=r(44293),l=n._(r(80676)),u=n._(r(48441)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>o.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get(){let t=d();return t[e]}})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n{s.ready(()=>{o.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;ne()),s.readyCallbacks=[],s.router}function g(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=o.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),a=0;a{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:o,children:i="",strategy:l="afterInteractive",onError:s}=e,h=r||t;if(h&&f.has(h))return;if(c.has(t)){f.add(h),c.get(t).then(n,s);return}let p=()=>{a&&a(),f.add(h)},m=document.createElement("script"),g=new Promise((e,t)=>{m.addEventListener("load",function(t){e(),n&&n.call(this,t),p()}),m.addEventListener("error",function(e){t(e)})}).catch(function(e){s&&s(e)});for(let[r,n]of(o?(m.innerHTML=o.__html||"",p()):i?(m.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",p()):t&&(m.src=t,c.set(t,g)),Object.entries(e))){if(void 0===n||d.includes(r))continue;let e=u.DOMAttributeNames[r]||r.toLowerCase();m.setAttribute(e,n)}"worker"===l&&m.setAttribute("type","text/partytown"),m.setAttribute("data-nscript",l),document.body.appendChild(m)};function p(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>h(e))}):h(e)}function m(e){e.forEach(p),function(){let e=[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')];e.forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}()}function g(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:u="afterInteractive",onError:c,...d}=e,{updateScripts:p,scripts:m,getIsSsr:g,appDir:y,nonce:_}=(0,i.useContext)(l.HeadManagerContext),b=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=t||r;b.current||(a&&e&&f.has(e)&&a(),b.current=!0)},[a,t,r]);let v=(0,i.useRef)(!1);if((0,i.useEffect)(()=>{!v.current&&("afterInteractive"===u?h(e):"lazyOnload"===u&&("complete"===document.readyState?(0,s.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>h(e))})),v.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(p?(m[u]=(m[u]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:c,...d}]),p(m)):g&&g()?f.add(t||r):g&&!g()&&h(e)),y){if("beforeInteractive"===u)return r?(o.default.preload(r,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"}),i.default.createElement("script",{nonce:_,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r])+")"}})):(d.dangerouslySetInnerHTML&&(d.children=d.dangerouslySetInnerHTML.__html,delete d.dangerouslySetInnerHTML),i.default.createElement("script",{nonce:_,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...d}])+")"}}));"afterInteractive"===u&&r&&o.default.preload(r,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let y=g;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41290:function(e,t){"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48441:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(38754),a=n._(r(67294)),o=r(75919);function i(e){function t(t){return a.default.createElement(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55366:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(38754),a=n._(r(67294)),o=r(95514);async function i(e){let{Component:t,ctx:r}=e,n=await (0,o.loadGetInitialProps)(t,r);return{pageProps:n}}class l extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return a.default.createElement(e,t)}}l.origGetInitialProps=i,l.getInitialProps=i,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14600:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(38754),a=n._(r(67294)),o=n._(r(68965)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e,n=t&&t.statusCode?t.statusCode:r?r.statusCode:404;return{statusCode:n}}let u={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class s extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||i[e]||"An unexpected error has occurred";return a.default.createElement("div",{style:u.error},a.default.createElement(o.default,null,a.default.createElement("title",null,e?e+": "+r:"Application error: a client-side exception has occurred")),a.default.createElement("div",{style:u.desc},a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?a.default.createElement("h1",{className:"next-error-h1",style:u.h1},e):null,a.default.createElement("div",{style:u.wrap},a.default.createElement("h2",{style:u.h2},this.props.title||e?r:a.default.createElement(a.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}}s.displayName="ErrorPage",s.getInitialProps=l,s.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext({})},64171:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},27473:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{CacheStates:function(){return n},AppRouterContext:function(){return l},LayoutRouterContext:function(){return u},GlobalLayoutRouterContext:function(){return s},TemplateContext:function(){return c}});let o=r(38754),i=o._(r(67294));(a=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",a.DATA_FETCH="DATAFETCH",a.READY="READY";let l=i.default.createContext(null),u=i.default.createContext(null),s=i.default.createContext(null),c=i.default.createContext(null)},46088:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=.01);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){let e={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};return e}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){let t=this.getHashValues(e);t.forEach(e=>{this.bitArray[e]=1})}contains(e){let t=this.getHashValues(e);return t.every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r>>13,t=Math.imul(t,1540483477)}return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},17266:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return a}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function a(e){return r.test(e)?e.replace(n,"\\$&"):e}},19307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext({})},68965:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{defaultHead:function(){return c},default:function(){return p}});let n=r(38754),a=r(61757),o=a._(r(67294)),i=n._(r(89034)),l=r(63853),u=r(19307),s=r(64171);function c(e){void 0===e&&(e=!1);let t=[o.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(59941);let d=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:r}=t;return e.reduce(f,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return a=>{let o=!0,i=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){i=!0;let t=a.key.slice(a.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(a.type){case"title":case"base":t.has(a.type)?o=!1:t.add(a.type);break;case"meta":for(let e=0,t=d.length;e{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,o.default.cloneElement(e,t)}return o.default.cloneElement(e,{key:n})})}let p=function(e){let{children:t}=e,r=(0,o.useContext)(l.AmpStateContext),n=(0,o.useContext)(u.HeadManagerContext);return o.default.createElement(i.default,{reduceComponentsToState:h,headManager:n,inAmpMode:(0,s.isInAmpMode)(r)},t)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35802:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{SearchParamsContext:function(){return a},PathnameContext:function(){return o}});let n=r(67294),a=(0,n.createContext)(null),o=(0,n.createContext)(null)},7150:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},76226:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let n=r(38754),a=n._(r(67294)),o=r(2478),i=a.default.createContext(o.imageConfigDefault)},2478:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},20189:function(e,t){"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},7483:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return r}});let r="NEXT_DYNAMIC_NO_SSR_CODE"},28829:function(e,t){"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},99245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return o}});let n=r(84546),a=r(968);function o(e){let t=(0,a.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},968:function(e,t){"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},44293:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return o}});let n=r(38754),a=n._(r(67294)),o=a.default.createContext(null)},26119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{adaptForAppRouterInstance:function(){return l},adaptForSearchParams:function(){return u},PathnameContextProviderAdapter:function(){return s}});let n=r(61757),a=n._(r(67294)),o=r(35802),i=r(84546);function l(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},push(t){e.push(t)},replace(t){e.replace(t)},prefetch(t){e.prefetch(t)}}}function u(e){return e.isReady&&e.query?function(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,e);else void 0!==n&&t.append(r,n);return t}(e.query):new URLSearchParams}function s(e){let{children:t,router:r,...n}=e,l=(0,a.useRef)(n.isAutoExport),u=(0,a.useMemo)(()=>{let e;let t=l.current;if(t&&(l.current=!1),(0,i.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return a.default.createElement(o.PathnameContext.Provider,{value:u},t)}},20530:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return V},matchesMiddleware:function(){return N},createKey:function(){return W}});let n=r(38754),a=r(61757),o=r(59152),i=r(98116),l=r(64104),u=a._(r(80676)),s=r(99245),c=r(7150),f=n._(r(28829)),d=r(95514),h=r(80396),p=r(59325);r(72431);let m=r(19917),g=r(6047),y=r(28904);r(72081);let _=r(62551),b=r(27521),v=r(67169),P=r(21847),w=r(66318),S=r(52501),j=r(79423),O=r(42666),E=r(85622),x=r(36965),R=r(65723),C=r(78001),M=r(48321),A=r(65722),L=r(86680),T=r(85913);function I(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function N(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,_.parsePath)(e.asPath),n=(0,S.hasBasePath)(r)?(0,P.removeBasePath)(r):r,a=(0,w.addBasePath)((0,b.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(a))}function k(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function D(e,t,r){let[n,a]=(0,A.resolveHref)(e,t,!0),o=(0,d.getLocationOrigin)(),i=n.startsWith(o),l=a&&a.startsWith(o);n=k(n),a=a?k(a):a;let u=i?n:(0,w.addBasePath)(n),s=r?k((0,A.resolveHref)(e,r)):a||n;return{url:u,as:l?s:(0,w.addBasePath)(s)}}function B(e,t){let r=(0,o.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,h.isDynamicRoute)(t)&&(0,g.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,o.removeTrailingSlash)(e))}async function H(e){let t=await N(e);if(!t||!e.fetchData)return null;try{let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!0},a=t.headers.get("x-nextjs-rewrite"),l=a||t.headers.get("x-nextjs-matched-path"),u=t.headers.get("x-matched-path");if(!u||l||u.includes("__next_data_catchall")||u.includes("/_error")||u.includes("/404")||(l=u),l){if(l.startsWith("/")){let t=(0,p.parseRelativeUrl)(l),u=(0,O.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,o.removeTrailingSlash)(u.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(o=>{let[i,{__rewrites:l}]=o,f=(0,b.addLocale)(u.pathname,u.locale);if((0,h.isDynamicRoute)(f)||!a&&i.includes((0,c.normalizeLocalePath)((0,P.removeBasePath)(f),r.router.locales).pathname)){let r=(0,O.getNextPathnameInfo)((0,p.parseRelativeUrl)(e).pathname,{nextConfig:n,parseData:!0});f=(0,w.addBasePath)(r.pathname),t.pathname=f}if(!i.includes(s)){let e=B(s,i);e!==s&&(s=e)}let d=i.includes(s)?s:B((0,c.normalizeLocalePath)((0,P.removeBasePath)(t.pathname),r.router.locales).pathname,i);if((0,h.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,g.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,_.parsePath)(e),u=(0,E.formatNextPathnameInfo)({...(0,O.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-external",destination:""+u+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,_.parsePath)(s),t=(0,E.formatNextPathnameInfo)({...(0,O.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}catch(e){return null}}let U=Symbol("SSG_DATA_NOT_FOUND");function F(e){try{return JSON.parse(e)}catch(e){return null}}function q(e){var t;let{dataHref:r,inflightCache:n,isPrefetch:a,hasMiddleware:o,isServerRender:l,parseJSON:u,persistCache:s,isBackground:c,unstable_skipClientCache:f}=e,{href:d}=new URL(r,window.location.href),h=e=>(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(a=>!a.ok&&r>1&&a.status>=500?e(t,r-1,n):a)})(r,l?3:1,{headers:Object.assign({},a?{purpose:"prefetch"}:{},a&&o?{"x-middleware-prefetch":"1"}:{}),method:null!=(t=null==e?void 0:e.method)?t:"GET"}).then(t=>t.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:r,response:t,text:"",json:{},cacheKey:d}:t.text().then(e=>{if(!t.ok){if(o&&[301,302,307,308].includes(t.status))return{dataHref:r,response:t,text:e,json:{},cacheKey:d};if(404===t.status){var n;if(null==(n=F(e))?void 0:n.notFound)return{dataHref:r,json:{notFound:U},response:t,text:e,cacheKey:d}}let a=Error("Failed to load static props");throw l||(0,i.markAssetError)(a),a}return{dataHref:r,json:u?F(e):null,response:t,text:e,cacheKey:d}})).then(e=>(s&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete n[d],e)).catch(e=>{throw f||delete n[d],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e});return f&&s?h({}).then(e=>(n[d]=Promise.resolve(e),e)):void 0!==n[d]?n[d]:n[d]=h(c?{method:"HEAD"}:{})}function W(){return Math.random().toString(36).slice(2,10)}function z(e){let{url:t,router:r}=e;if(t===(0,w.addBasePath)((0,b.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let G=e=>{let{route:t,router:r}=e,n=!1,a=r.clc=()=>{n=!0};return()=>{if(n){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}a===r.clc&&(r.clc=null)}};class V{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=D(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,n){{let u=!1,s=!1;for(let c of[e,t])if(c){let t=(0,o.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,w.addBasePath)((0,b.addLocale)(t,r||this.locale));if(t!==(0,o.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var a,i,l;for(let e of(u=u||!!(null==(a=this._bfl_s)?void 0:a.contains(t))||!!(null==(i=this._bfl_s)?void 0:i.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e{})}}}}return!1}async change(e,t,r,n,a){var s,c,f,j,O,E,C,A,T;let k,H;if(!(0,R.isLocalURL)(t))return z({url:t,router:this}),!1;let F=1===n._h;F||n.shallow||await this._bfl(r,void 0,n.locale);let q=F||n._shouldResolveHref||(0,_.parsePath)(t).pathname===(0,_.parsePath)(r).pathname,W={...this.state},G=!0!==this.isReady;this.isReady=!0;let X=this.isSsr;if(F||(this.isSsr=!1),F&&this.clc)return!1;let Y=W.locale;d.ST&&performance.mark("routeChange");let{shallow:$=!1,scroll:J=!0}=n,K={shallow:$};this._inFlightRoute&&this.clc&&(X||V.events.emit("routeChangeError",I(),this._inFlightRoute,K),this.clc(),this.clc=null),r=(0,w.addBasePath)((0,b.addLocale)((0,S.hasBasePath)(r)?(0,P.removeBasePath)(r):r,n.locale,this.defaultLocale));let Q=(0,v.removeLocale)((0,S.hasBasePath)(r)?(0,P.removeBasePath)(r):r,W.locale);this._inFlightRoute=r;let Z=Y!==W.locale;if(!F&&this.onlyAHashChange(Q)&&!Z){W.asPath=Q,V.events.emit("hashChangeStart",r,K),this.changeState(e,t,r,{...n,scroll:!1}),J&&this.scrollToHash(Q);try{await this.set(W,this.components[W.route],null)}catch(e){throw(0,u.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,K),e}return V.events.emit("hashChangeComplete",r,K),!0}let ee=(0,p.parseRelativeUrl)(t),{pathname:et,query:er}=ee;if(null==(s=this.components[et])?void 0:s.__appRouter)return z({url:r,router:this}),new Promise(()=>{});try{[k,{__rewrites:H}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return z({url:r,router:this}),!1}this.urlIsNew(Q)||Z||(e="replaceState");let en=r;et=et?(0,o.removeTrailingSlash)((0,P.removeBasePath)(et)):et;let ea=(0,o.removeTrailingSlash)(et),eo=r.startsWith("/")&&(0,p.parseRelativeUrl)(r).pathname,ei=!!(eo&&ea!==eo&&(!(0,h.isDynamicRoute)(ea)||!(0,m.getRouteMatcher)((0,g.getRouteRegex)(ea))(eo))),el=!n.shallow&&await N({asPath:r,locale:W.locale,router:this});if(F&&el&&(q=!1),q&&"/_error"!==et&&(n._shouldResolveHref=!0,ee.pathname=B(et,k),ee.pathname===et||(et=ee.pathname,ee.pathname=(0,w.addBasePath)(et),el||(t=(0,y.formatWithValidation)(ee)))),!(0,R.isLocalURL)(r))return z({url:r,router:this}),!1;en=(0,v.removeLocale)((0,P.removeBasePath)(en),W.locale),ea=(0,o.removeTrailingSlash)(et);let eu=!1;if((0,h.isDynamicRoute)(ea)){let e=(0,p.parseRelativeUrl)(en),n=e.pathname,a=(0,g.getRouteRegex)(ea);eu=(0,m.getRouteMatcher)(a)(n);let o=ea===n,i=o?(0,L.interpolateAs)(ea,n,er):{};if(eu&&(!o||i.result))o?r=(0,y.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,M.omit)(er,i.params)})):Object.assign(er,eu);else{let e=Object.keys(a.groups).filter(e=>!er[e]&&!a.groups[e].optional);if(e.length>0&&!el)throw Error((o?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+ea+"). ")+"Read more: https://nextjs.org/docs/messages/"+(o?"href-interpolation-failed":"incompatible-href-as"))}}F||V.events.emit("routeChangeStart",r,K);let es="/404"===this.pathname||"/_error"===this.pathname;try{let o=await this.getRouteInfo({route:ea,pathname:et,query:er,as:r,resolvedAs:en,routeProps:K,locale:W.locale,isPreview:W.isPreview,hasMiddleware:el,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:F&&!this.isFallback,isMiddlewareRewrite:ei});if(F||n.shallow||await this._bfl(r,"resolvedAs"in o?o.resolvedAs:void 0,W.locale),"route"in o&&el){ea=et=o.route||ea,K.shallow||(er=Object.assign({},o.query||{},er));let e=(0,S.hasBasePath)(ee.pathname)?(0,P.removeBasePath)(ee.pathname):ee.pathname;if(eu&&et!==e&&Object.keys(eu).forEach(e=>{eu&&er[e]===eu[e]&&delete er[e]}),(0,h.isDynamicRoute)(et)){let e=!K.shallow&&o.resolvedAs?o.resolvedAs:(0,w.addBasePath)((0,b.addLocale)(new URL(r,location.href).pathname,W.locale),!0),t=e;(0,S.hasBasePath)(t)&&(t=(0,P.removeBasePath)(t));let n=(0,g.getRouteRegex)(et),a=(0,m.getRouteMatcher)(n)(new URL(t,location.href).pathname);a&&Object.assign(er,a)}}if("type"in o){if("redirect-internal"===o.type)return this.change(e,o.newUrl,o.newAs,n);return z({url:o.destination,router:this}),new Promise(()=>{})}let i=o.Component;if(i&&i.unstable_scriptLoader){let e=[].concat(i.unstable_scriptLoader());e.forEach(e=>{(0,l.handleClientScriptLoad)(e.props)})}if((o.__N_SSG||o.__N_SSP)&&o.props){if(o.props.pageProps&&o.props.pageProps.__N_REDIRECT){n.locale=!1;let t=o.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==o.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,p.parseRelativeUrl)(t);r.pathname=B(r.pathname,k);let{url:a,as:o}=D(this,t,t);return this.change(e,a,o,n)}return z({url:t,router:this}),new Promise(()=>{})}if(W.isPreview=!!o.props.__N_PREVIEW,o.props.notFound===U){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(o=await this.getRouteInfo({route:e,pathname:e,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isNotFound:!0}),"type"in o)throw Error("Unexpected middleware effect on /404")}}F&&"/_error"===this.pathname&&(null==(c=self.__NEXT_DATA__.props)?void 0:null==(f=c.pageProps)?void 0:f.statusCode)===500&&(null==(j=o.props)?void 0:j.pageProps)&&(o.props.pageProps.statusCode=500);let s=n.shallow&&W.route===(null!=(O=o.route)?O:ea),d=null!=(E=n.scroll)?E:!F&&!s,y=null!=a?a:d?{x:0,y:0}:null,_={...W,route:ea,pathname:et,query:er,asPath:Q,isFallback:!1};if(F&&es){if(o=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isQueryUpdating:F&&!this.isFallback}),"type"in o)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(C=self.__NEXT_DATA__.props)?void 0:null==(A=C.pageProps)?void 0:A.statusCode)===500&&(null==(T=o.props)?void 0:T.pageProps)&&(o.props.pageProps.statusCode=500);try{await this.set(_,o,y)}catch(e){throw(0,u.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,K),e}return!0}V.events.emit("beforeHistoryChange",r,K),this.changeState(e,t,r,n);let v=F&&!y&&!G&&!Z&&(0,x.compareRouterStates)(_,this.state);if(!v){try{await this.set(_,o,y)}catch(e){if(e.cancelled)o.error=o.error||e;else throw e}if(o.error)throw F||V.events.emit("routeChangeError",o.error,Q,K),o.error;F||V.events.emit("routeChangeComplete",r,K),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,u.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:W()},"",r))}async handleRouteInfoError(e,t,r,n,a,o){if(console.error(e),e.cancelled)throw e;if((0,i.isAssetError)(e)||o)throw V.events.emit("routeChangeError",e,n,a),z({url:n,router:this}),I();try{let n;let{page:a,styleSheets:o}=await this.fetchComponent("/_error"),i={props:n,Component:a,styleSheets:o,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(a,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,u.default)(e)?e:Error(e+""),t,r,n,a,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:a,resolvedAs:i,routeProps:l,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:h,isQueryUpdating:p,isMiddlewareRewrite:m,isNotFound:g}=e,_=t;try{var b,v,w,S;let e=G({route:_,router:this}),t=this.components[_];if(l.shallow&&t&&this.route===_)return t;f&&(t=void 0);let u=!t||"initial"in t?void 0:t,O={dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:g?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:p?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:h,isBackground:p},E=p&&!m?null:await H({fetchData:()=>q(O),asPath:g?"/404":i,locale:s,router:this}).catch(e=>{if(p)return null;throw e});if(E&&("/_error"===r||"/404"===r)&&(E.effect=void 0),p&&(E?E.json=self.__NEXT_DATA__.props:E={json:self.__NEXT_DATA__.props}),e(),(null==E?void 0:null==(b=E.effect)?void 0:b.type)==="redirect-internal"||(null==E?void 0:null==(v=E.effect)?void 0:v.type)==="redirect-external")return E.effect;if((null==E?void 0:null==(w=E.effect)?void 0:w.type)==="rewrite"){let e=(0,o.removeTrailingSlash)(E.effect.resolvedHref),a=await this.pageLoader.getPageList();if((!p||a.includes(e))&&(_=e,r=E.effect.resolvedHref,n={...n,...E.effect.parsedAs.query},i=(0,P.removeBasePath)((0,c.normalizeLocalePath)(E.effect.parsedAs.pathname,this.locales).pathname),t=this.components[_],l.shallow&&t&&this.route===_&&!f))return{...t,route:_}}if((0,j.isAPIRoute)(_))return z({url:a,router:this}),new Promise(()=>{});let x=u||await this.fetchComponent(_).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),R=null==E?void 0:null==(S=E.response)?void 0:S.headers.get("x-middleware-skip"),C=x.__N_SSG||x.__N_SSP;R&&(null==E?void 0:E.dataHref)&&delete this.sdc[E.dataHref];let{props:M,cacheKey:A}=await this._getData(async()=>{if(C){if((null==E?void 0:E.json)&&!R)return{cacheKey:E.cacheKey,props:E.json};let e=(null==E?void 0:E.dataHref)?E.dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await q({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:R?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:h});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(x.Component,{pathname:r,query:n,asPath:a,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return x.__N_SSP&&O.dataHref&&A&&delete this.sdc[A],this.isPreview||!x.__N_SSG||p||q(Object.assign({},O,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),M.pageProps=Object.assign({},M.pageProps),x.props=M,x.route=_,x.query=n,x.resolvedAs=i,this.components[_]=x,x}catch(e){return this.handleRouteInfoError((0,u.getProperError)(e),r,n,a,l)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#"),[n,a]=e.split("#");return!!a&&t===n&&r===a||t===n&&r!==a}scrollToHash(e){let[,t=""]=e.split("#");if(""===t||"top"===t){(0,T.handleSmoothScroll)(()=>window.scrollTo(0,0));return}let r=decodeURIComponent(t),n=document.getElementById(r);if(n){(0,T.handleSmoothScroll)(()=>n.scrollIntoView());return}let a=document.getElementsByName(r)[0];a&&(0,T.handleSmoothScroll)(()=>a.scrollIntoView())}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,C.isBot)(window.navigator.userAgent))return;let n=(0,p.parseRelativeUrl)(e),a=n.pathname,{pathname:i,query:l}=n,u=i,s=await this.pageLoader.getPageList(),c=t,f=void 0!==r.locale?r.locale||void 0:this.locale,d=await N({asPath:t,locale:f,router:this});n.pathname=B(n.pathname,s),(0,h.isDynamicRoute)(n.pathname)&&(i=n.pathname,n.pathname=i,Object.assign(l,(0,m.getRouteMatcher)((0,g.getRouteRegex)(n.pathname))((0,_.parsePath)(t).pathname)||{}),d||(e=(0,y.formatWithValidation)(n)));let b=await H({fetchData:()=>q({dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:u,query:l}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==b?void 0:b.effect.type)==="rewrite"&&(n.pathname=b.effect.resolvedHref,i=b.effect.resolvedHref,l={...l,...b.effect.parsedAs.query},c=b.effect.parsedAs.pathname,e=(0,y.formatWithValidation)(n)),(null==b?void 0:b.effect.type)==="redirect-external")return;let v=(0,o.removeTrailingSlash)(i);await this._bfl(t,c,r.locale,!0)&&(this.components[a]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(v).then(t=>!!t&&q({dataHref:(null==b?void 0:b.json)?null==b?void 0:b.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](v)])}async fetchComponent(e){let t=G({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return q({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,n,{initialProps:a,pageLoader:i,App:l,wrapApp:u,Component:s,err:c,subscription:f,isFallback:m,locale:g,locales:_,defaultLocale:b,domainLocales:v,isPreview:P}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=W(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,y.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA){window.location.reload();return}if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:a,as:o,options:i,key:l}=n;this._key=l;let{pathname:u}=(0,p.parseRelativeUrl)(a);(!this.isSsr||o!==(0,w.addBasePath)(this.asPath)||u!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",a,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let S=(0,o.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:a,err:c,__N_SSG:a&&a.__N_SSG,__N_SSP:a&&a.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]};{let{BloomFilter:e}=r(46088),t={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]},n={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==n?void 0:n.numHashes)&&(this._bfl_d=new e(n.numItems,n.errorRate),this._bfl_d.import(n))}this.events=V.events,this.pageLoader=i;let j=(0,h.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=f,this.clc=null,this._wrapApp=u,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!j&&!self.location.search),this.state={route:S,pathname:e,query:t,asPath:j?e:n,isPreview:!!P,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!n.startsWith("//")){let r={locale:g},a=(0,d.getURL)();this._initialMatchesMiddlewarePromise=N({router:this,locale:g,asPath:a}).then(o=>(r._shouldResolveHref=n!==e,this.changeState("replaceState",o?a:(0,y.formatWithValidation)({pathname:(0,w.addBasePath)(e),query:t}),a,r),o))}window.addEventListener("popstate",this.onPopState)}}V.events=(0,f.default)()},66355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return o}});let n=r(62478),a=r(53488);function o(e,t,r,o){if(!t||t===r)return e;let i=e.toLowerCase();return!o&&((0,a.pathHasPrefix)(i,"/api")||(0,a.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},62478:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:a,hash:o}=(0,n.parsePath)(e);return""+t+r+a+o}},42774:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:a,hash:o}=(0,n.parsePath)(e);return""+r+t+a+o}},36965:function(e,t){"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let a=r[n];if("query"===a){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let a=r[n];if(!t.query.hasOwnProperty(a)||e.query[a]!==t.query[a])return!1}}else if(!t.hasOwnProperty(a)||e[a]!==t[a])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},85622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return l}});let n=r(59152),a=r(62478),o=r(42774),i=r(66355);function l(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,o.addPathSuffix)((0,a.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,a.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,o.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},28904:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return i},urlObjectKeys:function(){return l},formatWithValidation:function(){return u}});let n=r(61757),a=n._(r(85342)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",l=e.hash||"",u=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&"?"+u||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),""+n+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+l}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},83413:function(e,t){"use strict";function r(e,t){void 0===t&&(t="");let r="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:""+e;return r+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},42666:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(7150),a=r(50563),o=r(53488);function i(e,t){var r,i,l;let{basePath:u,i18n:s,trailingSlash:c}=null!=(r=t.nextConfig)?r:{},f={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):c};if(u&&(0,o.pathHasPrefix)(f.pathname,u)&&(f.pathname=(0,a.removePathPrefix)(f.pathname,u),f.basePath=u),!0===t.parseData&&f.pathname.startsWith("/_next/data/")&&f.pathname.endsWith(".json")){let e=f.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),t=e[0];f.pathname="index"!==e[1]?"/"+e.slice(1).join("/"):"/",f.buildId=t}if(t.i18nProvider){let e=t.i18nProvider.analyze(f.pathname);f.locale=e.detectedLocale,f.pathname=null!=(i=e.pathname)?i:f.pathname}else if(s){let e=(0,n.normalizeLocalePath)(f.pathname,s.locales);f.locale=e.detectedLocale,f.pathname=null!=(l=e.pathname)?l:f.pathname}return f}},85913:function(e,t){"use strict";function r(e,t){void 0===t&&(t={});let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},84546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return a.isDynamicRoute}});let n=r(47235),a=r(80396)},86680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return o}});let n=r(19917),a=r(6047);function o(e,t,r){let o="",i=(0,a.getRouteRegex)(e),l=i.groups,u=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;o=e;let s=Object.keys(l);return s.every(e=>{let t=u[e]||"",{repeat:r,optional:n}=l[e],a="["+(r?"...":"")+e+"]";return n&&(a=(t?"":"/")+"["+a+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in u)&&(o=o.replace(a,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:s,result:o}}},78001:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},80396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return n}});let r=/\/\[[^/]+?\](?=\/|$)/;function n(e){return r.test(e)}},65723:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=r(95514),a=r(52501);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},48321:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},62551:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},59325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return o}});let n=r(95514),a=r(85342);function o(e,t){let r=new URL((0,n.getLocationOrigin)()),o=t?new URL(t,r):e.startsWith(".")?new URL(window.location.href):r,{pathname:i,searchParams:l,search:u,hash:s,href:c,origin:f}=new URL(e,o);if(f!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,a.searchParamsToUrlQuery)(l),search:u,hash:s,href:c.slice(r.origin.length)}}},53488:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return a}});let n=r(62551);function a(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},85342:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,a]=e;Array.isArray(a)?a.forEach(e=>t.append(r,n(e))):t.set(r,n(a))}),t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return a},assign:function(){return o}})},50563:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return a}});let n=r(53488);function a(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},59152:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},65722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(85342),a=r(28904),o=r(48321),i=r(95514),l=r(25731),u=r(65723),s=r(80396),c=r(86680);function f(e,t,r){let f;let d="string"==typeof t?t:(0,a.formatWithValidation)(t),h=d.match(/^[a-zA-Z]{1,}:\/\//),p=h?d.slice(h[0].length):d,m=p.split("?");if((m[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(p);d=(h?h[0]:"")+t}if(!(0,u.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,l.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:l}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,a.formatWithValidation)({pathname:i,hash:e.hash,query:(0,o.omit)(r,l)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}},19917:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return a}});let n=r(95514);function a(e){let{re:t,groups:r}=e;return e=>{let a=t.exec(e);if(!a)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=a[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>o(e)):t.repeat?[o(n)]:o(n))}),i}}},6047:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return c},getNamedMiddlewareRegex:function(){return f}});let n=r(17266),a=r(59152),o="nxtP";function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function l(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),r={},o=1;return{parameterizedRoute:t.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,n.escapeStringRegexp)(e);{let{key:t,optional:n,repeat:a}=i(e.slice(1,-1));return r[t]={pos:o++,repeat:a,optional:n},a?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function u(e){let{parameterizedRoute:t,groups:r}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e,t){let r,l;let u=(0,a.removeTrailingSlash)(e).slice(1).split("/"),s=(r=97,l=1,()=>{let e="";for(let t=0;t122&&(l++,r=97);return e}),c={};return{namedParameterizedRoute:u.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,n.escapeStringRegexp)(e);{let{key:r,optional:n,repeat:a}=i(e.slice(1,-1)),l=r.replace(/\W/g,"");t&&(l=""+o+l);let u=!1;return(0===l.length||l.length>30)&&(u=!0),isNaN(parseInt(l.slice(0,1)))||(u=!0),u&&(l=s()),t?c[l]=""+o+r:c[l]=""+r,a?n?"(?:/(?<"+l+">.+?))?":"/(?<"+l+">.+?)":"/(?<"+l+">[^/]+?)"}}).join(""),routeKeys:c}}function c(e,t){let r=s(e,t);return{...u(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function f(e,t){let{parameterizedRoute:r}=l(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:a}=s(e,!1);return{namedRegex:"^"+a+(n?"(?:(/.*)?)":"")+"$"}}},47235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let a=e[0];if(a.startsWith("[")&&a.endsWith("]")){let r=a.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function o(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===a.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,r),this.optionalRestSlugName=r,a="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,r),this.restSlugName=r,a="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,r),this.slugName=r,a="[]"}}this.children.has(a)||this.children.set(a,new r),this.children.get(a)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},66452:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return a}});let n=()=>r;function a(e){r=e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89034:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(61757),a=n._(r(67294)),o=a.useLayoutEffect,i=a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let n=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(n,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},95514:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return o},getLocationOrigin:function(){return i},getURL:function(){return l},getDisplayName:function(){return u},isResSent:function(){return s},normalizeRepeatedSlashes:function(){return c},loadGetInitialProps:function(){return f},SP:function(){return d},ST:function(){return h},DecodeError:function(){return p},NormalizeError:function(){return m},PageNotFoundError:function(){return g},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return _}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,a=Array(n),o=0;oa.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function l(){let{href:e}=window.location,t=i();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?"),r=t[0];return r.replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n){let t='"'+u(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.';throw Error(t)}return n}let d="undefined"!=typeof performance,h=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class p extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class _ extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}},59941:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},78018:function(e){var t,r,n,a,o,i,l,u,s,c,f,d,h,p,m,g,y,_,b,v,P,w,S,j,O,E,x,R,C,M,A,L,T,I,N,k,D,B,H,U,F,q,W,z,G,V;(t={}).d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==t&&(t.ab="//"),r={},t.r(r),t.d(r,{getCLS:function(){return S},getFCP:function(){return v},getFID:function(){return M},getINP:function(){return q},getLCP:function(){return z},getTTFB:function(){return V},onCLS:function(){return S},onFCP:function(){return v},onFID:function(){return M},onINP:function(){return q},onLCP:function(){return z},onTTFB:function(){return V}}),u=-1,s=function(e){addEventListener("pageshow",function(t){t.persisted&&(u=t.timeStamp,e(t))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},f=function(){var e=c();return e&&e.activationStart||0},d=function(e,t){var r=c(),n="navigate";return u>=0?n="back-forward-cache":r&&(n=document.prerendering||f()>0?"prerender":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},h=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){t(e.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},p=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},m=function(e,t,r,n){var a,o;return function(i){var l;t.value>=0&&(i||n)&&((o=t.value-(a||0))||void 0===a)&&(a=t.value,t.delta=o,t.rating=(l=t.value)>r[1]?"poor":l>r[0]?"needs-improvement":"good",e(t))}},g=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},_=function(){p(function(e){g=e.timeStamp},!0)},b=function(){return g<0&&(g=y(),_(),s(function(){setTimeout(function(){g=y(),_()},0)})),{get firstHiddenTime(){return g}}},v=function(e,t){t=t||{};var r,n=[1800,3e3],a=b(),o=d("FCP"),i=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(u&&u.disconnect(),e.startTime-1&&e(t)},o=d("CLS",0),i=0,l=[],u=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=l[0],r=l[l.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,l.push(e)):(i=e.value,l=[e]),i>o.value&&(o.value=i,o.entries=l,n())}})},c=h("layout-shift",u);c&&(n=m(a,o,r,t.reportAllChanges),p(function(){u(c.takeRecords()),n(!0)}),s(function(){i=0,w=-1,n=m(a,o=d("CLS",0),r,t.reportAllChanges)}))},j={passive:!0,capture:!0},O=new Date,E=function(e,t){n||(n=t,a=e,o=new Date,C(removeEventListener),x())},x=function(){if(a>=0&&a1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){E(a,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,j),removeEventListener("pointercancel",r,j)},addEventListener("pointerup",t,j),addEventListener("pointercancel",r,j)):E(a,e)}},C=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,R,j)})},M=function(e,t){t=t||{};var r,o=[100,300],l=b(),u=d("FID"),c=function(e){e.startTimet.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};U[n.id]=n,H.push(n)}H.sort(function(e,t){return t.latency-e.latency}),H.splice(10).forEach(function(e){delete U[e.id]})}},q=function(e,t){t=t||{};var r=[200,500];k();var n,a=d("INP"),o=function(e){e.forEach(function(e){e.interactionId&&F(e),"first-input"!==e.entryType||H.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||F(e)});var t,r=(t=Math.min(H.length-1,Math.floor(B()/50)),H[t]);r&&r.latency!==a.value&&(a.value=r.latency,a.entries=r.entries,n())},i=h("event",o,{durationThreshold:t.durationThreshold||40});n=m(e,a,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),p(function(){o(i.takeRecords()),a.value<0&&B()>0&&(a.value=0,a.entries=[]),n(!0)}),s(function(){H=[],D=N(),n=m(e,a=d("INP"),r,t.reportAllChanges)}))},W={},z=function(e,t){t=t||{};var r,n=[2500,4e3],a=b(),o=d("LCP"),i=function(e){var t=e[e.length-1];if(t){var n=t.startTime-f();nperformance.now())return;n.entries=[o],a(!0),s(function(){(a=m(e,n=d("TTFB",0),r,t.reportAllChanges))(!0)})}})},e.exports=r},79423:function(e,t){"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},80676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return a},getProperError:function(){return o}});let n=r(20189);function a(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function o(e){return a(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},72431:function(){},38754:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},61757:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}r.r(t),r.d(t,{_:function(){return a},_interop_require_wildcard:function(){return a}})}},function(e){e.O(0,[9774],function(){return e(e.s=87206)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3af894dd978f3a24.js b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3d30aab9de4cf75b.js similarity index 80% rename from packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3af894dd978f3a24.js rename to packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3d30aab9de4cf75b.js index c146694ab..7260774b9 100644 --- a/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3af894dd978f3a24.js +++ b/packages/dbgpt-app/src/dbgpt_app/static/web/_next/static/chunks/pages/_app-3d30aab9de4cf75b.js @@ -74,7 +74,7 @@ * @author Feross Aboukhadijeh * @license MIT */let r=n(79742),o=n(80645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);let n=0|R(e,t),r=a(n),o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){let t=new Uint8Array(e);return T(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return T(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);let o=function(e){var t;if(s.isBuffer(e)){let t=0|d(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function E(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return E(e),a(e<0?0:0|d(e))}function u(e){let t=e.length<0?0:0|d(e.length),n=a(t);for(let r=0;r=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function R(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return w(e).length;default:if(o)return r?-1:U(e).length;t=(""+t).toLowerCase(),o=!0}}function f(e,t,n){let o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(i=n=+n)!=i&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return -1;n=e.length-1}else if(n<0){if(!o)return -1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:O(e,t,n,r,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):O(e,[t],n,r,o);throw TypeError("val must be string, number or Buffer")}function O(e,t,n,r,o){let i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,n/=2}function E(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){let n=!0;for(let r=0;r239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(i=t);break;case 2:(192&(n=e[o+1]))==128&&(l=(31&t)<<6|63&n)>127&&(i=l);break;case 3:n=e[o+1],r=e[o+2],(192&n)==128&&(192&r)==128&&(l=(15&t)<<12|(63&n)<<6|63&r)>2047&&(l<55296||l>57343)&&(i=l);break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],(192&n)==128&&(192&r)==128&&(192&s)==128&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s)>65535&&l<1114112&&(i=l)}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rn)throw RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function h(e,t,n,r,o){y(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function _(e,t,n,r,o){y(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function m(e,t,n,r,o,i){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function C(e,t,n,r,i){return t=+t,n>>>=0,i||m(e,t,n,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return t=+t,n>>>=0,i||m(e,t,n,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,n,r,52,8),n+8}t.lW=s,t.h2=50,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(E(e),e<=0)?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);or.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else if(s.isBuffer(t))t.copy(r,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=t.length}return r},s.byteLength=R,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,o){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;let i=o-r,a=n-t,l=Math.min(i,a),E=this.slice(r,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-t;if((void 0===n||n>T)&&(n=T),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let d=!1;for(;;)switch(r){case"hex":return function(e,t,n,r){let o;n=Number(n)||0;let i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;let a=t.length;for(r>a/2&&(r=a/2),o=0;o>8,o.push(n%256),o.push(r);return o}(e,this.length-c),this,c,u);default:if(d)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),d=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=H(function(e){D(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&M(e,this.length-8);let r=t+256*this[++e]+65536*this[++e]+16777216*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+16777216*n;return BigInt(r)+(BigInt(o)<>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&M(e,this.length-8);let r=16777216*t+65536*this[++e]+256*this[++e]+this[++e],o=16777216*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return(e>>>=0,t||N(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=H(function(e){D(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&M(e,this.length-8);let r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&M(e,this.length-8);let r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||N(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;I(this,e,t,n,r,0)}let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;I(this,e,t,n,r,0)}let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=H(function(e,t=0){return h(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=H(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=H(function(e,t=0){return h(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=H(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return C(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return C(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function y(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:`>= ${t}${o} and <= ${n}${o}`,new g.ERR_OUT_OF_RANGE("value",r,e)}D(o,"offset"),(void 0===r[o]||void 0===r[o+i])&&M(o,r.length-(i+1))}function D(e,t){if("number"!=typeof e)throw new g.ERR_INVALID_ARG_TYPE(t,"number",e)}function M(e,t,n){if(Math.floor(e)!==e)throw D(e,n),new g.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new g.ERR_BUFFER_OUT_OF_BOUNDS;throw new g.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}v("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),v("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),v("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>4294967296?o=P(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=P(o)),o+="n"),r+=` It must be ${t}. Received ${o}`},RangeError);let b=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;let r=e.length,o=null,i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319||a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return i}function w(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(b,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function x(e,t,n,r){let o;for(o=0;o=t.length)&&!(o>=e.length);++o)t[o+n]=e[o];return o}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let F=function(){let e="0123456789abcdef",t=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function H(e){return"undefined"==typeof BigInt?B:e}function B(){throw Error("BigInt not supported")}},80645:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<>1,c=-7,u=n?o-1:0,T=n?-1:1,d=e[t+u];for(u+=T,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+u],u+=T,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+u],u+=T,c-=8);if(0===i)i=1-E;else{if(i===l)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),i-=E}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,E=8*i-o-1,c=(1<>1,T=23===o?5960464477539062e-23:0,d=r?0:i-1,R=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=T/l:t+=T*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,o),a+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=R,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=R,a/=256,E-=8);e[n+d-R]|=128*f}},62705:function(e,t,n){var r=n(55639).Symbol;e.exports=r},44239:function(e,t,n){var r=n(62705),o=n(89607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},31957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},89607:function(e,t,n){var r=n(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,n){var r=n(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),i=n(14841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,E,c,u,T,d,R=0,f=!1,A=!1,S=!0;if("function"!=typeof e)throw TypeError("Expected a function");function O(t){var n=l,r=E;return l=E=void 0,R=t,u=e.apply(r,n)}function p(e){var n=e-d,r=e-R;return void 0===d||n>=t||n<0||A&&r>=c}function N(){var e,n,r,i=o();if(p(i))return I(i);T=setTimeout(N,(e=i-d,n=i-R,r=t-e,A?s(r,c-n):r))}function I(e){return(T=void 0,S&&l)?O(e):(l=E=void 0,u)}function h(){var e,n=o(),r=p(n);if(l=arguments,E=this,d=n,r){if(void 0===T)return R=e=d,T=setTimeout(N,t),f?O(e):u;if(A)return clearTimeout(T),T=setTimeout(N,t),O(d)}return void 0===T&&(T=setTimeout(N,t)),u}return t=i(t)||0,r(n)&&(f=!!n.leading,c=(A="maxWait"in n)?a(i(n.maxWait)||0,t):c,S="trailing"in n?!!n.trailing:S),h.cancel=function(){void 0!==T&&clearTimeout(T),R=0,l=d=E=T=void 0},h.flush=function(){return void 0===T?u:I(o())},h}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},23493:function(e,t,n){var r=n(23279),o=n(13218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},14841:function(e,t,n){var r=n(27561),o=n(13218),i=n(33448),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,E=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||E.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},83839:function(e,t,n){!function(e){e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return(12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t)?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(30381))},30381:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";function t(){return B.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function i(e){var t;if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(t in e)if(o(e,t))return!1;return!0}function a(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function E(e,t){var n,r=[],o=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},b={};function U(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(b[e]=o),t&&(b[t[0]]=function(){return P(o.apply(this,arguments),t[1],t[2])}),n&&(b[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function w(e,t){return e.isValid()?(M[t=x(t,e.localeData())]=M[t]||function(e){var t,n,r,o=e.match(y);for(n=0,r=o.length;n=0&&D.test(e);)e=e.replace(D,r),D.lastIndex=0,n-=1;return e}var G={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function F(e){return"string"==typeof e?G[e]||G[e.toLowerCase()]:void 0}function H(e){var t,n,r={};for(n in e)o(e,n)&&(t=F(n))&&(r[t]=e[n]);return r}var B,Y,k,V,$={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},W=/\d/,Z=/\d\d/,j=/\d{3}/,X=/\d{4}/,K=/[+-]?\d{6}/,z=/\d\d?/,J=/\d\d\d\d?/,q=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,ee=/\d{1,4}/,et=/[+-]?\d{1,6}/,en=/\d+/,er=/[+-]?\d+/,eo=/Z|[+-]\d\d:?\d\d/gi,ei=/Z|[+-]\d\d(?::?\d\d)?/gi,ea=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,es=/^[1-9]\d?/,el=/^([1-9]\d|\d)/;function eE(e,t,n){V[e]=L(t)?t:function(e,r){return e&&n?n:t}}function ec(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function eu(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function eT(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=eu(t)),n}V={};var ed={};function eR(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),s(t)&&(o=function(e,n){n[t]=eT(e)}),r=e.length,n=0;n68?1900:2e3)};var eO=ep("FullYear",!0);function ep(e,n){return function(r){return null!=r?(eI(this,e,r),t.updateOffset(this,n),this):eN(this,e)}}function eN(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function eI(e,t,n){var r,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=e.month(),a=29!==(a=e.date())||1!==i||eA(n)?a:28,o?r.setUTCFullYear(n,i,a):r.setFullYear(n,i,a)}}function eh(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?eA(e)?29:28:31-n%7%2}ek=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?isFinite((s=new Date(e+400,t,n,r,o,i,a)).getFullYear())&&s.setFullYear(e):s=new Date(e,t,n,r,o,i,a),s}function ey(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,isFinite((t=new Date(Date.UTC.apply(null,n))).getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function eD(e,t,n){var r=7+t-n;return-((7+ey(e,0,r).getUTCDay()-t)%7)+r-1}function eM(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+eD(e,r,o);return s<=0?a=eS(i=e-1)+s:s>eS(e)?(i=e+1,a=s-eS(e)):(i=e,a=s),{year:i,dayOfYear:a}}function eb(e,t,n){var r,o,i=eD(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+eU(o=e.year()-1,t,n):a>eU(e.year(),t,n)?(r=a-eU(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function eU(e,t,n){var r=eD(e,t,n),o=eD(e+1,t,n);return(eS(e)-r+o)/7}function ew(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),eE("w",z,es),eE("ww",z,Z),eE("W",z,es),eE("WW",z,Z),ef(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=eT(e)}),U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),eE("d",z),eE("e",z),eE("E",z),eE("dd",function(e,t){return t.weekdaysMinRegex(e)}),eE("ddd",function(e,t){return t.weekdaysShortRegex(e)}),eE("dddd",function(e,t){return t.weekdaysRegex(e)}),ef(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:T(n).invalidWeekday=e}),ef(["d","e","E"],function(e,t,n,r){t[r]=eT(e)});var ex="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function eG(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(r=0,this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];r<7;++r)i=u([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=ek.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ek.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ek.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ek.call(this._weekdaysParse,a))||-1!==(o=ek.call(this._shortWeekdaysParse,a))?o:-1!==(o=ek.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ek.call(this._shortWeekdaysParse,a))||-1!==(o=ek.call(this._weekdaysParse,a))?o:-1!==(o=ek.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ek.call(this._minWeekdaysParse,a))||-1!==(o=ek.call(this._weekdaysParse,a))?o:-1!==(o=ek.call(this._shortWeekdaysParse,a))?o:null}function eF(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],E=[];for(t=0;t<7;t++)n=u([2e3,1]).day(t),r=ec(this.weekdaysMin(n,"")),o=ec(this.weekdaysShort(n,"")),i=ec(this.weekdays(n,"")),a.push(r),s.push(o),l.push(i),E.push(r),E.push(o),E.push(i);a.sort(e),s.sort(e),l.sort(e),E.sort(e),this._weekdaysRegex=RegExp("^("+E.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=RegExp("^("+a.join("|")+")","i")}function eH(){return this.hours()%12||12}function eB(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function eY(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,eH),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+eH.apply(this)+P(this.minutes(),2)}),U("hmmss",0,0,function(){return""+eH.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),eB("a",!0),eB("A",!1),eE("a",eY),eE("A",eY),eE("H",z,el),eE("h",z,es),eE("k",z,es),eE("HH",z,Z),eE("hh",z,Z),eE("kk",z,Z),eE("hmm",J),eE("hmmss",q),eE("Hmm",J),eE("Hmmss",q),eR(["H","HH"],3),eR(["k","kk"],function(e,t,n){var r=eT(e);t[3]=24===r?0:r}),eR(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),eR(["h","hh"],function(e,t,n){t[3]=eT(e),T(n).bigHour=!0}),eR("hmm",function(e,t,n){var r=e.length-2;t[3]=eT(e.substr(0,r)),t[4]=eT(e.substr(r)),T(n).bigHour=!0}),eR("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=eT(e.substr(0,r)),t[4]=eT(e.substr(r,2)),t[5]=eT(e.substr(o)),T(n).bigHour=!0}),eR("Hmm",function(e,t,n){var r=e.length-2;t[3]=eT(e.substr(0,r)),t[4]=eT(e.substr(r))}),eR("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=eT(e.substr(0,r)),t[4]=eT(e.substr(r,2)),t[5]=eT(e.substr(o))});var ek,eV,e$=ep("Hours",!0),eW={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:e_,week:{dow:0,doy:6},weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysShort:ex,meridiemParse:/[ap]\.?m?\.?/i},eZ={},ej={};function eX(e){return e?e.toLowerCase().replace("_","-"):e}function eK(t){var n=null;if(void 0===eZ[t]&&e&&e.exports&&t&&t.match("^[^/\\\\]*$"))try{n=eV._abbr,function(){var e=Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),ez(n)}catch(e){eZ[t]=null}return eZ[t]}function ez(e,t){var n;return e&&((n=a(t)?eq(e):eJ(e,t))?eV=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eV._abbr}function eJ(e,t){if(null===t)return delete eZ[e],null;var n,r=eW;if(t.abbr=e,null!=eZ[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=eZ[e]._config;else if(null!=t.parentLocale){if(null!=eZ[t.parentLocale])r=eZ[t.parentLocale]._config;else{if(null==(n=eK(t.parentLocale)))return ej[t.parentLocale]||(ej[t.parentLocale]=[]),ej[t.parentLocale].push({name:e,config:t}),null;r=n._config}}return eZ[e]=new v(g(r,t)),ej[e]&&ej[e].forEach(function(e){eJ(e.name,e.config)}),ez(e),eZ[e]}function eq(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eV;if(!n(e)){if(t=eK(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i0;){if(r=eK(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n=t-1)break;t--}i++}return eV}(e)}function eQ(e){var t,n=e._a;return n&&-2===T(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>eh(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,T(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),T(e)._overflowWeeks&&-1===t&&(t=7),T(e)._overflowWeekday&&-1===t&&(t=8),T(e).overflow=t),e}var e0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e1=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e2=/Z|[+-]\d\d(?::?\d\d)?/,e4=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],e6=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],e3=/^\/?Date\((-?\d+)/i,e8=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,e5={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function e7(e){var t,n,r,o,i,a,s=e._i,l=e0.exec(s)||e1.exec(s),E=e4.length,c=e6.length;if(l){for(t=0,T(e).iso=!0,n=E;t7)&&(E=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,c=eb(ti(),a,s),r=te(n.gg,e._a[0],c.year),o=te(n.w,c.week),null!=n.d?((i=n.d)<0||i>6)&&(E=!0):null!=n.e?(i=n.e+a,(n.e<0||n.e>6)&&(E=!0)):i=a),o<1||o>eU(r,a,s)?T(e)._overflowWeeks=!0:null!=E?T(e)._overflowWeekday=!0:(l=eM(r,o,i,a,s),e._a[0]=l.year,e._dayOfYear=l.dayOfYear)),null!=e._dayOfYear&&(S=te(e._a[0],f[0]),(e._dayOfYear>eS(S)||0===e._dayOfYear)&&(T(e)._overflowDayOfYear=!0),R=ey(S,0,e._dayOfYear),e._a[1]=R.getUTCMonth(),e._a[2]=R.getUTCDate()),d=0;d<3&&null==e._a[d];++d)e._a[d]=O[d]=f[d];for(;d<7;d++)e._a[d]=O[d]=null==e._a[d]?2===d?1:0:e._a[d];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?ey:eP).apply(null,O),A=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==A&&(T(e).weekdayMismatch=!0)}}function tn(e){if(e._f===t.ISO_8601){e7(e);return}if(e._f===t.RFC_2822){e9(e);return}e._a=[],T(e).empty=!0;var n,r,i,a,s,l,E,c,u,d,R,f=""+e._i,A=f.length,S=0;for(s=0,R=(E=x(e._f,e._locale).match(y)||[]).length;s0&&T(e).unusedInput.push(u),f=f.slice(f.indexOf(l)+l.length),S+=l.length),b[c])?(l?T(e).empty=!1:T(e).unusedTokens.push(c),null!=l&&o(ed,c)&&ed[c](l,e._a,e,c)):e._strict&&!l&&T(e).unusedTokens.push(c);T(e).charsLeftOver=A-S,f.length>0&&T(e).unusedInput.push(f),e._a[3]<=12&&!0===T(e).bigHour&&e._a[3]>0&&(T(e).bigHour=void 0),T(e).parsedDateParts=e._a.slice(0),T(e).meridiem=e._meridiem,e._a[3]=(n=e._locale,r=e._a[3],null==(i=e._meridiem)?r:null!=n.meridiemHour?n.meridiemHour(r,i):(null!=n.isPM&&((a=n.isPM(i))&&r<12&&(r+=12),a||12!==r||(r=0)),r)),null!==(d=T(e).era)&&(e._a[0]=e._locale.erasConvertYear(d,e._a[0])),tt(e),eQ(e)}function tr(e){var o,i=e._i,u=e._f;return(e._locale=e._locale||eq(e._l),null===i||void 0===u&&""===i)?R({nullInput:!0}):("string"==typeof i&&(e._i=i=e._locale.preparse(i)),I(i))?new N(eQ(i)):(l(i)?e._d=i:n(u)?function(e){var t,n,r,o,i,a,s=!1,l=e._f.length;if(0===l){T(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;othis?this:e:R()});function tl(e,t){var r,o;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return ti();for(o=1,r=t[0];o=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function tU(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tw(e,t){return t.erasAbbrRegex(e)}function tx(){var e,t,n,r,o,i=[],a=[],s=[],l=[],E=this.eras();for(e=0,t=E.length;e(i=eU(e,r,o))&&(t=i),tH.call(this,e,t,n,r,o))}function tH(e,t,n,r,o){var i=eM(e,t,n,r,o),a=ey(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),eE("N",tw),eE("NN",tw),eE("NNN",tw),eE("NNNN",function(e,t){return t.erasNameRegex(e)}),eE("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),eR(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?T(n).era=o:T(n).invalidEra=e}),eE("y",en),eE("yy",en),eE("yyy",en),eE("yyyy",en),eE("yo",function(e,t){return t._eraYearOrdinalRegex||en}),eR(["y","yy","yyy","yyyy"],0),eR(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)}),U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tG("gggg","weekYear"),tG("ggggg","weekYear"),tG("GGGG","isoWeekYear"),tG("GGGGG","isoWeekYear"),eE("G",er),eE("g",er),eE("GG",z,Z),eE("gg",z,Z),eE("GGGG",ee,X),eE("gggg",ee,X),eE("GGGGG",et,K),eE("ggggg",et,K),ef(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=eT(e)}),ef(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),eE("Q",W),eR("Q",function(e,t){t[1]=(eT(e)-1)*3}),U("D",["DD",2],"Do","date"),eE("D",z,es),eE("DD",z,Z),eE("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),eR(["D","DD"],2),eR("Do",function(e,t){t[2]=eT(e.match(z)[0])});var tB=ep("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),eE("DDD",Q),eE("DDDD",j),eR(["DDD","DDDD"],function(e,t,n){n._dayOfYear=eT(e)}),U("m",["mm",2],0,"minute"),eE("m",z,el),eE("mm",z,Z),eR(["m","mm"],4);var tY=ep("Minutes",!1);U("s",["ss",2],0,"second"),eE("s",z,el),eE("ss",z,Z),eR(["s","ss"],5);var tk=ep("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),eE("S",Q,W),eE("SS",Q,Z),eE("SSS",Q,j),f="SSSS";f.length<=9;f+="S")eE(f,en);function tV(e,t){t[6]=eT(("0."+e)*1e3)}for(f="S";f.length<=9;f+="S")eR(f,tV);A=ep("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var t$=N.prototype;function tW(e){return e}t$.add=tL,t$.calendar=function(e,a){if(1==arguments.length){if(arguments[0]){var E,c,u;(E=arguments[0],I(E)||l(E)||tv(E)||s(E)||(c=n(E),u=!1,c&&(u=0===E.filter(function(e){return!s(e)&&tv(E)}).length),c&&u)||function(e){var t,n,a=r(e)&&!i(e),s=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],E=l.length;for(t=0;tn.valueOf():n.valueOf()n.year()||n.year()>9999?w(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+6e4*this.utcOffset()).toISOString().replace("Z",w(n,"Z")):w(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},t$.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(t$[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),t$.toJSON=function(){return this.isValid()?this.toISOString():null},t$.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},t$.unix=function(){return Math.floor(this.valueOf()/1e3)},t$.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},t$.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},t$.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eMath.abs(e)&&!r&&(e*=60);return!this._isUTC&&n&&(o=tS(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i===e||(!n||this._changeInProgress?tC(this,tI(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this},t$.utc=function(e){return this.utcOffset(0,e)},t$.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(tS(this),"m")),this},t$.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=tf(eo,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},t$.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ti(e).utcOffset():0,(this.utcOffset()-e)%60==0)},t$.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},t$.isLocal=function(){return!!this.isValid()&&!this._isUTC},t$.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},t$.isUtc=tO,t$.isUTC=tO,t$.zoneAbbr=function(){return this._isUTC?"UTC":""},t$.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},t$.dates=_("dates accessor is deprecated. Use date instead.",tB),t$.months=_("months accessor is deprecated. Use month instead",eg),t$.years=_("years accessor is deprecated. Use year instead",eO),t$.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),t$.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return p(t,this),(t=tr(t))._a?(e=t._isUTC?u(t._a):ti(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted});var tZ=v.prototype;function tj(e,t,n,r){var o=eq(),i=u().set(r,t);return o[n](i,e)}function tX(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return tj(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=tj(e,r,n,"month");return o}function tK(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o,i=eq(),a=e?i._week.dow:0,l=[];if(null!=n)return tj(t,(n+a)%7,r,"day");for(o=0;o<7;o++)l[o]=tj(t,(o+a)%7,r,"day");return l}tZ.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return L(r)?r.call(t,n):r},tZ.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(y).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},tZ.invalidDate=function(){return this._invalidDate},tZ.ordinal=function(e){return this._ordinal.replace("%d",e)},tZ.preparse=tW,tZ.postformat=tW,tZ.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return L(o)?o(e,t,n,r):o.replace(/%d/i,e)},tZ.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return L(n)?n(t):n.replace(/%s/i,t)},tZ.set=function(e){var t,n;for(n in e)o(e,n)&&(L(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},tZ.eras=function(e,n){var r,o,i,a=this._eras||eq("en")._eras;for(r=0,o=a.length;r=0)return l[r]},tZ.erasConvertYear=function(e,n){var r=e.since<=e.until?1:-1;return void 0===n?t(e.since).year():t(e.since).year()+(n-e.offset)*r},tZ.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||tx.call(this),e?this._erasAbbrRegex:this._erasRegex},tZ.erasNameRegex=function(e){return o(this,"_erasNameRegex")||tx.call(this),e?this._erasNameRegex:this._erasRegex},tZ.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||tx.call(this),e?this._erasNarrowRegex:this._erasRegex},tZ.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||em).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},tZ.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[em.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},tZ.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return eC.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(o=u([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e)||n&&"MMM"===t&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r},tZ.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ev.call(this),e)?this._monthsStrictRegex:this._monthsRegex:(o(this,"_monthsRegex")||(this._monthsRegex=ea),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},tZ.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ev.call(this),e)?this._monthsShortStrictRegex:this._monthsShortRegex:(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},tZ.week=function(e){return eb(e,this._week.dow,this._week.doy).week},tZ.firstDayOfYear=function(){return this._week.doy},tZ.firstDayOfWeek=function(){return this._week.dow},tZ.weekdays=function(e,t){var r=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ew(r,this._week.dow):e?r[e.day()]:r},tZ.weekdaysMin=function(e){return!0===e?ew(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},tZ.weekdaysShort=function(e){return!0===e?ew(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},tZ.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return eG.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=u([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e)||n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},tZ.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysStrictRegex:this._weekdaysRegex:(o(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},tZ.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysShortStrictRegex:this._weekdaysShortRegex:(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ea),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},tZ.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysMinStrictRegex:this._weekdaysMinRegex:(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ea),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},tZ.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tZ.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ez("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===eT(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),t.lang=_("moment.lang is deprecated. Use moment.locale instead.",ez),t.langData=_("moment.langData is deprecated. Use moment.localeData instead.",eq);var tz=Math.abs;function tJ(e,t,n,r){var o=tI(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function tq(e){return e<0?Math.floor(e):Math.ceil(e)}function tQ(e){return 4800*e/146097}function t0(e){return 146097*e/4800}function t1(e){return function(){return this.as(e)}}var t2=t1("ms"),t4=t1("s"),t6=t1("m"),t3=t1("h"),t8=t1("d"),t5=t1("w"),t7=t1("M"),t9=t1("Q"),ne=t1("y");function nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var nn=nt("milliseconds"),nr=nt("seconds"),no=nt("minutes"),ni=nt("hours"),na=nt("days"),ns=nt("months"),nl=nt("years"),nE=Math.round,nc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nu(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var nT=Math.abs;function nd(e){return(e>0)-(e<0)||+e}function nR(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,a,s,l=nT(this._milliseconds)/1e3,E=nT(this._days),c=nT(this._months),u=this.asSeconds();return u?(e=eu(l/60),t=eu(e/60),l%=60,e%=60,n=eu(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",i=nd(this._months)!==nd(u)?"-":"",a=nd(this._days)!==nd(u)?"-":"",s=nd(this._milliseconds)!==nd(u)?"-":"",o+"P"+(n?i+n+"Y":"")+(c?i+c+"M":"")+(E?a+E+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var nf=tc.prototype;return nf.isValid=function(){return this._isValid},nf.abs=function(){var e=this._data;return this._milliseconds=tz(this._milliseconds),this._days=tz(this._days),this._months=tz(this._months),e.milliseconds=tz(e.milliseconds),e.seconds=tz(e.seconds),e.minutes=tz(e.minutes),e.hours=tz(e.hours),e.months=tz(e.months),e.years=tz(e.years),this},nf.add=function(e,t){return tJ(this,e,t,1)},nf.subtract=function(e,t){return tJ(this,e,t,-1)},nf.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+tQ(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(t0(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw Error("Unknown unit "+e)}},nf.asMilliseconds=t2,nf.asSeconds=t4,nf.asMinutes=t6,nf.asHours=t3,nf.asDays=t8,nf.asWeeks=t5,nf.asMonths=t7,nf.asQuarters=t9,nf.asYears=ne,nf.valueOf=t2,nf._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*tq(t0(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=eu(i/1e3),l.seconds=e%60,t=eu(e/60),l.minutes=t%60,n=eu(t/60),l.hours=n%24,a+=eu(n/24),s+=o=eu(tQ(a)),a-=tq(t0(o)),r=eu(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},nf.clone=function(){return tI(this)},nf.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():NaN},nf.milliseconds=nn,nf.seconds=nr,nf.minutes=no,nf.hours=ni,nf.days=na,nf.weeks=function(){return eu(this.days()/7)},nf.months=ns,nf.years=nl,nf.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o,i,a,s,l,E,c,u,T,d,R,f=!1,A=nc;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(f=e),"object"==typeof t&&(A=Object.assign({},nc,t),null!=t.s&&null==t.ss&&(A.ss=t.s-1)),d=this.localeData(),n=!f,r=A,i=nE((o=tI(this).abs()).as("s")),a=nE(o.as("m")),s=nE(o.as("h")),l=nE(o.as("d")),E=nE(o.as("M")),c=nE(o.as("w")),u=nE(o.as("y")),T=i<=r.ss&&["s",i]||i0,T[4]=d,R=nu.apply(null,T),f&&(R=d.pastFuture(+this,R)),d.postformat(R)},nf.toISOString=nR,nf.toString=nR,nf.toJSON=nR,nf.locale=ty,nf.localeData=tM,nf.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nR),nf.lang=tD,U("X",0,0,"unix"),U("x",0,0,"valueOf"),eE("x",er),eE("X",/[+-]?\d+(\.\d{1,3})?/),eR("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),eR("x",function(e,t,n){n._d=new Date(eT(e))}),//! moment.js -t.version="2.30.1",B=ti,t.fn=t$,t.min=function(){var e=[].slice.call(arguments,0);return tl("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return tl("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=u,t.unix=function(e){return ti(1e3*e)},t.months=function(e,t){return tX(e,t,"months")},t.isDate=l,t.locale=ez,t.invalid=R,t.duration=tI,t.isMoment=I,t.weekdays=function(e,t,n){return tK(e,t,n,"weekdays")},t.parseZone=function(){return ti.apply(null,arguments).parseZone()},t.localeData=eq,t.isDuration=tu,t.monthsShort=function(e,t){return tX(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return tK(e,t,n,"weekdaysMin")},t.defineLocale=eJ,t.updateLocale=function(e,t){if(null!=t){var n,r,o=eW;null!=eZ[e]&&null!=eZ[e].parentLocale?eZ[e].set(g(eZ[e]._config,t)):(null!=(r=eK(e))&&(o=r._config),t=g(o,t),null==r&&(t.abbr=e),(n=new v(t)).parentLocale=eZ[e],eZ[e]=n),ez(e)}else null!=eZ[e]&&(null!=eZ[e].parentLocale?(eZ[e]=eZ[e].parentLocale,e===ez()&&ez(e)):null!=eZ[e]&&delete eZ[e]);return eZ[e]},t.locales=function(){return k(eZ)},t.weekdaysShort=function(e,t,n){return tK(e,t,n,"weekdaysShort")},t.normalizeUnits=F,t.relativeTimeRounding=function(e){return void 0===e?nE:"function"==typeof e&&(nE=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==nc[e]&&(void 0===t?nc[e]:(nc[e]=t,"s"===e&&(nc.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},t.prototype=t$,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}()},69654:function(e){var t;t=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach(function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)})}function o(){this.reset("")}function i(e,t,i){if(e instanceof r)var a=e,i=t;else var a=r.fromCompiled(e,t);for(var s in this.grammar=a,this.options={keepHistory:!1,lexer:a.lexer||new o},i||{})this.options[s]=i[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(a,0);this.table=[l],l.wants[a.start]=[],l.predict(a.start),l.process(),this.current=0}function a(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";else throw Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(a).join(" "):this.symbols.slice(0,e).map(a).join(" ")+" ● "+this.symbols.slice(e).map(a).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do e.push(t.right.data),t=t.left;while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,i.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,o=0;o0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+a)),n=a}},i.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);else throw Error("Unknown symbol type: "+e)}}(e)},i.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),o=this.buildFirstStateStack(n,r);return null===o?null:[e].concat(o)},i.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},i.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},i.prototype.rewind=function(e){if(!this.options.keepHistory)throw Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},i.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach(function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==i.fail&&e.push(n)}),e.map(function(e){return e.data})},{Parser:i,Grammar:r,Rule:e}},e.exports?e.exports=t():this.nearley=t()},83454:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(26466)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return u},p:function(){return c}});var r=n(85893),o=n(76212),i=n(62418),a=n(25519),s=n(65654),l=n(39332),E=n(67294);let c=(0,E.createContext)({mode:"light",scene:"",chatId:"",model:"",modelList:[],dbParam:void 0,dialogueList:[],agent:"",setAgent:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,setMode:()=>void 0,history:[],setHistory:()=>{},docId:void 0,setDocId:()=>{},currentDialogInfo:{chat_scene:"",app_code:""},setCurrentDialogInfo:()=>{},adminList:[],refreshDialogList:()=>{}}),u=e=>{var t,n,u;let{children:T}=e,d=(0,l.useSearchParams)(),R=null!==(t=null==d?void 0:d.get("id"))&&void 0!==t?t:"",f=null!==(n=null==d?void 0:d.get("scene"))&&void 0!==n?n:"",A=null!==(u=null==d?void 0:d.get("db_param"))&&void 0!==u?u:"",[S,O]=(0,E.useState)(!1),[p,N]=(0,E.useState)(""),[I,h]=(0,E.useState)("chat_dashboard"!==f),[_,m]=(0,E.useState)(A),[C,L]=(0,E.useState)(""),[g,v]=(0,E.useState)([]),[P,y]=(0,E.useState)(),[D,M]=(0,E.useState)("light"),[b,U]=(0,E.useState)([]),[w,x]=(0,E.useState)({chat_scene:"",app_code:""}),{data:G=[]}=(0,s.Z)(async()=>{let[,e]=await (0,o.Vx)((0,o.Vw)());return null!=e?e:[]}),{run:F}=(0,s.Z)(async()=>{let[,e]=await (0,o.Vx)((0,o.WA)({role:"admin"}));return null!=e?e:[]},{onSuccess:e=>{U(e)},manual:!0});return(0,E.useEffect)(()=>{(0,i.n5)()&&F()},[F,(0,i.n5)()]),(0,E.useEffect)(()=>{M(function(){let e=localStorage.getItem(a.he);return e||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}());try{let e=JSON.parse(localStorage.getItem("cur_dialog_info")||"");x(e)}catch(e){x({chat_scene:"",app_code:""})}},[]),(0,E.useEffect)(()=>{N(G[0])},[G,null==G?void 0:G.length]),(0,r.jsx)(c.Provider,{value:{isContract:S,isMenuExpand:I,scene:f,chatId:R,model:p,modelList:G,dbParam:_||A,agent:C,setAgent:L,mode:D,setMode:M,setModel:N,setIsContract:O,setIsMenuExpand:h,setDbParam:m,history:g,setHistory:v,docId:P,setDocId:y,currentDialogInfo:w,setCurrentDialogInfo:x,adminList:b},children:T})}},64371:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(36609),o=n(67421);r.ZP.use(o.Db).init({resources:{en:{translation:{chat_online:"chat Online",dialog_list:"Dialog List",delete_chat:"Delete Chat",delete_chat_confirm:"Are you sure you want to delete this chat?",input_tips:"Ask me anything, Shift + Enter newline",sent:"Sent",answer_again:"Answer again",feedback_tip:"Describe specific questions or better answers",thinking:"Thinking",stop_replying:"Stop replying",erase_memory:"Erase Memory",copy_nothing:"Content copied is empty",copy_success:"Copy success",copy_failed:"Copy failed",file_tip:"File cannot be changed after upload",file_upload_tip:"Upload file to chat(Your model must support multimodal input)",assistant:"Platform Assistant",model_tip:"Model selection is not supported for the current application",temperature_tip:"The current application does not support temperature configuration",max_new_tokens_tip:"The current application does not support max_new_tokens configuration",extend_tip:"Extended configuration is not supported for the current application",cot_title:"Thoughts",code_preview:"Preview",code_preview_full_screen:"Full Screen",code_preview_exit_full_screen:"Exit Full Screen",code_preview_code:"Code",code_preview_copy:"Copy",code_preview_already_copied:"Already Copied",code_preview_download:"Download",code_preview_run:"Run",code_preview_close:"Close",Upload_Data_Successfully:"file uploaded successfully",Upload_Data_Failed:"file upload failed",Upload_Data:"Upload Data",Code_Editor:"Code Editor",Open_Code_Editor:"Open Code Editor",Export_Flow_Success:"Export flow success",Import_Flow_Success:"Import flow success",Import:"Import",Export:"Export",Import_Flow:"Import Flow",Export_Flow:"Export Flow",Select_File:"Select File",Save_After_Import:"Save after import",Export_File_Type:"File_Type",Export_File_Format:"File_Format",Yes:"Yes",No:"No",Please_Add_Nodes_First:"Please add nodes first",Add_Global_Variable_of_Flow:"Add global variable of flow",Add_Parameter:"Add Parameter",Higher_Order_Nodes:"Higher Order",All_Nodes:"All",Import_From_Template:"Import from template",Template_Description:"Description",Template_Name:"Template Name",Template_Label:"Label",Template_Action:"Action",minimum_dynamic_fields_warning:"Please keep more than one dynamic field",Knowledge_Space:"Knowledge",space:"space",Vector:"Vector",Owner:"Owner",Count:"Count",File_type_Invalid:"The file type is invalid",Knowledge_Space_Config:"Space Config",Choose_a_Datasource_type:"Datasource type",Segmentation:"Segmentation",No_parameter:"No segementation parameter required.",Knowledge_Space_Name:"Knowledge Space Name",Please_input_the_name:"Please input the name",Please_input_the_owner:"Please input the owner",Please_select_file:"Please select one file",Description:"Description",Storage:"Storage",Domain:"Domain",Please_input_the_description:"Please input the description",Please_select_the_storage:"Please select the storage",Please_select_the_domain_type:"Please select the domain type",Next:"Next",the_name_can_only_contain:'the name can only contain numbers, letters, Chinese characters, "-" and "_"',Text:"Text","Fill your raw text":"Fill your raw text",URL:"URL",Fetch_the_content_of_a_URL:"Fetch the content of a URL",Document:"Document",Upload_a_document:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown, Zip",Name:"Name",Text_Source:"Text Source(Optional)",Please_input_the_text_source:"Please input the text source",Sync:"Sync",Back:"Back",Finish:"Finish",Web_Page_URL:"Web Page URL",Please_input_the_Web_Page_URL:"Please input the Web Page URL",Select_or_Drop_file:"Select or Drop file",Documents:"Documents",Chat:"Chat",Add_Datasource:"Add Datasource",View_Graph:"View Graph",Arguments:"Arguments",Type:"Type",Size:"Size",Last_Sync:"Last Sync",Status:"Status",Result:"Result",Details:"Details",Delete:"Delete",Operation:"Operation",Submit:"Submit",Chunks:"Chunks",Content:"Content",Meta_Data:"Meta Data",Please_select_a_file:"Please select a file",Please_input_the_text:"Please input the text",Embedding:"Embedding",topk:"topk",the_top_k_vectors:"the top k vectors based on similarity score",recall_score:"recall_score",Set_a_threshold_score:"Set a threshold score for the retrieval of similar vectors",recall_type:"recall_type",model:"model",A_model_used:"A model used to create vector representations of text or other data",Automatic:"Automatic",Process:"Process",Automatic_desc:"Automatically set segmentation and preprocessing rules.",chunk_size:"chunk_size",The_size_of_the_data_chunks:"The size of the data chunks used in processing",chunk_overlap:"chunk_overlap",The_amount_of_overlap:"The amount of overlap between adjacent data chunks",Prompt:"Prompt",scene:"scene",A_contextual_parameter:"A contextual parameter used to define the setting or environment in which the prompt is being used",template:"template",structure_or_format:"A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.",max_token:"max_token",max_iteration:"max_iteration",concurrency_limit:"concurrency_limit",The_maximum_number_of_tokens:"The maximum number of tokens or words allowed in a prompt",Theme:"Theme",database_type:"Database Type",edit_database:"Edit Datasource",add_database:"Add Datasource",create_success:"Create success",create_failed:"Create failed",please_select_database_type:"Please select database type",select_database_type:"Select database type",description:"Description",input_description:"Please input description",Port:"Port",Username:"Username",Password:"Password",Remark:"Remark",Edit:"Edit",Database:"Database",Data_Source:"Data Center",Close_Sidebar:"Fold",Show_Sidebar:"UnFold",language:"Language",choose_model:"Please choose a model",data_center_desc:"DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.",create_database:"Create Database",create_knowledge:"Create Knowledge",path:"Path",model_manage:"Models",create_model:"Create Model",model_select_tips:"Please select a model",language_select_tips:"Please select a language",submit:"Submit",close:"Close",stop_model:"Stop Model",stop_model_success:"Stop model success",start_model:"Start Model",start_model_success:"Start model success",stop_and_delete_model:"Stop and Delete Model",stop_and_delete_model_success:"Stop and delete model success",confirm_start_model:"Are you sure you want to start the model?, model name:",confirm_stop_model:"Are you sure you want to stop the model?, model name:",confirm_stop_and_delete_model:"Are you sure you want to stop and delete the model?, model name:",worker_type_select_tips:"Please select a worker type",model_select_worker_type:"Select worker type",download_model_tip:"Please download model first.",start_model_failed:"Start model failed",provider_select_tips:"Please select a provider",model_select_provider:"Please select a provider",model_please_input_name:"Please input the name",model_select_or_input_model:"Select or input model name",model_deploy_name:"Model Name",Plugins:"Plugins",try_again:"Try again",no_data:"No data",Open_Sidebar:"Unfold",verify:"Verify",cancel:"Cancel",Edit_Success:"Edit Success",Add:"Add",Add_Success:"Add Success",Error_Message:"Something Error",Please_Input:"Please Input",Prompt_Info_Scene:"Scene",Prompt_Info_Sub_Scene:"Sub Scene",Prompt_Info_Name:"Name",Prompt_Info_Content:"Content",Public:"Public",Private:"Private",Lowest:"Lowest",Missed:"Missed",Lost:"Lost",Incorrect:"Incorrect",Verbose:"Verbose",Best:"Best",Rating:"Rating",Q_A_Category:"Q&A Category",Q_A_Rating:"Q&A Rating",feed_back_desc:"0: No results\n1: Results exist, but they are irrelevant, the question is not understood\n2: Results exist, the question is understood, but it indicates that the question cannot be answered\n3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n",input_count:"Total input",input_unit:"characters",Click_Select:"Click&Select",Quick_Start:"Quick Start",Select_Plugins:"Select Plugins",Search:"Search",Update_From_Github:"Upload From Github",Reset:"Reset",Upload:"Upload",Market_Plugins:"Market Plugin",My_Plugins:"My Plugins",Del_Knowledge_Tips:"Do you want delete the Space",Del_Document_Tips:"Do you want delete the Document",Tips:"Tips",Limit_Upload_File_Count_Tips:"Only one file can be uploaded at a time",To_Plugin_Market:"Go to the Plugin Market",Summary:"Summary",stacked_column_chart:"Stacked Column",column_chart:"Column",percent_stacked_column_chart:"Percent Stacked Column",grouped_column_chart:"Grouped Column",time_column:"Time Column",pie_chart:"Pie",line_chart:"Line",area_chart:"Area",stacked_area_chart:"Stacked Area",scatter_plot:"Scatter",bubble_chart:"Bubble",stacked_bar_chart:"Stacked Bar",bar_chart:"Bar",percent_stacked_bar_chart:"Percent Stacked Bar",grouped_bar_chart:"Grouped Bar",water_fall_chart:"Waterfall",table:"Table",multi_line_chart:"Multi Line",multi_measure_column_chart:"Multi Measure Column",multi_measure_line_chart:"Multi Measure Line",Advices:"Advices",Retry:"Retry",Load_more:"load more",new_chat:"New Chat",choice_agent_tip:"Please choose an agent",no_context_tip:"Please enter your question",Terminal:"Terminal",used_apps:"Used Apps",app_in_mind:"Don't have an app in mind? to",explore:"Explore",Discover_more:"Discove more",sdk_insert:"SDK Insert",my_apps:"My Apps",awel_flow:"AWEL Flow",save:"Save",add_node:"Add Node",no_node:"No Node",connect_warning:"Nodes cannot be connected",flow_modal_title:"Save Flow",flow_name:"Flow Name",flow_description:"Flow Description",flow_name_required:"Please enter the flow name",flow_description_required:"Please enter the flow description",save_flow_success:"Save flow success",delete_flow_confirm:"Are you sure you want to delete this flow?",related_nodes:"Related Nodes",add_resource:"Add Resource",team_modal:"Work Modal",App:"App",resource_name:"Resource Name",resource_type:"Resource Type",resource_value:"Value",resource_dynamic:"Dynamic",Please_input_the_work_modal:"Please select the work modal",available_resources:" Available Resources",edit_new_applications:"Edit new applications",collect:"Collect",collected:"Collected",create:"Create",Agents:"Agents",edit_application:"edit application",add_application:"add application",app_name:"App Name",input_app_name:"Please enter the application name",LLM_strategy:"LLM Strategy",LLM_strategy_value:"LLM Strategy Value",please_select_LLM_strategy:"Please select LLM strategy",please_select_LLM_strategy_value:"Please select LLM strategy value",resource:"Resource",operators:"Operators",Chinese:"Chinese",English:"English",docs:"Docs",apps:"All Apps",please_enter_the_keywords:"Please enter the keywords",input_tip:"Please select the model and enter the description to start quickly",create_app:"Create App",copy_url:"Click the Copy Share link",double_click_open:"Double click on Nail nail to open",construct:" Construct App",chat_online:"Chat",recommend_apps:"Recommend",all_apps:"All",latest_apps:"Latest",my_collected_apps:"Collected",collect_success:"Collect success",cancel_success:"Cancel success",published:"Published",unpublished:"Unpublished",start_chat:"Chat",native_app:"Native app",temperature:"Temperature",max_new_tokens:"Max output tokens",create_flow:"Create flow",update:"Update",native_type:"App type",refreshSuccess:"Refresh Success",Download:"Download",app_type_select:"Please select app type",please_select_param:"Please select parameters",please_select_model:"Please select model",please_input_temperature:"Please input the temperature value",please_input_max_new_tokens:"Please input the max new tokens",select_workflow:"Select workflow",please_select_workflow:"Please select workflow",recommended_questions:"Recommended questions",question:"Question",please_input_recommended_questions:"Please input recommendation question",is_effective:"Whether to enable",add_question:"Add question",update_success:"Update successful",update_failed:"Update failed",please_select_prompt:"Please select a prompt",details:"Details",choose:"Choose",please_choose:"Please choose",want_delete:"Are you sure delete it?",success:"Success",input_parameter:"Input parameter",output_structure:"Output structure",User_input:"User input",LLM_test:"LLM test",Output_verification:"Output verification",select_scene:"Please select a scene",select_type:"Please select a type",Please_complete_the_input_parameters:"Please complete the input parameters",Please_fill_in_the_user_input:"Please fill in the user input",help:"I can help you:",Refresh_status:"Refresh status",Recall_test:"Recall test",synchronization:"One-key synchronization",Synchronization_initiated:"Synchronization has been initiated, please wait",Edit_document:"Edit document",Document_name:"Document name",Correlation_problem:"Correlation problem",Add_problem:"Add problem",New_knowledge_base:"New knowledge base",yuque:"yuque document",Get_yuque_document:"Get the contents of the Sparrow document",document_url:"Document address",input_document_url:"Please enter the document address",Get_token:"Please obtain the team knowledge base token first",Reference_link:"Reference link",document_token:"Document token",input_document_token:"Please enter document token",input_question:"Please enter a question",detail:"Detail",Manual_entry:"Manual entry",Data_content:"Data content",Main_content:"Main content",Auxiliary_data:"Auxiliary data",enter_question_first:"Please enter the question first",Update_successfully:"Update successfully",Create_successfully:"Create successfully",Update_failure:"Update failure",Create_failure:"Create failure",View_details:"View details",All:"All",Please_input_prompt_name:"Please input prompt name",Copy_Btn:"Copy",copy_to_clipboard:"Copy to clipboard",copy_to_clipboard_success:"Copy to clipboard success",copy_to_clipboard_failed:"Copy to clipboard failed",Delete_Btn:"Delete",publish:"Publish",unpublish:"Unpublished",publish_desc:"Are you sure about releasing the application?",unPublish_desc:"Are you sure you want to unpublish this application?",published_success:"Published Success",dbgpts_community:"DBGPTS Community",community_dbgpts:"Community DBGPTS",my_dbgpts:"My DBGPTS",Refresh_dbgpts:"Refresh from the community Git repository",workflow:"Workflow",resources:"Resources",app:"App",please_select_resource_type:"Please select resource type"}},zh:{translation:{dialog_list:"对话列表",delete_chat:"删除会话",delete_chat_confirm:"您确认要删除会话吗?",input_tips:"可以问我任何问题,shift + Enter 换行",sent:"发送",answer_again:"重新回答",feedback_tip:"描述一下具体问题或更优的答案",thinking:"正在思考中",stop_replying:"停止回复",erase_memory:"清除记忆",copy_success:"复制成功",copy_failed:"复制失败",copy_nothing:"内容复制为空",file_tip:"文件上传后无法更改",file_upload_tip:"上传文件到对话(您的模型必须支持多模态输入)",chat_online:"在线对话",assistant:"平台小助手",model_tip:"当前应用暂不支持模型选择",temperature_tip:"当前应用暂不支持温度配置",max_new_tokens_tip:"当前应用暂不支持max_new_tokens配置",extend_tip:"当前应用暂不支持拓展配置",cot_title:"思考",code_preview:"预览",code_preview_full_screen:"全屏",code_preview_exit_full_screen:"退出全屏",code_preview_code:"代码",code_preview_copy:"复制",code_preview_already_copied:"已复制",code_preview_download:"下载",code_preview_run:"运行",code_preview_close:"关闭",Upload_Data_Successfully:"文件上传成功",Upload_Data_Failed:"文件上传失败",Upload_Data:"上传数据",Code_Editor:"代码编辑器",Open_Code_Editor:"打开代码编辑器",Export_Flow_Success:"导出工作流成功",Import_Flow_Success:"导入工作流成功",Import:"导入",Export:"导出",Import_Flow:"导入工作流",Export_Flow:"导出工作流",Select_File:"选择文件",Save_After_Import:"导入后保存",Export_File_Type:"文件类型",Export_File_Format:"文件格式",Yes:"是",No:"否",Please_Add_Nodes_First:"请先添加节点",Add_Global_Variable_of_Flow:"添加 Flow 全局变量",Add_Parameter:"添加参数",Higher_Order_Nodes:"高阶",All_Nodes:"所有",Import_From_Template:"导入模版",Template_Description:"描述",Template_Name:"模版名称",Template_Label:"标签",Template_Action:"操作",minimum_dynamic_fields_warning:"请保留一个以上的动态字段",Knowledge_Space:"知识库",space:"知识库",Vector:"向量",Owner:"创建人",Count:"文档数",File_type_Invalid:"文件类型错误",Knowledge_Space_Config:"知识库配置",Choose_a_Datasource_type:"知识库类型",Segmentation:"分片",No_parameter:"不需要配置分片参数",Knowledge_Space_Name:"知识库名称",Please_input_the_name:"请输入名称",Please_input_the_owner:"请输入创建人",Please_select_file:"请至少选择一个文件",Description:"描述",Storage:"存储类型",Domain:"领域类型",Please_input_the_description:"请输入描述",Please_select_the_storage:"请选择存储类型",Please_select_the_domain_type:"请选择领域类型",Next:"下一步",the_name_can_only_contain:"名称只能包含数字、字母、中文字符、-或_",Text:"文本","Fill your raw text":"填写您的原始文本",URL:"网址",Fetch_the_content_of_a_URL:"获取 URL 的内容",Document:"文档",Upload_a_document:"上传文档,文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown、Zip",Name:"名称",Text_Source:"文本来源(可选)",Please_input_the_text_source:"请输入文本来源",Sync:"同步",Back:"上一步",Finish:"完成",Web_Page_URL:"网页网址",Please_input_the_Web_Page_URL:"请输入网页网址",Select_or_Drop_file:"选择或拖拽文件",Documents:"文档",Chat:"对话",Add_Datasource:"添加数据源",View_Graph:"查看图谱",Arguments:"参数",Type:"类型",Size:"切片",Last_Sync:"上次同步时间",Status:"状态",Result:"结果",Details:"明细",Delete:"删除",Operation:"操作",Submit:"提交",close:"关闭",Chunks:"切片",Content:"内容",Meta_Data:"元数据",Please_select_a_file:"请上传一个文件",Please_input_the_text:"请输入文本",Embedding:"嵌入",topk:"TopK",the_top_k_vectors:"基于相似度得分的前 k 个向量",recall_score:"召回分数",Set_a_threshold_score:"设置相似向量检索的阈值分数",recall_type:"召回类型",model:"模型",A_model_used:"用于创建文本或其他数据的矢量表示的模型",Automatic:"自动切片",Process:"切片处理",Automatic_desc:"自动设置分割和预处理规则。",chunk_size:"块大小",The_size_of_the_data_chunks:"处理中使用的数据块的大小",chunk_overlap:"块重叠",The_amount_of_overlap:"相邻数据块之间的重叠量",scene:"场景",A_contextual_parameter:"用于定义使用提示的设置或环境的上下文参数",template:"模板",structure_or_format:"预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。",max_token:"最大令牌",max_iteration:"最大迭代",concurrency_limit:"并发限制",The_maximum_number_of_tokens:"提示中允许的最大标记或单词数",Theme:"主题",database_type:"数据库类型",edit_database:"编辑数据源",add_database:"添加数据源",update_success:"更新成功",update_failed:"更新失败",create_success:"创建成功",create_failed:"创建失败",please_select_database_type:"请选择数据库类型",select_database_type:"选择数据库类型",description:"描述",input_description:"请输入描述",Port:"端口",Username:"用户名",Password:"密码",Remark:"备注",Edit:"编辑",Database:"数据库",Data_Source:"数据中心",Close_Sidebar:"收起",Show_Sidebar:"展开",language:"语言",choose_model:"请选择一个模型",data_center_desc:"DB-GPT支持数据库交互和基于文档的对话,它还提供了一个用户友好的数据中心管理界面。",create_database:"创建数据库",create_knowledge:"创建知识库",create_flow:"创建工作流",path:"路径",model_manage:"模型管理",create_model:"创建模型",model_select_tips:"请选择一个模型",submit:"提交",stop_model:"停止模型",stop_model_success:"模型停止成功",start_model:"启动模型",start_model_success:"启动模型成功",stop_and_delete_model:"停止并删除模型",stop_and_delete_model_success:"停止并删除模型成功",confirm_start_model:"确定要启动模型? 模型名:",confirm_stop_model:"确定要停止模型? 模型名:",confirm_stop_and_delete_model:"确定要停止并删除模型? 模型名:",worker_type_select_tips:"请选择一个worker类型",model_select_worker_type:"选择worker类型",download_model_tip:"请先下载模型!",start_model_failed:"启动模型失败",provider_select_tips:"请选择一个模型提供商",model_select_provider:"请选择一个模型提供商",model_please_input_name:"请输入模型名称",model_select_or_input_model:"选择或输入模型名称",model_deploy_name:"模型名称",Plugins:"插件列表",try_again:"刷新重试",no_data:"暂无数据",Prompt:"提示词",Open_Sidebar:"展开",verify:"确认",cancel:"取消",Edit_Success:"编辑成功",Add:"新增",Add_Success:"新增成功",Error_Message:"出错了",Please_Input:"请输入",Prompt_Info_Scene:"场景",Prompt_Info_Sub_Scene:"次级场景",Prompt_Info_Name:"名称",Prompt_Info_Content:"内容",Public:"公共",Private:"私有",Lowest:"渣渣",Missed:"没理解",Lost:"答不了",Incorrect:"答错了",Verbose:"较啰嗦",Best:"真棒",Rating:"评分",Q_A_Category:"问答类别",Q_A_Rating:"问答评分",feed_back_desc:"0: 无结果\n1: 有结果,但是在文不对题,没有理解问题\n2: 有结果,理解了问题,但是提示回答不了这个问题\n3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n",input_count:"共计输入",input_unit:"字",Click_Select:"点击选择",Quick_Start:"快速开始",Select_Plugins:"选择插件",Search:"搜索",Reset:"重置",Update_From_Github:"更新Github插件",Upload:"上传",Market_Plugins:"插件市场",My_Plugins:"我的插件",Del_Knowledge_Tips:"你确定删除该知识库吗",Del_Document_Tips:"你确定删除该文档吗",Tips:"提示",Limit_Upload_File_Count_Tips:"一次只能上传一个文件",To_Plugin_Market:"前往插件市场",Summary:"总结",stacked_column_chart:"堆叠柱状图",column_chart:"柱状图",percent_stacked_column_chart:"百分比堆叠柱状图",grouped_column_chart:"簇形柱状图",time_column:"簇形柱状图",pie_chart:"饼图",line_chart:"折线图",area_chart:"面积图",stacked_area_chart:"堆叠面积图",scatter_plot:"散点图",bubble_chart:"气泡图",stacked_bar_chart:"堆叠条形图",bar_chart:"条形图",percent_stacked_bar_chart:"百分比堆叠条形图",grouped_bar_chart:"簇形条形图",water_fall_chart:"瀑布图",table:"表格",multi_line_chart:"多折线图",multi_measure_column_chart:"多指标柱形图",multi_measure_line_chart:"多指标折线图",Advices:"自动推荐",Retry:"重试",Load_more:"加载更多",new_chat:"创建会话",choice_agent_tip:"请选择代理",no_context_tip:"请输入你的问题",Terminal:"终端",used_apps:"最近使用",app_in_mind:"没有心仪的应用?去",explore:"探索广场",Discover_more:"发现更多",sdk_insert:"SDK接入",my_apps:"我的应用",awel_flow:"AWEL 工作流",save:"保存",add_node:"添加节点",no_node:"没有可编排节点",connect_warning:"节点无法连接",flow_modal_title:"保存工作流",flow_name:"工作流名称",flow_description:"工作流描述",flow_name_required:"请输入工作流名称",flow_description_required:"请输入工作流描述",save_flow_success:"保存工作流成功",delete_flow_confirm:"确定删除该工作流吗?",related_nodes:"关联节点",language_select_tips:"请选择语言",add_resource:"添加资源",team_modal:"工作模式",App:"应用程序",resource:"资源",resource_name:"资源名",resource_type:"资源类型",resource_value:"参数",resource_dynamic:"动态",Please_input_the_work_modal:"请选择工作模式",available_resources:"可用资源",edit_new_applications:"编辑新的应用",collect:"收藏",collected:"已收藏",create:"创建",Agents:"智能体",edit_application:"编辑应用",add_application:"添加应用",app_name:"应用名称",input_app_name:"请输入应用名称",LLM_strategy:"模型策略",please_select_LLM_strategy:"请选择模型策略",LLM_strategy_value:"模型策略参数",please_select_LLM_strategy_value:"请选择模型策略参数",operators:"算子",Chinese:"中文",English:"英文",docs:"文档",apps:"全部",please_enter_the_keywords:"请输入关键词",input_tip:"请选择模型,输入描述快速开始",create_app:"创建应用",copy_url:"单击复制分享链接",double_click_open:"双击钉钉打开",construct:"应用管理",chat_online:"在线对话",recommend_apps:"热门推荐",all_apps:"全部应用",latest_apps:"最新应用",my_collected_apps:"我的收藏",collect_success:"收藏成功",cancel_success:"取消成功",published:"已发布",unpublished:"未发布",start_chat:"开始对话",native_app:"原生应用",native_type:"应用类型",temperature:"温度",max_new_tokens:"最大输出token",update:"更新",refreshSuccess:"刷新成功",Download:"下载",app_type_select:"请选择应用类型",please_select_param:"请选择参数",please_select_model:"请选择模型",please_input_temperature:"请输入temperature值",please_input_max_new_tokens:"请输入max_new_tokens值",select_workflow:"选择工作流",please_select_workflow:"请选择工作流",recommended_questions:"推荐问题",question:"问题",please_input_recommended_questions:"请输入推荐问题",is_effective:"是否生效",add_question:"添加问题",please_select_prompt:"请选择一个提示词",details:"详情",choose:"选择",please_choose:"请先选择",want_delete:"你确定要删除吗?",success:"成功",input_parameter:"输入参数",output_structure:"输出结构",User_input:"用户输入",LLM_test:"LLM测试",Output_verification:"输出验证",select_scene:"请选择场景",select_type:"请选择类型",Please_complete_the_input_parameters:"请填写完整的输入参数",Please_fill_in_the_user_input:"请填写用户输入内容",help:"我可以帮您:",Refresh_status:"刷新状态",Recall_test:"召回测试",synchronization:"一键同步",Synchronization_initiated:"同步已发起,请稍后",Edit_document:"编辑文档",Document_name:"文档名",Correlation_problem:"关联问题",Add_problem:"添加问题",New_knowledge_base:"新增知识库",yuque:"语雀文档",Get_yuque_document:"获取语雀文档的内容",document_url:"文档地址",input_document_url:"请输入文档地址",Get_token:"请先获取团队知识库token,token获取",Reference_link:"参考链接",document_token:"文档token",input_document_token:"请输入文档token",input_question:"请输入问题",detail:"详情",Manual_entry:"手动录入",Data_content:"数据内容",Main_content:"主要内容",Auxiliary_data:"辅助数据",enter_question_first:"请先输入问题",Update_successfully:"更新成功",Create_successfully:"创建成功",Update_failure:"更新失败",Create_failure:"创建失败",View_details:"查看详情",All:"全部",Please_input_prompt_name:"请输入prompt名称",Copy_Btn:"复制",Delete_Btn:"删除",copy_to_clipboard:"复制到剪贴板",copy_to_clipboard_success:"复制到剪贴板成功",copy_to_clipboard_failed:"复制到剪贴板失败",publish:"发布",unpublish:"取消发布",publish_desc:"您确认发布该应用吗?",unPublish_desc:"您确认取消发布该应用吗?",published_success:"发布成功",dbgpts_community:"DBGPTS社区",community_dbgpts:"社区DBGPTS",my_dbgpts:"我的DBGPTS",Refresh_dbgpts:"从社区Git仓库刷新",workflow:"工作流",resources:"资源",app:"应用",please_select_resource_type:"请选择资源类型"}}},lng:"en",interpolation:{escapeValue:!1}});var i=r.ZP},89546:function(e,t,n){"use strict";n.d(t,{A:function(){return o},Ir:function(){return s},Jr:function(){return i},Ty:function(){return l},zx:function(){return a}});var r=n(76212);let o=e=>(0,r.HT)("/api/v1/question/list",e),i=()=>(0,r.HT)("/api/v1/conv/feedback/reasons"),a=e=>(0,r.a4)("/api/v1/conv/feedback/add",e),s=e=>(0,r.a4)("/api/v1/conv/feedback/cancel",e),l=e=>(0,r.a4)("/api/v1/chat/topic/terminate?conv_id=".concat(e.conv_id,"&round_index=").concat(e.round_index),e)},76212:function(e,t,n){"use strict";n.d(t,{yY:function(){return tm},HT:function(){return tI},a4:function(){return th},uO:function(){return t_},L5:function(){return l},H_:function(){return eL},zd:function(){return b},Hy:function(){return ee},be:function(){return eg},TT:function(){return Z},Vx:function(){return tA},Ir:function(){return p.Ir},fU:function(){return J},zR:function(){return ep},mo:function(){return e0},kg:function(){return D},NY:function(){return ex},Nl:function(){return e5},$E:function(){return m},MX:function(){return eN},n3:function(){return eb},Wd:function(){return g},XK:function(){return eU},Jq:function(){return G},$j:function(){return en},Ug:function(){return C},XI:function(){return L},k7:function(){return j},zx:function(){return p.zx},j8:function(){return u},GQ:function(){return S},BN:function(){return e3},yk:function(){return c},Vd:function(){return T},m9:function(){return A},Tu:function(){return eI},Eb:function(){return eq},Lu:function(){return eJ},$i:function(){return eS},gV:function(){return eM},iZ:function(){return ev},a$:function(){return I},Bw:function(){return es},t$:function(){return el},H4:function(){return ez},iP:function(){return eR},_Q:function(){return em},Wm:function(){return v},Jr:function(){return p.Jr},_d:function(){return w},As:function(){return F},MJ:function(){return Y},Wf:function(){return U},FT:function(){return eC},RR:function(){return k},Kt:function(){return P},fZ:function(){return ew},tM:function(){return f},xA:function(){return er},RX:function(){return d},Q5:function(){return e2},i1:function(){return R},mB:function(){return e7},Vm:function(){return e_},xv:function(){return eH},lz:function(){return s},Vw:function(){return ef},gt:function(){return V},_Y:function(){return B},Gn:function(){return eo},Jx:function(){return $},sW:function(){return ei},DM:function(){return ek},v6:function(){return eZ},N6:function(){return e$},bC:function(){return eB},YU:function(){return eX},VC:function(){return eQ},qn:function(){return eO},vD:function(){return eA},b_:function(){return eu},J5:function(){return eE},mR:function(){return ec},yx:function(){return ed},KS:function(){return eT},zE:function(){return eV},Al:function(){return ej},YP:function(){return eW},uf:function(){return eY},l_:function(){return eK},GU:function(){return Q},pm:function(){return q},b1:function(){return e4},WA:function(){return tS},UO:function(){return K},Y2:function(){return z},Pg:function(){return X},mW:function(){return e8},ks:function(){return H},iH:function(){return eh},ey:function(){return W},YK:function(){return y},vA:function(){return eF},kU:function(){return eG},Ty:function(){return p.Ty},KL:function(){return ey},Hx:function(){return eP},gD:function(){return e1},Fq:function(){return e6},KT:function(){return E},p$:function(){return O},w_:function(){return M},ao:function(){return x},Fu:function(){return et},h:function(){return h},L$:function(){return _},iG:function(){return eD}});var r,o=n(62418),i=n(25519),a=n(87066);let s=()=>tI("/api/v1/team-mode/list"),l=e=>th("/api/v1/app/create",e),E=e=>th("/api/v1/app/edit",e),c=e=>th("/api/v1/app/list?page=".concat(e.page||1,"&page_size=").concat(e.page_size||12),e),u=()=>tI("/api/v1/agents/list",{}),T=()=>tI("/api/v1/llm-strategy/list"),d=e=>tI("/api/v1/app/resources/list?type=".concat(e.type)),R=e=>tI("/api/v1/app/resources/list?type=".concat(e.type,"&version=v2")),f=()=>tI("/api/v1/native_scenes"),A=e=>tI("/api/v1/llm-strategy/value/list?type=".concat(e)),S=e=>tI("/api/v1/app/".concat(e,"/admins")),O=e=>th("/api/v1/app/admins/update",e);var p=n(89546);let N=(0,o.n5)(),I=e=>tI("/api/v1/evaluate/datasets",e,{headers:{"user-id":N}}),h=e=>th("/api/v1/evaluate/dataset/upload/content",e,{headers:{"user-id":N}}),_=e=>th("/api/v1/evaluate/dataset/upload/file",e,{headers:{"user-id":N,"Content-Type":"multipart/form-data"}}),m=e=>tm("/api/v1/evaluate/dataset",e,{headers:{"user-id":N}}),C=e=>tI("/api/v1/evaluate/dataset/download",e,{headers:{"user-id":N,"Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"blob"}),L=e=>tI("/api/v1/evaluate/evaluation/result/download",e,{headers:{"user-id":N,"Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"blob"}),g=e=>tm("/api/v1/evaluate/evaluation",e,{headers:{"user-id":N}}),v=e=>tI("/api/v1/evaluate/evaluations",e,{headers:{"user-id":N}}),P=e=>tI("/api/v1/evaluate/metrics",e,{headers:{"user-id":N}}),y=e=>tI("/api/v1/evaluate/evaluation/detail/show",e,{headers:{"user-id":N}}),D=e=>th("/api/v1/evaluate/start",e,{headers:{"user-id":N}}),M=e=>th("/api/v1/evaluate/dataset/members/update",e,{headers:{"user-id":N}}),b=e=>th("/api/v2/serve/awel/flows",e),U=e=>{let{page:t,page_size:n}=e;return tI("/api/v2/serve/awel/flows",{page:t,page_size:n})},w=e=>tI("/api/v2/serve/awel/flows/".concat(e)),x=(e,t)=>t_("/api/v2/serve/awel/flows/".concat(e),t),G=e=>tm("/api/v2/serve/awel/flows/".concat(e)),F=e=>tI("/api/v2/serve/awel/nodes",{tags:e}),H=e=>th("/api/v2/serve/awel/nodes/refresh",e),B=e=>th("/api/v2/serve/awel/flow/import",e),Y=()=>tI("/api/v2/serve/awel/flow/templates"),k=e=>tI("/api/v2/serve/awel/variables/keys",e),V=e=>tI("/api/v2/serve/awel/variables",e),$=e=>th("/api/v2/serve/file/files/metadata/batch",e),W=(e,t)=>th("/knowledge/".concat(e,"/document/list"),t),Z=e=>th("/knowledge/".concat(e.space_name,"/document/yuque/add"),e),j=(e,t)=>th("/knowledge/".concat(e,"/document/edit"),t),X=e=>tI("/knowledge/".concat(e,"/recommend_questions")),K=e=>tI("/knowledge/".concat(e,"/recall_retrievers")),z=(e,t)=>th("/knowledge/".concat(t,"/recall_test"),e),J=e=>th("/knowledge/questions/chunk/edit",e),q=e=>tI("/prompt/type/targets?prompt_type=".concat(e)),Q=e=>th("/prompt/template/load?prompt_type=".concat(e.prompt_type,"&target=").concat(e.target),e),ee=e=>th("/prompt/add",e),et=e=>th("/prompt/update",e),en=e=>th("/prompt/delete",e),er=e=>th("/prompt/query_page?page=".concat(e.page,"&page_size=").concat(e.page_size),e),eo=e=>th("/prompt/response/verify",e),ei=e=>th("/api/v1/chat/dialogue/new?chat_mode=".concat(e.chat_mode,"&model_name=").concat(e.model),e),ea=(e,t)=>{let n=Object.keys(t).filter(e=>void 0!==t[e]).map(e=>"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t[e]))).join("&");return n?"".concat(e,"?").concat(n):e},es=()=>tI("/api/v2/serve/datasources"),el=()=>tI("/api/v2/serve/datasource-types"),eE=e=>tm("/api/v2/serve/datasources/".concat(e)),ec=e=>t_("/api/v2/serve/datasources",e),eu=e=>th("/api/v2/serve/datasources",e),eT=e=>th("/api/v2/serve/datasources/test-connection",e),ed=e=>th("/api/v2/serve/datasources/".concat(e.id,"/refresh")),eR=()=>tI("/api/v1/chat/dialogue/list"),ef=()=>tI("/api/v1/model/types"),eA=e=>th("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),eS=e=>tI("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),eO=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i,temperatureValue:a,maxNewTokensValue:s,userName:l,sysCode:E}=e,c=ea("/api/v1/resource/file/upload",{conv_uid:t,chat_mode:n,model_name:i,user_name:l,sys_code:E,temperature:a,max_new_tokens:s});return th(c,r,{headers:{"Content-Type":"multipart/form-data"},...o})},ep=e=>th("/api/v1/chat/dialogue/clear?con_uid=".concat(e)),eN=e=>th("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),eI=e=>th("/knowledge/".concat(e,"/arguments"),{}),eh=(e,t)=>th("/knowledge/".concat(e,"/argument/save"),t),e_=e=>th("/knowledge/space/list",e),em=(e,t)=>th("/knowledge/".concat(e,"/document/list"),t),eC=(e,t)=>th("/knowledge/".concat(e,"/graphvis"),t),eL=(e,t)=>th("/knowledge/".concat(e,"/document/add"),t),eg=e=>th("/knowledge/space/add",e),ev=()=>tI("/knowledge/document/chunkstrategies"),eP=(e,t)=>th("/knowledge/".concat(e,"/document/sync"),t),ey=(e,t)=>th("/knowledge/".concat(e,"/document/sync_batch"),t),eD=(e,t)=>th("/knowledge/".concat(e,"/document/upload"),t),eM=(e,t)=>th("/knowledge/".concat(e,"/chunk/list"),t),eb=(e,t)=>th("/knowledge/".concat(e,"/document/delete"),t),eU=e=>th("/knowledge/space/delete",e),ew=()=>tI("/api/v2/serve/model/models"),ex=e=>th("/api/v2/serve/model/models",e),eG=e=>th("/api/v2/serve/model/models/stop",e),eF=e=>th("/api/v2/serve/model/models/start",e),eH=()=>tI("/api/v2/serve/model/model-types"),eB=e=>th("/api/v1/agent/query",e),eY=e=>th("/api/v1/serve/dbgpts/hub/query_page?page=".concat(null==e?void 0:e.page_index,"&page_size=").concat(null==e?void 0:e.page_size),e),ek=e=>th("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),eV=e=>th("/api/v1/serve/dbgpts/hub/source/refresh",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),e$=e=>th("/api/v1/agent/my",void 0,{params:{user:e}}),eW=e=>th("/api/v1/serve/dbgpts/my/query_page?page=".concat(null==e?void 0:e.page_index,"&page_size=").concat(null==e?void 0:e.page_size),e),eZ=(e,t)=>th("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),ej=(e,t)=>th("/api/v1/serve/dbgpts/hub/install",e,{params:{user:t},timeout:6e4}),eX=(e,t)=>th("/api/v1/agent/uninstall",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eK=(e,t)=>th("/api/v1/serve/dbgpts/my/uninstall",void 0,{params:{...e,user:t},timeout:6e4}),ez=()=>tI("/api/v1/dbgpts/list"),eJ=()=>tI("/api/v1/feedback/select",void 0),eq=(e,t)=>tI("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),eQ=e=>{let{data:t,config:n}=e;return th("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})},e0=e=>th("/api/v1/app/collect",e),e1=e=>th("/api/v1/app/uncollect",e),e2=()=>tI("/api/v1/resource-type/list"),e4=e=>th("/api/v1/app/publish",{app_code:e}),e6=e=>th("/api/v1/app/unpublish",{app_code:e}),e3=e=>tI("/api/v1/app/info",e),e8=e=>th("/api/v1/app/hot/list",e),e5=e=>th("/api/v1/app/remove",e),e7=()=>tI("/knowledge/space/config");var e9=n(26855);let{Axios:te,AxiosError:tt,CanceledError:tn,isCancel:tr,CancelToken:to,VERSION:ti,all:ta,Cancel:ts,isAxiosError:tl,spread:tE,toFormData:tc,AxiosHeaders:tu,HttpStatusCode:tT,formToJSON:td,getAdapter:tR,mergeConfig:tf}=a.default,tA=(e,t)=>e.then(e=>{let{data:n}=e;if(!n)throw Error("Network Error!");if(!n.success){if("*"===t||n.err_code&&t&&t.includes(n.err_code));else{var r;e9.ZP.error({message:"Request error",description:null!==(r=null==n?void 0:n.err_msg)&&void 0!==r?r:"The interface is abnormal. Please try again later"})}}return[null,n.data,n,e]}).catch(e=>{let t=e.message;if(e instanceof tt)try{let{err_msg:n}=JSON.parse(e.request.response);n&&(t=n)}catch(e){}return e9.ZP.error({message:"Request error",description:t}),[e,null,null,null]}),tS=e=>[];var tO=n(83454);let tp=a.default.create({baseURL:null!==(r=tO.env.API_BASE_URL)&&void 0!==r?r:""}),tN=["/db/add","/db/test/connect","/db/summary","/params/file/load","/chat/prepare","/model/start","/model/stop","/editor/sql/run","/sql/editor/submit","/editor/chart/run","/chart/editor/submit","/document/upload","/document/sync","/agent/install","/agent/uninstall","/personal/agent/upload"];tp.interceptors.request.use(e=>{let t=tN.some(t=>e.url&&e.url.indexOf(t)>=0);return e.timeout||(e.timeout=t?6e4:1e5),e.headers.set(i.gp,(0,o.n5)()),e});let tI=(e,t,n)=>tp.get(e,{params:t,...n}),th=(e,t,n)=>tp.post(e,t,n),t_=(e,t,n)=>tp.put(e,t,n),tm=(e,t,n)=>tp.delete(e,{params:t,...n})},1051:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);function o(){return(0,r.jsx)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M688 312c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48z m-392 88h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8z m376 116c119.3 0 216 96.7 216 216s-96.7 216-216 216-216-96.7-216-216 96.7-216 216-216z m107.5 323.5C808.2 810.8 824 772.6 824 732s-15.8-78.8-44.5-107.5S712.6 580 672 580s-78.8 15.8-107.5 44.5S520 691.4 520 732s15.8 78.8 44.5 107.5S631.4 884 672 884s78.8-15.8 107.5-44.5zM440 852c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H168c-17.7 0-32-14.3-32-32V108c0-17.7 14.3-32 32-32h640c17.7 0 32 14.3 32 32v384c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8V148H208v704h232z m232-76.06l-20.56 28.43c-1.5 2.1-3.9 3.3-6.5 3.3h-44.3c-6.5 0-10.3-7.4-6.4-12.7l45.75-63.3-45.75-63.3c-3.9-5.3-0.1-12.7 6.4-12.7h44.3c2.6 0 5 1.2 6.5 3.3L672 687.4l20.56-28.43c1.5-2.1 3.9-3.3 6.5-3.3h44.3c6.5 0 10.3 7.4 6.4 12.7l-45.75 63.3 45.75 63.3c3.9 5.3 0.1 12.7-6.4 12.7h-44.3c-2.6 0-5-1.2-6.5-3.3L672 775.94z",fill:"#d81e06"})})}},82353:function(e,t,n){"use strict";n.d(t,{O7:function(){return o},RD:function(){return s},In:function(){return i},zM:function(){return a},je:function(){return l},DL:function(){return E},si:function(){return c},FD:function(){return u},qw:function(){return T},s2:function(){return d},FE:function(){return R.Z},Rp:function(){return f},IN:function(){return A},tu:function(){return S},ig:function(){return O},ol:function(){return p},bn:function(){return N}});var r=n(85893),o=function(){return(0,r.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M416.9549913 314.32347826h297.42302609a119.56758261 119.56758261 0 0 1 119.56758261 119.56758261v179.19109565a196.71485217 196.71485217 0 0 1-196.71485217 196.71485218H416.9549913a119.56758261 119.56758261 0 0 1-119.5675826-119.56758261v-256.44521739A119.56758261 119.56758261 0 0 1 416.9549913 314.32347826z",fill:"#F5384A"}),(0,r.jsx)("path",{d:"M716.24793043 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v260.18504347c0 3.84667826 0 7.69335652 0.58768696 11.43318261a345.7202087 345.7202087 0 0 0 502.9531826-353.19986087A117.1634087 117.1634087 0 0 0 716.24793043 314.32347826z",fill:"#F54F5C"}),(0,r.jsx)("path",{d:"M318.91812174 594.54330435a345.7202087 345.7202087 0 0 0 420.73043478-249.07241739c2.35074783-9.18928696 4.22066087-18.432 5.82344348-27.67471305a117.10998261 117.10998261 0 0 0-29.22406957-3.63297391H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.5373913v156.43158261c6.9453913 2.35074783 14.10448696 4.54121739 21.42386087 6.41113044z",fill:"#F66C73"}),(0,r.jsx)("path",{d:"M630.17850435 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v48.08347826a346.14761739 346.14761739 0 0 0 332.68424348-165.62086957z",fill:"#F78989"}),(0,r.jsx)("path",{d:"M859.85725217 354.76702609h-25.53766956C802.26393043 200.52591304 669.92751304 84.59130435 512 84.59130435S221.73606957 200.52591304 189.68041739 354.76702609h-25.53766956a139.6557913 139.6557913 0 0 0-139.44208696 139.49551304v79.872a139.6557913 139.6557913 0 0 0 139.44208696 139.49551304h27.62128695a54.65488696 54.65488696 0 0 0 54.60146087-54.60146087V427.10594783C246.36549565 273.6128 365.50566957 148.7026087 512 148.7026087s265.63450435 124.9101913 265.63450435 278.40333913v159.3165913c0 116.09488696-74.79652174 219.47436522-181.38156522 251.42316522a30.23916522 30.23916522 0 0 0-3.09871304 1.06852174 60.15777391 60.15777391 0 1 0 18.05801739 61.06601739 23.50747826 23.50747826 0 0 0 3.36584348-0.69453913c93.12166957-27.88841739 166.63596522-98.67798261 203.01913043-187.79269565a54.92201739 54.92201739 0 0 0 14.90587826 2.13704347h27.62128696a139.6557913 139.6557913 0 0 0 139.44208696-139.49551304V494.26253913a139.6557913 139.6557913 0 0 0-139.7092174-139.49551304zM182.2541913 649.51874783h-18.11144347a75.43763478 75.43763478 0 0 1-75.33078261-75.3842087V494.26253913a75.43763478 75.43763478 0 0 1 75.33078261-75.3842087h18.11144347v230.6404174z m752.93384348-75.3842087a75.43763478 75.43763478 0 0 1-75.33078261 75.3842087h-18.11144347V418.87833043h18.11144347a75.43763478 75.43763478 0 0 1 75.33078261 75.3842087z",fill:"#444444"})]})},i=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1116 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M80.75 80.75m67.14674945 0l805.76099677 0q67.14674945 0 67.14674947 67.14674945l0 604.32074759q0 67.14674945-67.14674947 67.14674945l-805.76099677 0q-67.14674945 0-67.14674945-67.14674945l0-604.32074759q0-67.14674945 67.14674945-67.14674945Z",fill:"#36CFC9"}),(0,r.jsx)("path",{d:"M1020.80449568 685.07074759v67.14674945a67.14674945 67.14674945 0 0 1-67.14674946 67.14674945h-308.20358111l91.3195796 100.72012459-24.84429735 22.49416172L600.46584251 819.36424649h-100.72012459L389.62504831 943.25 364.78075097 920.08437108l91.31957961-100.72012459H147.89674945a67.14674945 67.14674945 0 0 1-67.14674945-67.14674945v-67.14674946z",fill:"#08979C"}),(0,r.jsx)("path",{d:"M416.48374894 282.19024919v335.7337481H315.76362434V282.19024919z m167.86687404 134.29349975v201.44024834h-100.72012459v-201.44024834z m167.86687406 67.14674945v134.2934989h-100.7201246v-134.2934989z m-225.94881252-302.16037379v141.34390829h201.4402492V272.11823698L819.36424649 341.27938889l-91.3195796 63.45367858V356.38740719h-239.71389641V215.04349975H315.76362434V181.4701246z",fill:"#B5F5EC"}),(0,r.jsx)("path",{d:"M550.77724783 752.21749704m-33.57337513 0a33.57337515 33.57337515 0 1 0 67.14675028 0 33.57337515 33.57337515 0 1 0-67.14675028 0Z",fill:"#FFFFFF"})]})},a=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M207.83 962c-5.4 0-10.88-1.17-16.08-3.67-18.55-8.89-26.39-31.13-17.5-49.69l77.22-161.26c8.9-18.58 31.14-26.41 49.7-17.51 18.55 8.89 26.39 31.13 17.5 49.69l-77.22 161.26c-6.4 13.38-19.74 21.18-33.62 21.18zM821.57 962c-13.88 0-27.21-7.8-33.62-21.17l-77.24-161.26c-8.9-18.55-1.06-40.8 17.5-49.69 18.57-8.87 40.8-1.07 49.7 17.51l77.24 161.26c8.9 18.55 1.06 40.8-17.5 49.69a37.266 37.266 0 0 1-16.08 3.66z",fill:"#12926E"}),(0,r.jsx)("path",{d:"M156.74 105.14h710.51c50.7 0 91.8 41.1 91.8 91.8v525.82c0 50.7-41.1 91.8-91.8 91.8H156.74c-50.7 0-91.8-41.1-91.8-91.8V196.93c0.01-50.69 41.11-91.79 91.8-91.79z",fill:"#39E2A0"}),(0,r.jsx)("path",{d:"M835.65 686.01h-614.7c-5.14 0-9.31-4.17-9.31-9.31 0-5.14 4.17-9.31 9.31-9.31h614.7c5.14 0 9.31 4.17 9.31 9.31 0 5.14-4.17 9.31-9.31 9.31z",fill:"#D3F8EA"}),(0,r.jsx)("path",{d:"M699.31 631.94H624.8V454.95c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v176.99zM846.22 631.94h-74.51V346.76c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v285.18zM289.51 631.94H215V417.69c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v214.25zM436.42 631.94h-74.51V495.77c0-11.28 9.14-20.42 20.42-20.42H416c11.28 0 20.42 9.14 20.42 20.42v136.17z",fill:"#FFFFFF"}),(0,r.jsx)("path",{d:"M715.4 173.76H308.6c-11.11 0-20.12-9.01-20.12-20.12V82.12c0-11.11 9.01-20.12 20.12-20.12h406.8c11.11 0 20.12 9.01 20.12 20.12v71.52c0.01 11.11-9 20.12-20.12 20.12z",fill:"#12926E"})]})},s=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M226.3 70.4C151.1 91.6 91.6 151.1 70.4 226.3L226.3 70.4z",fill:"#FFA65A"}),(0,r.jsx)("path",{d:"M277.9 62.2c-116.5 4.7-211 99.1-215.7 215.7L277.9 62.2z",fill:"#FFA659"}),(0,r.jsx)("path",{d:"M321.5 62H287C163.3 62 62 163.3 62 287v34.5L321.5 62z",fill:"#FFA558"}),(0,r.jsx)("path",{d:"M365 62h-78C163.3 62 62 163.3 62 287v78L365 62z",fill:"#FFA557"}),(0,r.jsx)("path",{d:"M408.4 62H287C163.3 62 62 163.3 62 287v121.4L408.4 62z",fill:"#FFA556"}),(0,r.jsx)("path",{d:"M451.8 62H287c-35.9 0-69.8 8.5-100 23.6L85.6 187C70.5 217.2 62 251.1 62 287v164.8L451.8 62z",fill:"#FFA555"}),(0,r.jsx)("path",{d:"M495.3 62H287c-12.2 0-24.2 1-35.9 2.9L64.9 251.1C63 262.8 62 274.8 62 287v208.3L495.3 62z",fill:"#FFA454"}),(0,r.jsx)("path",{d:"M62 538.7L538.7 62H297.5L62 297.5z",fill:"#FFA453"}),(0,r.jsx)("path",{d:"M62 582.1L582.1 62H340.9L62 340.9z",fill:"#FFA452"}),(0,r.jsx)("path",{d:"M62 625.6L625.6 62H384.3L62 384.3z",fill:"#FFA451"}),(0,r.jsx)("path",{d:"M62 427.8V669L669 62H427.8z",fill:"#FFA450"}),(0,r.jsx)("path",{d:"M62 471.2v241.2L712.4 62H471.2z",fill:"#FFA34F"}),(0,r.jsx)("path",{d:"M737 62H514.6L62 514.6V737c0 6.1 0.3 12.1 0.7 18.1L755.1 62.7c-6-0.4-12-0.7-18.1-0.7z",fill:"#FFA34E"}),(0,r.jsx)("path",{d:"M737 62H558.1L62 558.1V737c0 19.1 2.4 37.6 6.9 55.4L792.4 68.9C774.6 64.4 756.1 62 737 62z",fill:"#FFA34D"}),(0,r.jsx)("path",{d:"M737 62H601.5L62 601.5V737c0 31.1 6.4 60.8 17.9 87.8L824.8 79.9C797.8 68.4 768.1 62 737 62z",fill:"#FFA34C"}),(0,r.jsx)("path",{d:"M853.5 94.7C819.4 74 779.5 62 737 62h-92.1L62 644.9V737c0 42.5 12 82.4 32.7 116.5L853.5 94.7z",fill:"#FFA24B"}),(0,r.jsx)("path",{d:"M878.9 112.7C840.1 81.1 790.7 62 737 62h-48.6L62 688.4V737c0 53.7 19.1 103.1 50.7 141.9l766.2-766.2z",fill:"#FFA24A"}),(0,r.jsx)("path",{d:"M737 62h-5.2L62 731.8v5.2c0 64.7 27.7 123.2 71.7 164.3l767.6-767.6C860.2 89.7 801.7 62 737 62z",fill:"#FFA249"}),(0,r.jsx)("path",{d:"M64.8 772.4c9.8 61 44.3 114.1 92.8 148.4l763.2-763.2c-34.3-48.6-87.4-83.1-148.4-92.8L64.8 772.4z",fill:"#FFA248"}),(0,r.jsx)("path",{d:"M73.3 807.3c18.7 56.4 59.2 103 111.3 129.9l752.6-752.6C910.4 132.5 863.7 92 807.3 73.3l-734 734z",fill:"#FFA247"}),(0,r.jsx)("path",{d:"M86.1 838c26.5 52.3 72.9 93.1 129.1 112.2l735-735C931.1 159 890.3 112.6 838 86.1L86.1 838z",fill:"#FFA147"}),(0,r.jsx)("path",{d:"M102.4 865.2c34 48.7 86.7 83.5 147.5 93.7l709-709c-10.2-60.8-45-113.5-93.7-147.5L102.4 865.2z",fill:"#FFA146"}),(0,r.jsx)("path",{d:"M962 287c0-65.2-28.1-124.1-72.7-165.3L121.7 889.3C162.9 933.9 221.8 962 287 962h3.2L962 290.2V287z",fill:"#FFA145"}),(0,r.jsx)("path",{d:"M962 287c0-54.2-19.4-104-51.6-143L144 910.4c39 32.2 88.8 51.6 143 51.6h46.6L962 333.6V287z",fill:"#FFA144"}),(0,r.jsx)("path",{d:"M962 287c0-43.1-12.3-83.4-33.5-117.7L169.3 928.5C203.6 949.7 243.9 962 287 962h90.1L962 377.1V287z",fill:"#FFA143"}),(0,r.jsx)("path",{d:"M287 962h133.5L962 420.5V287c0-31.6-6.6-61.8-18.5-89.2L197.8 943.4c27.4 12 57.6 18.6 89.2 18.6z",fill:"#FFA042"}),(0,r.jsx)("path",{d:"M287 962h176.9L962 463.9V287c0-19.7-2.6-38.7-7.4-56.9L230.1 954.6c18.2 4.8 37.2 7.4 56.9 7.4z",fill:"#FFA041"}),(0,r.jsx)("path",{d:"M287 962h220.4L962 507.4V287c0-6.7-0.3-13.4-0.9-20L267 961.1c6.6 0.6 13.3 0.9 20 0.9z",fill:"#FFA040"}),(0,r.jsx)("path",{d:"M550.8 962L962 550.8V309.6L309.6 962z",fill:"#FFA03F"}),(0,r.jsx)("path",{d:"M594.2 962L962 594.2V353L353 962z",fill:"#FF9F3E"}),(0,r.jsx)("path",{d:"M637.7 962L962 637.7V396.4L396.4 962z",fill:"#FF9F3D"}),(0,r.jsx)("path",{d:"M681.1 962L962 681.1V439.9L439.9 962z",fill:"#FF9F3C"}),(0,r.jsx)("path",{d:"M724.5 962L962 724.5V483.3L483.3 962z",fill:"#FF9F3B"}),(0,r.jsx)("path",{d:"M962 737V526.7L526.7 962H737c11.4 0 22.5-0.9 33.5-2.5l189-189c1.6-11 2.5-22.1 2.5-33.5z",fill:"#FF9F3A"}),(0,r.jsx)("path",{d:"M962 737V570.2L570.2 962H737c34.3 0 66.9-7.8 96.1-21.7l107.2-107.2c13.9-29.2 21.7-61.8 21.7-96.1z",fill:"#FF9E39"}),(0,r.jsx)("path",{d:"M962 613.6L613.6 962H737c123.8 0 225-101.3 225-225V613.6z",fill:"#FF9E38"}),(0,r.jsx)("path",{d:"M962 657L657 962h80c123.8 0 225-101.3 225-225v-80z",fill:"#FF9E37"}),(0,r.jsx)("path",{d:"M962 700.5L700.5 962H737c123.8 0 225-101.3 225-225v-36.5z",fill:"#FF9E36"}),(0,r.jsx)("path",{d:"M961.9 744L744 961.9c118.2-3.7 214.2-99.7 217.9-217.9z",fill:"#FF9D35"}),(0,r.jsx)("path",{d:"M954.4 795L795 954.4c77.4-20.8 138.6-82 159.4-159.4z",fill:"#FF9D34"}),(0,r.jsx)("path",{d:"M736.3 622.9L523.5 747.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 622.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFD9C0"}),(0,r.jsx)("path",{d:"M736.3 523.9L523.5 648.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 523.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFE8D9"}),(0,r.jsx)("path",{d:"M736.3 424.9L523.5 549.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 424.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFF6F0"})]})},l=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M197.99492187 62v900h-34.18066406C124.57285156 962 92.76171875 930.18886719 92.76171875 890.94746094V133.05253906C92.76171875 93.81113281 124.57285156 62 163.81425781 62h34.18066406z m662.19082032 0C899.42714844 62 931.23828125 93.81113281 931.23828125 133.05253906v757.89492188c0 39.24140625-31.81113281 71.05253906-71.05253906 71.05253906H276.92070312V62h583.26503907z",fill:"#19A05F"}),(0,r.jsx)("path",{d:"M577.0390625 62l0.33222656 220.3875 111.2475586-108.80771484L800.19951172 284.36328125V62zM425.40224609 508.18554688h377.05078125v50.94404296h-377.05078125V508.18554688z m0 101.88720703h377.05078125v50.94316406h-377.05078125v-50.94316406z",fill:"#FFFFFF"})]})},E=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M701.95942066 37.1014489H250.80579673a142.46956521 142.46956521 0 0 0-142.46956522 142.46956523v664.85797174a142.46956521 142.46956521 0 0 0 142.46956522 142.46956523h522.38840654a142.46956521 142.46956521 0 0 0 142.46956522-142.46956523V274.55072501L701.95942066 37.1014489z",fill:"#53D39C"}),(0,r.jsx)("path",{d:"M444.2794663 392.18309566l69.64387283 117.72735109h2.70692174l69.97630108-117.70360654h82.4661337l-105.40373371 172.67311305 107.77822609 172.6968587h-83.98580869l-70.83111847-117.89356521h-2.70692174L443.09222066 737.57681196h-83.65338045l108.11065544-172.6968587-106.09233586-172.6968576h82.82230651z",fill:"#25BF79"}),(0,r.jsx)("path",{d:"M444.2794663 380.31063151l69.64387283 117.7273511h2.70692174l69.97630108-117.70360543h82.4661337l-105.40373371 172.67311305L671.44718803 725.70434783h-83.98580869l-70.83111847-117.89356522h-2.70692174L443.09222066 725.70434783h-83.65338045l108.11065544-172.6968576-106.09233586-172.69685872h82.82230651z",fill:"#FFFFFF"}),(0,r.jsx)("path",{d:"M701.95942066 37.1014489l160.27826087 178.08695653L915.66376849 274.55072501h-142.46956522a71.23478261 71.23478261 0 0 1-71.23478261-71.23478261V37.1014489z",fill:"#25BF79"})]})},c=function(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:(0,r.jsx)("path",{d:"M688.51536688 447.75428656l-2.39993719 1.25996719a200.75473031 200.75473031 0 0 1-7.19981156 38.03900156l-47.33875688 166.43563031 110.45710031-59.63843437-47.03876531-114.41699625a108.2971575 108.2971575 0 0 1-6.47982937-31.67916844z m194.87488406-200.99472375l-96.35747063-58.55846344-354.77068687 217.43429251a70.01816156 70.01816156 0 0 0-32.51914688 59.57843624v193.97490844l-158.99582625-98.09742562V362.67651969a69.4181775 69.4181775 0 0 1 33.95910844-60.41841375l358.67058469-206.99456625 13.55964469 7.97979L544.75914031 41.26495719a62.75835281 62.75835281 0 0 0-65.63827687 0L140.54975094 246.75956281a69.89816531 69.89816531 0 0 0-32.81913844 59.75843063v410.98921218c-0.11999719 24.47935781 12.2996775 47.1587625 32.81913844 59.81842969l338.5711125 205.49460563c20.21946937 12.23967844 45.35880937 12.23967844 65.63827687 0l338.69110875-205.49460563c20.33946563-12.41967375 32.87913656-35.09907844 32.8791375-59.81842968v-410.98921219a69.77816813 69.77816813 0 0 0-32.93913562-59.75843063z m-89.51764969 477.88745532l-31.01918625-75.65801438-150.53604844 81.35786438-30.47919937 108.95713968-95.81748563 51.7186425 151.61602032-485.20726312 103.79727562-56.09852719 148.73609531 322.97152219-96.29747156 51.95863594z m0-1e-8",fill:"#0F6CF9"})})},u=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.jsx)("path",{d:"M593.054 120.217C483.656 148.739 402.91 248.212 402.91 366.546c0 140.582 113.962 254.544 254.544 254.544 118.334 0 217.808-80.746 246.328-190.144C909.17 457.12 912 484.23 912 512c0 220.914-179.086 400-400 400S112 732.914 112 512s179.086-400 400-400c27.77 0 54.88 2.83 81.054 8.217z"})})};function T(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#1afa29"})]})}function d(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z",fill:"#87d068"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z",fill:"#87d068"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#87d068"})]})}var R=n(1051);function f(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M296 256c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM488 456v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8z",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M544.1 736.4c1.8-34.5 16.2-66.8 40.8-91.4 26.2-26.2 62-41 99.1-41 37.4 0 72.6 14.6 99.1 41 3.2 3.2 6.3 6.6 9.2 10.1L769.2 673c-5.3 4.1-3.5 12.5 3 14.1l93.3 22.5c5 1.2 9.8-2.6 9.9-7.7l0.6-95.4c0-6.7-7.6-10.5-12.9-6.4l-20.3 15.8C805.4 569.6 748.1 540 684 540c-109.9 0-199.6 86.9-204 195.7-0.2 4.5 3.5 8.3 8 8.3h48.1c4.3 0 7.8-3.3 8-7.6zM880 744h-48.1c-4.3 0-7.8 3.3-8 7.6-1.8 34.5-16.2 66.8-40.8 91.4-26.2 26.2-62 41-99.1 41-37.4 0-72.6-14.6-99.1-41-3.2-3.2-6.3-6.6-9.2-10.1l23.1-17.9c5.3-4.1 3.5-12.5-3-14.1l-93.3-22.5c-5-1.2-9.8 2.6-9.9 7.7l-0.6 95.4c0 6.7 7.6 10.5 12.9 6.4l20.3-15.8C562.6 918.4 619.9 948 684 948c109.9 0 199.6-86.9 204-195.7 0.2-4.5-3.5-8.3-8-8.3z",fill:"#2db7f5"})]})}var A=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M513.89 950.72c-5.5 0-11-1.4-15.99-4.2L143.84 743c-9.85-5.73-15.99-16.17-15.99-27.64V308.58c0-11.33 6.14-21.91 15.99-27.64L497.9 77.43c9.85-5.73 22.14-5.73 31.99 0l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64V715.5c0 11.33-6.14 21.91-15.99 27.64L529.89 946.52c-4.99 2.8-10.49 4.2-16 4.2zM191.83 697.15L513.89 882.2l322.07-185.05V326.92L513.89 141.87 191.83 326.92v370.23z m322.06-153.34c-5.37 0-10.88-1.4-15.99-4.33L244.29 393.91c-15.35-8.79-20.6-28.27-11.77-43.56 8.83-15.28 28.41-20.5 43.76-11.72l253.61 145.7c15.35 8.79 20.6 28.27 11.77 43.56-6.01 10.32-16.76 15.92-27.77 15.92z m0 291.52c-17.66 0-31.99-14.26-31.99-31.84V530.44L244.55 393.91s-0.13 0-0.13-0.13l-100.45-57.69c-15.35-8.79-20.6-28.27-11.77-43.56s28.41-20.5 43.76-11.72l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64v291.39c-0.13 17.71-14.46 31.97-32.12 31.97z m0 115.39c-17.66 0-31.99-14.26-31.99-31.84V511.97c0-17.58 14.33-31.84 31.99-31.84s31.99 14.26 31.99 31.84v406.91c0 17.7-14.33 31.84-31.99 31.84z m0-406.91c-11 0-21.75-5.73-27.77-15.92-8.83-15.28-3.58-34.64 11.77-43.56l354.06-203.52c15.35-8.79 34.8-3.57 43.76 11.72 8.83 15.28 3.58 34.64-11.77 43.56L529.89 539.61c-4.99 2.93-10.49 4.2-16 4.2z"})})};function S(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M114.5856 951.04h298.24v-71.68H186.2656v-747.52h593.92v271.36h71.68v-343.04h-737.28v890.88z",fill:"#747690"}),(0,r.jsx)("path",{d:"M662.4256 311.04h-358.4v-71.68h358.4v71.68zM508.8256 490.24h-204.8v-71.68h204.8v71.68zM668.8256 554.24a168.96 168.96 0 1 0 0 337.92 168.96 168.96 0 0 0 0-337.92z m-240.64 168.96a240.64 240.64 0 1 1 481.28 0 240.64 240.64 0 0 1-481.28 0z",fill:"#747690"}),(0,r.jsx)("path",{d:"M629.76 588.8h71.68v131.4304l82.5856 41.3184-32.0512 64.1024-122.2144-61.0816V588.8z",fill:"#747690"})]})}var O=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M602.24 246.72a17.28 17.28 0 0 0-11.84-16.32l-42.88-14.4A90.56 90.56 0 0 1 490.24 160l-14.4-42.88a17.28 17.28 0 0 0-32 0L428.8 160a90.56 90.56 0 0 1-57.28 57.28l-42.88 14.4a17.28 17.28 0 0 0 0 32l42.88 14.4a90.56 90.56 0 0 1 57.28 57.28l14.4 42.88a17.28 17.28 0 0 0 32 0l14.4-42.88a90.56 90.56 0 0 1 57.28-57.28l42.88-14.4a17.28 17.28 0 0 0 12.48-16.96z m301.12 221.76l-48.32-16a101.44 101.44 0 0 1-64-64l-16-48.32a19.2 19.2 0 0 0-36.8 0l-16 48.32a101.44 101.44 0 0 1-64 64l-48.32 16a19.2 19.2 0 0 0 0 36.8l48.32 16a101.44 101.44 0 0 1 64 64l16 48.32a19.2 19.2 0 0 0 36.8 0l16-48.32a101.44 101.44 0 0 1 64-64l48.32-16a19.2 19.2 0 0 0 0-36.8z m-376.64 195.52l-64-20.8a131.84 131.84 0 0 1-83.52-83.52l-20.8-64a25.28 25.28 0 0 0-47.68 0l-20.8 64a131.84 131.84 0 0 1-82.24 83.52l-64 20.8a25.28 25.28 0 0 0 0 47.68l64 20.8a131.84 131.84 0 0 1 83.52 83.84l20.8 64a25.28 25.28 0 0 0 47.68 0l20.8-64a131.84 131.84 0 0 1 83.52-83.52l64-20.8a25.28 25.28 0 0 0 0-47.68z"})})},p=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.jsx)("path",{d:"M554.6 64h-85.4v128h85.4V64z m258.2 87.4L736 228.2l59.8 59.8 76.8-76.8-59.8-59.8z m-601.6 0l-59.8 59.8 76.8 76.8 59.8-59.8-76.8-76.8zM512 256c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m448 213.4h-128v85.4h128v-85.4z m-768 0H64v85.4h128v-85.4zM795.8 736L736 795.8l76.8 76.8 59.8-59.8-76.8-76.8z m-567.6 0l-76.8 76.8 59.8 59.8 76.8-76.8-59.8-59.8z m326.4 96h-85.4v128h85.4v-128z"})})};function N(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M151.5 586.2c-5-24.2-7.5-49.2-7.5-74.2s2.5-50 7.5-74.2c4.8-23.6 12-46.8 21.4-69 9.2-21.8 20.6-42.8 33.9-62.5 13.2-19.5 28.3-37.8 45-54.5s35-31.8 54.5-45c19.7-13.3 40.7-24.7 62.5-33.9 22.2-9.4 45.4-16.6 69-21.4 48.5-9.9 99.9-9.9 148.4 0 23.6 4.8 46.8 12 69 21.4 21.8 9.2 42.8 20.6 62.5 33.9 19.5 13.2 37.8 28.3 54.5 45 1.4 1.4 2.8 2.8 4.1 4.2H688c-17.7 0-32 14.3-32 32s14.3 32 32 32h160c17.7 0 32-14.3 32-32V128c0-17.7-14.3-32-32-32s-32 14.3-32 32v77.1c-19.2-19-40.1-36.2-62.4-51.3-23.1-15.6-47.8-29-73.4-39.8-26.1-11-53.4-19.5-81.1-25.2-56.9-11.6-117.1-11.6-174.1 0-27.8 5.7-55.1 14.2-81.1 25.2-25.6 10.8-50.3 24.2-73.4 39.8-22.9 15.4-44.4 33.2-63.9 52.7s-37.3 41-52.7 63.9c-15.6 23.1-29 47.8-39.8 73.4-11 26.1-19.5 53.4-25.2 81.1C83 453.4 80 482.7 80 512s3 58.6 8.8 87c3.1 15.2 16.4 25.6 31.3 25.6 2.1 0 4.3-0.2 6.4-0.7 17.4-3.5 28.5-20.4 25-37.7zM935.2 425c-3.5-17.3-20.5-28.5-37.8-24.9-17.3 3.5-28.5 20.5-24.9 37.8 5 24.2 7.5 49.2 7.5 74.2s-2.5 50-7.5 74.2c-4.8 23.6-12 46.8-21.4 69-9.2 21.8-20.6 42.8-33.9 62.5-13.2 19.5-28.3 37.8-45 54.5s-35 31.8-54.5 45C698 830.6 677 842 655.2 851.2c-22.2 9.4-45.4 16.6-69 21.4-48.5 9.9-99.9 9.9-148.4 0-23.6-4.8-46.8-12-69-21.4-21.8-9.2-42.8-20.6-62.5-33.9-19.5-13.2-37.8-28.3-54.5-45-1.4-1.4-2.8-2.8-4.1-4.2H336c17.7 0 32-14.3 32-32s-14.3-32-32-32H176c-17.7 0-32 14.3-32 32v160c0 17.7 14.3 32 32 32s32-14.3 32-32V819c19.2 19 40.1 36.2 62.4 51.3 23.1 15.6 47.8 29 73.4 39.8 26.1 11 53.4 19.5 81.1 25.2 28.5 5.8 57.7 8.8 87 8.8s58.6-3 87-8.8c27.8-5.7 55-14.2 81.1-25.2 25.6-10.8 50.3-24.2 73.4-39.8 22.9-15.5 44.4-33.2 63.9-52.7s37.3-41 52.7-63.9c15.6-23.1 29-47.8 39.8-73.4 11-26.1 19.5-53.4 25.2-81.1 5.8-28.5 8.8-57.7 8.8-87 0.2-29.5-2.8-58.8-8.6-87.2z",fill:"#1875F0"})})}},32665:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(38754),n(67294),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return d},useSearchParams:function(){return R},usePathname:function(){return f},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return A},useParams:function(){return S},useSelectedLayoutSegments:function(){return O},useSelectedLayoutSegment:function(){return p},redirect:function(){return E.redirect},notFound:function(){return c.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),s=n(43512),l=n(98751),E=n(96885),c=n(86323),u=Symbol("internal for urlsearchparams readonly");function T(){return Error("ReadonlyURLSearchParams cannot be modified")}class d{[Symbol.iterator](){return this[u][Symbol.iterator]()}append(){throw T()}delete(){throw T()}set(){throw T()}sort(){throw T()}constructor(e){this[u]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e)}}function R(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new d(e):null,[e]);return t}function f(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function A(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function S(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(o.GlobalLayoutRouterContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],o=Array.isArray(r),i=o?r[1]:r;!i||i.startsWith("__PAGE__")||(o&&(n[r[0]]=r[1]),n=e(t,n))}return n}(e.tree):null}function O(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(o.LayoutRouterContext);return function e(t,n,r,o){let i;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)i=t[1][n];else{var a;let e=t[1];i=null!=(a=e.children)?a:Object.values(e)[0]}if(!i)return o;let l=i[0],E=(0,s.getSegmentValue)(l);return!E||E.startsWith("__PAGE__")?o:(o.push(E),e(i,n,!1,o))}(t,e)}function p(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=O(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return o}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96885:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return s},redirect:function(){return l},isRedirectError:function(){return E},getURLFromRedirectError:function(){return c},getRedirectTypeFromError:function(){return u}});let i=n(68214),a="NEXT_REDIRECT";function s(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function l(e,t){throw void 0===t&&(t="replace"),s(e,t)}function E(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r]=e.digest.split(";",3);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r}function c(e){return E(e)?e.digest.split(";",3)[2]:null}function u(e){if(!E(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},43512:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29382:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return i},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return E},ACTION_SERVER_ACTION:function(){return c}});let o="refresh",i="navigate",a="restore",s="server-patch",l="prefetch",E="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75476:function(e,t){"use strict";function n(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},69873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return O}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),s=n(38083),l=n(2478),E=n(76226);n(59941);let c=r._(n(31720)),u={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function T(e){return void 0!==e.default}function d(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function R(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let s="decode"in e?e.decode():Promise.resolve();s.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===n&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==o?void 0:o.current)&&o.current(e)}})}function f(e){let[t,n]=i.version.split("."),r=parseInt(t,10),o=parseInt(n,10);return r>18||18===r&&o>=3?{fetchPriority:e}:{fetchpriority:e}}let A=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:s,imgStyle:l,blurStyle:E,isLazy:c,fetchPriority:u,fill:T,placeholder:d,loading:A,srcString:S,config:O,unoptimized:p,loader:N,onLoadRef:I,onLoadingCompleteRef:h,setBlurComplete:_,setShowAltText:m,onLoad:C,onError:L,...g}=e;return A=c?"lazy":A,i.default.createElement("img",{...g,...f(u),loading:A,width:o,height:r,decoding:"async","data-nimg":T?"fill":"1",className:s,style:{...l,...E},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(L&&(e.src=e.src),e.complete&&R(e,S,d,I,h,_,p))},[S,d,I,h,_,L,p,t]),onLoad:e=>{let t=e.currentTarget;R(t,S,d,I,h,_,p)},onError:e=>{m(!0),"blur"===d&&_(!0),L&&L(e)}})}),S=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:R,sizes:S,unoptimized:O=!1,priority:p=!1,loading:N,className:I,quality:h,width:_,height:m,fill:C,style:L,onLoad:g,onLoadingComplete:v,placeholder:P="empty",blurDataURL:y,fetchPriority:D,layout:M,objectFit:b,objectPosition:U,lazyBoundary:w,lazyRoot:x,...G}=e,F=(0,i.useContext)(E.ImageConfigContext),H=(0,i.useMemo)(()=>{let e=u||F||l.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[F]),B=G.loader||c.default;delete G.loader;let Y="__next_img_default"in B;if(Y){if("custom"===H.loader)throw Error('Image with src "'+R+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=B;B=t=>{let{config:n,...r}=t;return e(r)}}if(M){"fill"===M&&(C=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[M];e&&(L={...L,...e});let t={responsive:"100vw",fill:"100vw"}[M];t&&!S&&(S=t)}let k="",V=d(_),$=d(m);if("object"==typeof(n=R)&&(T(n)||void 0!==n.src)){let e=T(R)?R.default:R;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(r=e.blurWidth,o=e.blurHeight,y=y||e.blurDataURL,k=e.src,!C){if(V||$){if(V&&!$){let t=V/e.width;$=Math.round(e.height*t)}else if(!V&&$){let t=$/e.height;V=Math.round(e.width*t)}}else V=e.width,$=e.height}}let W=!p&&("lazy"===N||void 0===N);(!(R="string"==typeof R?R:k)||R.startsWith("data:")||R.startsWith("blob:"))&&(O=!0,W=!1),H.unoptimized&&(O=!0),Y&&R.endsWith(".svg")&&!H.dangerouslyAllowSVG&&(O=!0),p&&(D="high");let[Z,j]=(0,i.useState)(!1),[X,K]=(0,i.useState)(!1),z=d(h),J=Object.assign(C?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:b,objectPosition:U}:{},X?{}:{color:"transparent"},L),q="blur"===P&&y&&!Z?{backgroundSize:J.objectFit||"cover",backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,s.getImageBlurSvg)({widthInt:V,heightInt:$,blurWidth:r,blurHeight:o,blurDataURL:y,objectFit:J.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:E}=function(e,t,n){let{deviceSizes:r,allSizes:o}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:o,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let i=[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))];return{widths:i,kind:"x"}}(t,o,a),c=l.length-1;return{sizes:a||"w"!==E?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===E?e:r+1)+E).join(", "),src:s({config:t,src:n,quality:i,width:l[c]})}}({config:H,src:R,unoptimized:O,width:V,quality:z,sizes:S,loader:B}),ee=R,et=(0,i.useRef)(g);(0,i.useEffect)(()=>{et.current=g},[g]);let en=(0,i.useRef)(v);(0,i.useEffect)(()=>{en.current=v},[v]);let er={isLazy:W,imgAttributes:Q,heightInt:$,widthInt:V,qualityInt:z,className:I,imgStyle:J,blurStyle:q,loading:N,config:H,fetchPriority:D,fill:C,unoptimized:O,placeholder:P,loader:B,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:j,setShowAltText:K,...G};return i.default.createElement(i.default.Fragment,null,i.default.createElement(A,{...er,ref:t}),p?i.default.createElement(a.default,null,i.default.createElement("link",{key:"__nimg-"+Q.src+Q.srcSet+Q.sizes,rel:"preload",as:"image",href:Q.srcSet?void 0:Q.src,imageSrcSet:Q.srcSet,imageSizes:Q.sizes,crossOrigin:G.crossOrigin,referrerPolicy:G.referrerPolicy,...f(D)})):null)}),O=S;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return N}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),s=n(28904),l=n(95514),E=n(27521),c=n(44293),u=n(27473),T=n(81307),d=n(75476),R=n(66318),f=n(29382),A=new Set;function S(e,t,n,r,o,i){if(!i&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let o=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,i=t+"%"+n+"%"+o;if(A.has(i))return;A.add(i)}let s=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function O(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let p=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:A,children:p,prefetch:N=null,passHref:I,replace:h,shallow:_,scroll:m,locale:C,onClick:L,onMouseEnter:g,onTouchStart:v,legacyBehavior:P=!1,...y}=e;n=p,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let D=!1!==N,M=null===N?f.PrefetchKind.AUTO:f.PrefetchKind.FULL,b=o.default.useContext(c.RouterContext),U=o.default.useContext(u.AppRouterContext),w=null!=b?b:U,x=!b,{href:G,as:F}=o.default.useMemo(()=>{if(!b){let e=O(s);return{href:e,as:A?O(A):e}}let[e,t]=(0,i.resolveHref)(b,s,!0);return{href:e,as:A?(0,i.resolveHref)(b,A):t||e}},[b,s,A]),H=o.default.useRef(G),B=o.default.useRef(F);P&&(r=o.default.Children.only(n));let Y=P?r&&"object"==typeof r&&r.ref:t,[k,V,$]=(0,T.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(B.current!==F||H.current!==G)&&($(),B.current=F,H.current=G),k(e),Y&&("function"==typeof Y?Y(e):"object"==typeof Y&&(Y.current=e))},[F,Y,G,$,k]);o.default.useEffect(()=>{w&&V&&D&&S(w,G,F,{locale:C},{kind:M},x)},[F,G,V,C,D,null==b?void 0:b.locale,w,x,M]);let Z={ref:W,onClick(e){P||"function"!=typeof L||L(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),w&&!e.defaultPrevented&&function(e,t,n,r,i,s,l,E,c,u){let{nodeName:T}=e.currentTarget,d="A"===T.toUpperCase();if(d&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let R=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:E,scroll:l}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!u})};c?o.default.startTransition(R):R()}(e,w,G,F,h,_,m,C,x,D)},onMouseEnter(e){P||"function"!=typeof g||g(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),w&&(D||!x)&&S(w,G,F,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:M},x)},onTouchStart(e){P||"function"!=typeof v||v(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),w&&(D||!x)&&S(w,G,F,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:M},x)}};if((0,l.isAbsoluteUrl)(F))Z.href=F;else if(!P||I||"a"===r.type&&!("href"in r.props)){let e=void 0!==C?C:null==b?void 0:b.locale,t=(null==b?void 0:b.isLocaleDomain)&&(0,d.getDomainLocale)(F,e,null==b?void 0:b.locales,null==b?void 0:b.domainLocales);Z.href=t||(0,R.addBasePath)((0,E.addLocale)(F,e,null==b?void 0:b.defaultLocale))}return P?o.default.cloneElement(r,Z):o.default.createElement("a",{...y,...Z},n)}),N=p;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,E=l||!i,[c,u]=(0,r.useState)(!1),T=(0,r.useRef)(null),d=(0,r.useCallback)(e=>{T.current=e},[]);(0,r.useEffect)(()=>{if(i){if(E||c)return;let e=T.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map,i=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:i,elements:o},s.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&u(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,o.requestIdleCallback)(()=>u(!0));return()=>(0,o.cancelIdleCallback)(e)}},[E,n,t,c,T.current]);let R=(0,r.useCallback)(()=>{u(!1)},[]);return[d,c,R]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38083:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:o,blurDataURL:i,objectFit:a}=e,s=r||t,l=o||n,E=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return s&&l?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+s+" "+l+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+E+"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E":"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='"+("contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},31720:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:o}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},98751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return a}});let r=n(61757),o=r._(n(67294)),i=o.default.createContext(null);function a(e){let t=(0,o.useContext)(i);t&&t(e)}},26466:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return en}});var r=n(85893),o=n(41468),i=n(82353),a=n(25519),s=n(7134),l=n(93967),E=n.n(l),c=n(67294),u=function(e){let{onlyAvatar:t=!1}=e,[n,o]=(0,c.useState)();return(0,c.useEffect)(()=>{try{var e;let t=JSON.parse(null!==(e=localStorage.getItem(a.C9))&&void 0!==e?e:"");o(t)}catch(e){return}},[]),(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,r.jsx)("div",{className:E()("flex items-center group w-full",{"justify-center":t,"justify-between":!t}),children:(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(s.C,{src:null==n?void 0:n.avatar_url,className:"bg-gradient-to-tr from-[#31afff] to-[#1677ff] cursor-pointer",children:null==n?void 0:n.nick_name}),(0,r.jsx)("span",{className:E()("text-sm",{hidden:t}),children:null==n?void 0:n.nick_name})]})})})},T=n(16165),d=n(10524),R=n(84477),f=n(19944),A=n(83062),S=n(55241),O=n(30381),p=n.n(O);n(83839);var N=n(25675),I=n.n(N),h=n(41664),_=n.n(h),m=n(11163),C=n(67421),L=function(){let{isMenuExpand:e,setIsMenuExpand:t,mode:n,setMode:s,adminList:l}=(0,c.useContext)(o.p),{pathname:O}=(0,m.useRouter)(),{t:N,i18n:h}=(0,C.$G)(),[L,g]=(0,c.useState)("/logo_zh_latest.png"),v=(0,c.useMemo)(()=>{let{user_id:e}=JSON.parse(localStorage.getItem(a.C9)||"{}");return l.some(t=>t.user_id===e)},[l]),P=(0,c.useCallback)(()=>{t(!e)},[e,t]),y=(0,c.useCallback)(()=>{let e="light"===n?"dark":"light";s(e),localStorage.setItem(a.he,e)},[n,s]),D=(0,c.useCallback)(()=>{let e="en"===h.language?"zh":"en";h.changeLanguage(e),"zh"===e&&p().locale("zh-cn"),"en"===e&&p().locale("en"),localStorage.setItem(a.Yl,e)},[h]),M=(0,c.useMemo)(()=>{let t=[{key:"theme",name:N("Theme"),icon:"dark"===n?(0,r.jsx)(T.Z,{component:i.FD}):(0,r.jsx)(T.Z,{component:i.ol}),items:[{key:"light",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(I(),{src:"/pictures/theme_light.png",alt:"english",width:38,height:32}),(0,r.jsx)("span",{children:"Light"})]}),(0,r.jsx)("span",{className:E()({block:"light"===n,hidden:"light"!==n}),children:"✓"})]})},{key:"dark",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(I(),{src:"/pictures/theme_dark.png",alt:"english",width:38,height:32}),(0,r.jsx)("span",{children:"Dark"})]}),(0,r.jsx)("span",{className:E()({block:"dark"===n,hidden:"dark"!==n}),children:"✓"})]})}],onClick:y,onSelect:e=>{let{key:t}=e;n!==t&&(s(t),localStorage.setItem(a.he,t))},defaultSelectedKeys:[n],placement:"topLeft"},{key:"language",name:N("language"),icon:(0,r.jsx)(d.Z,{}),items:[{key:"en",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2",children:[(0,r.jsx)(I(),{src:"/icons/english.png",alt:"english",width:21,height:21}),(0,r.jsx)("span",{children:"English"})]}),(0,r.jsx)("span",{className:E()({block:"en"===h.language,hidden:"en"!==h.language}),children:"✓"})]})},{key:"zh",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2",children:[(0,r.jsx)(I(),{src:"/icons/zh.png",alt:"english",width:21,height:21}),(0,r.jsx)("span",{children:"简体中文"})]}),(0,r.jsx)("span",{className:E()({block:"zh"===h.language,hidden:"zh"!==h.language}),children:"✓"})]})}],onSelect:e=>{let{key:t}=e;h.language!==t&&(h.changeLanguage(t),"zh"===t&&p().locale("zh-cn"),"en"===t&&p().locale("en"),localStorage.setItem(a.Yl,t))},onClick:D,defaultSelectedKeys:[h.language]},{key:"fold",name:N(e?"Close_Sidebar":"Show_Sidebar"),icon:e?(0,r.jsx)(R.Z,{}):(0,r.jsx)(f.Z,{}),onClick:P,noDropdownItem:!0}];return t},[N,n,y,h,D,e,P,s]),b=(0,c.useMemo)(()=>{let e=[{key:"chat",name:N("chat_online"),icon:(0,r.jsx)(I(),{src:"/chat"===O?"/pictures/chat_active.png":"/pictures/chat.png",alt:"chat_image",width:40,height:40},"image_chat"),path:"/chat",isActive:O.startsWith("/chat")},{key:"explore",name:N("explore"),isActive:"/"===O,icon:(0,r.jsx)(I(),{src:"/"===O?"/pictures/explore_active.png":"/pictures/explore.png",alt:"construct_image",width:40,height:40},"image_explore"),path:"/"},{key:"construct",name:N("construct"),isActive:O.startsWith("/construct"),icon:(0,r.jsx)(I(),{src:O.startsWith("/construct")?"/pictures/app_active.png":"/pictures/app.png",alt:"construct_image",width:40,height:40},"image_construct"),path:"/construct/app"}];return v&&e.push({key:"evaluation",name:"场景评测",icon:(0,r.jsx)(I(),{src:O.startsWith("/evaluation")?"/pictures/app_active.png":"/pictures/app.png",alt:"construct_image",width:40,height:40},"image_construct"),path:"/evaluation",isActive:"/evaluation"===O}),e},[N,O,v]);return((0,c.useEffect)(()=>{let e=h.language;"zh"===e&&p().locale("zh-cn"),"en"===e&&p().locale("en")},[]),(0,c.useEffect)(()=>{g("dark"===n?"/logo_s_latest.png":"/logo_zh_latest.png")},[n]),e)?(0,r.jsxs)("div",{className:"flex flex-col justify-between h-screen px-4 pt-4 bg-bar dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(_(),{href:"/",className:"flex items-center justify-center p-2 pb-4",children:(0,r.jsx)(I(),{src:e?L:"/LOGO_SMALL.png",alt:"DB-GPT",width:180,height:40})}),(0,r.jsx)("div",{className:"flex flex-col gap-4",children:b.map(e=>(0,r.jsxs)(_(),{href:e.path,className:E()("flex items-center w-full h-12 px-4 cursor-pointer hover:bg-[#F1F5F9] dark:hover:bg-theme-dark hover:rounded-xl",{"bg-white rounded-xl dark:bg-black":e.isActive}),children:[(0,r.jsx)("div",{className:"mr-3",children:e.icon}),(0,r.jsx)("span",{className:"text-sm",children:N(e.name)})]},e.key))})]}),(0,r.jsxs)("div",{className:"pt-4",children:[(0,r.jsx)("span",{className:E()("flex items-center w-full h-12 px-4 bg-[#F1F5F9] dark:bg-theme-dark rounded-xl"),children:(0,r.jsx)("div",{className:"mr-3 w-full",children:(0,r.jsx)(u,{})})}),(0,r.jsx)("div",{className:"flex items-center justify-around py-4 mt-2 border-t border-dashed border-gray-200 dark:border-gray-700",children:M.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(S.Z,{content:e.name,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center cursor-pointer text-xl",onClick:e.onClick,children:e.icon})})},e.key))})]})]}):(0,r.jsxs)("div",{className:"flex flex-col justify-between pt-4 h-screen bg-bar dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(_(),{href:"/",className:"flex justify-center items-center pb-4",children:(0,r.jsx)(I(),{src:e?L:"/LOGO_SMALL.png",alt:"DB-GPT",width:40,height:40})}),(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center",children:b.map(e=>(0,r.jsx)(_(),{className:"h-12 flex items-center",href:e.path,children:null==e?void 0:e.icon},e.key))})]}),(0,r.jsxs)("div",{className:"py-4",children:[(0,r.jsx)(u,{onlyAvatar:!0}),M.filter(e=>e.noDropdownItem).map(e=>(0,r.jsx)(A.Z,{title:e.name,placement:"right",children:(0,r.jsx)("div",{className:"flex items-center justify-center mx-auto rounded w-14 h-14 text-xl hover:bg-[#F1F5F9] dark:hover:bg-theme-dark transition-colors cursor-pointer ".concat(""),onClick:e.onClick,children:e.icon})},e.key))]})]})},g=n(93045),v=n(14079),P=n(12652),y=()=>(0,r.jsx)(P.Z.Group,{trigger:"hover",icon:(0,r.jsx)(g.Z,{}),children:(0,r.jsx)(P.Z,{icon:(0,r.jsx)(v.Z,{}),href:"http://docs.dbgpt.cn",target:"_blank",tooltip:"Doucuments"})}),D=n(25446),M=n(67164),b=n(2790),U=n(1393),w=n(25976),x=n(33083),G=n(372),F=n(69594),H=n(84898),B=n(57),Y=n(10274);let k=(e,t)=>new Y.C(e).setAlpha(t).toRgbString(),V=(e,t)=>{let n=new Y.C(e);return n.lighten(t).toHexString()},$=e=>{let t=(0,H.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},W=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:k(r,.85),colorTextSecondary:k(r,.65),colorTextTertiary:k(r,.45),colorTextQuaternary:k(r,.25),colorFill:k(r,.18),colorFillSecondary:k(r,.12),colorFillTertiary:k(r,.08),colorFillQuaternary:k(r,.04),colorBgElevated:V(n,12),colorBgContainer:V(n,8),colorBgLayout:V(n,0),colorBgSpotlight:V(n,26),colorBgBlur:k(r,.04),colorBorder:V(n,26),colorBorderSecondary:V(n,19)}};var Z={defaultSeed:x.u_.token,useToken:function(){let[e,t,n]=(0,w.ZP)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:M.Z,darkAlgorithm:(e,t)=>{let n=Object.keys(b.M).map(t=>{let n=(0,H.R_)(e[t],{theme:"dark"});return Array(10).fill(1).reduce((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),r=null!=t?t:(0,M.Z)(e);return Object.assign(Object.assign(Object.assign({},r),n),(0,B.Z)(e,{generateColorPalettes:$,generateNeutralColorPalettes:W}))},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,M.Z)(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,F.Z)(r)),{controlHeight:o}),(0,G.Z)(Object.assign(Object.assign({},n),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,D.jG)(e.algorithm):(0,D.jG)(M.Z),n=Object.assign(Object.assign({},b.Z),null==e?void 0:e.token);return(0,D.t2)(n,{override:null==e?void 0:e.token},t,U.Z)},defaultConfig:x.u_,_internalContext:x.Mj},j=n(28459),X=n(31418),K=n(18253),z=n(82925),J=n(9008),q=n.n(J);n(64371),n(90833),n(80864);let Q=(e,t)=>({...Z.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function ee(e){let{children:t}=e,{mode:n}=(0,c.useContext)(o.p),{i18n:i}=(0,C.$G)();return(0,c.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,c.useEffect)(()=>{var e;null===(e=i.changeLanguage)||void 0===e||e.call(i,window.localStorage.getItem(a.Yl)||"zh")},[i]),(0,r.jsx)("div",{children:t})}function et(e){let{children:t}=e,{isMenuExpand:n,mode:i}=(0,c.useContext)(o.p),{i18n:s}=(0,C.$G)(),[l,u]=(0,c.useState)(!1),T=(0,m.useRouter)(),d=async()=>{u(!1);let e={user_channel:"dbgpt",user_no:"001",nick_name:"dbgpt"};e&&(localStorage.setItem(a.C9,JSON.stringify(e)),localStorage.setItem(a.Sc,Date.now().toString()),u(!0))};return((0,c.useEffect)(()=>{d()},[]),l)?(0,r.jsx)(j.ZP,{locale:"en"===s.language?K.Z:z.Z,theme:{token:{colorPrimary:"#0C75FC",borderRadius:4},algorithm:"dark"===i?Q:void 0},children:(0,r.jsx)(X.Z,{children:T.pathname.includes("mobile")?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,r.jsx)(q(),{children:(0,r.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width, maximum-scale=1"})}),"/construct/app/extra"!==T.pathname&&(0,r.jsx)("div",{className:E()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,r.jsx)(L,{})}),(0,r.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t}),(0,r.jsx)(y,{})]})})}):null}var en=function(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(o.R,{children:(0,r.jsx)(ee,{children:(0,r.jsx)(et,{children:(0,r.jsx)(t,{...n})})})})}},19284:function(e,t,n){"use strict";n.d(t,{Hf:function(){return o},S$:function(){return s},ab:function(){return a}});let r="/models/huggingface.svg",o=new Proxy({},{get:(e,t)=>({label:function(e){var t;if(!e)return"";if(null===(t=i[e])||void 0===t?void 0:t.label)return i[e].label;let n=e.toLowerCase();for(let t in i){let r=i[t];if(r.patterns&&r.patterns.some(e=>n.includes(e.toLowerCase()))){let t=e.match(/[-_](\d+b|\d+\.\d+b?|v\d+(\.\d+)?)/i),n=e.match(/[-_](\d+b)/i),o=r.label;return t&&!n&&(o+=" ".concat(t[1])),n&&(o+=" ".concat(n[1])),o}}return e}(t),icon:a(t)})}),i={deepseek:{label:"DeepSeek",icon:"/models/deepseek.png",patterns:["deepseek","r1"]},qwen:{label:"Qwen",icon:"/models/qwen2.png",patterns:["qwen","qwen2","qwen2.5","qwq","qvq"]},gemini:{label:"Gemini",icon:"/models/gemini.png",patterns:["gemini"]},moonshot:{label:"Moonshot",icon:"/models/moonshot.png",patterns:["moonshot","kimi"]},doubao:{label:"Doubao",icon:"/models/doubao.png",patterns:["doubao"]},ernie:{label:"ERNIE",icon:"/models/ernie.png",patterns:["ernie"]},proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png",patterns:["proxy"]},chatgpt:{label:"ChatGPT",icon:"/models/chatgpt.png",patterns:["chatgpt","gpt","o1","o3"]},vicuna:{label:"Vicuna",icon:"/models/vicuna.jpeg",patterns:["vicuna"]},chatglm:{label:"ChatGLM",icon:"/models/chatglm.png",patterns:["chatglm","glm"]},llama:{label:"Llama",icon:"/models/llama.jpg",patterns:["llama","llama2","llama3"]},baichuan:{label:"Baichuan",icon:"/models/baichuan.png",patterns:["baichuan"]},claude:{label:"Claude",icon:"/models/claude.png",patterns:["claude"]},bard:{label:"Bard",icon:"/models/bard.gif",patterns:["bard"]},tongyi:{label:"Tongyi",icon:"/models/tongyi.apng",patterns:["tongyi"]},yi:{label:"Yi",icon:"/models/yi.svg",patterns:["yi"]},bailing:{label:"Bailing",icon:"/models/bailing.svg",patterns:["bailing"]},wizardlm:{label:"WizardLM",icon:"/models/wizardlm.png",patterns:["wizard"]},internlm:{label:"InternLM",icon:"/models/internlm.png",patterns:["internlm"]},solar:{label:"Solar",icon:"/models/solar_logo.png",patterns:["solar"]},gorilla:{label:"Gorilla",icon:"/models/gorilla.png",patterns:["gorilla"]},zhipu:{label:"Zhipu",icon:"/models/zhipu.png",patterns:["zhipu"]},falcon:{label:"Falcon",icon:"/models/falcon.jpeg",patterns:["falcon"]},huggingface:{label:"Hugging Face",icon:"/models/huggingface.svg",patterns:["huggingface","hf"]}};function a(e){var t;if(!e)return r;let n=e.toLowerCase();if(null===(t=i[e])||void 0===t?void 0:t.icon)return i[e].icon;for(let e in i){let t=i[e];if(t.patterns&&t.patterns.some(e=>n.includes(e.toLowerCase())))return t.icon}let o=n.split(/[-_]/);if(o.length>0){let e=o[0];for(let t in i)if(e===t.toLowerCase())return i[t].icon}return r}let s={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},oceanbase:{label:"OceanBase",icon:"/icons/oceanbase.png",desc:"An Ultra-Fast & Cost-Effective Distributed SQL Database."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},omc:{label:"Omc",icon:"/icons/odc.png",desc:"Omc meta data."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},vertica:{label:"Vertica",icon:"/icons/vertica.png",desc:"Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."},tugraph:{label:"TuGraph",icon:"/icons/tugraph.png",desc:"TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University."}}},25519:function(e,t,n){"use strict";var r,o;n.d(t,{gp:function(){return i},rU:function(){return l},Yl:function(){return s},he:function(){return a},C9:function(){return E},Sc:function(){return c}}),(o=r||(r={}))[o.NO_PERMISSION=-1]="NO_PERMISSION",o[o.SERVICE_ERROR=-2]="SERVICE_ERROR",o[o.INVALID=-3]="INVALID",o[o.IS_EXITS=-4]="IS_EXITS",o[o.MISSING_PARAMETER=-5]="MISSING_PARAMETER";let i="user-id",a="__db_gpt_theme_key",s="__db_gpt_lng_key",l="__db_gpt_im_key",E="__db_gpt_uinfo_key",c="__db_gpt_uinfo_vt_key"},62418:function(e,t,n){"use strict";let r,o,i;n.d(t,{zN:function(){return ro},rU:function(){return rr},S$:function(){return n7.S$},_m:function(){return ri},a_:function(){return re},n5:function(){return rt},Ev:function(){return rs},Hb:function(){return ra}});var a,s,l,E={};n.r(E),n.d(E,{bigquery:function(){return F},db2:function(){return X},hive:function(){return er},mariadb:function(){return eT},mysql:function(){return eI},n1ql:function(){return ey},plsql:function(){return eH},postgresql:function(){return eX},redshift:function(){return e4},singlestoredb:function(){return tj},snowflake:function(){return t2},spark:function(){return tn},sql:function(){return tN},sqlite:function(){return tu},transactsql:function(){return tF},trino:function(){return tP}}),(a=r||(r={})).QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",a.IDENTIFIER="IDENTIFIER",a.STRING="STRING",a.VARIABLE="VARIABLE",a.RESERVED_KEYWORD="RESERVED_KEYWORD",a.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",a.RESERVED_PHRASE="RESERVED_PHRASE",a.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",a.RESERVED_CLAUSE="RESERVED_CLAUSE",a.RESERVED_SELECT="RESERVED_SELECT",a.RESERVED_JOIN="RESERVED_JOIN",a.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",a.ARRAY_KEYWORD="ARRAY_KEYWORD",a.CASE="CASE",a.END="END",a.WHEN="WHEN",a.ELSE="ELSE",a.THEN="THEN",a.LIMIT="LIMIT",a.BETWEEN="BETWEEN",a.AND="AND",a.OR="OR",a.XOR="XOR",a.OPERATOR="OPERATOR",a.COMMA="COMMA",a.ASTERISK="ASTERISK",a.DOT="DOT",a.OPEN_PAREN="OPEN_PAREN",a.CLOSE_PAREN="CLOSE_PAREN",a.LINE_COMMENT="LINE_COMMENT",a.BLOCK_COMMENT="BLOCK_COMMENT",a.NUMBER="NUMBER",a.NAMED_PARAMETER="NAMED_PARAMETER",a.QUOTED_PARAMETER="QUOTED_PARAMETER",a.NUMBERED_PARAMETER="NUMBERED_PARAMETER",a.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",a.CUSTOM_PARAMETER="CUSTOM_PARAMETER",a.DELIMITER="DELIMITER",a.EOF="EOF";let c=e=>({type:r.EOF,raw:"\xabEOF\xbb",text:"\xabEOF\xbb",start:e}),u=c(1/0),T=e=>t=>t.type===e.type&&t.text===e.text,d={ARRAY:T({text:"ARRAY",type:r.RESERVED_KEYWORD}),BY:T({text:"BY",type:r.RESERVED_KEYWORD}),SET:T({text:"SET",type:r.RESERVED_CLAUSE}),STRUCT:T({text:"STRUCT",type:r.RESERVED_KEYWORD}),WINDOW:T({text:"WINDOW",type:r.RESERVED_CLAUSE})},R=e=>e===r.RESERVED_KEYWORD||e===r.RESERVED_FUNCTION_NAME||e===r.RESERVED_PHRASE||e===r.RESERVED_CLAUSE||e===r.RESERVED_SELECT||e===r.RESERVED_SET_OPERATION||e===r.RESERVED_JOIN||e===r.ARRAY_KEYWORD||e===r.CASE||e===r.END||e===r.WHEN||e===r.ELSE||e===r.THEN||e===r.LIMIT||e===r.BETWEEN||e===r.AND||e===r.OR||e===r.XOR,f=e=>e===r.AND||e===r.OR||e===r.XOR,A=e=>e.flatMap(S),S=e=>h(I(e)).map(e=>e.trim()),O=/[^[\]{}]+/y,p=/\{.*?\}/y,N=/\[.*?\]/y,I=e=>{let t=0,n=[];for(;te.trim());n.push(["",...e]),t+=o[0].length}p.lastIndex=t;let i=p.exec(e);if(i){let e=i[0].slice(1,-1).split("|").map(e=>e.trim());n.push(e),t+=i[0].length}if(!r&&!o&&!i)throw Error(`Unbalanced parenthesis in: ${e}`)}return n},h=([e,...t])=>void 0===e?[""]:h(t).flatMap(t=>e.map(e=>e.trim()+" "+t.trim())),_=e=>[...new Set(e)],m=e=>e[e.length-1],C=e=>e.sort((e,t)=>t.length-e.length||e.localeCompare(t)),L=e=>e.reduce((e,t)=>Math.max(e,t.length),0),g=e=>e.replace(/\s+/gu," "),v=e=>_(Object.values(e).flat()),P=e=>/\n/.test(e),y=v({keywords:["ALL","AND","ANY","ARRAY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LIKE","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","STRUCT","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN"],datatypes:["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],stringFormat:["HEX","BASEX","BASE64M","ASCII","UTF-8","UTF8"],misc:["SAFE"],ddl:["LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"]}),D=v({aead:["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH"],aggregateAnalytic:["ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP"],aggregate:["ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM"],approximateAggregate:["APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM"],array:["ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL"],bitwise:["BIT_COUNT"],conversion:["PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST"],date:["CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE"],datetime:["CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME"],debugging:["ERROR"],federatedQuery:["EXTERNAL_QUERY"],geography:["S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y"],hash:["FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512"],hll:["HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT"],interval:["MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL"],json:["JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING"],math:["ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET"],navigation:["FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC"],net:["NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN"],numbering:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER"],security:["SESSION_USER"],statisticalAggregate:["CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE"],string:["ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER"],time:["CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME"],timestamp:["CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS"],uuid:["GENERATE_UUID"],conditional:["COALESCE","IF","IFNULL","NULLIF"],legacyAggregate:["AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP"],legacyBitwise:["BIT_COUNT"],legacyCasting:["BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING"],legacyComparison:["COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL"],legacyDatetime:["CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR"],legacyIp:["FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP"],legacyJson:["JSON_EXTRACT","JSON_EXTRACT_SCALAR"],legacyMath:["ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH"],legacyRegex:["REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE"],legacyString:["CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER"],legacyTableWildcard:["TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY"],legacyUrl:["HOST","DOMAIN","TLD"],legacyWindow:["AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER"],legacyMisc:["CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64"],other:["BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW"],ddl:["OPTIONS"],pivot:["PIVOT","UNPIVOT"],dataTypes:["BYTES","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","STRING"]}),M=A(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),b=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),U=A(["UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),w=A(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),x=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),G=A(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),F={tokenizerOptions:{reservedSelect:M,reservedClauses:[...b,...U],reservedSetOperations:w,reservedJoins:x,reservedPhrases:G,reservedKeywords:y,reservedFunctionNames:D,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"'''..'''",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:function(e){var t;let n;return t=function(e){let t=[];for(let o=0;o"===t.text?n--:">>"===t.text&&(n-=2),0===n)return r}return e.length-1}(e,o+1),a=e.slice(o,n+1);t.push({type:r.IDENTIFIER,raw:a.map(H("raw")).join(""),text:a.map(H("text")).join(""),start:i.start}),o=n}else t.push(i)}return t}(e),n=u,t.map(e=>"OFFSET"===e.text&&"["===n.text?(n=e,{...e,type:r.RESERVED_FUNCTION_NAME}):(n=e,e))}},formatOptions:{onelineClauses:U}},H=e=>t=>t.type===r.IDENTIFIER||t.type===r.COMMA?t[e]+" ":t[e],B=v({aggregate:["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG"],scalar:["ABS","ABSVAL","ACOS","ADD_DAYS","ADD_MONTHS","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ARRAY_TRIM","ASCII","ASCII_CHR","ASCII_STR","ASCIISTR","ASIN","ATAN","ATANH","ATAN2","BIGINT","BINARY","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BLOB","BTRIM","CARDINALITY","CCSID_ENCODING","CEILING","CEIL","CHAR","CHAR9","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CLOB","COALESCE","COLLATION_KEY","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","DATE","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DBCLOB","DECFLOAT","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECIMAL","DEC","DECODE","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DECRYPT_DATAKEY_BIGINT","DECRYPT_DATAKEY_BIT","DECRYPT_DATAKEY_CLOB","DECRYPT_DATAKEY_DBCLOB","DECRYPT_DATAKEY_DECIMAL","DECRYPT_DATAKEY_INTEGER","DECRYPT_DATAKEY_VARCHAR","DECRYPT_DATAKEY_VARGRAPHIC","DEGREES","DIFFERENCE","DIGITS","DOUBLE_PRECISION","DOUBLE","DSN_XMLVALIDATE","EBCDIC_CHR","EBCDIC_STR","ENCRYPT_DATAKEY","ENCRYPT_TDES","EXP","EXTRACT","FLOAT","FLOOR","GENERATE_UNIQUE","GENERATE_UNIQUE_BINARY","GETHINT","GETVARIABLE","GRAPHIC","GREATEST","HASH","HASH_CRC32","HASH_MD5","HASH_SHA1","HASH_SHA256","HEX","HOUR","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTEGER","INT","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LOCATE","LOCATE_IN_STRING","LOG10","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NORMALIZE_DECFLOAT","NORMALIZE_STRING","NULLIF","NVL","OVERLAY","PACK","POSITION","POSSTR","POWER","POW","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND","ROUND_TIMESTAMP","ROWID","RPAD","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SMALLINT","SOUNDEX","SOAPHTTPC","SOAPHTTPV","SOAPHTTPNC","SOAPHTTPNV","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TAN","TANH","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMP_TZ","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TOTALORDER","TO_TIMESTAMP","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRUNC","TRUNC_TIMESTAMP","UCASE","UNICODE","UNICODE_STR","UNISTR","UPPER","VALUE","VARBINARY","VARCHAR","VARCHAR9","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARGRAPHIC","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLMODIFY","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLSERIALIZE","XMLTEXT","XMLXSROBJECTID","XSLTRANSFORM","YEAR"],table:["ADMIN_TASK_LIST","ADMIN_TASK_OUTPUT","ADMIN_TASK_STATUS","BLOCKING_THREADS","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE"],row:["UNPACK"],olap:["CUME_DIST","PERCENT_RANK","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT"],cast:["CAST"]}),Y=v({standard:["ALL","ALLOCATE","ALLOW","ALTERAND","ANY","AS","ARRAY","ARRAY_EXISTS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","AUDIT","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BUFFERPOOL","BY","CAPTURE","CASCADED","CAST","CCSID","CHARACTER","CHECK","CLONE","CLUSTER","COLLECTION","COLLID","COLUMN","CONDITION","CONNECTION","CONSTRAINT","CONTENT","CONTINUE","CREATE","CUBE","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRVAL","CURSOR","DATA","DATABASE","DBINFO","DECLARE","DEFAULT","DESCRIPTOR","DETERMINISTIC","DISABLE","DISALLOW","DISTINCT","DO","DOCUMENT","DSSIZE","DYNAMIC","EDITPROC","ELSE","ELSEIF","ENCODING","ENCRYPTION","ENDING","END-EXEC","ERASE","ESCAPE","EXCEPTION","EXISTS","EXIT","EXTERNAL","FENCED","FIELDPROC","FINAL","FIRST","FOR","FREE","FULL","FUNCTION","GENERATED","GET","GLOBAL","GOTO","GROUP","HANDLER","HOLD","HOURS","IF","IMMEDIATE","IN","INCLUSIVE","INDEX","INHERIT","INNER","INOUT","INSENSITIVE","INTO","IS","ISOBID","ITERATE","JAR","KEEP","KEY","LANGUAGE","LAST","LC_CTYPE","LEAVE","LIKE","LOCAL","LOCALE","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","MAINTAINED","MATERIALIZED","MICROSECONDS","MINUTEMINUTES","MODIFIES","MONTHS","NEXT","NEXTVAL","NO","NONE","NOT","NULL","NULLS","NUMPARTS","OBID","OF","OLD","ON","OPTIMIZATION","OPTIMIZE","ORDER","ORGANIZATION","OUT","OUTER","PACKAGE","PARAMETER","PART","PADDED","PARTITION","PARTITIONED","PARTITIONING","PATH","PIECESIZE","PERIOD","PLAN","PRECISION","PREVVAL","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","READS","REFERENCES","RESIGNAL","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","ROLE","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROW","ROWSET","SCHEMA","SCRATCHPAD","SECONDS","SECQTY","SECURITY","SEQUENCE","SENSITIVE","SESSION_USER","SIMPLE","SOME","SOURCE","SPECIFIC","STANDARD","STATIC","STATEMENT","STAY","STOGROUP","STORES","STYLE","SUMMARY","SYNONYM","SYSDATE","SYSTEM","SYSTIMESTAMP","TABLE","TABLESPACE","THEN","TO","TRIGGER","TYPE","UNDO","UNIQUE","UNTIL","USER","USING","VALIDPROC","VARIABLE","VARIANT","VCAT","VERSIONING","VIEW","VOLATILE","VOLUMES","WHILE","WLM","XMLEXISTS","XMLCAST","YEARS","ZONE"]}),k=A(["SELECT [ALL | DISTINCT]"]),V=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","FETCH FIRST","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT","CREATE [OR REPLACE] VIEW","CREATE [GLOBAL TEMPORARY] TABLE"]),$=A(["UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [HIERARCHY]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {IDENTITY | EXPRESSION | DEFAULT | NOT NULL}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","AFTER","GO","ALLOCATE CURSOR","ALTER DATABASE","ALTER FUNCTION","ALTER INDEX","ALTER MASK","ALTER PERMISSION","ALTER PROCEDURE","ALTER SEQUENCE","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE LOCATORS","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT","COMMIT","CONNECT","CREATE ALIAS","CREATE AUXILIARY TABLE","CREATE DATABASE","CREATE FUNCTION","CREATE GLOBAL TEMPORARY TABLE","CREATE INDEX","CREATE LOB TABLESPACE","CREATE MASK","CREATE PERMISSION","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE STOGROUP","CREATE SYNONYM","CREATE TABLESPACE","CREATE TRIGGER","CREATE TRUSTED CONTEXT","CREATE TYPE","CREATE VARIABLE","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE STATEMENT","DECLARE TABLE","DECLARE VARIABLE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE OUTPUT","DESCRIBE PROCEDURE","DESCRIBE TABLE","DROP","END DECLARE SECTION","EXCHANGE","EXECUTE","EXECUTE IMMEDIATE","EXPLAIN","FETCH","FREE LOCATOR","GET DIAGNOSTICS","GRANT","HOLD LOCATOR","INCLUDE","LABEL","LOCK TABLE","OPEN","PREPARE","REFRESH","RELEASE","RELEASE SAVEPOINT","RENAME","REVOKE","ROLLBACK","SAVEPOINT","SELECT INTO","SET CONNECTION","SET CURRENT ACCELERATOR","SET CURRENT APPLICATION COMPATIBILITY","SET CURRENT APPLICATION ENCODING SCHEME","SET CURRENT DEBUG MODE","SET CURRENT DECFLOAT ROUNDING MODE","SET CURRENT DEGREE","SET CURRENT EXPLAIN MODE","SET CURRENT GET_ACCEL_ARCHIVE","SET CURRENT LOCALE LC_CTYPE","SET CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION","SET CURRENT OPTIMIZATION HINT","SET CURRENT PACKAGE PATH","SET CURRENT PACKAGESET","SET CURRENT PRECISION","SET CURRENT QUERY ACCELERATION","SET CURRENT QUERY ACCELERATION WAITFORDATA","SET CURRENT REFRESH AGE","SET CURRENT ROUTINE VERSION","SET CURRENT RULES","SET CURRENT SQLID","SET CURRENT TEMPORAL BUSINESS_TIME","SET CURRENT TEMPORAL SYSTEM_TIME","SET ENCRYPTION PASSWORD","SET PATH","SET SESSION TIME ZONE","SIGNAL","VALUES INTO","WHENEVER"]),W=A(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Z=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),j=A(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),X={tokenizerOptions:{reservedSelect:k,reservedClauses:[...V,...$],reservedSetOperations:W,reservedJoins:Z,reservedPhrases:j,reservedKeywords:Y,reservedFunctionNames:B,stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","\xac=","\xac>","\xac<","!>","!<","||"]},formatOptions:{onelineClauses:$}},K=v({math:["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET"],array:["ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY"],conversion:["BINARY","CAST"],date:["ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR"],conditional:["ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL"],string:["ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER"],masking:["MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N"],misc:["AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION"],aggregate:["AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],table:["EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK"],window:["LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],dataTypes:["DECIMAL","NUMERIC","VARCHAR","CHAR"]}),z=v({nonReserved:["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","STRUCT","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE"],reserved:["ALL","ALTER","AND","ARRAY","AS","AUTHORIZATION","BETWEEN","BIGINT","BINARY","BOOLEAN","BOTH","BY","CASE","CAST","CHAR","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DATE","DECIMAL","DELETE","DESCRIBE","DISTINCT","DOUBLE","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FLOAT","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INT","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MAP","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","SMALLINT","TABLE","TABLESAMPLE","THEN","TIMESTAMP","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","VARCHAR","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","INTEGER","PRECISION","VIEWS","TIME","NUMERIC","SYNC"],fileTypes:["TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"]}),J=A(["SELECT [ALL | DISTINCT]"]),q=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),Q=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),ee=A(["UNION [ALL | DISTINCT]"]),et=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),en=A(["{ROWS | RANGE} BETWEEN"]),er={tokenizerOptions:{reservedSelect:J,reservedClauses:[...q,...Q],reservedSetOperations:ee,reservedJoins:et,reservedPhrases:en,reservedKeywords:z,reservedFunctionNames:K,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:Q}},eo=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALL","ALGORITHM","ALTER","ALWAYS","ANALYZE","AND","ANY","AS","ASC","ASCII","ASENSITIVE","AT","ATOMIC","AUTHORS","AUTO_INCREMENT","AUTOEXTEND_SIZE","AUTO","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BODY","BOOL","BOOLEAN","BOTH","BTREE","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHANGE","CHANGED","CHAR","CHARACTER","CHARSET","CHECK","CHECKPOINT","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLOB","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMN_NAME","COLUMNS","COLUMN_ADD","COLUMN_CHECK","COLUMN_CREATE","COLUMN_DELETE","COLUMN_GET","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPRESSED","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONTRIBUTORS","CONVERT","CPU","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_POS","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","CYCLE","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DES_KEY_FILE","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DO_DOMAIN_IDS","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","ELSIF","EMPTY","ENABLE","ENCLOSED","END","ENDS","ENGINE","ENGINES","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXAMINED","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXCEPTION","EXISTS","EXIT","EXPANSION","EXPIRE","EXPORT","EXPLAIN","EXTENDED","EXTENT_SIZE","FALSE","FAST","FAULTS","FEDERATED","FETCH","FIELDS","FILE","FIRST","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GET_FORMAT","GET","GLOBAL","GOTO","GRANT","GRANTS","GROUP","HANDLER","HARD","HASH","HAVING","HELP","HIGH_PRIORITY","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORED","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IMMEDIATE","IMPORT","INTERSECT","IN","INCREMENT","INDEX","INDEXES","INFILE","INITIAL_SIZE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INVISIBLE","INTO","IO","IO_THREAD","IPC","IS","ISOLATION","ISOPEN","ISSUER","ITERATE","INVOKER","JOIN","JSON","JSON_TABLE","KEY","KEYS","KEY_BLOCK_SIZE","KILL","LANGUAGE","LAST","LAST_VALUE","LASTVAL","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_GTID_POS","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_SERVER_ID","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_USER","MASTER_USE_GTID","MASTER_HEARTBEAT_PERIOD","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_STATEMENT_TIME","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MAXVALUE","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUS","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONITOR","MONTH","MUTEX","MYSQL","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NESTED","NEVER","NEW","NEXT","NEXTVAL","NO","NOMAXVALUE","NOMINVALUE","NOCACHE","NOCYCLE","NO_WAIT","NOWAIT","NODEGROUP","NONE","NOT","NOTFOUND","NO_WRITE_TO_BINLOG","NULL","NUMBER","NUMERIC","NVARCHAR","OF","OFFSET","OLD_PASSWORD","ON","ONE","ONLINE","ONLY","OPEN","OPTIMIZE","OPTIONS","OPTION","OPTIONALLY","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OUTFILE","OVER","OVERLAPS","OWNER","PACKAGE","PACK_KEYS","PAGE","PAGE_CHECKSUM","PARSER","PARSE_VCOL_EXPR","PATH","PERIOD","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PERSISTENT","PHASE","PLUGIN","PLUGINS","PORT","PORTION","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PREVIOUS","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RAISE","RANGE","RAW","READ","READ_ONLY","READ_WRITE","READS","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDOFILE","REDUNDANT","REFERENCES","REGEXP","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEATABLE","REPLACE","REPLAY","REPLICA","REPLICAS","REPLICA_POS","REPLICATION","REPEAT","REQUIRE","RESET","RESIGNAL","RESTART","RESTORE","RESTRICT","RESUME","RETURNED_SQLSTATE","RETURN","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROW","ROWCOUNT","ROWNUM","ROWS","ROWTYPE","ROW_COUNT","ROW_FORMAT","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMA_NAME","SCHEMAS","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SEQUENCE","SERIAL","SERIALIZABLE","SESSION","SERVER","SET","SETVAL","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLAVES","SLAVE_POS","SLOW","SNAPSHOT","SMALLINT","SOCKET","SOFT","SOME","SONAME","SOUNDS","SOURCE","STAGE","STORED","SPATIAL","SPECIFIC","REF_SYSTEM_ID","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_SECOND","SQL_TSI_MINUTE","SQL_TSI_HOUR","SQL_TSI_DAY","SQL_TSI_WEEK","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_YEAR","SSL","START","STARTING","STARTS","STATEMENT","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSDATE","SYSTEM","SYSTEM_TIME","TABLE","TABLE_NAME","TABLES","TABLESPACE","TABLE_CHECKSUM","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRANSACTION","TRANSACTIONAL","THREADS","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO_BUFFER_SIZE","UNDOFILE","UNDO","UNICODE","UNION","UNIQUE","UNKNOWN","UNLOCK","UNINSTALL","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARCHAR2","VARIABLES","VARYING","VIA","VIEW","VIRTUAL","VISIBLE","VERSIONING","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","X509","XOR","XA","XML","YEAR","YEAR_MONTH","ZEROFILL"]}),ei=v({all:["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","BIT","BINARY","BLOB","CHAR","NATIONAL CHAR","CHAR BYTE","ENUM","VARBINARY","VARCHAR","NATIONAL VARCHAR","TIME","DATETIME","TIMESTAMP","YEAR"]}),ea=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),es=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]","RETURNING"]),el=A(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),eE=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),ec=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eu=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eT={tokenizerOptions:{reservedSelect:ea,reservedClauses:[...es,...el],reservedSetOperations:eE,reservedJoins:ec,reservedPhrases:eu,supportsXor:!0,reservedKeywords:eo,reservedFunctionNames:ei,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:el}},ed=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ALWAYS","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASCII","ASENSITIVE","AT","ATTRIBUTE","AUTHENTICATION","AUTOEXTEND_SIZE","AUTO_INCREMENT","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BOOL","BOOLEAN","BOTH","BTREE","BUCKETS","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHALLENGE_RESPONSE","CHANGE","CHANGED","CHANNEL","CHAR","CHARACTER","CHARSET","CHECK","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLONE","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMNS","COLUMN_FORMAT","COLUMN_NAME","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPONENT","COMPRESSED","COMPRESSION","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONVERT","CPU","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULT_AUTH","DEFINER","DEFINITION","DELAYED","DELAY_KEY_WRITE","DELETE","DENSE_RANK","DESC","DESCRIBE","DESCRIPTION","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCLOSED","ENCRYPTION","END","ENDS","ENFORCED","ENGINE","ENGINES","ENGINE_ATTRIBUTE","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXISTS","EXIT","EXPANSION","EXPIRE","EXPLAIN","EXPORT","EXTENDED","EXTENT_SIZE","FACTOR","FAILED_LOGIN_ATTEMPTS","FALSE","FAST","FAULTS","FETCH","FIELDS","FILE","FILE_BLOCK_SIZE","FILTER","FINISH","FIRST","FIRST_VALUE","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GEOMCOLLECTION","GEOMETRY","GEOMETRYCOLLECTION","GET","GET_FORMAT","GET_MASTER_PUBLIC_KEY","GET_SOURCE_PUBLIC_KEY","GLOBAL","GRANT","GRANTS","GROUP","GROUPING","GROUPS","GROUP_REPLICATION","GTID_ONLY","HANDLER","HASH","HAVING","HELP","HIGH_PRIORITY","HISTOGRAM","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORE_SERVER_IDS","IMPORT","IN","INACTIVE","INDEX","INDEXES","INFILE","INITIAL","INITIAL_SIZE","INITIATE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INSTANCE","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","INVISIBLE","INVOKER","IO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IO_THREAD","IPC","IS","ISOLATION","ISSUER","ITERATE","JOIN","JSON","JSON_TABLE","JSON_VALUE","KEY","KEYRING","KEYS","KEY_BLOCK_SIZE","KILL","LAG","LANGUAGE","LAST","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LINESTRING","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_AUTO_POSITION","MASTER_BIND","MASTER_COMPRESSION_ALGORITHMS","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_HEARTBEAT_PERIOD","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_PUBLIC_KEY_PATH","MASTER_RETRY_COUNT","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_TLS_CIPHERSUITES","MASTER_TLS_VERSION","MASTER_USER","MASTER_ZSTD_COMPRESSION_LEVEL","MATCH","MAXVALUE","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONTH","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","MUTEX","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NDB","NDBCLUSTER","NESTED","NETWORK_NAMESPACE","NEVER","NEW","NEXT","NO","NODEGROUP","NONE","NOT","NOWAIT","NO_WAIT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NULLS","NUMBER","NUMERIC","NVARCHAR","OF","OFF","OFFSET","OJ","OLD","ON","ONE","ONLY","OPEN","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONAL","OPTIONALLY","OPTIONS","OR","ORDER","ORDINALITY","ORGANIZATION","OTHERS","OUT","OUTER","OUTFILE","OVER","OWNER","PACK_KEYS","PAGE","PARSER","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PASSWORD_LOCK_TIME","PATH","PERCENT_RANK","PERSIST","PERSIST_ONLY","PHASE","PLUGIN","PLUGINS","PLUGIN_DIR","POINT","POLYGON","PORT","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PRIMARY","PRIVILEGES","PRIVILEGE_CHECKS_USER","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RANDOM","RANGE","RANK","READ","READS","READ_ONLY","READ_WRITE","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDUNDANT","REFERENCE","REFERENCES","REGEXP","REGISTRATION","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEAT","REPEATABLE","REPLACE","REPLICA","REPLICAS","REPLICATE_DO_DB","REPLICATE_DO_TABLE","REPLICATE_IGNORE_DB","REPLICATE_IGNORE_TABLE","REPLICATE_REWRITE_DB","REPLICATE_WILD_DO_TABLE","REPLICATE_WILD_IGNORE_TABLE","REPLICATION","REQUIRE","REQUIRE_ROW_FORMAT","RESET","RESIGNAL","RESOURCE","RESPECT","RESTART","RESTORE","RESTRICT","RESUME","RETAIN","RETURN","RETURNED_SQLSTATE","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROTATE","ROUTINE","ROW","ROWS","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMAS","SCHEMA_NAME","SECOND","SECONDARY","SECONDARY_ENGINE","SECONDARY_ENGINE_ATTRIBUTE","SECONDARY_LOAD","SECONDARY_UNLOAD","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SERIAL","SERIALIZABLE","SERVER","SESSION","SET","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLOW","SMALLINT","SNAPSHOT","SOCKET","SOME","SONAME","SOUNDS","SOURCE","SOURCE_AUTO_POSITION","SOURCE_BIND","SOURCE_COMPRESSION_ALGORITHMS","SOURCE_CONNECT_RETRY","SOURCE_DELAY","SOURCE_HEARTBEAT_PERIOD","SOURCE_HOST","SOURCE_LOG_FILE","SOURCE_LOG_POS","SOURCE_PASSWORD","SOURCE_PORT","SOURCE_PUBLIC_KEY_PATH","SOURCE_RETRY_COUNT","SOURCE_SSL","SOURCE_SSL_CA","SOURCE_SSL_CAPATH","SOURCE_SSL_CERT","SOURCE_SSL_CIPHER","SOURCE_SSL_CRL","SOURCE_SSL_CRLPATH","SOURCE_SSL_KEY","SOURCE_SSL_VERIFY_SERVER_CERT","SOURCE_TLS_CIPHERSUITES","SOURCE_TLS_VERSION","SOURCE_USER","SOURCE_ZSTD_COMPRESSION_LEVEL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_AFTER_GTIDS","SQL_AFTER_MTS_GAPS","SQL_BEFORE_GTIDS","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SRID","SSL","STACKED","START","STARTING","STARTS","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STORED","STRAIGHT_JOIN","STREAM","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSTEM","TABLE","TABLES","TABLESPACE","TABLE_CHECKSUM","TABLE_NAME","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","THREAD_PRIORITY","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TLS","TO","TRAILING","TRANSACTION","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNDOFILE","UNDO_BUFFER_SIZE","UNICODE","UNINSTALL","UNION","UNIQUE","UNKNOWN","UNLOCK","UNREGISTER","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARYING","VCPU","VIEW","VIRTUAL","VISIBLE","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHOUT","WORK","WRAPPER","WRITE","X509","XA","XID","XML","XOR","YEAR","YEAR_MONTH","ZEROFILL","ZONE"]}),eR=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MEMBER OF","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOT","NOT IN","NOT LIKE","NOT REGEXP","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),ef=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),eA=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),eS=A(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),eO=A(["UNION [ALL | DISTINCT]"]),ep=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eN=A(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eI={tokenizerOptions:{reservedSelect:ef,reservedClauses:[...eA,...eS],reservedSetOperations:eO,reservedJoins:ep,reservedPhrases:eN,supportsXor:!0,reservedKeywords:ed,reservedFunctionNames:eR,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:eS}},eh=v({all:["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"]}),e_=v({all:["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","ISOLATION","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"]}),em=A(["SELECT [ALL | DISTINCT]"]),eC=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),eL=A(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),eg=A(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),ev=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),eP=A(["{ROWS | RANGE | GROUPS} BETWEEN"]),ey={tokenizerOptions:{reservedSelect:em,reservedClauses:[...eC,...eL],reservedSetOperations:eg,reservedJoins:ev,reservedPhrases:eP,supportsXor:!0,reservedKeywords:e_,reservedFunctionNames:eh,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:eL}},eD=v({all:["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARRAY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BFILE_BASE","BINARY","BLOB_BASE","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHAR","CHAR_BASE","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE","DATE_BASE","DAY","DECIMAL","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DOUBLE","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FLOAT","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INT","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LONG","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NCHAR","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NUMBER_BASE","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"]}),eM=v({numeric:["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET"],character:["CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET"],comparison:["GREATEST","LEAST"],conversion:["ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR"],largeObject:["BFILENAME","EMPTY_BLOB,","EMPTY_CLOB"],collection:["CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET"],hierarchical:["SYS_CONNECT_BY_PATH"],dataMining:["CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET"],xml:["APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM"],encoding:["DECODE","DUMP","ORA_HASH","VSIZE"],nullRelated:["COALESCE","LNNVL","NULLIF","NVL","NVL2"],env:["SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV"],aggregate:["AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER"],objectReference:["DEREF","MAKE_REF","REF","REFTOHEX","VALUE"],model:["CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],dataTypes:["VARCHAR2","NVARCHAR2","NUMBER","FLOAT","TIMESTAMP","INTERVAL YEAR","INTERVAL DAY","RAW","UROWID","NCHAR","CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","NATIONAL CHARACTER","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NUMERIC","DECIMAL","FLOAT","VARCHAR"]}),eb=A(["SELECT [ALL | DISTINCT | UNIQUE]"]),eU=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE","RETURNING"]),ew=A(["UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),ex=A(["UNION [ALL]","EXCEPT","INTERSECT"]),eG=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),eF=A(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),eH={tokenizerOptions:{reservedSelect:eb,reservedClauses:[...eU,...ew],reservedSetOperations:ex,reservedJoins:eG,reservedPhrases:eF,supportsXor:!0,reservedKeywords:eD,reservedFunctionNames:eM,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},paramChars:{},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:function(e){let t=u;return e.map(e=>d.SET(e)&&d.BY(t)?{...e,type:r.RESERVED_KEYWORD}:(R(e.type)&&(t=e),e))}},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:ew}},eB=v({math:["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET"],string:["ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER"],binary:["BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM"],bitstring:["BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING"],pattern:["REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE"],datatype:["TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP"],datetime:["CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP"],enum:["ENUM_FIRST","ENUM_LAST","ENUM_RANGE"],geometry:["AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH"],network:["ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TEXT","TRUNC"],textsearch:["ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY"],uuid:["UUID"],xml:["CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS"],json:["ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP"],sequence:["CURRVAL","LASTVAL","NEXTVAL","SETVAL"],conditional:["COALESCE","GREATEST","LEAST","NULLIF"],array:["ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST"],range:["ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF"],aggregate:["ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG"],window:["CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],set:["GENERATE_SERIES","GENERATE_SUBSCRIPTS"],sysInfo:["ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION"],sysAdmin:["BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG"],trigger:["SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN"],eventTrigger:["PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS"],stats:["PG_MCV_LIST_ITEMS"],cast:["CAST"],dataTypes:["BIT","BIT VARYING","CHARACTER","CHARACTER VARYING","VARCHAR","CHAR","DECIMAL","NUMERIC","TIME","TIMESTAMP","ENUM"]}),eY=v({all:["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASENSITIVE","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATOMIC","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BREADTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","COMPRESSION","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DEPTH","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FINALIZE","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURN","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"]}),ek=A(["SELECT [ALL | DISTINCT]"]),eV=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE MATERIALIZED VIEW [IF NOT EXISTS]","CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]","RETURNING"]),e$=A(["UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","[SET DATA] TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMENT","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE FUNCTION","CREATE GROUP","CREATE INDEX","CREATE LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE RULE","CREATE SCHEMA","CREATE SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE TRANSFORM","CREATE TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),eW=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),eZ=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),ej=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","{TIMESTAMP | TIME} {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),eX={tokenizerOptions:{reservedSelect:ek,reservedClauses:[...eV,...e$],reservedSetOperations:eW,reservedJoins:eZ,reservedPhrases:ej,reservedKeywords:eY,reservedFunctionNames:eB,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^","^>","?#","?-","?|","?-|","?||","@>","<@","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:e$}},eK=v({aggregate:["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],array:["array","array_concat","array_flatten","get_array_length","split_to_array","subarray"],bitwise:["BIT_AND","BIT_OR","BOOL_AND","BOOL_OR"],conditional:["COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF"],dateTime:["ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC"],spatial:["AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox"],hash:["CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2"],hyperLogLog:["HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE"],json:["IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE"],math:["ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC"],machineLearning:["EXPLAIN_MODEL"],string:["ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER"],superType:["decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof"],window:["AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],dataType:["CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT"],sysAdmin:["CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG"],sysInfo:["CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],dataTypes:["DECIMAL","NUMERIC","CHAR","CHARACTER","VARCHAR","CHARACTER VARYING","NCHAR","NVARCHAR","VARBYTE"]}),ez=v({standard:["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT"],dataConversionParams:["ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS"],dataLoadParams:["COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE"],dataFormatParams:["FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC"],copyAuthParams:["ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN"],copyCompressionParams:["BZIP2","GZIP","LZOP","ZSTD"],copyMiscParams:["MANIFEST","READRATIO","REGION","SSH"],compressionEncodings:["RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K"],misc:["CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],dataTypes:["BPCHAR","TEXT"]}),eJ=A(["SELECT [ALL | DISTINCT]"]),eq=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","CREATE [OR REPLACE | MATERIALIZED] VIEW","CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),eQ=A(["UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMENT","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),e0=A(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),e1=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),e2=A(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),e4={tokenizerOptions:{reservedSelect:eJ,reservedClauses:[...eq,...eQ],reservedSetOperations:e0,reservedJoins:e1,reservedPhrases:e2,reservedKeywords:ez,reservedFunctionNames:eK,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:eQ}},e6=v({all:["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","ARRAY","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTERVAL","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MAP","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","STRUCT","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","STRING","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"]}),e3=v({aggregate:["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],array:["ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY"],map:["ELEMENT_AT","ELEMENT_AT","MAP","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR"],json:["FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON"],misc:["ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIGINT","BIN","BINARY","BIT_COUNT","BIT_GET","BIT_LENGTH","BOOLEAN","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DATE","DECIMAL","DEGREES","DOUBLE","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOAT","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","INT","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SMALLINT","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TIMESTAMP","TINYINT","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","DEC","NUMERIC","VARCHAR"]}),e8=A(["SELECT [ALL | DISTINCT]"]),e5=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),e7=A(["DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),e9=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),te=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),tt=A(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),tn={tokenizerOptions:{reservedSelect:e8,reservedClauses:[...e5,...e7],reservedSetOperations:e9,reservedJoins:te,reservedPhrases:tt,supportsXor:!0,reservedKeywords:e6,reservedFunctionNames:e3,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:function(e){return e.map((t,n)=>{let o=e[n-1]||u,i=e[n+1]||u;return d.WINDOW(t)&&i.type===r.OPEN_PAREN?{...t,type:r.RESERVED_FUNCTION_NAME}:"ITEMS"!==t.text||t.type!==r.RESERVED_KEYWORD||"COLLECTION"===o.text&&"TERMINATED"===i.text?t:{...t,type:r.IDENTIFIER,text:t.raw}})}},formatOptions:{onelineClauses:e7}},tr=v({scalar:["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB"],aggregate:["AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL"],datetime:["DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME"],window:["row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value"],math:["ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC"],json:["JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE"],cast:["CAST"],dataTypes:["CHARACTER","VARCHAR","VARYING CHARACTER","NCHAR","NATIVE CHARACTER","NVARCHAR","NUMERIC","DECIMAL"]}),to=v({all:["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ANY","ARE","ARRAY","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","GROUPS","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"]}),ti=A(["SELECT [ALL | DISTINCT]"]),ta=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET","CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),ts=A(["UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),tl=A(["UNION [ALL]","EXCEPT","INTERSECT"]),tE=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tc=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),tu={tokenizerOptions:{reservedSelect:ti,reservedClauses:[...ta,...ts],reservedSetOperations:tl,reservedJoins:tE,reservedPhrases:tc,reservedKeywords:to,reservedFunctionNames:tr,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:ts}},tT=v({set:["GROUPING"],window:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER"],numeric:["POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET"],string:["SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE"],datetime:["CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP"],aggregate:["COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],nonStandard:["ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],dataTypes:["CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","VARCHAR","CHARACTER LARGE OBJECT","CHAR LARGE OBJECT","CLOB","NATIONAL CHARACTER","NATIONAL CHAR","NCHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NATIONAL CHARACTER LARGE OBJECT","NCHAR LARGE OBJECT","NCLOB","BINARY","BINARY VARYING","VARBINARY","BINARY LARGE OBJECT","BLOB","NUMERIC","DECIMAL","DEC","TIME","TIMESTAMP"]}),td=v({all:["ALL","ALLOCATE","ALTER","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHAR","CHARACTER","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FLOAT","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"]}),tR=A(["SELECT [ALL | DISTINCT]"]),tf=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [RECURSIVE] VIEW","CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),tA=A(["UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),tS=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tO=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tp=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tN={tokenizerOptions:{reservedSelect:tR,reservedClauses:[...tf,...tA],reservedSetOperations:tS,reservedJoins:tO,reservedPhrases:tp,reservedKeywords:td,reservedFunctionNames:tT,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:tA}},tI=v({all:["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH"],rowPattern:["CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"]}),th=v({all:["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],types:["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"]}),t_=A(["SELECT [ALL | DISTINCT]"]),tm=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW","CREATE TABLE [IF NOT EXISTS]","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),tC=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","COMMENT ON TABLE","COMMENT ON COLUMN","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),tL=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tg=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tv=A(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),tP={tokenizerOptions:{reservedSelect:t_,reservedClauses:[...tm,...tC],reservedSetOperations:tL,reservedJoins:tg,reservedPhrases:tv,reservedKeywords:th,reservedFunctionNames:tI,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:tC}},ty=v({aggregate:["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP"],analytic:["CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS"],configuration:["@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION"],conversion:["CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE"],cryptographic:["ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY"],cursor:["@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS"],dataType:["DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY"],datetime:["@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY"],mathematical:["ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST"],metadata:["@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY"],ranking:["DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME"],security:["CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME"],string:["ASCII","CHAR","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER"],system:["$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE"],statistical:["@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID"],trigger:["COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","NUMERIC","FLOAT","REAL","DATETIME2","DATETIMEOFFSET","TIME","CHAR","VARCHAR","NCHAR","NVARCHAR","BINARY","VARBINARY"]}),tD=v({standard:["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DOUBLE","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NATIONAL","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRECISION","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VARYING","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT"],odbc:["ABSOLUTE","ACTION","ADA","ADD","ALL","ALLOCATE","ALTER","AND","ANY","ARE","AS","ASC","ASSERTION","AT","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BY","CASCADE","CASCADED","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOSE","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DISTINCT","DOMAIN","DOUBLE","DROP","END-EXEC","ESCAPE","EXCEPTION","EXEC","EXECUTE","EXISTS","EXTERNAL","EXTRACT","FALSE","FETCH","FIRST","FLOAT","FOR","FOREIGN","FORTRAN","FOUND","FROM","FULL","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HAVING","HOUR","IDENTITY","IMMEDIATE","IN","INCLUDE","INDEX","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISOLATION","JOIN","KEY","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OF","ONLY","OPEN","OPTION","OR","ORDER","OUTER","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURE","PUBLIC","READ","REAL","REFERENCES","RELATIVE","RESTRICT","REVOKE","RIGHT","ROLLBACK","ROWS","SCHEMA","SCROLL","SECOND","SECTION","SELECT","SESSION","SESSION_USER","SET","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","SYSTEM_USER","TABLE","TEMPORARY","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TRIM","TRUE","UNION","UNIQUE","UNKNOWN","UPDATE","UPPER","USAGE","USER","VALUE","VALUES","VARCHAR","VARYING","VIEW","WHENEVER","WHERE","WITH","WORK","WRITE","YEAR","ZONE"]}),tM=A(["SELECT [ALL | DISTINCT]"]),tb=A(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] [MATERIALIZED] VIEW","CREATE TABLE","CREATE [OR ALTER] {PROC | PROCEDURE}"]),tU=A(["UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLLATE","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","FUNCTION","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION FUNCTION","PARTITION SCHEME","PROCEDURE","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),tw=A(["UNION [ALL]","EXCEPT","INTERSECT"]),tx=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),tG=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tF={tokenizerOptions:{reservedSelect:tM,reservedClauses:[...tb,...tU],reservedSetOperations:tw,reservedJoins:tx,reservedPhrases:tG,reservedKeywords:tD,reservedFunctionNames:ty,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:tU}},tH=v({all:["ABORT","ABSOLUTE","ACCESS","ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","AGGREGATES","AGGREGATOR","AGGREGATOR_ID","AGGREGATOR_PLAN_HASH","AGGREGATORS","ALGORITHM","ALL","ALSO","ALTER","ALWAYS","ANALYZE","AND","ANY","ARGHISTORY","ARRANGE","ARRANGEMENT","ARRAY","AS","ASC","ASCII","ASENSITIVE","ASM","ASSERTION","ASSIGNMENT","AST","ASYMMETRIC","ASYNC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","AUTO","AUTO_INCREMENT","AUTO_REPROVISION","AUTOSTATS","AUTOSTATS_CARDINALITY_MODE","AUTOSTATS_ENABLED","AUTOSTATS_HISTOGRAM_MODE","AUTOSTATS_SAMPLING","AVAILABILITY","AVG","AVG_ROW_LENGTH","AVRO","AZURE","BACKGROUND","_BACKGROUND_THREADS_FOR_CLEANUP","BACKUP","BACKUP_HISTORY","BACKUP_ID","BACKWARD","BATCH","BATCHES","BATCH_INTERVAL","_BATCH_SIZE_LIMIT","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","_BINARY","BIT","BLOB","BOOL","BOOLEAN","BOOTSTRAP","BOTH","_BT","BTREE","BUCKET_COUNT","BUCKETS","BY","BYTE","BYTE_LENGTH","CACHE","CALL","CALL_FOR_PIPELINE","CALLED","CAPTURE","CASCADE","CASCADED","CASE","CATALOG","CHAIN","CHANGE","CHAR","CHARACTER","CHARACTERISTICS","CHARSET","CHECK","CHECKPOINT","_CHECK_CAN_CONNECT","_CHECK_CONSISTENCY","CHECKSUM","_CHECKSUM","CLASS","CLEAR","CLIENT","CLIENT_FOUND_ROWS","CLOSE","CLUSTER","CLUSTERED","CNF","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNAR","COLUMNS","COLUMNSTORE","COLUMNSTORE_SEGMENT_ROWS","COMMENT","COMMENTS","COMMIT","COMMITTED","_COMMIT_LOG_TAIL","COMPACT","COMPILE","COMPRESSED","COMPRESSION","CONCURRENT","CONCURRENTLY","CONDITION","CONFIGURATION","CONNECTION","CONNECTIONS","CONFIG","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","_CONTINUE_REPLAY","CONVERSION","CONVERT","COPY","_CORE","COST","CREATE","CREDENTIALS","CROSS","CUBE","CSV","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_SCHEMA","CURRENT_SECURITY_GROUPS","CURRENT_SECURITY_ROLES","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATABASES","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELIMITER","DELIMITERS","DENSE_RANK","DESC","DESCRIBE","DETACH","DETERMINISTIC","DICTIONARY","DIFFERENTIAL","DIRECTORY","DISABLE","DISCARD","_DISCONNECT","DISK","DISTINCT","DISTINCTROW","DISTRIBUTED_JOINS","DIV","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","_DROP_PROFILE","DUAL","DUMP","DUPLICATE","DURABILITY","DYNAMIC","EARLIEST","EACH","ECHO","ELECTION","ELSE","ELSEIF","ENABLE","ENCLOSED","ENCODING","ENCRYPTED","END","ENGINE","ENGINES","ENUM","ERRORS","ESCAPE","ESCAPED","ESTIMATE","EVENT","EVENTS","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTENSION","EXTERNAL","EXTERNAL_HOST","EXTERNAL_PORT","EXTRACTOR","EXTRACTORS","EXTRA_JOIN","_FAILOVER","FAILED_LOGIN_ATTEMPTS","FAILURE","FALSE","FAMILY","FAULT","FETCH","FIELDS","FILE","FILES","FILL","FIX_ALTER","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREGROUND","FOREIGN","FORMAT","FORWARD","FREEZE","FROM","FS","_FSYNC","FULL","FULLTEXT","FUNCTION","FUNCTIONS","GC","GCS","GET_FORMAT","_GC","_GCX","GENERATE","GEOGRAPHY","GEOGRAPHYPOINT","GEOMETRY","GEOMETRYPOINT","GLOBAL","_GLOBAL_VERSION_TIMESTAMP","GRANT","GRANTED","GRANTS","GROUP","GROUPING","GROUPS","GZIP","HANDLE","HANDLER","HARD_CPU_LIMIT_PERCENTAGE","HASH","HAS_TEMP_TABLES","HAVING","HDFS","HEADER","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HISTOGRAM","HOLD","HOLDING","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IDENTITY","IF","IGNORE","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDING","INCREMENT","INCREMENTAL","INDEX","INDEXES","INFILE","INHERIT","INHERITS","_INIT_PROFILE","INIT","INITIALIZE","INITIALLY","INJECT","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTANCE","INSTEAD","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","_INTERNAL_DYNAMIC_TYPECAST","INTERPRETER_MODE","INTERSECT","INTERVAL","INTO","INVOKER","ISOLATION","ITERATE","JOIN","JSON","KAFKA","KEY","KEY_BLOCK_SIZE","KEYS","KILL","KILLALL","LABEL","LAG","LANGUAGE","LARGE","LAST","LAST_VALUE","LATERAL","LATEST","LC_COLLATE","LC_CTYPE","LEAD","LEADING","LEAF","LEAKPROOF","LEAVE","LEAVES","LEFT","LEVEL","LICENSE","LIKE","LIMIT","LINES","LISTEN","LLVM","LOADDATA_WHERE","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","_LS","LZ4","MANAGEMENT","_MANAGEMENT_THREAD","MAPPING","MASTER","MATCH","MATERIALIZED","MAXVALUE","MAX_CONCURRENCY","MAX_ERRORS","MAX_PARTITIONS_PER_BATCH","MAX_QUEUE_DEPTH","MAX_RETRIES_PER_BATCH_PARTITION","MAX_ROWS","MBC","MPL","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MEMORY_PERCENTAGE","_MEMSQL_TABLE_ID_LOOKUP","MEMSQL","MEMSQL_DESERIALIZE","MEMSQL_IMITATING_KAFKA","MEMSQL_SERIALIZE","MERGE","METADATA","MICROSECOND","MIDDLEINT","MIN_ROWS","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MOD","MODE","MODEL","MODIFIES","MODIFY","MONTH","MOVE","MPL","NAMES","NAMED","NAMESPACE","NATIONAL","NATURAL","NCHAR","NEXT","NO","NODE","NONE","NO_QUERY_REWRITE","NOPARAM","NOT","NOTHING","NOTIFY","NOWAIT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NORELY","NTH_VALUE","NTILE","NULL","NULLCOLS","NULLS","NUMERIC","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OIDS","ON","ONLINE","ONLY","OPEN","OPERATOR","OPTIMIZATION","OPTIMIZE","OPTIMIZER","OPTIMIZER_STATE","OPTION","OPTIONS","OPTIONALLY","OR","ORDER","ORDERED_SERIALIZE","ORPHAN","OUT","OUT_OF_ORDER","OUTER","OUTFILE","OVER","OVERLAPS","OVERLAY","OWNED","OWNER","PACK_KEYS","PAIRED","PARSER","PARQUET","PARTIAL","PARTITION","PARTITION_ID","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PASSWORD_LOCK_TIME","PAUSE","_PAUSE_REPLAY","PERIODIC","PERSISTED","PIPELINE","PIPELINES","PLACING","PLAN","PLANS","PLANCACHE","PLUGINS","POOL","POOLS","PORT","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROGRAM","PROMOTE","PROXY","PURGE","QUARTER","QUERIES","QUERY","QUERY_TIMEOUT","QUEUE","RANGE","RANK","READ","_READ","READS","REAL","REASSIGN","REBALANCE","RECHECK","RECORD","RECURSIVE","REDUNDANCY","REDUNDANT","REF","REFERENCE","REFERENCES","REFRESH","REGEXP","REINDEX","RELATIVE","RELEASE","RELOAD","RELY","REMOTE","REMOVE","RENAME","REPAIR","_REPAIR_TABLE","REPEAT","REPEATABLE","_REPL","_REPROVISIONING","REPLACE","REPLICA","REPLICATE","REPLICATING","REPLICATION","REQUIRE","RESOURCE","RESOURCE_POOL","RESET","RESTART","RESTORE","RESTRICT","RESULT","_RESURRECT","RETRY","RETURN","RETURNING","RETURNS","REVERSE","RG_POOL","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","ROLES","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","ROWS","ROWSTORE","RULE","_RPC","RUNNING","S3","SAFE","SAVE","SAVEPOINT","SCALAR","SCHEMA","SCHEMAS","SCHEMA_BINDING","SCROLL","SEARCH","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SEMI_JOIN","_SEND_THREADS","SENSITIVE","SEPARATOR","SEQUENCE","SEQUENCES","SERIAL","SERIALIZABLE","SERIES","SERVICE_USER","SERVER","SESSION","SESSION_USER","SET","SETOF","SECURITY_LISTS_INTERSECT","SHA","SHARD","SHARDED","SHARDED_ID","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMILAR","SIMPLE","SITE","SKIP","SKIPPED_BATCHES","__SLEEP","SMALLINT","SNAPSHOT","_SNAPSHOT","_SNAPSHOTS","SOFT_CPU_LIMIT_PERCENTAGE","SOME","SONAME","SPARSE","SPATIAL","SPATIAL_CHECK_INDEX","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_MODE","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STDIN","STDOUT","STOP","STORAGE","STRAIGHT_JOIN","STRICT","STRING","STRIP","SUCCESS","SUPER","SYMMETRIC","SYNC_SNAPSHOT","SYNC","_SYNC","_SYNC2","_SYNC_PARTITIONS","_SYNC_SNAPSHOT","SYNCHRONIZE","SYSID","SYSTEM","TABLE","TABLE_CHECKSUM","TABLES","TABLESPACE","TAGS","TARGET_SIZE","TASK","TEMP","TEMPLATE","TEMPORARY","TEMPTABLE","_TERM_BUMP","TERMINATE","TERMINATED","TEXT","THEN","TIME","TIMEOUT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMEZONE","TINYBLOB","TINYINT","TINYTEXT","TO","TRACELOGS","TRADITIONAL","TRAILING","TRANSFORM","TRANSACTION","_TRANSACTIONS_EXPERIMENTAL","TREAT","TRIGGER","TRIGGERS","TRUE","TRUNC","TRUNCATE","TRUSTED","TWO_PHASE","_TWOPCID","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNENCRYPTED","UNENFORCED","UNHOLD","UNICODE","UNION","UNIQUE","_UNITTEST","UNKNOWN","UNLISTEN","_UNLOAD","UNLOCK","UNLOGGED","UNPIVOT","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USERS","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARIADIC","VARYING","VERBOSE","VIEW","VOID","VOLATILE","VOTING","WAIT","_WAKE","WARNINGS","WEEK","WHEN","WHERE","WHILE","WHITESPACE","WINDOW","WITH","WITHOUT","WITHIN","_WM_HEARTBEAT","WORK","WORKLOAD","WRAPPER","WRITE","XACT_ID","XOR","YEAR","YEAR_MONTH","YES","ZEROFILL","ZONE"]}),tB=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),tY=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),tk=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","SET","CREATE VIEW","CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),tV=A(["UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),t$=A(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),tW=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),tZ=A(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),tj={tokenizerOptions:{reservedSelect:tY,reservedClauses:[...tk,...tV],reservedSetOperations:t$,reservedJoins:tW,reservedPhrases:tZ,reservedKeywords:tH,reservedFunctionNames:tB,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:tV}},tX=v({all:["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"]}),tK=v({all:["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH"]}),tz=A(["SELECT [ALL | DISTINCT]"]),tJ=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),tq=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","[SET DATA] TYPE","[UNSET] COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),tQ=A(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),t0=A(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),t1=A(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),t2={tokenizerOptions:{reservedSelect:tz,reservedClauses:[...tJ,...tq],reservedSetOperations:tQ,reservedJoins:t0,reservedPhrases:t1,reservedKeywords:tK,reservedFunctionNames:tX,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||",":","=>"]},formatOptions:{alwaysDenseOperators:[":","::"],onelineClauses:tq}},t4=e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),t6=/\s+/uy,t3=e=>RegExp(`(?:${e})`,"uy"),t8=e=>e.split("").map(e=>/ /gu.test(e)?"\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),t5=e=>e+"(?:-"+e+")*",t7=({prefixes:e,requirePrefix:t})=>`(?:${e.map(t8).join("|")}${t?"":"|"})`,t9=e=>RegExp(`(?:${e.map(t4).join("|")}).*?(?=\r +t.version="2.30.1",B=ti,t.fn=t$,t.min=function(){var e=[].slice.call(arguments,0);return tl("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return tl("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=u,t.unix=function(e){return ti(1e3*e)},t.months=function(e,t){return tX(e,t,"months")},t.isDate=l,t.locale=ez,t.invalid=R,t.duration=tI,t.isMoment=I,t.weekdays=function(e,t,n){return tK(e,t,n,"weekdays")},t.parseZone=function(){return ti.apply(null,arguments).parseZone()},t.localeData=eq,t.isDuration=tu,t.monthsShort=function(e,t){return tX(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return tK(e,t,n,"weekdaysMin")},t.defineLocale=eJ,t.updateLocale=function(e,t){if(null!=t){var n,r,o=eW;null!=eZ[e]&&null!=eZ[e].parentLocale?eZ[e].set(g(eZ[e]._config,t)):(null!=(r=eK(e))&&(o=r._config),t=g(o,t),null==r&&(t.abbr=e),(n=new v(t)).parentLocale=eZ[e],eZ[e]=n),ez(e)}else null!=eZ[e]&&(null!=eZ[e].parentLocale?(eZ[e]=eZ[e].parentLocale,e===ez()&&ez(e)):null!=eZ[e]&&delete eZ[e]);return eZ[e]},t.locales=function(){return k(eZ)},t.weekdaysShort=function(e,t,n){return tK(e,t,n,"weekdaysShort")},t.normalizeUnits=F,t.relativeTimeRounding=function(e){return void 0===e?nE:"function"==typeof e&&(nE=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==nc[e]&&(void 0===t?nc[e]:(nc[e]=t,"s"===e&&(nc.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},t.prototype=t$,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}()},69654:function(e){var t;t=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach(function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)})}function o(){this.reset("")}function i(e,t,i){if(e instanceof r)var a=e,i=t;else var a=r.fromCompiled(e,t);for(var s in this.grammar=a,this.options={keepHistory:!1,lexer:a.lexer||new o},i||{})this.options[s]=i[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(a,0);this.table=[l],l.wants[a.start]=[],l.predict(a.start),l.process(),this.current=0}function a(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";else throw Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(a).join(" "):this.symbols.slice(0,e).map(a).join(" ")+" ● "+this.symbols.slice(e).map(a).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do e.push(t.right.data),t=t.left;while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,i.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,o=0;o0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+a)),n=a}},i.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);else throw Error("Unknown symbol type: "+e)}}(e)},i.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),o=this.buildFirstStateStack(n,r);return null===o?null:[e].concat(o)},i.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},i.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},i.prototype.rewind=function(e){if(!this.options.keepHistory)throw Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},i.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach(function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==i.fail&&e.push(n)}),e.map(function(e){return e.data})},{Parser:i,Grammar:r,Rule:e}},e.exports?e.exports=t():this.nearley=t()},83454:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(26466)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return u},p:function(){return c}});var r=n(85893),o=n(76212),i=n(62418),a=n(25519),s=n(65654),l=n(39332),E=n(67294);let c=(0,E.createContext)({mode:"light",scene:"",chatId:"",model:"",modelList:[],dbParam:void 0,dialogueList:[],agent:"",setAgent:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,setMode:()=>void 0,history:[],setHistory:()=>{},docId:void 0,setDocId:()=>{},currentDialogInfo:{chat_scene:"",app_code:""},setCurrentDialogInfo:()=>{},adminList:[],refreshDialogList:()=>{}}),u=e=>{var t,n,u;let{children:T}=e,d=(0,l.useSearchParams)(),R=null!==(t=null==d?void 0:d.get("id"))&&void 0!==t?t:"",f=null!==(n=null==d?void 0:d.get("scene"))&&void 0!==n?n:"",A=null!==(u=null==d?void 0:d.get("db_param"))&&void 0!==u?u:"",[S,O]=(0,E.useState)(!1),[p,N]=(0,E.useState)(""),[I,h]=(0,E.useState)("chat_dashboard"!==f),[_,m]=(0,E.useState)(A),[C,L]=(0,E.useState)(""),[g,v]=(0,E.useState)([]),[P,y]=(0,E.useState)(),[D,M]=(0,E.useState)("light"),[b,U]=(0,E.useState)([]),[w,x]=(0,E.useState)({chat_scene:"",app_code:""}),{data:G=[]}=(0,s.Z)(async()=>{let[,e]=await (0,o.Vx)((0,o.Vw)());return null!=e?e:[]}),{run:F}=(0,s.Z)(async()=>{let[,e]=await (0,o.Vx)((0,o.WA)({role:"admin"}));return null!=e?e:[]},{onSuccess:e=>{U(e)},manual:!0});return(0,E.useEffect)(()=>{(0,i.n5)()&&F()},[F,(0,i.n5)()]),(0,E.useEffect)(()=>{M(function(){let e=localStorage.getItem(a.he);return e||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}());try{let e=JSON.parse(localStorage.getItem("cur_dialog_info")||"");x(e)}catch(e){x({chat_scene:"",app_code:""})}},[]),(0,E.useEffect)(()=>{N(G[0])},[G,null==G?void 0:G.length]),(0,r.jsx)(c.Provider,{value:{isContract:S,isMenuExpand:I,scene:f,chatId:R,model:p,modelList:G,dbParam:_||A,agent:C,setAgent:L,mode:D,setMode:M,setModel:N,setIsContract:O,setIsMenuExpand:h,setDbParam:m,history:g,setHistory:v,docId:P,setDocId:y,currentDialogInfo:w,setCurrentDialogInfo:x,adminList:b},children:T})}},64371:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(36609),o=n(67421);r.ZP.use(o.Db).init({resources:{en:{translation:{chat_online:"chat Online",dialog_list:"Dialog List",delete_chat:"Delete Chat",delete_chat_confirm:"Are you sure you want to delete this chat?",input_tips:"Ask me anything, Shift + Enter newline",sent:"Sent",answer_again:"Answer again",feedback_tip:"Describe specific questions or better answers",thinking:"Thinking",stop_replying:"Stop replying",erase_memory:"Erase Memory",copy_nothing:"Content copied is empty",copy_success:"Copy success",copy_failed:"Copy failed",file_tip:"File cannot be changed after upload",file_upload_tip:"Upload file to chat(Your model must support multimodal input)",assistant:"Platform Assistant",model_tip:"Model selection is not supported for the current application",temperature_tip:"The current application does not support temperature configuration",max_new_tokens_tip:"The current application does not support max_new_tokens configuration",extend_tip:"Extended configuration is not supported for the current application",cot_title:"Thoughts",code_preview:"Preview",code_preview_full_screen:"Full Screen",code_preview_exit_full_screen:"Exit Full Screen",code_preview_code:"Code",code_preview_copy:"Copy",code_preview_already_copied:"Already Copied",code_preview_download:"Download",code_preview_run:"Run",code_preview_close:"Close",Upload_Data_Successfully:"file uploaded successfully",Upload_Data_Failed:"file upload failed",Upload_Data:"Upload Data",Code_Editor:"Code Editor",Open_Code_Editor:"Open Code Editor",Export_Flow_Success:"Export flow success",Import_Flow_Success:"Import flow success",Import:"Import",Export:"Export",Import_Flow:"Import Flow",Export_Flow:"Export Flow",Select_File:"Select File",Save_After_Import:"Save after import",Export_File_Type:"File_Type",Export_File_Format:"File_Format",Yes:"Yes",No:"No",Please_Add_Nodes_First:"Please add nodes first",Add_Global_Variable_of_Flow:"Add global variable of flow",Add_Parameter:"Add Parameter",Higher_Order_Nodes:"Higher Order",All_Nodes:"All",Import_From_Template:"Import from template",Template_Description:"Description",Template_Name:"Template Name",Template_Label:"Label",Template_Action:"Action",minimum_dynamic_fields_warning:"Please keep more than one dynamic field",Knowledge_Space:"Knowledge",space:"space",Vector:"Vector",Owner:"Owner",Count:"Count",File_type_Invalid:"The file type is invalid",Knowledge_Space_Config:"Space Config",Choose_a_Datasource_type:"Datasource type",Segmentation:"Segmentation",No_parameter:"No segementation parameter required.",Knowledge_Space_Name:"Knowledge Space Name",Please_input_the_name:"Please input the name",Please_input_the_owner:"Please input the owner",Please_select_file:"Please select one file",Description:"Description",Storage:"Storage",Domain:"Domain",Please_input_the_description:"Please input the description",Please_select_the_storage:"Please select the storage",Please_select_the_domain_type:"Please select the domain type",Next:"Next",the_name_can_only_contain:'the name can only contain numbers, letters, Chinese characters, "-" and "_"',Text:"Text","Fill your raw text":"Fill your raw text",URL:"URL",Fetch_the_content_of_a_URL:"Fetch the content of a URL",Document:"Document",Upload_a_document:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown, Zip",Name:"Name",Text_Source:"Text Source(Optional)",Please_input_the_text_source:"Please input the text source",Sync:"Sync",Back:"Back",Finish:"Finish",Web_Page_URL:"Web Page URL",Please_input_the_Web_Page_URL:"Please input the Web Page URL",Select_or_Drop_file:"Select or Drop file",Documents:"Documents",Chat:"Chat",Add_Datasource:"Add Datasource",View_Graph:"View Graph",Arguments:"Arguments",Type:"Type",Size:"Size",Last_Sync:"Last Sync",Status:"Status",Result:"Result",Details:"Details",Delete:"Delete",Operation:"Operation",Submit:"Submit",Chunks:"Chunks",Content:"Content",Meta_Data:"Meta Data",Please_select_a_file:"Please select a file",Please_input_the_text:"Please input the text",Embedding:"Embedding",topk:"topk",the_top_k_vectors:"the top k vectors based on similarity score",recall_score:"recall_score",Set_a_threshold_score:"Set a threshold score for the retrieval of similar vectors",recall_type:"recall_type",model:"model",A_model_used:"A model used to create vector representations of text or other data",Automatic:"Automatic",Process:"Process",Automatic_desc:"Automatically set segmentation and preprocessing rules.",chunk_size:"chunk_size",The_size_of_the_data_chunks:"The size of the data chunks used in processing",chunk_overlap:"chunk_overlap",The_amount_of_overlap:"The amount of overlap between adjacent data chunks",Prompt:"Prompt",scene:"scene",A_contextual_parameter:"A contextual parameter used to define the setting or environment in which the prompt is being used",template:"template",structure_or_format:"A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.",max_token:"max_token",max_iteration:"max_iteration",concurrency_limit:"concurrency_limit",The_maximum_number_of_tokens:"The maximum number of tokens or words allowed in a prompt",Theme:"Theme",database_type:"Database Type",edit_database:"Edit Datasource",add_database:"Add Datasource",create_success:"Create success",create_failed:"Create failed",please_select_database_type:"Please select database type",select_database_type:"Select database type",description:"Description",input_description:"Please input description",Port:"Port",Username:"Username",Password:"Password",Remark:"Remark",Edit:"Edit",Database:"Database",Data_Source:"Data Center",Close_Sidebar:"Fold",Show_Sidebar:"UnFold",language:"Language",choose_model:"Please choose a model",data_center_desc:"DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.",create_database:"Create Database",create_knowledge:"Create Knowledge",path:"Path",model_manage:"Models",create_model:"Create Model",model_select_tips:"Please select a model",language_select_tips:"Please select a language",submit:"Submit",close:"Close",stop_model:"Stop Model",stop_model_success:"Stop model success",start_model:"Start Model",start_model_success:"Start model success",stop_and_delete_model:"Stop and Delete Model",stop_and_delete_model_success:"Stop and delete model success",confirm_start_model:"Are you sure you want to start the model?, model name:",confirm_stop_model:"Are you sure you want to stop the model?, model name:",confirm_stop_and_delete_model:"Are you sure you want to stop and delete the model?, model name:",worker_type_select_tips:"Please select a worker type",model_select_worker_type:"Select worker type",download_model_tip:"Please download model first.",start_model_failed:"Start model failed",provider_select_tips:"Please select a provider",model_select_provider:"Please select a provider",model_please_input_name:"Please input the name",model_select_or_input_model:"Select or input model name",model_deploy_name:"Model Name",Plugins:"Plugins",try_again:"Try again",no_data:"No data",Open_Sidebar:"Unfold",verify:"Verify",cancel:"Cancel",Edit_Success:"Edit Success",Add:"Add",Add_Success:"Add Success",Error_Message:"Something Error",Please_Input:"Please Input",Prompt_Info_Scene:"Scene",Prompt_Info_Sub_Scene:"Sub Scene",Prompt_Info_Name:"Name",Prompt_Info_Content:"Content",Public:"Public",Private:"Private",Lowest:"Lowest",Missed:"Missed",Lost:"Lost",Incorrect:"Incorrect",Verbose:"Verbose",Best:"Best",Rating:"Rating",Q_A_Category:"Q&A Category",Q_A_Rating:"Q&A Rating",feed_back_desc:"0: No results\n1: Results exist, but they are irrelevant, the question is not understood\n2: Results exist, the question is understood, but it indicates that the question cannot be answered\n3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n",input_count:"Total input",input_unit:"characters",Click_Select:"Click&Select",Quick_Start:"Quick Start",Select_Plugins:"Select Plugins",Search:"Search",Update_From_Github:"Upload From Github",Reset:"Reset",Upload:"Upload",Market_Plugins:"Market Plugin",My_Plugins:"My Plugins",Del_Knowledge_Tips:"Do you want delete the Space",Del_Document_Tips:"Do you want delete the Document",Tips:"Tips",Limit_Upload_File_Count_Tips:"Only one file can be uploaded at a time",To_Plugin_Market:"Go to the Plugin Market",Summary:"Summary",stacked_column_chart:"Stacked Column",column_chart:"Column",percent_stacked_column_chart:"Percent Stacked Column",grouped_column_chart:"Grouped Column",time_column:"Time Column",pie_chart:"Pie",line_chart:"Line",area_chart:"Area",stacked_area_chart:"Stacked Area",scatter_plot:"Scatter",bubble_chart:"Bubble",stacked_bar_chart:"Stacked Bar",bar_chart:"Bar",percent_stacked_bar_chart:"Percent Stacked Bar",grouped_bar_chart:"Grouped Bar",water_fall_chart:"Waterfall",table:"Table",multi_line_chart:"Multi Line",multi_measure_column_chart:"Multi Measure Column",multi_measure_line_chart:"Multi Measure Line",Advices:"Advices",Retry:"Retry",Load_more:"load more",new_chat:"New Chat",choice_agent_tip:"Please choose an agent",no_context_tip:"Please enter your question",Terminal:"Terminal",used_apps:"Used Apps",app_in_mind:"Don't have an app in mind? to",explore:"Explore",Discover_more:"Discove more",sdk_insert:"SDK Insert",my_apps:"My Apps",awel_flow:"AWEL Flow",save:"Save",add_node:"Add Node",no_node:"No Node",connect_warning:"Nodes cannot be connected",flow_modal_title:"Save Flow",flow_name:"Flow Name",flow_description:"Flow Description",flow_name_required:"Please enter the flow name",flow_description_required:"Please enter the flow description",save_flow_success:"Save flow success",delete_flow_confirm:"Are you sure you want to delete this flow?",related_nodes:"Related Nodes",add_resource:"Add Resource",team_modal:"Work Modal",App:"App",resource_name:"Resource Name",resource_type:"Resource Type",resource_value:"Value",resource_dynamic:"Dynamic",Please_input_the_work_modal:"Please select the work modal",available_resources:" Available Resources",edit_new_applications:"Edit new applications",collect:"Collect",collected:"Collected",create:"Create",Agents:"Agents",edit_application:"edit application",add_application:"add application",app_name:"App Name",input_app_name:"Please enter the application name",LLM_strategy:"LLM Strategy",LLM_strategy_value:"LLM Strategy Value",please_select_LLM_strategy:"Please select LLM strategy",please_select_LLM_strategy_value:"Please select LLM strategy value",resource:"Resource",operators:"Operators",Chinese:"Chinese",English:"English",docs:"Docs",apps:"All Apps",please_enter_the_keywords:"Please enter the keywords",input_tip:"Please select the model and enter the description to start quickly",create_app:"Create App",copy_url:"Click the Copy Share link",double_click_open:"Double click on Nail nail to open",construct:" Construct App",chat_online:"Chat",recommend_apps:"Recommend",all_apps:"All",latest_apps:"Latest",my_collected_apps:"Collected",collect_success:"Collect success",cancel_success:"Cancel success",published:"Published",unpublished:"Unpublished",start_chat:"Chat",native_app:"Native app",temperature:"Temperature",max_new_tokens:"Max output tokens",create_flow:"Create flow",update:"Update",native_type:"App type",refreshSuccess:"Refresh Success",Download:"Download",app_type_select:"Please select app type",please_select_param:"Please select parameters",please_select_model:"Please select model",please_input_temperature:"Please input the temperature value",please_input_max_new_tokens:"Please input the max new tokens",select_workflow:"Select workflow",please_select_workflow:"Please select workflow",recommended_questions:"Recommended questions",question:"Question",please_input_recommended_questions:"Please input recommendation question",is_effective:"Whether to enable",add_question:"Add question",update_success:"Update successful",update_failed:"Update failed",please_select_prompt:"Please select a prompt",details:"Details",choose:"Choose",please_choose:"Please choose",want_delete:"Are you sure delete it?",success:"Success",input_parameter:"Input parameter",output_structure:"Output structure",User_input:"User input",LLM_test:"LLM test",Output_verification:"Output verification",select_scene:"Please select a scene",select_type:"Please select a type",Please_complete_the_input_parameters:"Please complete the input parameters",Please_fill_in_the_user_input:"Please fill in the user input",help:"I can help you:",Refresh_status:"Refresh status",Recall_test:"Recall test",synchronization:"One-key synchronization",Synchronization_initiated:"Synchronization has been initiated, please wait",Edit_document:"Edit document",Document_name:"Document name",Correlation_problem:"Correlation problem",Add_problem:"Add problem",New_knowledge_base:"New knowledge base",yuque:"yuque document",Get_yuque_document:"Get the contents of the Sparrow document",document_url:"Document address",input_document_url:"Please enter the document address",Get_token:"Please obtain the team knowledge base token first",Reference_link:"Reference link",document_token:"Document token",input_document_token:"Please enter document token",input_question:"Please enter a question",detail:"Detail",Manual_entry:"Manual entry",Data_content:"Data content",Main_content:"Main content",Auxiliary_data:"Auxiliary data",enter_question_first:"Please enter the question first",Update_successfully:"Update successfully",Create_successfully:"Create successfully",Update_failure:"Update failure",Create_failure:"Create failure",View_details:"View details",All:"All",Please_input_prompt_name:"Please input prompt name",Copy_Btn:"Copy",copy_to_clipboard:"Copy to clipboard",copy_to_clipboard_success:"Copy to clipboard success",copy_to_clipboard_failed:"Copy to clipboard failed",Delete_Btn:"Delete",publish:"Publish",unpublish:"Unpublished",publish_desc:"Are you sure about releasing the application?",unPublish_desc:"Are you sure you want to unpublish this application?",published_success:"Published Success",dbgpts_community:"DBGPTS Community",community_dbgpts:"Community DBGPTS",my_dbgpts:"My DBGPTS",Refresh_dbgpts:"Refresh from the community Git repository",workflow:"Workflow",resources:"Resources",app:"App",please_select_resource_type:"Please select resource type"}},zh:{translation:{dialog_list:"对话列表",delete_chat:"删除会话",delete_chat_confirm:"您确认要删除会话吗?",input_tips:"可以问我任何问题,shift + Enter 换行",sent:"发送",answer_again:"重新回答",feedback_tip:"描述一下具体问题或更优的答案",thinking:"正在思考中",stop_replying:"停止回复",erase_memory:"清除记忆",copy_success:"复制成功",copy_failed:"复制失败",copy_nothing:"内容复制为空",file_tip:"文件上传后无法更改",file_upload_tip:"上传文件到对话(您的模型必须支持多模态输入)",chat_online:"在线对话",assistant:"平台小助手",model_tip:"当前应用暂不支持模型选择",temperature_tip:"当前应用暂不支持温度配置",max_new_tokens_tip:"当前应用暂不支持max_new_tokens配置",extend_tip:"当前应用暂不支持拓展配置",cot_title:"思考",code_preview:"预览",code_preview_full_screen:"全屏",code_preview_exit_full_screen:"退出全屏",code_preview_code:"代码",code_preview_copy:"复制",code_preview_already_copied:"已复制",code_preview_download:"下载",code_preview_run:"运行",code_preview_close:"关闭",Upload_Data_Successfully:"文件上传成功",Upload_Data_Failed:"文件上传失败",Upload_Data:"上传数据",Code_Editor:"代码编辑器",Open_Code_Editor:"打开代码编辑器",Export_Flow_Success:"导出工作流成功",Import_Flow_Success:"导入工作流成功",Import:"导入",Export:"导出",Import_Flow:"导入工作流",Export_Flow:"导出工作流",Select_File:"选择文件",Save_After_Import:"导入后保存",Export_File_Type:"文件类型",Export_File_Format:"文件格式",Yes:"是",No:"否",Please_Add_Nodes_First:"请先添加节点",Add_Global_Variable_of_Flow:"添加 Flow 全局变量",Add_Parameter:"添加参数",Higher_Order_Nodes:"高阶",All_Nodes:"所有",Import_From_Template:"导入模版",Template_Description:"描述",Template_Name:"模版名称",Template_Label:"标签",Template_Action:"操作",minimum_dynamic_fields_warning:"请保留一个以上的动态字段",Knowledge_Space:"知识库",space:"知识库",Vector:"向量",Owner:"创建人",Count:"文档数",File_type_Invalid:"文件类型错误",Knowledge_Space_Config:"知识库配置",Choose_a_Datasource_type:"知识库类型",Segmentation:"分片",No_parameter:"不需要配置分片参数",Knowledge_Space_Name:"知识库名称",Please_input_the_name:"请输入名称",Please_input_the_owner:"请输入创建人",Please_select_file:"请至少选择一个文件",Description:"描述",Storage:"存储类型",Domain:"领域类型",Please_input_the_description:"请输入描述",Please_select_the_storage:"请选择存储类型",Please_select_the_domain_type:"请选择领域类型",Next:"下一步",the_name_can_only_contain:"名称只能包含数字、字母、中文字符、-或_",Text:"文本","Fill your raw text":"填写您的原始文本",URL:"网址",Fetch_the_content_of_a_URL:"获取 URL 的内容",Document:"文档",Upload_a_document:"上传文档,文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown、Zip",Name:"名称",Text_Source:"文本来源(可选)",Please_input_the_text_source:"请输入文本来源",Sync:"同步",Back:"上一步",Finish:"完成",Web_Page_URL:"网页网址",Please_input_the_Web_Page_URL:"请输入网页网址",Select_or_Drop_file:"选择或拖拽文件",Documents:"文档",Chat:"对话",Add_Datasource:"添加数据源",View_Graph:"查看图谱",Arguments:"参数",Type:"类型",Size:"切片",Last_Sync:"上次同步时间",Status:"状态",Result:"结果",Details:"明细",Delete:"删除",Operation:"操作",Submit:"提交",close:"关闭",Chunks:"切片",Content:"内容",Meta_Data:"元数据",Please_select_a_file:"请上传一个文件",Please_input_the_text:"请输入文本",Embedding:"嵌入",topk:"TopK",the_top_k_vectors:"基于相似度得分的前 k 个向量",recall_score:"召回分数",Set_a_threshold_score:"设置相似向量检索的阈值分数",recall_type:"召回类型",model:"模型",A_model_used:"用于创建文本或其他数据的矢量表示的模型",Automatic:"自动切片",Process:"切片处理",Automatic_desc:"自动设置分割和预处理规则。",chunk_size:"块大小",The_size_of_the_data_chunks:"处理中使用的数据块的大小",chunk_overlap:"块重叠",The_amount_of_overlap:"相邻数据块之间的重叠量",scene:"场景",A_contextual_parameter:"用于定义使用提示的设置或环境的上下文参数",template:"模板",structure_or_format:"预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。",max_token:"最大令牌",max_iteration:"最大迭代",concurrency_limit:"并发限制",The_maximum_number_of_tokens:"提示中允许的最大标记或单词数",Theme:"主题",database_type:"数据库类型",edit_database:"编辑数据源",add_database:"添加数据源",update_success:"更新成功",update_failed:"更新失败",create_success:"创建成功",create_failed:"创建失败",please_select_database_type:"请选择数据库类型",select_database_type:"选择数据库类型",description:"描述",input_description:"请输入描述",Port:"端口",Username:"用户名",Password:"密码",Remark:"备注",Edit:"编辑",Database:"数据库",Data_Source:"数据中心",Close_Sidebar:"收起",Show_Sidebar:"展开",language:"语言",choose_model:"请选择一个模型",data_center_desc:"DB-GPT支持数据库交互和基于文档的对话,它还提供了一个用户友好的数据中心管理界面。",create_database:"创建数据库",create_knowledge:"创建知识库",create_flow:"创建工作流",path:"路径",model_manage:"模型管理",create_model:"创建模型",model_select_tips:"请选择一个模型",submit:"提交",stop_model:"停止模型",stop_model_success:"模型停止成功",start_model:"启动模型",start_model_success:"启动模型成功",stop_and_delete_model:"停止并删除模型",stop_and_delete_model_success:"停止并删除模型成功",confirm_start_model:"确定要启动模型? 模型名:",confirm_stop_model:"确定要停止模型? 模型名:",confirm_stop_and_delete_model:"确定要停止并删除模型? 模型名:",worker_type_select_tips:"请选择一个worker类型",model_select_worker_type:"选择worker类型",download_model_tip:"请先下载模型!",start_model_failed:"启动模型失败",provider_select_tips:"请选择一个模型提供商",model_select_provider:"请选择一个模型提供商",model_please_input_name:"请输入模型名称",model_select_or_input_model:"选择或输入模型名称",model_deploy_name:"模型名称",Plugins:"插件列表",try_again:"刷新重试",no_data:"暂无数据",Prompt:"提示词",Open_Sidebar:"展开",verify:"确认",cancel:"取消",Edit_Success:"编辑成功",Add:"新增",Add_Success:"新增成功",Error_Message:"出错了",Please_Input:"请输入",Prompt_Info_Scene:"场景",Prompt_Info_Sub_Scene:"次级场景",Prompt_Info_Name:"名称",Prompt_Info_Content:"内容",Public:"公共",Private:"私有",Lowest:"渣渣",Missed:"没理解",Lost:"答不了",Incorrect:"答错了",Verbose:"较啰嗦",Best:"真棒",Rating:"评分",Q_A_Category:"问答类别",Q_A_Rating:"问答评分",feed_back_desc:"0: 无结果\n1: 有结果,但是在文不对题,没有理解问题\n2: 有结果,理解了问题,但是提示回答不了这个问题\n3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n",input_count:"共计输入",input_unit:"字",Click_Select:"点击选择",Quick_Start:"快速开始",Select_Plugins:"选择插件",Search:"搜索",Reset:"重置",Update_From_Github:"更新Github插件",Upload:"上传",Market_Plugins:"插件市场",My_Plugins:"我的插件",Del_Knowledge_Tips:"你确定删除该知识库吗",Del_Document_Tips:"你确定删除该文档吗",Tips:"提示",Limit_Upload_File_Count_Tips:"一次只能上传一个文件",To_Plugin_Market:"前往插件市场",Summary:"总结",stacked_column_chart:"堆叠柱状图",column_chart:"柱状图",percent_stacked_column_chart:"百分比堆叠柱状图",grouped_column_chart:"簇形柱状图",time_column:"簇形柱状图",pie_chart:"饼图",line_chart:"折线图",area_chart:"面积图",stacked_area_chart:"堆叠面积图",scatter_plot:"散点图",bubble_chart:"气泡图",stacked_bar_chart:"堆叠条形图",bar_chart:"条形图",percent_stacked_bar_chart:"百分比堆叠条形图",grouped_bar_chart:"簇形条形图",water_fall_chart:"瀑布图",table:"表格",multi_line_chart:"多折线图",multi_measure_column_chart:"多指标柱形图",multi_measure_line_chart:"多指标折线图",Advices:"自动推荐",Retry:"重试",Load_more:"加载更多",new_chat:"创建会话",choice_agent_tip:"请选择代理",no_context_tip:"请输入你的问题",Terminal:"终端",used_apps:"最近使用",app_in_mind:"没有心仪的应用?去",explore:"探索广场",Discover_more:"发现更多",sdk_insert:"SDK接入",my_apps:"我的应用",awel_flow:"AWEL 工作流",save:"保存",add_node:"添加节点",no_node:"没有可编排节点",connect_warning:"节点无法连接",flow_modal_title:"保存工作流",flow_name:"工作流名称",flow_description:"工作流描述",flow_name_required:"请输入工作流名称",flow_description_required:"请输入工作流描述",save_flow_success:"保存工作流成功",delete_flow_confirm:"确定删除该工作流吗?",related_nodes:"关联节点",language_select_tips:"请选择语言",add_resource:"添加资源",team_modal:"工作模式",App:"应用程序",resource:"资源",resource_name:"资源名",resource_type:"资源类型",resource_value:"参数",resource_dynamic:"动态",Please_input_the_work_modal:"请选择工作模式",available_resources:"可用资源",edit_new_applications:"编辑新的应用",collect:"收藏",collected:"已收藏",create:"创建",Agents:"智能体",edit_application:"编辑应用",add_application:"添加应用",app_name:"应用名称",input_app_name:"请输入应用名称",LLM_strategy:"模型策略",please_select_LLM_strategy:"请选择模型策略",LLM_strategy_value:"模型策略参数",please_select_LLM_strategy_value:"请选择模型策略参数",operators:"算子",Chinese:"中文",English:"英文",docs:"文档",apps:"全部",please_enter_the_keywords:"请输入关键词",input_tip:"请选择模型,输入描述快速开始",create_app:"创建应用",copy_url:"单击复制分享链接",double_click_open:"双击钉钉打开",construct:"应用管理",chat_online:"在线对话",recommend_apps:"热门推荐",all_apps:"全部应用",latest_apps:"最新应用",my_collected_apps:"我的收藏",collect_success:"收藏成功",cancel_success:"取消成功",published:"已发布",unpublished:"未发布",start_chat:"开始对话",native_app:"原生应用",native_type:"应用类型",temperature:"温度",max_new_tokens:"最大输出token",update:"更新",refreshSuccess:"刷新成功",Download:"下载",app_type_select:"请选择应用类型",please_select_param:"请选择参数",please_select_model:"请选择模型",please_input_temperature:"请输入temperature值",please_input_max_new_tokens:"请输入max_new_tokens值",select_workflow:"选择工作流",please_select_workflow:"请选择工作流",recommended_questions:"推荐问题",question:"问题",please_input_recommended_questions:"请输入推荐问题",is_effective:"是否生效",add_question:"添加问题",please_select_prompt:"请选择一个提示词",details:"详情",choose:"选择",please_choose:"请先选择",want_delete:"你确定要删除吗?",success:"成功",input_parameter:"输入参数",output_structure:"输出结构",User_input:"用户输入",LLM_test:"LLM测试",Output_verification:"输出验证",select_scene:"请选择场景",select_type:"请选择类型",Please_complete_the_input_parameters:"请填写完整的输入参数",Please_fill_in_the_user_input:"请填写用户输入内容",help:"我可以帮您:",Refresh_status:"刷新状态",Recall_test:"召回测试",synchronization:"一键同步",Synchronization_initiated:"同步已发起,请稍后",Edit_document:"编辑文档",Document_name:"文档名",Correlation_problem:"关联问题",Add_problem:"添加问题",New_knowledge_base:"新增知识库",yuque:"语雀文档",Get_yuque_document:"获取语雀文档的内容",document_url:"文档地址",input_document_url:"请输入文档地址",Get_token:"请先获取团队知识库token,token获取",Reference_link:"参考链接",document_token:"文档token",input_document_token:"请输入文档token",input_question:"请输入问题",detail:"详情",Manual_entry:"手动录入",Data_content:"数据内容",Main_content:"主要内容",Auxiliary_data:"辅助数据",enter_question_first:"请先输入问题",Update_successfully:"更新成功",Create_successfully:"创建成功",Update_failure:"更新失败",Create_failure:"创建失败",View_details:"查看详情",All:"全部",Please_input_prompt_name:"请输入prompt名称",Copy_Btn:"复制",Delete_Btn:"删除",copy_to_clipboard:"复制到剪贴板",copy_to_clipboard_success:"复制到剪贴板成功",copy_to_clipboard_failed:"复制到剪贴板失败",publish:"发布",unpublish:"取消发布",publish_desc:"您确认发布该应用吗?",unPublish_desc:"您确认取消发布该应用吗?",published_success:"发布成功",dbgpts_community:"DBGPTS社区",community_dbgpts:"社区DBGPTS",my_dbgpts:"我的DBGPTS",Refresh_dbgpts:"从社区Git仓库刷新",workflow:"工作流",resources:"资源",app:"应用",please_select_resource_type:"请选择资源类型"}}},lng:"en",interpolation:{escapeValue:!1}});var i=r.ZP},89546:function(e,t,n){"use strict";n.d(t,{A:function(){return o},Ir:function(){return s},Jr:function(){return i},Ty:function(){return l},zx:function(){return a}});var r=n(76212);let o=e=>(0,r.HT)("/api/v1/question/list",e),i=()=>(0,r.HT)("/api/v1/conv/feedback/reasons"),a=e=>(0,r.a4)("/api/v1/conv/feedback/add",e),s=e=>(0,r.a4)("/api/v1/conv/feedback/cancel",e),l=e=>(0,r.a4)("/api/v1/chat/topic/terminate?conv_id=".concat(e.conv_id,"&round_index=").concat(e.round_index),e)},76212:function(e,t,n){"use strict";n.d(t,{yY:function(){return tm},HT:function(){return tI},a4:function(){return th},uO:function(){return t_},L5:function(){return l},H_:function(){return eL},zd:function(){return b},Hy:function(){return ee},be:function(){return eg},TT:function(){return Z},Vx:function(){return tA},Ir:function(){return p.Ir},fU:function(){return J},zR:function(){return ep},mo:function(){return e0},kg:function(){return D},NY:function(){return ex},Nl:function(){return e5},$E:function(){return m},MX:function(){return eN},n3:function(){return eb},Wd:function(){return g},XK:function(){return eU},Jq:function(){return G},$j:function(){return en},Ug:function(){return C},XI:function(){return L},k7:function(){return j},zx:function(){return p.zx},j8:function(){return u},GQ:function(){return S},BN:function(){return e3},yk:function(){return c},Vd:function(){return T},m9:function(){return A},Tu:function(){return eI},Eb:function(){return eq},Lu:function(){return eJ},$i:function(){return eS},gV:function(){return eM},iZ:function(){return ev},a$:function(){return I},Bw:function(){return es},t$:function(){return el},H4:function(){return ez},iP:function(){return eR},_Q:function(){return em},Wm:function(){return v},Jr:function(){return p.Jr},_d:function(){return w},As:function(){return F},MJ:function(){return Y},Wf:function(){return U},FT:function(){return eC},RR:function(){return k},Kt:function(){return P},fZ:function(){return ew},tM:function(){return f},xA:function(){return er},RX:function(){return d},Q5:function(){return e2},i1:function(){return R},mB:function(){return e7},Vm:function(){return e_},xv:function(){return eH},lz:function(){return s},Vw:function(){return ef},gt:function(){return V},_Y:function(){return B},Gn:function(){return eo},Jx:function(){return $},sW:function(){return ei},DM:function(){return ek},v6:function(){return eZ},N6:function(){return e$},bC:function(){return eB},YU:function(){return eX},VC:function(){return eQ},qn:function(){return eO},vD:function(){return eA},b_:function(){return eu},J5:function(){return eE},mR:function(){return ec},yx:function(){return ed},KS:function(){return eT},zE:function(){return eV},Al:function(){return ej},YP:function(){return eW},uf:function(){return eY},l_:function(){return eK},GU:function(){return Q},pm:function(){return q},b1:function(){return e4},WA:function(){return tS},UO:function(){return K},Y2:function(){return z},Pg:function(){return X},mW:function(){return e8},ks:function(){return H},iH:function(){return eh},ey:function(){return W},YK:function(){return y},vA:function(){return eF},kU:function(){return eG},Ty:function(){return p.Ty},KL:function(){return ey},Hx:function(){return eP},gD:function(){return e1},Fq:function(){return e6},KT:function(){return E},p$:function(){return O},w_:function(){return M},ao:function(){return x},Fu:function(){return et},h:function(){return h},L$:function(){return _},iG:function(){return eD}});var r,o=n(62418),i=n(25519),a=n(87066);let s=()=>tI("/api/v1/team-mode/list"),l=e=>th("/api/v1/app/create",e),E=e=>th("/api/v1/app/edit",e),c=e=>th("/api/v1/app/list?page=".concat(e.page||1,"&page_size=").concat(e.page_size||12),e),u=()=>tI("/api/v1/agents/list",{}),T=()=>tI("/api/v1/llm-strategy/list"),d=e=>tI("/api/v1/app/resources/list?type=".concat(e.type)),R=e=>tI("/api/v1/app/resources/list?type=".concat(e.type,"&version=v2")),f=()=>tI("/api/v1/native_scenes"),A=e=>tI("/api/v1/llm-strategy/value/list?type=".concat(e)),S=e=>tI("/api/v1/app/".concat(e,"/admins")),O=e=>th("/api/v1/app/admins/update",e);var p=n(89546);let N=(0,o.n5)(),I=e=>tI("/api/v1/evaluate/datasets",e,{headers:{"user-id":N}}),h=e=>th("/api/v1/evaluate/dataset/upload/content",e,{headers:{"user-id":N}}),_=e=>th("/api/v1/evaluate/dataset/upload/file",e,{headers:{"user-id":N,"Content-Type":"multipart/form-data"}}),m=e=>tm("/api/v1/evaluate/dataset",e,{headers:{"user-id":N}}),C=e=>tI("/api/v1/evaluate/dataset/download",e,{headers:{"user-id":N,"Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"blob"}),L=e=>tI("/api/v1/evaluate/evaluation/result/download",e,{headers:{"user-id":N,"Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},responseType:"blob"}),g=e=>tm("/api/v1/evaluate/evaluation",e,{headers:{"user-id":N}}),v=e=>tI("/api/v1/evaluate/evaluations",e,{headers:{"user-id":N}}),P=e=>tI("/api/v1/evaluate/metrics",e,{headers:{"user-id":N}}),y=e=>tI("/api/v1/evaluate/evaluation/detail/show",e,{headers:{"user-id":N}}),D=e=>th("/api/v1/evaluate/start",e,{headers:{"user-id":N}}),M=e=>th("/api/v1/evaluate/dataset/members/update",e,{headers:{"user-id":N}}),b=e=>th("/api/v2/serve/awel/flows",e),U=e=>{let{page:t,page_size:n}=e;return tI("/api/v2/serve/awel/flows",{page:t,page_size:n})},w=e=>tI("/api/v2/serve/awel/flows/".concat(e)),x=(e,t)=>t_("/api/v2/serve/awel/flows/".concat(e),t),G=e=>tm("/api/v2/serve/awel/flows/".concat(e)),F=e=>tI("/api/v2/serve/awel/nodes",{tags:e}),H=e=>th("/api/v2/serve/awel/nodes/refresh",e),B=e=>th("/api/v2/serve/awel/flow/import",e),Y=()=>tI("/api/v2/serve/awel/flow/templates"),k=e=>tI("/api/v2/serve/awel/variables/keys",e),V=e=>tI("/api/v2/serve/awel/variables",e),$=e=>th("/api/v2/serve/file/files/metadata/batch",e),W=(e,t)=>th("/knowledge/".concat(e,"/document/list"),t),Z=e=>th("/knowledge/".concat(e.space_name,"/document/yuque/add"),e),j=(e,t)=>th("/knowledge/".concat(e,"/document/edit"),t),X=e=>tI("/knowledge/".concat(e,"/recommend_questions")),K=e=>tI("/knowledge/".concat(e,"/recall_retrievers")),z=(e,t)=>th("/knowledge/".concat(t,"/recall_test"),e),J=e=>th("/knowledge/questions/chunk/edit",e),q=e=>tI("/prompt/type/targets?prompt_type=".concat(e)),Q=e=>th("/prompt/template/load?prompt_type=".concat(e.prompt_type,"&target=").concat(e.target),e),ee=e=>th("/prompt/add",e),et=e=>th("/prompt/update",e),en=e=>th("/prompt/delete",e),er=e=>th("/prompt/query_page?page=".concat(e.page,"&page_size=").concat(e.page_size),e),eo=e=>th("/prompt/response/verify",e),ei=e=>th("/api/v1/chat/dialogue/new?chat_mode=".concat(e.chat_mode,"&model_name=").concat(e.model),e),ea=(e,t)=>{let n=Object.keys(t).filter(e=>void 0!==t[e]).map(e=>"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t[e]))).join("&");return n?"".concat(e,"?").concat(n):e},es=()=>tI("/api/v2/serve/datasources"),el=()=>tI("/api/v2/serve/datasource-types"),eE=e=>tm("/api/v2/serve/datasources/".concat(e)),ec=e=>t_("/api/v2/serve/datasources",e),eu=e=>th("/api/v2/serve/datasources",e),eT=e=>th("/api/v2/serve/datasources/test-connection",e),ed=e=>th("/api/v2/serve/datasources/".concat(e.id,"/refresh")),eR=()=>tI("/api/v1/chat/dialogue/list"),ef=()=>tI("/api/v1/model/types"),eA=e=>th("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),eS=e=>tI("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),eO=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i,temperatureValue:a,maxNewTokensValue:s,userName:l,sysCode:E}=e,c=ea("/api/v1/resource/file/upload",{conv_uid:t,chat_mode:n,model_name:i,user_name:l,sys_code:E,temperature:a,max_new_tokens:s});return th(c,r,{headers:{"Content-Type":"multipart/form-data"},...o})},ep=e=>th("/api/v1/chat/dialogue/clear?con_uid=".concat(e)),eN=e=>th("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),eI=e=>th("/knowledge/".concat(e,"/arguments"),{}),eh=(e,t)=>th("/knowledge/".concat(e,"/argument/save"),t),e_=e=>th("/knowledge/space/list",e),em=(e,t)=>th("/knowledge/".concat(e,"/document/list"),t),eC=(e,t)=>th("/knowledge/".concat(e,"/graphvis"),t),eL=(e,t)=>th("/knowledge/".concat(e,"/document/add"),t),eg=e=>th("/knowledge/space/add",e),ev=()=>tI("/knowledge/document/chunkstrategies"),eP=(e,t)=>th("/knowledge/".concat(e,"/document/sync"),t),ey=(e,t)=>th("/knowledge/".concat(e,"/document/sync_batch"),t),eD=(e,t)=>th("/knowledge/".concat(e,"/document/upload"),t),eM=(e,t)=>th("/knowledge/".concat(e,"/chunk/list"),t),eb=(e,t)=>th("/knowledge/".concat(e,"/document/delete"),t),eU=e=>th("/knowledge/space/delete",e),ew=()=>tI("/api/v2/serve/model/models"),ex=e=>th("/api/v2/serve/model/models",e),eG=e=>th("/api/v2/serve/model/models/stop",e),eF=e=>th("/api/v2/serve/model/models/start",e),eH=()=>tI("/api/v2/serve/model/model-types"),eB=e=>th("/api/v1/agent/query",e),eY=e=>th("/api/v1/serve/dbgpts/hub/query_page?page=".concat(null==e?void 0:e.page_index,"&page_size=").concat(null==e?void 0:e.page_size),e),ek=e=>th("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),eV=e=>th("/api/v1/serve/dbgpts/hub/source/refresh",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),e$=e=>th("/api/v1/agent/my",void 0,{params:{user:e}}),eW=e=>th("/api/v1/serve/dbgpts/my/query_page?page=".concat(null==e?void 0:e.page_index,"&page_size=").concat(null==e?void 0:e.page_size),e),eZ=(e,t)=>th("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),ej=(e,t)=>th("/api/v1/serve/dbgpts/hub/install",e,{params:{user:t},timeout:6e4}),eX=(e,t)=>th("/api/v1/agent/uninstall",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eK=(e,t)=>th("/api/v1/serve/dbgpts/my/uninstall",void 0,{params:{...e,user:t},timeout:6e4}),ez=()=>tI("/api/v1/dbgpts/list"),eJ=()=>tI("/api/v1/feedback/select",void 0),eq=(e,t)=>tI("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),eQ=e=>{let{data:t,config:n}=e;return th("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})},e0=e=>th("/api/v1/app/collect",e),e1=e=>th("/api/v1/app/uncollect",e),e2=()=>tI("/api/v1/resource-type/list"),e4=e=>th("/api/v1/app/publish",{app_code:e}),e6=e=>th("/api/v1/app/unpublish",{app_code:e}),e3=e=>tI("/api/v1/app/info",e),e8=e=>th("/api/v1/app/hot/list",e),e5=e=>th("/api/v1/app/remove",e),e7=()=>tI("/knowledge/space/config");var e9=n(26855);let{Axios:te,AxiosError:tt,CanceledError:tn,isCancel:tr,CancelToken:to,VERSION:ti,all:ta,Cancel:ts,isAxiosError:tl,spread:tE,toFormData:tc,AxiosHeaders:tu,HttpStatusCode:tT,formToJSON:td,getAdapter:tR,mergeConfig:tf}=a.default,tA=(e,t)=>e.then(e=>{let{data:n}=e;if(!n)throw Error("Network Error!");if(!n.success){if("*"===t||n.err_code&&t&&t.includes(n.err_code));else{var r;e9.ZP.error({message:"Request error",description:null!==(r=null==n?void 0:n.err_msg)&&void 0!==r?r:"The interface is abnormal. Please try again later"})}}return[null,n.data,n,e]}).catch(e=>{let t=e.message;if(e instanceof tt)try{let{err_msg:n}=JSON.parse(e.request.response);n&&(t=n)}catch(e){}return e9.ZP.error({message:"Request error",description:t}),[e,null,null,null]}),tS=e=>[];var tO=n(83454);let tp=a.default.create({baseURL:null!==(r=tO.env.API_BASE_URL)&&void 0!==r?r:""}),tN=["/db/add","/db/test/connect","/db/summary","/params/file/load","/chat/prepare","/model/start","/model/stop","/editor/sql/run","/sql/editor/submit","/editor/chart/run","/chart/editor/submit","/document/upload","/document/sync","/agent/install","/agent/uninstall","/personal/agent/upload"];tp.interceptors.request.use(e=>{let t=tN.some(t=>e.url&&e.url.indexOf(t)>=0);return e.timeout||(e.timeout=t?6e4:1e5),e.headers.set(i.gp,(0,o.n5)()),e});let tI=(e,t,n)=>tp.get(e,{params:t,...n}),th=(e,t,n)=>tp.post(e,t,n),t_=(e,t,n)=>tp.put(e,t,n),tm=(e,t,n)=>tp.delete(e,{params:t,...n})},1051:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);function o(){return(0,r.jsx)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M688 312c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48z m-392 88h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8z m376 116c119.3 0 216 96.7 216 216s-96.7 216-216 216-216-96.7-216-216 96.7-216 216-216z m107.5 323.5C808.2 810.8 824 772.6 824 732s-15.8-78.8-44.5-107.5S712.6 580 672 580s-78.8 15.8-107.5 44.5S520 691.4 520 732s15.8 78.8 44.5 107.5S631.4 884 672 884s78.8-15.8 107.5-44.5zM440 852c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H168c-17.7 0-32-14.3-32-32V108c0-17.7 14.3-32 32-32h640c17.7 0 32 14.3 32 32v384c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8V148H208v704h232z m232-76.06l-20.56 28.43c-1.5 2.1-3.9 3.3-6.5 3.3h-44.3c-6.5 0-10.3-7.4-6.4-12.7l45.75-63.3-45.75-63.3c-3.9-5.3-0.1-12.7 6.4-12.7h44.3c2.6 0 5 1.2 6.5 3.3L672 687.4l20.56-28.43c1.5-2.1 3.9-3.3 6.5-3.3h44.3c6.5 0 10.3 7.4 6.4 12.7l-45.75 63.3 45.75 63.3c3.9 5.3 0.1 12.7-6.4 12.7h-44.3c-2.6 0-5-1.2-6.5-3.3L672 775.94z",fill:"#d81e06"})})}},82353:function(e,t,n){"use strict";n.d(t,{O7:function(){return o},RD:function(){return s},In:function(){return i},zM:function(){return a},je:function(){return l},DL:function(){return E},si:function(){return c},FD:function(){return u},qw:function(){return T},s2:function(){return d},FE:function(){return R.Z},Rp:function(){return f},IN:function(){return A},tu:function(){return S},ig:function(){return O},ol:function(){return p},bn:function(){return N}});var r=n(85893),o=function(){return(0,r.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M416.9549913 314.32347826h297.42302609a119.56758261 119.56758261 0 0 1 119.56758261 119.56758261v179.19109565a196.71485217 196.71485217 0 0 1-196.71485217 196.71485218H416.9549913a119.56758261 119.56758261 0 0 1-119.5675826-119.56758261v-256.44521739A119.56758261 119.56758261 0 0 1 416.9549913 314.32347826z",fill:"#F5384A"}),(0,r.jsx)("path",{d:"M716.24793043 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v260.18504347c0 3.84667826 0 7.69335652 0.58768696 11.43318261a345.7202087 345.7202087 0 0 0 502.9531826-353.19986087A117.1634087 117.1634087 0 0 0 716.24793043 314.32347826z",fill:"#F54F5C"}),(0,r.jsx)("path",{d:"M318.91812174 594.54330435a345.7202087 345.7202087 0 0 0 420.73043478-249.07241739c2.35074783-9.18928696 4.22066087-18.432 5.82344348-27.67471305a117.10998261 117.10998261 0 0 0-29.22406957-3.63297391H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.5373913v156.43158261c6.9453913 2.35074783 14.10448696 4.54121739 21.42386087 6.41113044z",fill:"#F66C73"}),(0,r.jsx)("path",{d:"M630.17850435 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v48.08347826a346.14761739 346.14761739 0 0 0 332.68424348-165.62086957z",fill:"#F78989"}),(0,r.jsx)("path",{d:"M859.85725217 354.76702609h-25.53766956C802.26393043 200.52591304 669.92751304 84.59130435 512 84.59130435S221.73606957 200.52591304 189.68041739 354.76702609h-25.53766956a139.6557913 139.6557913 0 0 0-139.44208696 139.49551304v79.872a139.6557913 139.6557913 0 0 0 139.44208696 139.49551304h27.62128695a54.65488696 54.65488696 0 0 0 54.60146087-54.60146087V427.10594783C246.36549565 273.6128 365.50566957 148.7026087 512 148.7026087s265.63450435 124.9101913 265.63450435 278.40333913v159.3165913c0 116.09488696-74.79652174 219.47436522-181.38156522 251.42316522a30.23916522 30.23916522 0 0 0-3.09871304 1.06852174 60.15777391 60.15777391 0 1 0 18.05801739 61.06601739 23.50747826 23.50747826 0 0 0 3.36584348-0.69453913c93.12166957-27.88841739 166.63596522-98.67798261 203.01913043-187.79269565a54.92201739 54.92201739 0 0 0 14.90587826 2.13704347h27.62128696a139.6557913 139.6557913 0 0 0 139.44208696-139.49551304V494.26253913a139.6557913 139.6557913 0 0 0-139.7092174-139.49551304zM182.2541913 649.51874783h-18.11144347a75.43763478 75.43763478 0 0 1-75.33078261-75.3842087V494.26253913a75.43763478 75.43763478 0 0 1 75.33078261-75.3842087h18.11144347v230.6404174z m752.93384348-75.3842087a75.43763478 75.43763478 0 0 1-75.33078261 75.3842087h-18.11144347V418.87833043h18.11144347a75.43763478 75.43763478 0 0 1 75.33078261 75.3842087z",fill:"#444444"})]})},i=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1116 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M80.75 80.75m67.14674945 0l805.76099677 0q67.14674945 0 67.14674947 67.14674945l0 604.32074759q0 67.14674945-67.14674947 67.14674945l-805.76099677 0q-67.14674945 0-67.14674945-67.14674945l0-604.32074759q0-67.14674945 67.14674945-67.14674945Z",fill:"#36CFC9"}),(0,r.jsx)("path",{d:"M1020.80449568 685.07074759v67.14674945a67.14674945 67.14674945 0 0 1-67.14674946 67.14674945h-308.20358111l91.3195796 100.72012459-24.84429735 22.49416172L600.46584251 819.36424649h-100.72012459L389.62504831 943.25 364.78075097 920.08437108l91.31957961-100.72012459H147.89674945a67.14674945 67.14674945 0 0 1-67.14674945-67.14674945v-67.14674946z",fill:"#08979C"}),(0,r.jsx)("path",{d:"M416.48374894 282.19024919v335.7337481H315.76362434V282.19024919z m167.86687404 134.29349975v201.44024834h-100.72012459v-201.44024834z m167.86687406 67.14674945v134.2934989h-100.7201246v-134.2934989z m-225.94881252-302.16037379v141.34390829h201.4402492V272.11823698L819.36424649 341.27938889l-91.3195796 63.45367858V356.38740719h-239.71389641V215.04349975H315.76362434V181.4701246z",fill:"#B5F5EC"}),(0,r.jsx)("path",{d:"M550.77724783 752.21749704m-33.57337513 0a33.57337515 33.57337515 0 1 0 67.14675028 0 33.57337515 33.57337515 0 1 0-67.14675028 0Z",fill:"#FFFFFF"})]})},a=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M207.83 962c-5.4 0-10.88-1.17-16.08-3.67-18.55-8.89-26.39-31.13-17.5-49.69l77.22-161.26c8.9-18.58 31.14-26.41 49.7-17.51 18.55 8.89 26.39 31.13 17.5 49.69l-77.22 161.26c-6.4 13.38-19.74 21.18-33.62 21.18zM821.57 962c-13.88 0-27.21-7.8-33.62-21.17l-77.24-161.26c-8.9-18.55-1.06-40.8 17.5-49.69 18.57-8.87 40.8-1.07 49.7 17.51l77.24 161.26c8.9 18.55 1.06 40.8-17.5 49.69a37.266 37.266 0 0 1-16.08 3.66z",fill:"#12926E"}),(0,r.jsx)("path",{d:"M156.74 105.14h710.51c50.7 0 91.8 41.1 91.8 91.8v525.82c0 50.7-41.1 91.8-91.8 91.8H156.74c-50.7 0-91.8-41.1-91.8-91.8V196.93c0.01-50.69 41.11-91.79 91.8-91.79z",fill:"#39E2A0"}),(0,r.jsx)("path",{d:"M835.65 686.01h-614.7c-5.14 0-9.31-4.17-9.31-9.31 0-5.14 4.17-9.31 9.31-9.31h614.7c5.14 0 9.31 4.17 9.31 9.31 0 5.14-4.17 9.31-9.31 9.31z",fill:"#D3F8EA"}),(0,r.jsx)("path",{d:"M699.31 631.94H624.8V454.95c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v176.99zM846.22 631.94h-74.51V346.76c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v285.18zM289.51 631.94H215V417.69c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v214.25zM436.42 631.94h-74.51V495.77c0-11.28 9.14-20.42 20.42-20.42H416c11.28 0 20.42 9.14 20.42 20.42v136.17z",fill:"#FFFFFF"}),(0,r.jsx)("path",{d:"M715.4 173.76H308.6c-11.11 0-20.12-9.01-20.12-20.12V82.12c0-11.11 9.01-20.12 20.12-20.12h406.8c11.11 0 20.12 9.01 20.12 20.12v71.52c0.01 11.11-9 20.12-20.12 20.12z",fill:"#12926E"})]})},s=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M226.3 70.4C151.1 91.6 91.6 151.1 70.4 226.3L226.3 70.4z",fill:"#FFA65A"}),(0,r.jsx)("path",{d:"M277.9 62.2c-116.5 4.7-211 99.1-215.7 215.7L277.9 62.2z",fill:"#FFA659"}),(0,r.jsx)("path",{d:"M321.5 62H287C163.3 62 62 163.3 62 287v34.5L321.5 62z",fill:"#FFA558"}),(0,r.jsx)("path",{d:"M365 62h-78C163.3 62 62 163.3 62 287v78L365 62z",fill:"#FFA557"}),(0,r.jsx)("path",{d:"M408.4 62H287C163.3 62 62 163.3 62 287v121.4L408.4 62z",fill:"#FFA556"}),(0,r.jsx)("path",{d:"M451.8 62H287c-35.9 0-69.8 8.5-100 23.6L85.6 187C70.5 217.2 62 251.1 62 287v164.8L451.8 62z",fill:"#FFA555"}),(0,r.jsx)("path",{d:"M495.3 62H287c-12.2 0-24.2 1-35.9 2.9L64.9 251.1C63 262.8 62 274.8 62 287v208.3L495.3 62z",fill:"#FFA454"}),(0,r.jsx)("path",{d:"M62 538.7L538.7 62H297.5L62 297.5z",fill:"#FFA453"}),(0,r.jsx)("path",{d:"M62 582.1L582.1 62H340.9L62 340.9z",fill:"#FFA452"}),(0,r.jsx)("path",{d:"M62 625.6L625.6 62H384.3L62 384.3z",fill:"#FFA451"}),(0,r.jsx)("path",{d:"M62 427.8V669L669 62H427.8z",fill:"#FFA450"}),(0,r.jsx)("path",{d:"M62 471.2v241.2L712.4 62H471.2z",fill:"#FFA34F"}),(0,r.jsx)("path",{d:"M737 62H514.6L62 514.6V737c0 6.1 0.3 12.1 0.7 18.1L755.1 62.7c-6-0.4-12-0.7-18.1-0.7z",fill:"#FFA34E"}),(0,r.jsx)("path",{d:"M737 62H558.1L62 558.1V737c0 19.1 2.4 37.6 6.9 55.4L792.4 68.9C774.6 64.4 756.1 62 737 62z",fill:"#FFA34D"}),(0,r.jsx)("path",{d:"M737 62H601.5L62 601.5V737c0 31.1 6.4 60.8 17.9 87.8L824.8 79.9C797.8 68.4 768.1 62 737 62z",fill:"#FFA34C"}),(0,r.jsx)("path",{d:"M853.5 94.7C819.4 74 779.5 62 737 62h-92.1L62 644.9V737c0 42.5 12 82.4 32.7 116.5L853.5 94.7z",fill:"#FFA24B"}),(0,r.jsx)("path",{d:"M878.9 112.7C840.1 81.1 790.7 62 737 62h-48.6L62 688.4V737c0 53.7 19.1 103.1 50.7 141.9l766.2-766.2z",fill:"#FFA24A"}),(0,r.jsx)("path",{d:"M737 62h-5.2L62 731.8v5.2c0 64.7 27.7 123.2 71.7 164.3l767.6-767.6C860.2 89.7 801.7 62 737 62z",fill:"#FFA249"}),(0,r.jsx)("path",{d:"M64.8 772.4c9.8 61 44.3 114.1 92.8 148.4l763.2-763.2c-34.3-48.6-87.4-83.1-148.4-92.8L64.8 772.4z",fill:"#FFA248"}),(0,r.jsx)("path",{d:"M73.3 807.3c18.7 56.4 59.2 103 111.3 129.9l752.6-752.6C910.4 132.5 863.7 92 807.3 73.3l-734 734z",fill:"#FFA247"}),(0,r.jsx)("path",{d:"M86.1 838c26.5 52.3 72.9 93.1 129.1 112.2l735-735C931.1 159 890.3 112.6 838 86.1L86.1 838z",fill:"#FFA147"}),(0,r.jsx)("path",{d:"M102.4 865.2c34 48.7 86.7 83.5 147.5 93.7l709-709c-10.2-60.8-45-113.5-93.7-147.5L102.4 865.2z",fill:"#FFA146"}),(0,r.jsx)("path",{d:"M962 287c0-65.2-28.1-124.1-72.7-165.3L121.7 889.3C162.9 933.9 221.8 962 287 962h3.2L962 290.2V287z",fill:"#FFA145"}),(0,r.jsx)("path",{d:"M962 287c0-54.2-19.4-104-51.6-143L144 910.4c39 32.2 88.8 51.6 143 51.6h46.6L962 333.6V287z",fill:"#FFA144"}),(0,r.jsx)("path",{d:"M962 287c0-43.1-12.3-83.4-33.5-117.7L169.3 928.5C203.6 949.7 243.9 962 287 962h90.1L962 377.1V287z",fill:"#FFA143"}),(0,r.jsx)("path",{d:"M287 962h133.5L962 420.5V287c0-31.6-6.6-61.8-18.5-89.2L197.8 943.4c27.4 12 57.6 18.6 89.2 18.6z",fill:"#FFA042"}),(0,r.jsx)("path",{d:"M287 962h176.9L962 463.9V287c0-19.7-2.6-38.7-7.4-56.9L230.1 954.6c18.2 4.8 37.2 7.4 56.9 7.4z",fill:"#FFA041"}),(0,r.jsx)("path",{d:"M287 962h220.4L962 507.4V287c0-6.7-0.3-13.4-0.9-20L267 961.1c6.6 0.6 13.3 0.9 20 0.9z",fill:"#FFA040"}),(0,r.jsx)("path",{d:"M550.8 962L962 550.8V309.6L309.6 962z",fill:"#FFA03F"}),(0,r.jsx)("path",{d:"M594.2 962L962 594.2V353L353 962z",fill:"#FF9F3E"}),(0,r.jsx)("path",{d:"M637.7 962L962 637.7V396.4L396.4 962z",fill:"#FF9F3D"}),(0,r.jsx)("path",{d:"M681.1 962L962 681.1V439.9L439.9 962z",fill:"#FF9F3C"}),(0,r.jsx)("path",{d:"M724.5 962L962 724.5V483.3L483.3 962z",fill:"#FF9F3B"}),(0,r.jsx)("path",{d:"M962 737V526.7L526.7 962H737c11.4 0 22.5-0.9 33.5-2.5l189-189c1.6-11 2.5-22.1 2.5-33.5z",fill:"#FF9F3A"}),(0,r.jsx)("path",{d:"M962 737V570.2L570.2 962H737c34.3 0 66.9-7.8 96.1-21.7l107.2-107.2c13.9-29.2 21.7-61.8 21.7-96.1z",fill:"#FF9E39"}),(0,r.jsx)("path",{d:"M962 613.6L613.6 962H737c123.8 0 225-101.3 225-225V613.6z",fill:"#FF9E38"}),(0,r.jsx)("path",{d:"M962 657L657 962h80c123.8 0 225-101.3 225-225v-80z",fill:"#FF9E37"}),(0,r.jsx)("path",{d:"M962 700.5L700.5 962H737c123.8 0 225-101.3 225-225v-36.5z",fill:"#FF9E36"}),(0,r.jsx)("path",{d:"M961.9 744L744 961.9c118.2-3.7 214.2-99.7 217.9-217.9z",fill:"#FF9D35"}),(0,r.jsx)("path",{d:"M954.4 795L795 954.4c77.4-20.8 138.6-82 159.4-159.4z",fill:"#FF9D34"}),(0,r.jsx)("path",{d:"M736.3 622.9L523.5 747.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 622.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFD9C0"}),(0,r.jsx)("path",{d:"M736.3 523.9L523.5 648.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 523.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFE8D9"}),(0,r.jsx)("path",{d:"M736.3 424.9L523.5 549.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 424.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFF6F0"})]})},l=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M197.99492187 62v900h-34.18066406C124.57285156 962 92.76171875 930.18886719 92.76171875 890.94746094V133.05253906C92.76171875 93.81113281 124.57285156 62 163.81425781 62h34.18066406z m662.19082032 0C899.42714844 62 931.23828125 93.81113281 931.23828125 133.05253906v757.89492188c0 39.24140625-31.81113281 71.05253906-71.05253906 71.05253906H276.92070312V62h583.26503907z",fill:"#19A05F"}),(0,r.jsx)("path",{d:"M577.0390625 62l0.33222656 220.3875 111.2475586-108.80771484L800.19951172 284.36328125V62zM425.40224609 508.18554688h377.05078125v50.94404296h-377.05078125V508.18554688z m0 101.88720703h377.05078125v50.94316406h-377.05078125v-50.94316406z",fill:"#FFFFFF"})]})},E=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M701.95942066 37.1014489H250.80579673a142.46956521 142.46956521 0 0 0-142.46956522 142.46956523v664.85797174a142.46956521 142.46956521 0 0 0 142.46956522 142.46956523h522.38840654a142.46956521 142.46956521 0 0 0 142.46956522-142.46956523V274.55072501L701.95942066 37.1014489z",fill:"#53D39C"}),(0,r.jsx)("path",{d:"M444.2794663 392.18309566l69.64387283 117.72735109h2.70692174l69.97630108-117.70360654h82.4661337l-105.40373371 172.67311305 107.77822609 172.6968587h-83.98580869l-70.83111847-117.89356521h-2.70692174L443.09222066 737.57681196h-83.65338045l108.11065544-172.6968587-106.09233586-172.6968576h82.82230651z",fill:"#25BF79"}),(0,r.jsx)("path",{d:"M444.2794663 380.31063151l69.64387283 117.7273511h2.70692174l69.97630108-117.70360543h82.4661337l-105.40373371 172.67311305L671.44718803 725.70434783h-83.98580869l-70.83111847-117.89356522h-2.70692174L443.09222066 725.70434783h-83.65338045l108.11065544-172.6968576-106.09233586-172.69685872h82.82230651z",fill:"#FFFFFF"}),(0,r.jsx)("path",{d:"M701.95942066 37.1014489l160.27826087 178.08695653L915.66376849 274.55072501h-142.46956522a71.23478261 71.23478261 0 0 1-71.23478261-71.23478261V37.1014489z",fill:"#25BF79"})]})},c=function(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full",children:(0,r.jsx)("path",{d:"M688.51536688 447.75428656l-2.39993719 1.25996719a200.75473031 200.75473031 0 0 1-7.19981156 38.03900156l-47.33875688 166.43563031 110.45710031-59.63843437-47.03876531-114.41699625a108.2971575 108.2971575 0 0 1-6.47982937-31.67916844z m194.87488406-200.99472375l-96.35747063-58.55846344-354.77068687 217.43429251a70.01816156 70.01816156 0 0 0-32.51914688 59.57843624v193.97490844l-158.99582625-98.09742562V362.67651969a69.4181775 69.4181775 0 0 1 33.95910844-60.41841375l358.67058469-206.99456625 13.55964469 7.97979L544.75914031 41.26495719a62.75835281 62.75835281 0 0 0-65.63827687 0L140.54975094 246.75956281a69.89816531 69.89816531 0 0 0-32.81913844 59.75843063v410.98921218c-0.11999719 24.47935781 12.2996775 47.1587625 32.81913844 59.81842969l338.5711125 205.49460563c20.21946937 12.23967844 45.35880937 12.23967844 65.63827687 0l338.69110875-205.49460563c20.33946563-12.41967375 32.87913656-35.09907844 32.8791375-59.81842968v-410.98921219a69.77816813 69.77816813 0 0 0-32.93913562-59.75843063z m-89.51764969 477.88745532l-31.01918625-75.65801438-150.53604844 81.35786438-30.47919937 108.95713968-95.81748563 51.7186425 151.61602032-485.20726312 103.79727562-56.09852719 148.73609531 322.97152219-96.29747156 51.95863594z m0-1e-8",fill:"#0F6CF9"})})},u=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.jsx)("path",{d:"M593.054 120.217C483.656 148.739 402.91 248.212 402.91 366.546c0 140.582 113.962 254.544 254.544 254.544 118.334 0 217.808-80.746 246.328-190.144C909.17 457.12 912 484.23 912 512c0 220.914-179.086 400-400 400S112 732.914 112 512s179.086-400 400-400c27.77 0 54.88 2.83 81.054 8.217z"})})};function T(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#1afa29"})]})}function d(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z",fill:"#87d068"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z",fill:"#87d068"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#87d068"})]})}var R=n(1051);function f(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M296 256c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM488 456v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8z",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M544.1 736.4c1.8-34.5 16.2-66.8 40.8-91.4 26.2-26.2 62-41 99.1-41 37.4 0 72.6 14.6 99.1 41 3.2 3.2 6.3 6.6 9.2 10.1L769.2 673c-5.3 4.1-3.5 12.5 3 14.1l93.3 22.5c5 1.2 9.8-2.6 9.9-7.7l0.6-95.4c0-6.7-7.6-10.5-12.9-6.4l-20.3 15.8C805.4 569.6 748.1 540 684 540c-109.9 0-199.6 86.9-204 195.7-0.2 4.5 3.5 8.3 8 8.3h48.1c4.3 0 7.8-3.3 8-7.6zM880 744h-48.1c-4.3 0-7.8 3.3-8 7.6-1.8 34.5-16.2 66.8-40.8 91.4-26.2 26.2-62 41-99.1 41-37.4 0-72.6-14.6-99.1-41-3.2-3.2-6.3-6.6-9.2-10.1l23.1-17.9c5.3-4.1 3.5-12.5-3-14.1l-93.3-22.5c-5-1.2-9.8 2.6-9.9 7.7l-0.6 95.4c0 6.7 7.6 10.5 12.9 6.4l20.3-15.8C562.6 918.4 619.9 948 684 948c109.9 0 199.6-86.9 204-195.7 0.2-4.5-3.5-8.3-8-8.3z",fill:"#2db7f5"})]})}var A=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M513.89 950.72c-5.5 0-11-1.4-15.99-4.2L143.84 743c-9.85-5.73-15.99-16.17-15.99-27.64V308.58c0-11.33 6.14-21.91 15.99-27.64L497.9 77.43c9.85-5.73 22.14-5.73 31.99 0l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64V715.5c0 11.33-6.14 21.91-15.99 27.64L529.89 946.52c-4.99 2.8-10.49 4.2-16 4.2zM191.83 697.15L513.89 882.2l322.07-185.05V326.92L513.89 141.87 191.83 326.92v370.23z m322.06-153.34c-5.37 0-10.88-1.4-15.99-4.33L244.29 393.91c-15.35-8.79-20.6-28.27-11.77-43.56 8.83-15.28 28.41-20.5 43.76-11.72l253.61 145.7c15.35 8.79 20.6 28.27 11.77 43.56-6.01 10.32-16.76 15.92-27.77 15.92z m0 291.52c-17.66 0-31.99-14.26-31.99-31.84V530.44L244.55 393.91s-0.13 0-0.13-0.13l-100.45-57.69c-15.35-8.79-20.6-28.27-11.77-43.56s28.41-20.5 43.76-11.72l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64v291.39c-0.13 17.71-14.46 31.97-32.12 31.97z m0 115.39c-17.66 0-31.99-14.26-31.99-31.84V511.97c0-17.58 14.33-31.84 31.99-31.84s31.99 14.26 31.99 31.84v406.91c0 17.7-14.33 31.84-31.99 31.84z m0-406.91c-11 0-21.75-5.73-27.77-15.92-8.83-15.28-3.58-34.64 11.77-43.56l354.06-203.52c15.35-8.79 34.8-3.57 43.76 11.72 8.83 15.28 3.58 34.64-11.77 43.56L529.89 539.61c-4.99 2.93-10.49 4.2-16 4.2z"})})};function S(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M114.5856 951.04h298.24v-71.68H186.2656v-747.52h593.92v271.36h71.68v-343.04h-737.28v890.88z",fill:"#747690"}),(0,r.jsx)("path",{d:"M662.4256 311.04h-358.4v-71.68h358.4v71.68zM508.8256 490.24h-204.8v-71.68h204.8v71.68zM668.8256 554.24a168.96 168.96 0 1 0 0 337.92 168.96 168.96 0 0 0 0-337.92z m-240.64 168.96a240.64 240.64 0 1 1 481.28 0 240.64 240.64 0 0 1-481.28 0z",fill:"#747690"}),(0,r.jsx)("path",{d:"M629.76 588.8h71.68v131.4304l82.5856 41.3184-32.0512 64.1024-122.2144-61.0816V588.8z",fill:"#747690"})]})}var O=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M602.24 246.72a17.28 17.28 0 0 0-11.84-16.32l-42.88-14.4A90.56 90.56 0 0 1 490.24 160l-14.4-42.88a17.28 17.28 0 0 0-32 0L428.8 160a90.56 90.56 0 0 1-57.28 57.28l-42.88 14.4a17.28 17.28 0 0 0 0 32l42.88 14.4a90.56 90.56 0 0 1 57.28 57.28l14.4 42.88a17.28 17.28 0 0 0 32 0l14.4-42.88a90.56 90.56 0 0 1 57.28-57.28l42.88-14.4a17.28 17.28 0 0 0 12.48-16.96z m301.12 221.76l-48.32-16a101.44 101.44 0 0 1-64-64l-16-48.32a19.2 19.2 0 0 0-36.8 0l-16 48.32a101.44 101.44 0 0 1-64 64l-48.32 16a19.2 19.2 0 0 0 0 36.8l48.32 16a101.44 101.44 0 0 1 64 64l16 48.32a19.2 19.2 0 0 0 36.8 0l16-48.32a101.44 101.44 0 0 1 64-64l48.32-16a19.2 19.2 0 0 0 0-36.8z m-376.64 195.52l-64-20.8a131.84 131.84 0 0 1-83.52-83.52l-20.8-64a25.28 25.28 0 0 0-47.68 0l-20.8 64a131.84 131.84 0 0 1-82.24 83.52l-64 20.8a25.28 25.28 0 0 0 0 47.68l64 20.8a131.84 131.84 0 0 1 83.52 83.84l20.8 64a25.28 25.28 0 0 0 47.68 0l20.8-64a131.84 131.84 0 0 1 83.52-83.52l64-20.8a25.28 25.28 0 0 0 0-47.68z"})})},p=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.jsx)("path",{d:"M554.6 64h-85.4v128h85.4V64z m258.2 87.4L736 228.2l59.8 59.8 76.8-76.8-59.8-59.8z m-601.6 0l-59.8 59.8 76.8 76.8 59.8-59.8-76.8-76.8zM512 256c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m448 213.4h-128v85.4h128v-85.4z m-768 0H64v85.4h128v-85.4zM795.8 736L736 795.8l76.8 76.8 59.8-59.8-76.8-76.8z m-567.6 0l-76.8 76.8 59.8 59.8 76.8-76.8-59.8-59.8z m326.4 96h-85.4v128h85.4v-128z"})})};function N(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M151.5 586.2c-5-24.2-7.5-49.2-7.5-74.2s2.5-50 7.5-74.2c4.8-23.6 12-46.8 21.4-69 9.2-21.8 20.6-42.8 33.9-62.5 13.2-19.5 28.3-37.8 45-54.5s35-31.8 54.5-45c19.7-13.3 40.7-24.7 62.5-33.9 22.2-9.4 45.4-16.6 69-21.4 48.5-9.9 99.9-9.9 148.4 0 23.6 4.8 46.8 12 69 21.4 21.8 9.2 42.8 20.6 62.5 33.9 19.5 13.2 37.8 28.3 54.5 45 1.4 1.4 2.8 2.8 4.1 4.2H688c-17.7 0-32 14.3-32 32s14.3 32 32 32h160c17.7 0 32-14.3 32-32V128c0-17.7-14.3-32-32-32s-32 14.3-32 32v77.1c-19.2-19-40.1-36.2-62.4-51.3-23.1-15.6-47.8-29-73.4-39.8-26.1-11-53.4-19.5-81.1-25.2-56.9-11.6-117.1-11.6-174.1 0-27.8 5.7-55.1 14.2-81.1 25.2-25.6 10.8-50.3 24.2-73.4 39.8-22.9 15.4-44.4 33.2-63.9 52.7s-37.3 41-52.7 63.9c-15.6 23.1-29 47.8-39.8 73.4-11 26.1-19.5 53.4-25.2 81.1C83 453.4 80 482.7 80 512s3 58.6 8.8 87c3.1 15.2 16.4 25.6 31.3 25.6 2.1 0 4.3-0.2 6.4-0.7 17.4-3.5 28.5-20.4 25-37.7zM935.2 425c-3.5-17.3-20.5-28.5-37.8-24.9-17.3 3.5-28.5 20.5-24.9 37.8 5 24.2 7.5 49.2 7.5 74.2s-2.5 50-7.5 74.2c-4.8 23.6-12 46.8-21.4 69-9.2 21.8-20.6 42.8-33.9 62.5-13.2 19.5-28.3 37.8-45 54.5s-35 31.8-54.5 45C698 830.6 677 842 655.2 851.2c-22.2 9.4-45.4 16.6-69 21.4-48.5 9.9-99.9 9.9-148.4 0-23.6-4.8-46.8-12-69-21.4-21.8-9.2-42.8-20.6-62.5-33.9-19.5-13.2-37.8-28.3-54.5-45-1.4-1.4-2.8-2.8-4.1-4.2H336c17.7 0 32-14.3 32-32s-14.3-32-32-32H176c-17.7 0-32 14.3-32 32v160c0 17.7 14.3 32 32 32s32-14.3 32-32V819c19.2 19 40.1 36.2 62.4 51.3 23.1 15.6 47.8 29 73.4 39.8 26.1 11 53.4 19.5 81.1 25.2 28.5 5.8 57.7 8.8 87 8.8s58.6-3 87-8.8c27.8-5.7 55-14.2 81.1-25.2 25.6-10.8 50.3-24.2 73.4-39.8 22.9-15.5 44.4-33.2 63.9-52.7s37.3-41 52.7-63.9c15.6-23.1 29-47.8 39.8-73.4 11-26.1 19.5-53.4 25.2-81.1 5.8-28.5 8.8-57.7 8.8-87 0.2-29.5-2.8-58.8-8.6-87.2z",fill:"#1875F0"})})}},32665:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(38754),n(67294),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return d},useSearchParams:function(){return R},usePathname:function(){return f},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return A},useParams:function(){return S},useSelectedLayoutSegments:function(){return O},useSelectedLayoutSegment:function(){return p},redirect:function(){return E.redirect},notFound:function(){return c.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),s=n(43512),l=n(98751),E=n(96885),c=n(86323),u=Symbol("internal for urlsearchparams readonly");function T(){return Error("ReadonlyURLSearchParams cannot be modified")}class d{[Symbol.iterator](){return this[u][Symbol.iterator]()}append(){throw T()}delete(){throw T()}set(){throw T()}sort(){throw T()}constructor(e){this[u]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e)}}function R(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new d(e):null,[e]);return t}function f(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function A(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function S(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(o.GlobalLayoutRouterContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],o=Array.isArray(r),i=o?r[1]:r;!i||i.startsWith("__PAGE__")||(o&&(n[r[0]]=r[1]),n=e(t,n))}return n}(e.tree):null}function O(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(o.LayoutRouterContext);return function e(t,n,r,o){let i;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)i=t[1][n];else{var a;let e=t[1];i=null!=(a=e.children)?a:Object.values(e)[0]}if(!i)return o;let l=i[0],E=(0,s.getSegmentValue)(l);return!E||E.startsWith("__PAGE__")?o:(o.push(E),e(i,n,!1,o))}(t,e)}function p(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=O(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return o}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96885:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return s},redirect:function(){return l},isRedirectError:function(){return E},getURLFromRedirectError:function(){return c},getRedirectTypeFromError:function(){return u}});let i=n(68214),a="NEXT_REDIRECT";function s(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function l(e,t){throw void 0===t&&(t="replace"),s(e,t)}function E(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r]=e.digest.split(";",3);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r}function c(e){return E(e)?e.digest.split(";",3)[2]:null}function u(e){if(!E(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},43512:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29382:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return i},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return E},ACTION_SERVER_ACTION:function(){return c}});let o="refresh",i="navigate",a="restore",s="server-patch",l="prefetch",E="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75476:function(e,t){"use strict";function n(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},69873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return O}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),s=n(38083),l=n(2478),E=n(76226);n(59941);let c=r._(n(31720)),u={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function T(e){return void 0!==e.default}function d(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function R(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let s="decode"in e?e.decode():Promise.resolve();s.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===n&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==o?void 0:o.current)&&o.current(e)}})}function f(e){let[t,n]=i.version.split("."),r=parseInt(t,10),o=parseInt(n,10);return r>18||18===r&&o>=3?{fetchPriority:e}:{fetchpriority:e}}let A=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:s,imgStyle:l,blurStyle:E,isLazy:c,fetchPriority:u,fill:T,placeholder:d,loading:A,srcString:S,config:O,unoptimized:p,loader:N,onLoadRef:I,onLoadingCompleteRef:h,setBlurComplete:_,setShowAltText:m,onLoad:C,onError:L,...g}=e;return A=c?"lazy":A,i.default.createElement("img",{...g,...f(u),loading:A,width:o,height:r,decoding:"async","data-nimg":T?"fill":"1",className:s,style:{...l,...E},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(L&&(e.src=e.src),e.complete&&R(e,S,d,I,h,_,p))},[S,d,I,h,_,L,p,t]),onLoad:e=>{let t=e.currentTarget;R(t,S,d,I,h,_,p)},onError:e=>{m(!0),"blur"===d&&_(!0),L&&L(e)}})}),S=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:R,sizes:S,unoptimized:O=!1,priority:p=!1,loading:N,className:I,quality:h,width:_,height:m,fill:C,style:L,onLoad:g,onLoadingComplete:v,placeholder:P="empty",blurDataURL:y,fetchPriority:D,layout:M,objectFit:b,objectPosition:U,lazyBoundary:w,lazyRoot:x,...G}=e,F=(0,i.useContext)(E.ImageConfigContext),H=(0,i.useMemo)(()=>{let e=u||F||l.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[F]),B=G.loader||c.default;delete G.loader;let Y="__next_img_default"in B;if(Y){if("custom"===H.loader)throw Error('Image with src "'+R+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=B;B=t=>{let{config:n,...r}=t;return e(r)}}if(M){"fill"===M&&(C=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[M];e&&(L={...L,...e});let t={responsive:"100vw",fill:"100vw"}[M];t&&!S&&(S=t)}let k="",V=d(_),$=d(m);if("object"==typeof(n=R)&&(T(n)||void 0!==n.src)){let e=T(R)?R.default:R;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(r=e.blurWidth,o=e.blurHeight,y=y||e.blurDataURL,k=e.src,!C){if(V||$){if(V&&!$){let t=V/e.width;$=Math.round(e.height*t)}else if(!V&&$){let t=$/e.height;V=Math.round(e.width*t)}}else V=e.width,$=e.height}}let W=!p&&("lazy"===N||void 0===N);(!(R="string"==typeof R?R:k)||R.startsWith("data:")||R.startsWith("blob:"))&&(O=!0,W=!1),H.unoptimized&&(O=!0),Y&&R.endsWith(".svg")&&!H.dangerouslyAllowSVG&&(O=!0),p&&(D="high");let[Z,j]=(0,i.useState)(!1),[X,K]=(0,i.useState)(!1),z=d(h),J=Object.assign(C?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:b,objectPosition:U}:{},X?{}:{color:"transparent"},L),q="blur"===P&&y&&!Z?{backgroundSize:J.objectFit||"cover",backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,s.getImageBlurSvg)({widthInt:V,heightInt:$,blurWidth:r,blurHeight:o,blurDataURL:y,objectFit:J.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:E}=function(e,t,n){let{deviceSizes:r,allSizes:o}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:o,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let i=[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))];return{widths:i,kind:"x"}}(t,o,a),c=l.length-1;return{sizes:a||"w"!==E?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===E?e:r+1)+E).join(", "),src:s({config:t,src:n,quality:i,width:l[c]})}}({config:H,src:R,unoptimized:O,width:V,quality:z,sizes:S,loader:B}),ee=R,et=(0,i.useRef)(g);(0,i.useEffect)(()=>{et.current=g},[g]);let en=(0,i.useRef)(v);(0,i.useEffect)(()=>{en.current=v},[v]);let er={isLazy:W,imgAttributes:Q,heightInt:$,widthInt:V,qualityInt:z,className:I,imgStyle:J,blurStyle:q,loading:N,config:H,fetchPriority:D,fill:C,unoptimized:O,placeholder:P,loader:B,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:j,setShowAltText:K,...G};return i.default.createElement(i.default.Fragment,null,i.default.createElement(A,{...er,ref:t}),p?i.default.createElement(a.default,null,i.default.createElement("link",{key:"__nimg-"+Q.src+Q.srcSet+Q.sizes,rel:"preload",as:"image",href:Q.srcSet?void 0:Q.src,imageSrcSet:Q.srcSet,imageSizes:Q.sizes,crossOrigin:G.crossOrigin,referrerPolicy:G.referrerPolicy,...f(D)})):null)}),O=S;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return N}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),s=n(28904),l=n(95514),E=n(27521),c=n(44293),u=n(27473),T=n(81307),d=n(75476),R=n(66318),f=n(29382),A=new Set;function S(e,t,n,r,o,i){if(!i&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let o=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,i=t+"%"+n+"%"+o;if(A.has(i))return;A.add(i)}let s=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function O(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let p=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:A,children:p,prefetch:N=null,passHref:I,replace:h,shallow:_,scroll:m,locale:C,onClick:L,onMouseEnter:g,onTouchStart:v,legacyBehavior:P=!1,...y}=e;n=p,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let D=!1!==N,M=null===N?f.PrefetchKind.AUTO:f.PrefetchKind.FULL,b=o.default.useContext(c.RouterContext),U=o.default.useContext(u.AppRouterContext),w=null!=b?b:U,x=!b,{href:G,as:F}=o.default.useMemo(()=>{if(!b){let e=O(s);return{href:e,as:A?O(A):e}}let[e,t]=(0,i.resolveHref)(b,s,!0);return{href:e,as:A?(0,i.resolveHref)(b,A):t||e}},[b,s,A]),H=o.default.useRef(G),B=o.default.useRef(F);P&&(r=o.default.Children.only(n));let Y=P?r&&"object"==typeof r&&r.ref:t,[k,V,$]=(0,T.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(B.current!==F||H.current!==G)&&($(),B.current=F,H.current=G),k(e),Y&&("function"==typeof Y?Y(e):"object"==typeof Y&&(Y.current=e))},[F,Y,G,$,k]);o.default.useEffect(()=>{w&&V&&D&&S(w,G,F,{locale:C},{kind:M},x)},[F,G,V,C,D,null==b?void 0:b.locale,w,x,M]);let Z={ref:W,onClick(e){P||"function"!=typeof L||L(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),w&&!e.defaultPrevented&&function(e,t,n,r,i,s,l,E,c,u){let{nodeName:T}=e.currentTarget,d="A"===T.toUpperCase();if(d&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let R=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:E,scroll:l}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!u})};c?o.default.startTransition(R):R()}(e,w,G,F,h,_,m,C,x,D)},onMouseEnter(e){P||"function"!=typeof g||g(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),w&&(D||!x)&&S(w,G,F,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:M},x)},onTouchStart(e){P||"function"!=typeof v||v(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),w&&(D||!x)&&S(w,G,F,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:M},x)}};if((0,l.isAbsoluteUrl)(F))Z.href=F;else if(!P||I||"a"===r.type&&!("href"in r.props)){let e=void 0!==C?C:null==b?void 0:b.locale,t=(null==b?void 0:b.isLocaleDomain)&&(0,d.getDomainLocale)(F,e,null==b?void 0:b.locales,null==b?void 0:b.domainLocales);Z.href=t||(0,R.addBasePath)((0,E.addLocale)(F,e,null==b?void 0:b.defaultLocale))}return P?o.default.cloneElement(r,Z):o.default.createElement("a",{...y,...Z},n)}),N=p;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,E=l||!i,[c,u]=(0,r.useState)(!1),T=(0,r.useRef)(null),d=(0,r.useCallback)(e=>{T.current=e},[]);(0,r.useEffect)(()=>{if(i){if(E||c)return;let e=T.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=s.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map,i=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:i,elements:o},s.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&u(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,o.requestIdleCallback)(()=>u(!0));return()=>(0,o.cancelIdleCallback)(e)}},[E,n,t,c,T.current]);let R=(0,r.useCallback)(()=>{u(!1)},[]);return[d,c,R]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38083:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:o,blurDataURL:i,objectFit:a}=e,s=r||t,l=o||n,E=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return s&&l?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+s+" "+l+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+E+"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E":"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='"+("contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},31720:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:o}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},98751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return a}});let r=n(61757),o=r._(n(67294)),i=o.default.createContext(null);function a(e){let t=(0,o.useContext)(i);t&&t(e)}},26466:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return en}});var r=n(85893),o=n(41468),i=n(82353),a=n(25519),s=n(7134),l=n(93967),E=n.n(l),c=n(67294),u=function(e){let{onlyAvatar:t=!1}=e,[n,o]=(0,c.useState)();return(0,c.useEffect)(()=>{try{var e;let t=JSON.parse(null!==(e=localStorage.getItem(a.C9))&&void 0!==e?e:"");o(t)}catch(e){return}},[]),(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,r.jsx)("div",{className:E()("flex items-center group w-full",{"justify-center":t,"justify-between":!t}),children:(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(s.C,{src:null==n?void 0:n.avatar_url,className:"bg-gradient-to-tr from-[#31afff] to-[#1677ff] cursor-pointer",children:null==n?void 0:n.nick_name}),(0,r.jsx)("span",{className:E()("text-sm",{hidden:t}),children:null==n?void 0:n.nick_name})]})})})},T=n(16165),d=n(10524),R=n(84477),f=n(19944),A=n(83062),S=n(55241),O=n(30381),p=n.n(O);n(83839);var N=n(25675),I=n.n(N),h=n(41664),_=n.n(h),m=n(11163),C=n(67421),L=function(){let{isMenuExpand:e,setIsMenuExpand:t,mode:n,setMode:s,adminList:l}=(0,c.useContext)(o.p),{pathname:O}=(0,m.useRouter)(),{t:N,i18n:h}=(0,C.$G)(),[L,g]=(0,c.useState)("/logo_zh_latest.png"),v=(0,c.useMemo)(()=>{let{user_id:e}=JSON.parse(localStorage.getItem(a.C9)||"{}");return l.some(t=>t.user_id===e)},[l]),P=(0,c.useCallback)(()=>{t(!e)},[e,t]),y=(0,c.useCallback)(()=>{let e="light"===n?"dark":"light";s(e),localStorage.setItem(a.he,e)},[n,s]),D=(0,c.useCallback)(()=>{let e="en"===h.language?"zh":"en";h.changeLanguage(e),"zh"===e&&p().locale("zh-cn"),"en"===e&&p().locale("en"),localStorage.setItem(a.Yl,e)},[h]),M=(0,c.useMemo)(()=>{let t=[{key:"theme",name:N("Theme"),icon:"dark"===n?(0,r.jsx)(T.Z,{component:i.FD}):(0,r.jsx)(T.Z,{component:i.ol}),items:[{key:"light",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(I(),{src:"/pictures/theme_light.png",alt:"english",width:38,height:32}),(0,r.jsx)("span",{children:"Light"})]}),(0,r.jsx)("span",{className:E()({block:"light"===n,hidden:"light"!==n}),children:"✓"})]})},{key:"dark",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(I(),{src:"/pictures/theme_dark.png",alt:"english",width:38,height:32}),(0,r.jsx)("span",{children:"Dark"})]}),(0,r.jsx)("span",{className:E()({block:"dark"===n,hidden:"dark"!==n}),children:"✓"})]})}],onClick:y,onSelect:e=>{let{key:t}=e;n!==t&&(s(t),localStorage.setItem(a.he,t))},defaultSelectedKeys:[n],placement:"topLeft"},{key:"language",name:N("language"),icon:(0,r.jsx)(d.Z,{}),items:[{key:"en",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2",children:[(0,r.jsx)(I(),{src:"/icons/english.png",alt:"english",width:21,height:21}),(0,r.jsx)("span",{children:"English"})]}),(0,r.jsx)("span",{className:E()({block:"en"===h.language,hidden:"en"!==h.language}),children:"✓"})]})},{key:"zh",label:(0,r.jsxs)("div",{className:"py-1 flex justify-between gap-8 ",children:[(0,r.jsxs)("span",{className:"flex gap-2",children:[(0,r.jsx)(I(),{src:"/icons/zh.png",alt:"english",width:21,height:21}),(0,r.jsx)("span",{children:"简体中文"})]}),(0,r.jsx)("span",{className:E()({block:"zh"===h.language,hidden:"zh"!==h.language}),children:"✓"})]})}],onSelect:e=>{let{key:t}=e;h.language!==t&&(h.changeLanguage(t),"zh"===t&&p().locale("zh-cn"),"en"===t&&p().locale("en"),localStorage.setItem(a.Yl,t))},onClick:D,defaultSelectedKeys:[h.language]},{key:"fold",name:N(e?"Close_Sidebar":"Show_Sidebar"),icon:e?(0,r.jsx)(R.Z,{}):(0,r.jsx)(f.Z,{}),onClick:P,noDropdownItem:!0}];return t},[N,n,y,h,D,e,P,s]),b=(0,c.useMemo)(()=>{let e=[{key:"chat",name:N("chat_online"),icon:(0,r.jsx)(I(),{src:"/chat"===O?"/pictures/chat_active.png":"/pictures/chat.png",alt:"chat_image",width:40,height:40},"image_chat"),path:"/chat",isActive:O.startsWith("/chat")},{key:"explore",name:N("explore"),isActive:"/"===O,icon:(0,r.jsx)(I(),{src:"/"===O?"/pictures/explore_active.png":"/pictures/explore.png",alt:"construct_image",width:40,height:40},"image_explore"),path:"/"},{key:"construct",name:N("construct"),isActive:O.startsWith("/construct"),icon:(0,r.jsx)(I(),{src:O.startsWith("/construct")?"/pictures/app_active.png":"/pictures/app.png",alt:"construct_image",width:40,height:40},"image_construct"),path:"/construct/app"}];return v&&e.push({key:"evaluation",name:"场景评测",icon:(0,r.jsx)(I(),{src:O.startsWith("/evaluation")?"/pictures/app_active.png":"/pictures/app.png",alt:"construct_image",width:40,height:40},"image_construct"),path:"/evaluation",isActive:"/evaluation"===O}),e},[N,O,v]);return((0,c.useEffect)(()=>{let e=h.language;"zh"===e&&p().locale("zh-cn"),"en"===e&&p().locale("en")},[]),(0,c.useEffect)(()=>{g("dark"===n?"/logo_s_latest.png":"/logo_zh_latest.png")},[n]),e)?(0,r.jsxs)("div",{className:"flex flex-col justify-between h-screen px-4 pt-4 bg-bar dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(_(),{href:"/",className:"flex items-center justify-center p-2 pb-4",children:(0,r.jsx)(I(),{src:e?L:"/LOGO_SMALL.png",alt:"DB-GPT",width:180,height:40})}),(0,r.jsx)("div",{className:"flex flex-col gap-4",children:b.map(e=>(0,r.jsxs)(_(),{href:e.path,className:E()("flex items-center w-full h-12 px-4 cursor-pointer hover:bg-[#F1F5F9] dark:hover:bg-theme-dark hover:rounded-xl",{"bg-white rounded-xl dark:bg-black":e.isActive}),children:[(0,r.jsx)("div",{className:"mr-3",children:e.icon}),(0,r.jsx)("span",{className:"text-sm",children:N(e.name)})]},e.key))})]}),(0,r.jsxs)("div",{className:"pt-4",children:[(0,r.jsx)("span",{className:E()("flex items-center w-full h-12 px-4 bg-[#F1F5F9] dark:bg-theme-dark rounded-xl"),children:(0,r.jsx)("div",{className:"mr-3 w-full",children:(0,r.jsx)(u,{})})}),(0,r.jsx)("div",{className:"flex items-center justify-around py-4 mt-2 border-t border-dashed border-gray-200 dark:border-gray-700",children:M.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(S.Z,{content:e.name,children:(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center cursor-pointer text-xl",onClick:e.onClick,children:e.icon})})},e.key))})]})]}):(0,r.jsxs)("div",{className:"flex flex-col justify-between pt-4 h-screen bg-bar dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(_(),{href:"/",className:"flex justify-center items-center pb-4",children:(0,r.jsx)(I(),{src:e?L:"/LOGO_SMALL.png",alt:"DB-GPT",width:40,height:40})}),(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center",children:b.map(e=>(0,r.jsx)(_(),{className:"h-12 flex items-center",href:e.path,children:null==e?void 0:e.icon},e.key))})]}),(0,r.jsxs)("div",{className:"py-4",children:[(0,r.jsx)(u,{onlyAvatar:!0}),M.filter(e=>e.noDropdownItem).map(e=>(0,r.jsx)(A.Z,{title:e.name,placement:"right",children:(0,r.jsx)("div",{className:"flex items-center justify-center mx-auto rounded w-14 h-14 text-xl hover:bg-[#F1F5F9] dark:hover:bg-theme-dark transition-colors cursor-pointer ".concat(""),onClick:e.onClick,children:e.icon})},e.key))]})]})},g=n(93045),v=n(14079),P=n(12652),y=()=>(0,r.jsx)(P.Z.Group,{trigger:"hover",icon:(0,r.jsx)(g.Z,{}),children:(0,r.jsx)(P.Z,{icon:(0,r.jsx)(v.Z,{}),href:"http://docs.dbgpt.cn",target:"_blank",tooltip:"Doucuments"})}),D=n(25446),M=n(67164),b=n(2790),U=n(1393),w=n(25976),x=n(33083),G=n(372),F=n(69594),H=n(84898),B=n(57),Y=n(10274);let k=(e,t)=>new Y.C(e).setAlpha(t).toRgbString(),V=(e,t)=>{let n=new Y.C(e);return n.lighten(t).toHexString()},$=e=>{let t=(0,H.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},W=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:k(r,.85),colorTextSecondary:k(r,.65),colorTextTertiary:k(r,.45),colorTextQuaternary:k(r,.25),colorFill:k(r,.18),colorFillSecondary:k(r,.12),colorFillTertiary:k(r,.08),colorFillQuaternary:k(r,.04),colorBgElevated:V(n,12),colorBgContainer:V(n,8),colorBgLayout:V(n,0),colorBgSpotlight:V(n,26),colorBgBlur:k(r,.04),colorBorder:V(n,26),colorBorderSecondary:V(n,19)}};var Z={defaultSeed:x.u_.token,useToken:function(){let[e,t,n]=(0,w.ZP)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:M.Z,darkAlgorithm:(e,t)=>{let n=Object.keys(b.M).map(t=>{let n=(0,H.R_)(e[t],{theme:"dark"});return Array(10).fill(1).reduce((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),r=null!=t?t:(0,M.Z)(e);return Object.assign(Object.assign(Object.assign({},r),n),(0,B.Z)(e,{generateColorPalettes:$,generateNeutralColorPalettes:W}))},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,M.Z)(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,F.Z)(r)),{controlHeight:o}),(0,G.Z)(Object.assign(Object.assign({},n),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,D.jG)(e.algorithm):(0,D.jG)(M.Z),n=Object.assign(Object.assign({},b.Z),null==e?void 0:e.token);return(0,D.t2)(n,{override:null==e?void 0:e.token},t,U.Z)},defaultConfig:x.u_,_internalContext:x.Mj},j=n(28459),X=n(31418),K=n(18253),z=n(82925),J=n(9008),q=n.n(J);n(64371),n(90833),n(80864);let Q=(e,t)=>({...Z.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function ee(e){let{children:t}=e,{mode:n}=(0,c.useContext)(o.p),{i18n:i}=(0,C.$G)();return(0,c.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,c.useEffect)(()=>{var e;null===(e=i.changeLanguage)||void 0===e||e.call(i,window.localStorage.getItem(a.Yl)||"zh")},[i]),(0,r.jsx)("div",{children:t})}function et(e){let{children:t}=e,{isMenuExpand:n,mode:i}=(0,c.useContext)(o.p),{i18n:s}=(0,C.$G)(),[l,u]=(0,c.useState)(!1),T=(0,m.useRouter)(),d=async()=>{u(!1);let e={user_channel:"dbgpt",user_no:"001",nick_name:"dbgpt"};e&&(localStorage.setItem(a.C9,JSON.stringify(e)),localStorage.setItem(a.Sc,Date.now().toString()),u(!0))};return((0,c.useEffect)(()=>{d()},[]),l)?(0,r.jsx)(j.ZP,{locale:"en"===s.language?K.Z:z.Z,theme:{token:{colorPrimary:"#0C75FC",borderRadius:4},algorithm:"dark"===i?Q:void 0},children:(0,r.jsx)(X.Z,{children:T.pathname.includes("mobile")?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,r.jsx)(q(),{children:(0,r.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width, maximum-scale=1"})}),"/construct/app/extra"!==T.pathname&&(0,r.jsx)("div",{className:E()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,r.jsx)(L,{})}),(0,r.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t}),(0,r.jsx)(y,{})]})})}):null}var en=function(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(o.R,{children:(0,r.jsx)(ee,{children:(0,r.jsx)(et,{children:(0,r.jsx)(t,{...n})})})})}},19284:function(e,t,n){"use strict";n.d(t,{Hf:function(){return o},S$:function(){return s},ab:function(){return a}});let r="/models/huggingface.svg",o=new Proxy({},{get:(e,t)=>({label:function(e){var t;if(!e)return"";if(null===(t=i[e])||void 0===t?void 0:t.label)return i[e].label;let n=e.toLowerCase();for(let t in i){let r=i[t];if(r.patterns&&r.patterns.some(e=>n.includes(e.toLowerCase()))){let t=e.match(/[-_](\d+b|\d+\.\d+b?|v\d+(\.\d+)?)/i),n=e.match(/[-_](\d+b)/i),o=r.label;return t&&!n&&(o+=" ".concat(t[1])),n&&(o+=" ".concat(n[1])),o}}return e}(t),icon:a(t)})}),i={deepseek:{label:"DeepSeek",icon:"/models/deepseek.png",patterns:["deepseek","r1"]},qwen:{label:"Qwen",icon:"/models/qwen2.png",patterns:["qwen","qwen2","qwen2.5","qwq","qvq"]},gemini:{label:"Gemini",icon:"/models/gemini.png",patterns:["gemini"]},moonshot:{label:"Moonshot",icon:"/models/moonshot.png",patterns:["moonshot","kimi"]},doubao:{label:"Doubao",icon:"/models/doubao.png",patterns:["doubao"]},ernie:{label:"ERNIE",icon:"/models/ernie.png",patterns:["ernie"]},proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png",patterns:["proxy"]},chatgpt:{label:"ChatGPT",icon:"/models/chatgpt.png",patterns:["chatgpt","gpt","o1","o3"]},vicuna:{label:"Vicuna",icon:"/models/vicuna.jpeg",patterns:["vicuna"]},chatglm:{label:"ChatGLM",icon:"/models/chatglm.png",patterns:["chatglm","glm"]},llama:{label:"Llama",icon:"/models/llama.jpg",patterns:["llama","llama2","llama3"]},baichuan:{label:"Baichuan",icon:"/models/baichuan.png",patterns:["baichuan"]},claude:{label:"Claude",icon:"/models/claude.png",patterns:["claude"]},bard:{label:"Bard",icon:"/models/bard.gif",patterns:["bard"]},tongyi:{label:"Tongyi",icon:"/models/tongyi.apng",patterns:["tongyi"]},yi:{label:"Yi",icon:"/models/yi.svg",patterns:["yi"]},bailing:{label:"Bailing",icon:"/models/bailing.svg",patterns:["bailing"]},wizardlm:{label:"WizardLM",icon:"/models/wizardlm.png",patterns:["wizard"]},internlm:{label:"InternLM",icon:"/models/internlm.png",patterns:["internlm"]},solar:{label:"Solar",icon:"/models/solar_logo.png",patterns:["solar"]},gorilla:{label:"Gorilla",icon:"/models/gorilla.png",patterns:["gorilla"]},zhipu:{label:"Zhipu",icon:"/models/zhipu.png",patterns:["zhipu"]},falcon:{label:"Falcon",icon:"/models/falcon.jpeg",patterns:["falcon"]},huggingface:{label:"Hugging Face",icon:"/models/huggingface.svg",patterns:["huggingface","hf"]}};function a(e){var t;if(!e)return r;let n=e.toLowerCase();if(null===(t=i[e])||void 0===t?void 0:t.icon)return i[e].icon;for(let e in i){let t=i[e];if(t.patterns&&t.patterns.some(e=>n.includes(e.toLowerCase())))return t.icon}let o=n.split(/[-_]/);if(o.length>0){let e=o[0];for(let t in i)if(e===t.toLowerCase())return i[t].icon}return r}let s={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},oceanbase:{label:"OceanBase",icon:"/icons/oceanbase.png",desc:"An Ultra-Fast & Cost-Effective Distributed SQL Database."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},omc:{label:"Omc",icon:"/icons/odc.png",desc:"Omc meta data."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},gaussdb:{label:"GaussDB",icon:"/icons/gaussdb.png",desc:"Huawei's distributed database with PostgreSQL compatibility"},vertica:{label:"Vertica",icon:"/icons/vertica.png",desc:"Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."},tugraph:{label:"TuGraph",icon:"/icons/tugraph.png",desc:"TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University."}}},25519:function(e,t,n){"use strict";var r,o;n.d(t,{gp:function(){return i},rU:function(){return l},Yl:function(){return s},he:function(){return a},C9:function(){return E},Sc:function(){return c}}),(o=r||(r={}))[o.NO_PERMISSION=-1]="NO_PERMISSION",o[o.SERVICE_ERROR=-2]="SERVICE_ERROR",o[o.INVALID=-3]="INVALID",o[o.IS_EXITS=-4]="IS_EXITS",o[o.MISSING_PARAMETER=-5]="MISSING_PARAMETER";let i="user-id",a="__db_gpt_theme_key",s="__db_gpt_lng_key",l="__db_gpt_im_key",E="__db_gpt_uinfo_key",c="__db_gpt_uinfo_vt_key"},62418:function(e,t,n){"use strict";let r,o,i;n.d(t,{zN:function(){return ro},rU:function(){return rr},S$:function(){return n7.S$},_m:function(){return ri},a_:function(){return re},n5:function(){return rt},Ev:function(){return rs},Hb:function(){return ra}});var a,s,l,E={};n.r(E),n.d(E,{bigquery:function(){return F},db2:function(){return X},hive:function(){return er},mariadb:function(){return eT},mysql:function(){return eI},n1ql:function(){return ey},plsql:function(){return eH},postgresql:function(){return eX},redshift:function(){return e4},singlestoredb:function(){return tj},snowflake:function(){return t2},spark:function(){return tn},sql:function(){return tN},sqlite:function(){return tu},transactsql:function(){return tF},trino:function(){return tP}}),(a=r||(r={})).QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",a.IDENTIFIER="IDENTIFIER",a.STRING="STRING",a.VARIABLE="VARIABLE",a.RESERVED_KEYWORD="RESERVED_KEYWORD",a.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",a.RESERVED_PHRASE="RESERVED_PHRASE",a.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",a.RESERVED_CLAUSE="RESERVED_CLAUSE",a.RESERVED_SELECT="RESERVED_SELECT",a.RESERVED_JOIN="RESERVED_JOIN",a.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",a.ARRAY_KEYWORD="ARRAY_KEYWORD",a.CASE="CASE",a.END="END",a.WHEN="WHEN",a.ELSE="ELSE",a.THEN="THEN",a.LIMIT="LIMIT",a.BETWEEN="BETWEEN",a.AND="AND",a.OR="OR",a.XOR="XOR",a.OPERATOR="OPERATOR",a.COMMA="COMMA",a.ASTERISK="ASTERISK",a.DOT="DOT",a.OPEN_PAREN="OPEN_PAREN",a.CLOSE_PAREN="CLOSE_PAREN",a.LINE_COMMENT="LINE_COMMENT",a.BLOCK_COMMENT="BLOCK_COMMENT",a.NUMBER="NUMBER",a.NAMED_PARAMETER="NAMED_PARAMETER",a.QUOTED_PARAMETER="QUOTED_PARAMETER",a.NUMBERED_PARAMETER="NUMBERED_PARAMETER",a.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",a.CUSTOM_PARAMETER="CUSTOM_PARAMETER",a.DELIMITER="DELIMITER",a.EOF="EOF";let c=e=>({type:r.EOF,raw:"\xabEOF\xbb",text:"\xabEOF\xbb",start:e}),u=c(1/0),T=e=>t=>t.type===e.type&&t.text===e.text,d={ARRAY:T({text:"ARRAY",type:r.RESERVED_KEYWORD}),BY:T({text:"BY",type:r.RESERVED_KEYWORD}),SET:T({text:"SET",type:r.RESERVED_CLAUSE}),STRUCT:T({text:"STRUCT",type:r.RESERVED_KEYWORD}),WINDOW:T({text:"WINDOW",type:r.RESERVED_CLAUSE})},R=e=>e===r.RESERVED_KEYWORD||e===r.RESERVED_FUNCTION_NAME||e===r.RESERVED_PHRASE||e===r.RESERVED_CLAUSE||e===r.RESERVED_SELECT||e===r.RESERVED_SET_OPERATION||e===r.RESERVED_JOIN||e===r.ARRAY_KEYWORD||e===r.CASE||e===r.END||e===r.WHEN||e===r.ELSE||e===r.THEN||e===r.LIMIT||e===r.BETWEEN||e===r.AND||e===r.OR||e===r.XOR,f=e=>e===r.AND||e===r.OR||e===r.XOR,A=e=>e.flatMap(S),S=e=>h(I(e)).map(e=>e.trim()),O=/[^[\]{}]+/y,p=/\{.*?\}/y,N=/\[.*?\]/y,I=e=>{let t=0,n=[];for(;te.trim());n.push(["",...e]),t+=o[0].length}p.lastIndex=t;let i=p.exec(e);if(i){let e=i[0].slice(1,-1).split("|").map(e=>e.trim());n.push(e),t+=i[0].length}if(!r&&!o&&!i)throw Error(`Unbalanced parenthesis in: ${e}`)}return n},h=([e,...t])=>void 0===e?[""]:h(t).flatMap(t=>e.map(e=>e.trim()+" "+t.trim())),_=e=>[...new Set(e)],m=e=>e[e.length-1],C=e=>e.sort((e,t)=>t.length-e.length||e.localeCompare(t)),L=e=>e.reduce((e,t)=>Math.max(e,t.length),0),g=e=>e.replace(/\s+/gu," "),v=e=>_(Object.values(e).flat()),P=e=>/\n/.test(e),y=v({keywords:["ALL","AND","ANY","ARRAY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LIKE","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","STRUCT","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN"],datatypes:["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],stringFormat:["HEX","BASEX","BASE64M","ASCII","UTF-8","UTF8"],misc:["SAFE"],ddl:["LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"]}),D=v({aead:["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH"],aggregateAnalytic:["ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP"],aggregate:["ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM"],approximateAggregate:["APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM"],array:["ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL"],bitwise:["BIT_COUNT"],conversion:["PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST"],date:["CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE"],datetime:["CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME"],debugging:["ERROR"],federatedQuery:["EXTERNAL_QUERY"],geography:["S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y"],hash:["FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512"],hll:["HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT"],interval:["MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL"],json:["JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING"],math:["ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET"],navigation:["FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC"],net:["NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN"],numbering:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER"],security:["SESSION_USER"],statisticalAggregate:["CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE"],string:["ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER"],time:["CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME"],timestamp:["CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS"],uuid:["GENERATE_UUID"],conditional:["COALESCE","IF","IFNULL","NULLIF"],legacyAggregate:["AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP"],legacyBitwise:["BIT_COUNT"],legacyCasting:["BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING"],legacyComparison:["COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL"],legacyDatetime:["CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR"],legacyIp:["FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP"],legacyJson:["JSON_EXTRACT","JSON_EXTRACT_SCALAR"],legacyMath:["ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH"],legacyRegex:["REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE"],legacyString:["CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER"],legacyTableWildcard:["TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY"],legacyUrl:["HOST","DOMAIN","TLD"],legacyWindow:["AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER"],legacyMisc:["CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64"],other:["BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW"],ddl:["OPTIONS"],pivot:["PIVOT","UNPIVOT"],dataTypes:["BYTES","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","STRING"]}),M=A(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),b=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),U=A(["UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),w=A(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),x=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),G=A(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),F={tokenizerOptions:{reservedSelect:M,reservedClauses:[...b,...U],reservedSetOperations:w,reservedJoins:x,reservedPhrases:G,reservedKeywords:y,reservedFunctionNames:D,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"'''..'''",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:function(e){var t;let n;return t=function(e){let t=[];for(let o=0;o"===t.text?n--:">>"===t.text&&(n-=2),0===n)return r}return e.length-1}(e,o+1),a=e.slice(o,n+1);t.push({type:r.IDENTIFIER,raw:a.map(H("raw")).join(""),text:a.map(H("text")).join(""),start:i.start}),o=n}else t.push(i)}return t}(e),n=u,t.map(e=>"OFFSET"===e.text&&"["===n.text?(n=e,{...e,type:r.RESERVED_FUNCTION_NAME}):(n=e,e))}},formatOptions:{onelineClauses:U}},H=e=>t=>t.type===r.IDENTIFIER||t.type===r.COMMA?t[e]+" ":t[e],B=v({aggregate:["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG"],scalar:["ABS","ABSVAL","ACOS","ADD_DAYS","ADD_MONTHS","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ARRAY_TRIM","ASCII","ASCII_CHR","ASCII_STR","ASCIISTR","ASIN","ATAN","ATANH","ATAN2","BIGINT","BINARY","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BLOB","BTRIM","CARDINALITY","CCSID_ENCODING","CEILING","CEIL","CHAR","CHAR9","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CLOB","COALESCE","COLLATION_KEY","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","DATE","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DBCLOB","DECFLOAT","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECIMAL","DEC","DECODE","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DECRYPT_DATAKEY_BIGINT","DECRYPT_DATAKEY_BIT","DECRYPT_DATAKEY_CLOB","DECRYPT_DATAKEY_DBCLOB","DECRYPT_DATAKEY_DECIMAL","DECRYPT_DATAKEY_INTEGER","DECRYPT_DATAKEY_VARCHAR","DECRYPT_DATAKEY_VARGRAPHIC","DEGREES","DIFFERENCE","DIGITS","DOUBLE_PRECISION","DOUBLE","DSN_XMLVALIDATE","EBCDIC_CHR","EBCDIC_STR","ENCRYPT_DATAKEY","ENCRYPT_TDES","EXP","EXTRACT","FLOAT","FLOOR","GENERATE_UNIQUE","GENERATE_UNIQUE_BINARY","GETHINT","GETVARIABLE","GRAPHIC","GREATEST","HASH","HASH_CRC32","HASH_MD5","HASH_SHA1","HASH_SHA256","HEX","HOUR","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTEGER","INT","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LOCATE","LOCATE_IN_STRING","LOG10","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NORMALIZE_DECFLOAT","NORMALIZE_STRING","NULLIF","NVL","OVERLAY","PACK","POSITION","POSSTR","POWER","POW","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND","ROUND_TIMESTAMP","ROWID","RPAD","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SMALLINT","SOUNDEX","SOAPHTTPC","SOAPHTTPV","SOAPHTTPNC","SOAPHTTPNV","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TAN","TANH","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMP_TZ","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TOTALORDER","TO_TIMESTAMP","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRUNC","TRUNC_TIMESTAMP","UCASE","UNICODE","UNICODE_STR","UNISTR","UPPER","VALUE","VARBINARY","VARCHAR","VARCHAR9","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARGRAPHIC","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLMODIFY","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLSERIALIZE","XMLTEXT","XMLXSROBJECTID","XSLTRANSFORM","YEAR"],table:["ADMIN_TASK_LIST","ADMIN_TASK_OUTPUT","ADMIN_TASK_STATUS","BLOCKING_THREADS","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE"],row:["UNPACK"],olap:["CUME_DIST","PERCENT_RANK","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT"],cast:["CAST"]}),Y=v({standard:["ALL","ALLOCATE","ALLOW","ALTERAND","ANY","AS","ARRAY","ARRAY_EXISTS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","AUDIT","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BUFFERPOOL","BY","CAPTURE","CASCADED","CAST","CCSID","CHARACTER","CHECK","CLONE","CLUSTER","COLLECTION","COLLID","COLUMN","CONDITION","CONNECTION","CONSTRAINT","CONTENT","CONTINUE","CREATE","CUBE","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRVAL","CURSOR","DATA","DATABASE","DBINFO","DECLARE","DEFAULT","DESCRIPTOR","DETERMINISTIC","DISABLE","DISALLOW","DISTINCT","DO","DOCUMENT","DSSIZE","DYNAMIC","EDITPROC","ELSE","ELSEIF","ENCODING","ENCRYPTION","ENDING","END-EXEC","ERASE","ESCAPE","EXCEPTION","EXISTS","EXIT","EXTERNAL","FENCED","FIELDPROC","FINAL","FIRST","FOR","FREE","FULL","FUNCTION","GENERATED","GET","GLOBAL","GOTO","GROUP","HANDLER","HOLD","HOURS","IF","IMMEDIATE","IN","INCLUSIVE","INDEX","INHERIT","INNER","INOUT","INSENSITIVE","INTO","IS","ISOBID","ITERATE","JAR","KEEP","KEY","LANGUAGE","LAST","LC_CTYPE","LEAVE","LIKE","LOCAL","LOCALE","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","MAINTAINED","MATERIALIZED","MICROSECONDS","MINUTEMINUTES","MODIFIES","MONTHS","NEXT","NEXTVAL","NO","NONE","NOT","NULL","NULLS","NUMPARTS","OBID","OF","OLD","ON","OPTIMIZATION","OPTIMIZE","ORDER","ORGANIZATION","OUT","OUTER","PACKAGE","PARAMETER","PART","PADDED","PARTITION","PARTITIONED","PARTITIONING","PATH","PIECESIZE","PERIOD","PLAN","PRECISION","PREVVAL","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","READS","REFERENCES","RESIGNAL","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","ROLE","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROW","ROWSET","SCHEMA","SCRATCHPAD","SECONDS","SECQTY","SECURITY","SEQUENCE","SENSITIVE","SESSION_USER","SIMPLE","SOME","SOURCE","SPECIFIC","STANDARD","STATIC","STATEMENT","STAY","STOGROUP","STORES","STYLE","SUMMARY","SYNONYM","SYSDATE","SYSTEM","SYSTIMESTAMP","TABLE","TABLESPACE","THEN","TO","TRIGGER","TYPE","UNDO","UNIQUE","UNTIL","USER","USING","VALIDPROC","VARIABLE","VARIANT","VCAT","VERSIONING","VIEW","VOLATILE","VOLUMES","WHILE","WLM","XMLEXISTS","XMLCAST","YEARS","ZONE"]}),k=A(["SELECT [ALL | DISTINCT]"]),V=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","FETCH FIRST","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT","CREATE [OR REPLACE] VIEW","CREATE [GLOBAL TEMPORARY] TABLE"]),$=A(["UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [HIERARCHY]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {IDENTITY | EXPRESSION | DEFAULT | NOT NULL}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","AFTER","GO","ALLOCATE CURSOR","ALTER DATABASE","ALTER FUNCTION","ALTER INDEX","ALTER MASK","ALTER PERMISSION","ALTER PROCEDURE","ALTER SEQUENCE","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE LOCATORS","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT","COMMIT","CONNECT","CREATE ALIAS","CREATE AUXILIARY TABLE","CREATE DATABASE","CREATE FUNCTION","CREATE GLOBAL TEMPORARY TABLE","CREATE INDEX","CREATE LOB TABLESPACE","CREATE MASK","CREATE PERMISSION","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE STOGROUP","CREATE SYNONYM","CREATE TABLESPACE","CREATE TRIGGER","CREATE TRUSTED CONTEXT","CREATE TYPE","CREATE VARIABLE","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE STATEMENT","DECLARE TABLE","DECLARE VARIABLE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE OUTPUT","DESCRIBE PROCEDURE","DESCRIBE TABLE","DROP","END DECLARE SECTION","EXCHANGE","EXECUTE","EXECUTE IMMEDIATE","EXPLAIN","FETCH","FREE LOCATOR","GET DIAGNOSTICS","GRANT","HOLD LOCATOR","INCLUDE","LABEL","LOCK TABLE","OPEN","PREPARE","REFRESH","RELEASE","RELEASE SAVEPOINT","RENAME","REVOKE","ROLLBACK","SAVEPOINT","SELECT INTO","SET CONNECTION","SET CURRENT ACCELERATOR","SET CURRENT APPLICATION COMPATIBILITY","SET CURRENT APPLICATION ENCODING SCHEME","SET CURRENT DEBUG MODE","SET CURRENT DECFLOAT ROUNDING MODE","SET CURRENT DEGREE","SET CURRENT EXPLAIN MODE","SET CURRENT GET_ACCEL_ARCHIVE","SET CURRENT LOCALE LC_CTYPE","SET CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION","SET CURRENT OPTIMIZATION HINT","SET CURRENT PACKAGE PATH","SET CURRENT PACKAGESET","SET CURRENT PRECISION","SET CURRENT QUERY ACCELERATION","SET CURRENT QUERY ACCELERATION WAITFORDATA","SET CURRENT REFRESH AGE","SET CURRENT ROUTINE VERSION","SET CURRENT RULES","SET CURRENT SQLID","SET CURRENT TEMPORAL BUSINESS_TIME","SET CURRENT TEMPORAL SYSTEM_TIME","SET ENCRYPTION PASSWORD","SET PATH","SET SESSION TIME ZONE","SIGNAL","VALUES INTO","WHENEVER"]),W=A(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Z=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),j=A(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),X={tokenizerOptions:{reservedSelect:k,reservedClauses:[...V,...$],reservedSetOperations:W,reservedJoins:Z,reservedPhrases:j,reservedKeywords:Y,reservedFunctionNames:B,stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","\xac=","\xac>","\xac<","!>","!<","||"]},formatOptions:{onelineClauses:$}},K=v({math:["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET"],array:["ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY"],conversion:["BINARY","CAST"],date:["ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR"],conditional:["ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL"],string:["ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER"],masking:["MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N"],misc:["AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION"],aggregate:["AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],table:["EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK"],window:["LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],dataTypes:["DECIMAL","NUMERIC","VARCHAR","CHAR"]}),z=v({nonReserved:["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","STRUCT","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE"],reserved:["ALL","ALTER","AND","ARRAY","AS","AUTHORIZATION","BETWEEN","BIGINT","BINARY","BOOLEAN","BOTH","BY","CASE","CAST","CHAR","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DATE","DECIMAL","DELETE","DESCRIBE","DISTINCT","DOUBLE","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FLOAT","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INT","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MAP","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","SMALLINT","TABLE","TABLESAMPLE","THEN","TIMESTAMP","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","VARCHAR","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","INTEGER","PRECISION","VIEWS","TIME","NUMERIC","SYNC"],fileTypes:["TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"]}),J=A(["SELECT [ALL | DISTINCT]"]),q=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),Q=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),ee=A(["UNION [ALL | DISTINCT]"]),et=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),en=A(["{ROWS | RANGE} BETWEEN"]),er={tokenizerOptions:{reservedSelect:J,reservedClauses:[...q,...Q],reservedSetOperations:ee,reservedJoins:et,reservedPhrases:en,reservedKeywords:z,reservedFunctionNames:K,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:Q}},eo=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALL","ALGORITHM","ALTER","ALWAYS","ANALYZE","AND","ANY","AS","ASC","ASCII","ASENSITIVE","AT","ATOMIC","AUTHORS","AUTO_INCREMENT","AUTOEXTEND_SIZE","AUTO","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BODY","BOOL","BOOLEAN","BOTH","BTREE","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHANGE","CHANGED","CHAR","CHARACTER","CHARSET","CHECK","CHECKPOINT","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLOB","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMN_NAME","COLUMNS","COLUMN_ADD","COLUMN_CHECK","COLUMN_CREATE","COLUMN_DELETE","COLUMN_GET","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPRESSED","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONTRIBUTORS","CONVERT","CPU","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_POS","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","CYCLE","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DES_KEY_FILE","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DO_DOMAIN_IDS","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","ELSIF","EMPTY","ENABLE","ENCLOSED","END","ENDS","ENGINE","ENGINES","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXAMINED","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXCEPTION","EXISTS","EXIT","EXPANSION","EXPIRE","EXPORT","EXPLAIN","EXTENDED","EXTENT_SIZE","FALSE","FAST","FAULTS","FEDERATED","FETCH","FIELDS","FILE","FIRST","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GET_FORMAT","GET","GLOBAL","GOTO","GRANT","GRANTS","GROUP","HANDLER","HARD","HASH","HAVING","HELP","HIGH_PRIORITY","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORED","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IMMEDIATE","IMPORT","INTERSECT","IN","INCREMENT","INDEX","INDEXES","INFILE","INITIAL_SIZE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INVISIBLE","INTO","IO","IO_THREAD","IPC","IS","ISOLATION","ISOPEN","ISSUER","ITERATE","INVOKER","JOIN","JSON","JSON_TABLE","KEY","KEYS","KEY_BLOCK_SIZE","KILL","LANGUAGE","LAST","LAST_VALUE","LASTVAL","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_GTID_POS","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_SERVER_ID","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_USER","MASTER_USE_GTID","MASTER_HEARTBEAT_PERIOD","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_STATEMENT_TIME","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MAXVALUE","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUS","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONITOR","MONTH","MUTEX","MYSQL","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NESTED","NEVER","NEW","NEXT","NEXTVAL","NO","NOMAXVALUE","NOMINVALUE","NOCACHE","NOCYCLE","NO_WAIT","NOWAIT","NODEGROUP","NONE","NOT","NOTFOUND","NO_WRITE_TO_BINLOG","NULL","NUMBER","NUMERIC","NVARCHAR","OF","OFFSET","OLD_PASSWORD","ON","ONE","ONLINE","ONLY","OPEN","OPTIMIZE","OPTIONS","OPTION","OPTIONALLY","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OUTFILE","OVER","OVERLAPS","OWNER","PACKAGE","PACK_KEYS","PAGE","PAGE_CHECKSUM","PARSER","PARSE_VCOL_EXPR","PATH","PERIOD","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PERSISTENT","PHASE","PLUGIN","PLUGINS","PORT","PORTION","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PREVIOUS","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RAISE","RANGE","RAW","READ","READ_ONLY","READ_WRITE","READS","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDOFILE","REDUNDANT","REFERENCES","REGEXP","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEATABLE","REPLACE","REPLAY","REPLICA","REPLICAS","REPLICA_POS","REPLICATION","REPEAT","REQUIRE","RESET","RESIGNAL","RESTART","RESTORE","RESTRICT","RESUME","RETURNED_SQLSTATE","RETURN","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROW","ROWCOUNT","ROWNUM","ROWS","ROWTYPE","ROW_COUNT","ROW_FORMAT","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMA_NAME","SCHEMAS","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SEQUENCE","SERIAL","SERIALIZABLE","SESSION","SERVER","SET","SETVAL","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLAVES","SLAVE_POS","SLOW","SNAPSHOT","SMALLINT","SOCKET","SOFT","SOME","SONAME","SOUNDS","SOURCE","STAGE","STORED","SPATIAL","SPECIFIC","REF_SYSTEM_ID","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_SECOND","SQL_TSI_MINUTE","SQL_TSI_HOUR","SQL_TSI_DAY","SQL_TSI_WEEK","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_YEAR","SSL","START","STARTING","STARTS","STATEMENT","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSDATE","SYSTEM","SYSTEM_TIME","TABLE","TABLE_NAME","TABLES","TABLESPACE","TABLE_CHECKSUM","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRANSACTION","TRANSACTIONAL","THREADS","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO_BUFFER_SIZE","UNDOFILE","UNDO","UNICODE","UNION","UNIQUE","UNKNOWN","UNLOCK","UNINSTALL","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARCHAR2","VARIABLES","VARYING","VIA","VIEW","VIRTUAL","VISIBLE","VERSIONING","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","X509","XOR","XA","XML","YEAR","YEAR_MONTH","ZEROFILL"]}),ei=v({all:["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","BIT","BINARY","BLOB","CHAR","NATIONAL CHAR","CHAR BYTE","ENUM","VARBINARY","VARCHAR","NATIONAL VARCHAR","TIME","DATETIME","TIMESTAMP","YEAR"]}),ea=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),es=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]","RETURNING"]),el=A(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),eE=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),ec=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eu=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eT={tokenizerOptions:{reservedSelect:ea,reservedClauses:[...es,...el],reservedSetOperations:eE,reservedJoins:ec,reservedPhrases:eu,supportsXor:!0,reservedKeywords:eo,reservedFunctionNames:ei,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:el}},ed=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ALWAYS","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASCII","ASENSITIVE","AT","ATTRIBUTE","AUTHENTICATION","AUTOEXTEND_SIZE","AUTO_INCREMENT","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BOOL","BOOLEAN","BOTH","BTREE","BUCKETS","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHALLENGE_RESPONSE","CHANGE","CHANGED","CHANNEL","CHAR","CHARACTER","CHARSET","CHECK","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLONE","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMNS","COLUMN_FORMAT","COLUMN_NAME","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPONENT","COMPRESSED","COMPRESSION","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONVERT","CPU","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULT_AUTH","DEFINER","DEFINITION","DELAYED","DELAY_KEY_WRITE","DELETE","DENSE_RANK","DESC","DESCRIBE","DESCRIPTION","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCLOSED","ENCRYPTION","END","ENDS","ENFORCED","ENGINE","ENGINES","ENGINE_ATTRIBUTE","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXISTS","EXIT","EXPANSION","EXPIRE","EXPLAIN","EXPORT","EXTENDED","EXTENT_SIZE","FACTOR","FAILED_LOGIN_ATTEMPTS","FALSE","FAST","FAULTS","FETCH","FIELDS","FILE","FILE_BLOCK_SIZE","FILTER","FINISH","FIRST","FIRST_VALUE","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GEOMCOLLECTION","GEOMETRY","GEOMETRYCOLLECTION","GET","GET_FORMAT","GET_MASTER_PUBLIC_KEY","GET_SOURCE_PUBLIC_KEY","GLOBAL","GRANT","GRANTS","GROUP","GROUPING","GROUPS","GROUP_REPLICATION","GTID_ONLY","HANDLER","HASH","HAVING","HELP","HIGH_PRIORITY","HISTOGRAM","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORE_SERVER_IDS","IMPORT","IN","INACTIVE","INDEX","INDEXES","INFILE","INITIAL","INITIAL_SIZE","INITIATE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INSTANCE","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","INVISIBLE","INVOKER","IO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IO_THREAD","IPC","IS","ISOLATION","ISSUER","ITERATE","JOIN","JSON","JSON_TABLE","JSON_VALUE","KEY","KEYRING","KEYS","KEY_BLOCK_SIZE","KILL","LAG","LANGUAGE","LAST","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LINESTRING","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_AUTO_POSITION","MASTER_BIND","MASTER_COMPRESSION_ALGORITHMS","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_HEARTBEAT_PERIOD","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_PUBLIC_KEY_PATH","MASTER_RETRY_COUNT","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_TLS_CIPHERSUITES","MASTER_TLS_VERSION","MASTER_USER","MASTER_ZSTD_COMPRESSION_LEVEL","MATCH","MAXVALUE","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONTH","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","MUTEX","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NDB","NDBCLUSTER","NESTED","NETWORK_NAMESPACE","NEVER","NEW","NEXT","NO","NODEGROUP","NONE","NOT","NOWAIT","NO_WAIT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NULLS","NUMBER","NUMERIC","NVARCHAR","OF","OFF","OFFSET","OJ","OLD","ON","ONE","ONLY","OPEN","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONAL","OPTIONALLY","OPTIONS","OR","ORDER","ORDINALITY","ORGANIZATION","OTHERS","OUT","OUTER","OUTFILE","OVER","OWNER","PACK_KEYS","PAGE","PARSER","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PASSWORD_LOCK_TIME","PATH","PERCENT_RANK","PERSIST","PERSIST_ONLY","PHASE","PLUGIN","PLUGINS","PLUGIN_DIR","POINT","POLYGON","PORT","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PRIMARY","PRIVILEGES","PRIVILEGE_CHECKS_USER","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RANDOM","RANGE","RANK","READ","READS","READ_ONLY","READ_WRITE","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDUNDANT","REFERENCE","REFERENCES","REGEXP","REGISTRATION","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEAT","REPEATABLE","REPLACE","REPLICA","REPLICAS","REPLICATE_DO_DB","REPLICATE_DO_TABLE","REPLICATE_IGNORE_DB","REPLICATE_IGNORE_TABLE","REPLICATE_REWRITE_DB","REPLICATE_WILD_DO_TABLE","REPLICATE_WILD_IGNORE_TABLE","REPLICATION","REQUIRE","REQUIRE_ROW_FORMAT","RESET","RESIGNAL","RESOURCE","RESPECT","RESTART","RESTORE","RESTRICT","RESUME","RETAIN","RETURN","RETURNED_SQLSTATE","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROTATE","ROUTINE","ROW","ROWS","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMAS","SCHEMA_NAME","SECOND","SECONDARY","SECONDARY_ENGINE","SECONDARY_ENGINE_ATTRIBUTE","SECONDARY_LOAD","SECONDARY_UNLOAD","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SERIAL","SERIALIZABLE","SERVER","SESSION","SET","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLOW","SMALLINT","SNAPSHOT","SOCKET","SOME","SONAME","SOUNDS","SOURCE","SOURCE_AUTO_POSITION","SOURCE_BIND","SOURCE_COMPRESSION_ALGORITHMS","SOURCE_CONNECT_RETRY","SOURCE_DELAY","SOURCE_HEARTBEAT_PERIOD","SOURCE_HOST","SOURCE_LOG_FILE","SOURCE_LOG_POS","SOURCE_PASSWORD","SOURCE_PORT","SOURCE_PUBLIC_KEY_PATH","SOURCE_RETRY_COUNT","SOURCE_SSL","SOURCE_SSL_CA","SOURCE_SSL_CAPATH","SOURCE_SSL_CERT","SOURCE_SSL_CIPHER","SOURCE_SSL_CRL","SOURCE_SSL_CRLPATH","SOURCE_SSL_KEY","SOURCE_SSL_VERIFY_SERVER_CERT","SOURCE_TLS_CIPHERSUITES","SOURCE_TLS_VERSION","SOURCE_USER","SOURCE_ZSTD_COMPRESSION_LEVEL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_AFTER_GTIDS","SQL_AFTER_MTS_GAPS","SQL_BEFORE_GTIDS","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SRID","SSL","STACKED","START","STARTING","STARTS","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STORED","STRAIGHT_JOIN","STREAM","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSTEM","TABLE","TABLES","TABLESPACE","TABLE_CHECKSUM","TABLE_NAME","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","THREAD_PRIORITY","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TLS","TO","TRAILING","TRANSACTION","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNDOFILE","UNDO_BUFFER_SIZE","UNICODE","UNINSTALL","UNION","UNIQUE","UNKNOWN","UNLOCK","UNREGISTER","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARYING","VCPU","VIEW","VIRTUAL","VISIBLE","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHOUT","WORK","WRAPPER","WRITE","X509","XA","XID","XML","XOR","YEAR","YEAR_MONTH","ZEROFILL","ZONE"]}),eR=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MEMBER OF","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOT","NOT IN","NOT LIKE","NOT REGEXP","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),ef=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),eA=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),eS=A(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),eO=A(["UNION [ALL | DISTINCT]"]),ep=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eN=A(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eI={tokenizerOptions:{reservedSelect:ef,reservedClauses:[...eA,...eS],reservedSetOperations:eO,reservedJoins:ep,reservedPhrases:eN,supportsXor:!0,reservedKeywords:ed,reservedFunctionNames:eR,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:eS}},eh=v({all:["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"]}),e_=v({all:["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","ISOLATION","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"]}),em=A(["SELECT [ALL | DISTINCT]"]),eC=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),eL=A(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),eg=A(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),ev=A(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),eP=A(["{ROWS | RANGE | GROUPS} BETWEEN"]),ey={tokenizerOptions:{reservedSelect:em,reservedClauses:[...eC,...eL],reservedSetOperations:eg,reservedJoins:ev,reservedPhrases:eP,supportsXor:!0,reservedKeywords:e_,reservedFunctionNames:eh,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:eL}},eD=v({all:["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARRAY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BFILE_BASE","BINARY","BLOB_BASE","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHAR","CHAR_BASE","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE","DATE_BASE","DAY","DECIMAL","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DOUBLE","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FLOAT","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INT","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LONG","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NCHAR","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NUMBER_BASE","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"]}),eM=v({numeric:["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET"],character:["CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET"],comparison:["GREATEST","LEAST"],conversion:["ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR"],largeObject:["BFILENAME","EMPTY_BLOB,","EMPTY_CLOB"],collection:["CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET"],hierarchical:["SYS_CONNECT_BY_PATH"],dataMining:["CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET"],xml:["APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM"],encoding:["DECODE","DUMP","ORA_HASH","VSIZE"],nullRelated:["COALESCE","LNNVL","NULLIF","NVL","NVL2"],env:["SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV"],aggregate:["AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER"],objectReference:["DEREF","MAKE_REF","REF","REFTOHEX","VALUE"],model:["CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],dataTypes:["VARCHAR2","NVARCHAR2","NUMBER","FLOAT","TIMESTAMP","INTERVAL YEAR","INTERVAL DAY","RAW","UROWID","NCHAR","CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","NATIONAL CHARACTER","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NUMERIC","DECIMAL","FLOAT","VARCHAR"]}),eb=A(["SELECT [ALL | DISTINCT | UNIQUE]"]),eU=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE","RETURNING"]),ew=A(["UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),ex=A(["UNION [ALL]","EXCEPT","INTERSECT"]),eG=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),eF=A(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),eH={tokenizerOptions:{reservedSelect:eb,reservedClauses:[...eU,...ew],reservedSetOperations:ex,reservedJoins:eG,reservedPhrases:eF,supportsXor:!0,reservedKeywords:eD,reservedFunctionNames:eM,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},paramChars:{},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:function(e){let t=u;return e.map(e=>d.SET(e)&&d.BY(t)?{...e,type:r.RESERVED_KEYWORD}:(R(e.type)&&(t=e),e))}},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:ew}},eB=v({math:["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET"],string:["ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER"],binary:["BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM"],bitstring:["BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING"],pattern:["REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE"],datatype:["TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP"],datetime:["CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP"],enum:["ENUM_FIRST","ENUM_LAST","ENUM_RANGE"],geometry:["AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH"],network:["ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TEXT","TRUNC"],textsearch:["ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY"],uuid:["UUID"],xml:["CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS"],json:["ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP"],sequence:["CURRVAL","LASTVAL","NEXTVAL","SETVAL"],conditional:["COALESCE","GREATEST","LEAST","NULLIF"],array:["ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST"],range:["ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF"],aggregate:["ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG"],window:["CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],set:["GENERATE_SERIES","GENERATE_SUBSCRIPTS"],sysInfo:["ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION"],sysAdmin:["BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG"],trigger:["SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN"],eventTrigger:["PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS"],stats:["PG_MCV_LIST_ITEMS"],cast:["CAST"],dataTypes:["BIT","BIT VARYING","CHARACTER","CHARACTER VARYING","VARCHAR","CHAR","DECIMAL","NUMERIC","TIME","TIMESTAMP","ENUM"]}),eY=v({all:["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASENSITIVE","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATOMIC","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BREADTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","COMPRESSION","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DEPTH","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FINALIZE","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURN","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"]}),ek=A(["SELECT [ALL | DISTINCT]"]),eV=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE MATERIALIZED VIEW [IF NOT EXISTS]","CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]","RETURNING"]),e$=A(["UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","[SET DATA] TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMENT","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE FUNCTION","CREATE GROUP","CREATE INDEX","CREATE LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE RULE","CREATE SCHEMA","CREATE SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE TRANSFORM","CREATE TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),eW=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),eZ=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),ej=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","{TIMESTAMP | TIME} {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),eX={tokenizerOptions:{reservedSelect:ek,reservedClauses:[...eV,...e$],reservedSetOperations:eW,reservedJoins:eZ,reservedPhrases:ej,reservedKeywords:eY,reservedFunctionNames:eB,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^","^>","?#","?-","?|","?-|","?||","@>","<@","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:e$}},eK=v({aggregate:["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],array:["array","array_concat","array_flatten","get_array_length","split_to_array","subarray"],bitwise:["BIT_AND","BIT_OR","BOOL_AND","BOOL_OR"],conditional:["COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF"],dateTime:["ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC"],spatial:["AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox"],hash:["CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2"],hyperLogLog:["HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE"],json:["IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE"],math:["ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC"],machineLearning:["EXPLAIN_MODEL"],string:["ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER"],superType:["decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof"],window:["AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],dataType:["CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT"],sysAdmin:["CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG"],sysInfo:["CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],dataTypes:["DECIMAL","NUMERIC","CHAR","CHARACTER","VARCHAR","CHARACTER VARYING","NCHAR","NVARCHAR","VARBYTE"]}),ez=v({standard:["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT"],dataConversionParams:["ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS"],dataLoadParams:["COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE"],dataFormatParams:["FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC"],copyAuthParams:["ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN"],copyCompressionParams:["BZIP2","GZIP","LZOP","ZSTD"],copyMiscParams:["MANIFEST","READRATIO","REGION","SSH"],compressionEncodings:["RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K"],misc:["CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],dataTypes:["BPCHAR","TEXT"]}),eJ=A(["SELECT [ALL | DISTINCT]"]),eq=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","CREATE [OR REPLACE | MATERIALIZED] VIEW","CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),eQ=A(["UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMENT","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),e0=A(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),e1=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),e2=A(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),e4={tokenizerOptions:{reservedSelect:eJ,reservedClauses:[...eq,...eQ],reservedSetOperations:e0,reservedJoins:e1,reservedPhrases:e2,reservedKeywords:ez,reservedFunctionNames:eK,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:eQ}},e6=v({all:["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","ARRAY","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTERVAL","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MAP","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","STRUCT","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","STRING","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"]}),e3=v({aggregate:["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],array:["ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY"],map:["ELEMENT_AT","ELEMENT_AT","MAP","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR"],json:["FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON"],misc:["ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIGINT","BIN","BINARY","BIT_COUNT","BIT_GET","BIT_LENGTH","BOOLEAN","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DATE","DECIMAL","DEGREES","DOUBLE","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOAT","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","INT","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SMALLINT","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TIMESTAMP","TINYINT","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","DEC","NUMERIC","VARCHAR"]}),e8=A(["SELECT [ALL | DISTINCT]"]),e5=A(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),e7=A(["DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),e9=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),te=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),tt=A(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),tn={tokenizerOptions:{reservedSelect:e8,reservedClauses:[...e5,...e7],reservedSetOperations:e9,reservedJoins:te,reservedPhrases:tt,supportsXor:!0,reservedKeywords:e6,reservedFunctionNames:e3,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:function(e){return e.map((t,n)=>{let o=e[n-1]||u,i=e[n+1]||u;return d.WINDOW(t)&&i.type===r.OPEN_PAREN?{...t,type:r.RESERVED_FUNCTION_NAME}:"ITEMS"!==t.text||t.type!==r.RESERVED_KEYWORD||"COLLECTION"===o.text&&"TERMINATED"===i.text?t:{...t,type:r.IDENTIFIER,text:t.raw}})}},formatOptions:{onelineClauses:e7}},tr=v({scalar:["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB"],aggregate:["AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL"],datetime:["DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME"],window:["row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value"],math:["ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC"],json:["JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE"],cast:["CAST"],dataTypes:["CHARACTER","VARCHAR","VARYING CHARACTER","NCHAR","NATIVE CHARACTER","NVARCHAR","NUMERIC","DECIMAL"]}),to=v({all:["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ANY","ARE","ARRAY","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","GROUPS","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"]}),ti=A(["SELECT [ALL | DISTINCT]"]),ta=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET","CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),ts=A(["UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),tl=A(["UNION [ALL]","EXCEPT","INTERSECT"]),tE=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tc=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),tu={tokenizerOptions:{reservedSelect:ti,reservedClauses:[...ta,...ts],reservedSetOperations:tl,reservedJoins:tE,reservedPhrases:tc,reservedKeywords:to,reservedFunctionNames:tr,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:ts}},tT=v({set:["GROUPING"],window:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER"],numeric:["POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET"],string:["SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE"],datetime:["CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP"],aggregate:["COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],nonStandard:["ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],dataTypes:["CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","VARCHAR","CHARACTER LARGE OBJECT","CHAR LARGE OBJECT","CLOB","NATIONAL CHARACTER","NATIONAL CHAR","NCHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NATIONAL CHARACTER LARGE OBJECT","NCHAR LARGE OBJECT","NCLOB","BINARY","BINARY VARYING","VARBINARY","BINARY LARGE OBJECT","BLOB","NUMERIC","DECIMAL","DEC","TIME","TIMESTAMP"]}),td=v({all:["ALL","ALLOCATE","ALTER","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHAR","CHARACTER","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FLOAT","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"]}),tR=A(["SELECT [ALL | DISTINCT]"]),tf=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [RECURSIVE] VIEW","CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),tA=A(["UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),tS=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tO=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tp=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tN={tokenizerOptions:{reservedSelect:tR,reservedClauses:[...tf,...tA],reservedSetOperations:tS,reservedJoins:tO,reservedPhrases:tp,reservedKeywords:td,reservedFunctionNames:tT,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:tA}},tI=v({all:["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH"],rowPattern:["CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"]}),th=v({all:["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],types:["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"]}),t_=A(["SELECT [ALL | DISTINCT]"]),tm=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW","CREATE TABLE [IF NOT EXISTS]","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),tC=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","COMMENT ON TABLE","COMMENT ON COLUMN","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),tL=A(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tg=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tv=A(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),tP={tokenizerOptions:{reservedSelect:t_,reservedClauses:[...tm,...tC],reservedSetOperations:tL,reservedJoins:tg,reservedPhrases:tv,reservedKeywords:th,reservedFunctionNames:tI,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:tC}},ty=v({aggregate:["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP"],analytic:["CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS"],configuration:["@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION"],conversion:["CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE"],cryptographic:["ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY"],cursor:["@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS"],dataType:["DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY"],datetime:["@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY"],mathematical:["ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST"],metadata:["@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY"],ranking:["DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME"],security:["CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME"],string:["ASCII","CHAR","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER"],system:["$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE"],statistical:["@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID"],trigger:["COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","NUMERIC","FLOAT","REAL","DATETIME2","DATETIMEOFFSET","TIME","CHAR","VARCHAR","NCHAR","NVARCHAR","BINARY","VARBINARY"]}),tD=v({standard:["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DOUBLE","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NATIONAL","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRECISION","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VARYING","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT"],odbc:["ABSOLUTE","ACTION","ADA","ADD","ALL","ALLOCATE","ALTER","AND","ANY","ARE","AS","ASC","ASSERTION","AT","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BY","CASCADE","CASCADED","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOSE","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DISTINCT","DOMAIN","DOUBLE","DROP","END-EXEC","ESCAPE","EXCEPTION","EXEC","EXECUTE","EXISTS","EXTERNAL","EXTRACT","FALSE","FETCH","FIRST","FLOAT","FOR","FOREIGN","FORTRAN","FOUND","FROM","FULL","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HAVING","HOUR","IDENTITY","IMMEDIATE","IN","INCLUDE","INDEX","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISOLATION","JOIN","KEY","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OF","ONLY","OPEN","OPTION","OR","ORDER","OUTER","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURE","PUBLIC","READ","REAL","REFERENCES","RELATIVE","RESTRICT","REVOKE","RIGHT","ROLLBACK","ROWS","SCHEMA","SCROLL","SECOND","SECTION","SELECT","SESSION","SESSION_USER","SET","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","SYSTEM_USER","TABLE","TEMPORARY","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TRIM","TRUE","UNION","UNIQUE","UNKNOWN","UPDATE","UPPER","USAGE","USER","VALUE","VALUES","VARCHAR","VARYING","VIEW","WHENEVER","WHERE","WITH","WORK","WRITE","YEAR","ZONE"]}),tM=A(["SELECT [ALL | DISTINCT]"]),tb=A(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] [MATERIALIZED] VIEW","CREATE TABLE","CREATE [OR ALTER] {PROC | PROCEDURE}"]),tU=A(["UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLLATE","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","FUNCTION","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION FUNCTION","PARTITION SCHEME","PROCEDURE","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),tw=A(["UNION [ALL]","EXCEPT","INTERSECT"]),tx=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),tG=A(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tF={tokenizerOptions:{reservedSelect:tM,reservedClauses:[...tb,...tU],reservedSetOperations:tw,reservedJoins:tx,reservedPhrases:tG,reservedKeywords:tD,reservedFunctionNames:ty,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:tU}},tH=v({all:["ABORT","ABSOLUTE","ACCESS","ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","AGGREGATES","AGGREGATOR","AGGREGATOR_ID","AGGREGATOR_PLAN_HASH","AGGREGATORS","ALGORITHM","ALL","ALSO","ALTER","ALWAYS","ANALYZE","AND","ANY","ARGHISTORY","ARRANGE","ARRANGEMENT","ARRAY","AS","ASC","ASCII","ASENSITIVE","ASM","ASSERTION","ASSIGNMENT","AST","ASYMMETRIC","ASYNC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","AUTO","AUTO_INCREMENT","AUTO_REPROVISION","AUTOSTATS","AUTOSTATS_CARDINALITY_MODE","AUTOSTATS_ENABLED","AUTOSTATS_HISTOGRAM_MODE","AUTOSTATS_SAMPLING","AVAILABILITY","AVG","AVG_ROW_LENGTH","AVRO","AZURE","BACKGROUND","_BACKGROUND_THREADS_FOR_CLEANUP","BACKUP","BACKUP_HISTORY","BACKUP_ID","BACKWARD","BATCH","BATCHES","BATCH_INTERVAL","_BATCH_SIZE_LIMIT","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","_BINARY","BIT","BLOB","BOOL","BOOLEAN","BOOTSTRAP","BOTH","_BT","BTREE","BUCKET_COUNT","BUCKETS","BY","BYTE","BYTE_LENGTH","CACHE","CALL","CALL_FOR_PIPELINE","CALLED","CAPTURE","CASCADE","CASCADED","CASE","CATALOG","CHAIN","CHANGE","CHAR","CHARACTER","CHARACTERISTICS","CHARSET","CHECK","CHECKPOINT","_CHECK_CAN_CONNECT","_CHECK_CONSISTENCY","CHECKSUM","_CHECKSUM","CLASS","CLEAR","CLIENT","CLIENT_FOUND_ROWS","CLOSE","CLUSTER","CLUSTERED","CNF","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNAR","COLUMNS","COLUMNSTORE","COLUMNSTORE_SEGMENT_ROWS","COMMENT","COMMENTS","COMMIT","COMMITTED","_COMMIT_LOG_TAIL","COMPACT","COMPILE","COMPRESSED","COMPRESSION","CONCURRENT","CONCURRENTLY","CONDITION","CONFIGURATION","CONNECTION","CONNECTIONS","CONFIG","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","_CONTINUE_REPLAY","CONVERSION","CONVERT","COPY","_CORE","COST","CREATE","CREDENTIALS","CROSS","CUBE","CSV","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_SCHEMA","CURRENT_SECURITY_GROUPS","CURRENT_SECURITY_ROLES","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATABASES","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELIMITER","DELIMITERS","DENSE_RANK","DESC","DESCRIBE","DETACH","DETERMINISTIC","DICTIONARY","DIFFERENTIAL","DIRECTORY","DISABLE","DISCARD","_DISCONNECT","DISK","DISTINCT","DISTINCTROW","DISTRIBUTED_JOINS","DIV","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","_DROP_PROFILE","DUAL","DUMP","DUPLICATE","DURABILITY","DYNAMIC","EARLIEST","EACH","ECHO","ELECTION","ELSE","ELSEIF","ENABLE","ENCLOSED","ENCODING","ENCRYPTED","END","ENGINE","ENGINES","ENUM","ERRORS","ESCAPE","ESCAPED","ESTIMATE","EVENT","EVENTS","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTENSION","EXTERNAL","EXTERNAL_HOST","EXTERNAL_PORT","EXTRACTOR","EXTRACTORS","EXTRA_JOIN","_FAILOVER","FAILED_LOGIN_ATTEMPTS","FAILURE","FALSE","FAMILY","FAULT","FETCH","FIELDS","FILE","FILES","FILL","FIX_ALTER","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREGROUND","FOREIGN","FORMAT","FORWARD","FREEZE","FROM","FS","_FSYNC","FULL","FULLTEXT","FUNCTION","FUNCTIONS","GC","GCS","GET_FORMAT","_GC","_GCX","GENERATE","GEOGRAPHY","GEOGRAPHYPOINT","GEOMETRY","GEOMETRYPOINT","GLOBAL","_GLOBAL_VERSION_TIMESTAMP","GRANT","GRANTED","GRANTS","GROUP","GROUPING","GROUPS","GZIP","HANDLE","HANDLER","HARD_CPU_LIMIT_PERCENTAGE","HASH","HAS_TEMP_TABLES","HAVING","HDFS","HEADER","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HISTOGRAM","HOLD","HOLDING","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IDENTITY","IF","IGNORE","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDING","INCREMENT","INCREMENTAL","INDEX","INDEXES","INFILE","INHERIT","INHERITS","_INIT_PROFILE","INIT","INITIALIZE","INITIALLY","INJECT","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTANCE","INSTEAD","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","_INTERNAL_DYNAMIC_TYPECAST","INTERPRETER_MODE","INTERSECT","INTERVAL","INTO","INVOKER","ISOLATION","ITERATE","JOIN","JSON","KAFKA","KEY","KEY_BLOCK_SIZE","KEYS","KILL","KILLALL","LABEL","LAG","LANGUAGE","LARGE","LAST","LAST_VALUE","LATERAL","LATEST","LC_COLLATE","LC_CTYPE","LEAD","LEADING","LEAF","LEAKPROOF","LEAVE","LEAVES","LEFT","LEVEL","LICENSE","LIKE","LIMIT","LINES","LISTEN","LLVM","LOADDATA_WHERE","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","_LS","LZ4","MANAGEMENT","_MANAGEMENT_THREAD","MAPPING","MASTER","MATCH","MATERIALIZED","MAXVALUE","MAX_CONCURRENCY","MAX_ERRORS","MAX_PARTITIONS_PER_BATCH","MAX_QUEUE_DEPTH","MAX_RETRIES_PER_BATCH_PARTITION","MAX_ROWS","MBC","MPL","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MEMORY_PERCENTAGE","_MEMSQL_TABLE_ID_LOOKUP","MEMSQL","MEMSQL_DESERIALIZE","MEMSQL_IMITATING_KAFKA","MEMSQL_SERIALIZE","MERGE","METADATA","MICROSECOND","MIDDLEINT","MIN_ROWS","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MOD","MODE","MODEL","MODIFIES","MODIFY","MONTH","MOVE","MPL","NAMES","NAMED","NAMESPACE","NATIONAL","NATURAL","NCHAR","NEXT","NO","NODE","NONE","NO_QUERY_REWRITE","NOPARAM","NOT","NOTHING","NOTIFY","NOWAIT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NORELY","NTH_VALUE","NTILE","NULL","NULLCOLS","NULLS","NUMERIC","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OIDS","ON","ONLINE","ONLY","OPEN","OPERATOR","OPTIMIZATION","OPTIMIZE","OPTIMIZER","OPTIMIZER_STATE","OPTION","OPTIONS","OPTIONALLY","OR","ORDER","ORDERED_SERIALIZE","ORPHAN","OUT","OUT_OF_ORDER","OUTER","OUTFILE","OVER","OVERLAPS","OVERLAY","OWNED","OWNER","PACK_KEYS","PAIRED","PARSER","PARQUET","PARTIAL","PARTITION","PARTITION_ID","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PASSWORD_LOCK_TIME","PAUSE","_PAUSE_REPLAY","PERIODIC","PERSISTED","PIPELINE","PIPELINES","PLACING","PLAN","PLANS","PLANCACHE","PLUGINS","POOL","POOLS","PORT","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROGRAM","PROMOTE","PROXY","PURGE","QUARTER","QUERIES","QUERY","QUERY_TIMEOUT","QUEUE","RANGE","RANK","READ","_READ","READS","REAL","REASSIGN","REBALANCE","RECHECK","RECORD","RECURSIVE","REDUNDANCY","REDUNDANT","REF","REFERENCE","REFERENCES","REFRESH","REGEXP","REINDEX","RELATIVE","RELEASE","RELOAD","RELY","REMOTE","REMOVE","RENAME","REPAIR","_REPAIR_TABLE","REPEAT","REPEATABLE","_REPL","_REPROVISIONING","REPLACE","REPLICA","REPLICATE","REPLICATING","REPLICATION","REQUIRE","RESOURCE","RESOURCE_POOL","RESET","RESTART","RESTORE","RESTRICT","RESULT","_RESURRECT","RETRY","RETURN","RETURNING","RETURNS","REVERSE","RG_POOL","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","ROLES","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","ROWS","ROWSTORE","RULE","_RPC","RUNNING","S3","SAFE","SAVE","SAVEPOINT","SCALAR","SCHEMA","SCHEMAS","SCHEMA_BINDING","SCROLL","SEARCH","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SEMI_JOIN","_SEND_THREADS","SENSITIVE","SEPARATOR","SEQUENCE","SEQUENCES","SERIAL","SERIALIZABLE","SERIES","SERVICE_USER","SERVER","SESSION","SESSION_USER","SET","SETOF","SECURITY_LISTS_INTERSECT","SHA","SHARD","SHARDED","SHARDED_ID","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMILAR","SIMPLE","SITE","SKIP","SKIPPED_BATCHES","__SLEEP","SMALLINT","SNAPSHOT","_SNAPSHOT","_SNAPSHOTS","SOFT_CPU_LIMIT_PERCENTAGE","SOME","SONAME","SPARSE","SPATIAL","SPATIAL_CHECK_INDEX","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_MODE","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STDIN","STDOUT","STOP","STORAGE","STRAIGHT_JOIN","STRICT","STRING","STRIP","SUCCESS","SUPER","SYMMETRIC","SYNC_SNAPSHOT","SYNC","_SYNC","_SYNC2","_SYNC_PARTITIONS","_SYNC_SNAPSHOT","SYNCHRONIZE","SYSID","SYSTEM","TABLE","TABLE_CHECKSUM","TABLES","TABLESPACE","TAGS","TARGET_SIZE","TASK","TEMP","TEMPLATE","TEMPORARY","TEMPTABLE","_TERM_BUMP","TERMINATE","TERMINATED","TEXT","THEN","TIME","TIMEOUT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMEZONE","TINYBLOB","TINYINT","TINYTEXT","TO","TRACELOGS","TRADITIONAL","TRAILING","TRANSFORM","TRANSACTION","_TRANSACTIONS_EXPERIMENTAL","TREAT","TRIGGER","TRIGGERS","TRUE","TRUNC","TRUNCATE","TRUSTED","TWO_PHASE","_TWOPCID","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNENCRYPTED","UNENFORCED","UNHOLD","UNICODE","UNION","UNIQUE","_UNITTEST","UNKNOWN","UNLISTEN","_UNLOAD","UNLOCK","UNLOGGED","UNPIVOT","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USERS","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARIADIC","VARYING","VERBOSE","VIEW","VOID","VOLATILE","VOTING","WAIT","_WAKE","WARNINGS","WEEK","WHEN","WHERE","WHILE","WHITESPACE","WINDOW","WITH","WITHOUT","WITHIN","_WM_HEARTBEAT","WORK","WORKLOAD","WRAPPER","WRITE","XACT_ID","XOR","YEAR","YEAR_MONTH","YES","ZEROFILL","ZONE"]}),tB=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),tY=A(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),tk=A(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","SET","CREATE VIEW","CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),tV=A(["UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),t$=A(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),tW=A(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),tZ=A(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),tj={tokenizerOptions:{reservedSelect:tY,reservedClauses:[...tk,...tV],reservedSetOperations:t$,reservedJoins:tW,reservedPhrases:tZ,reservedKeywords:tH,reservedFunctionNames:tB,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return d.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:tV}},tX=v({all:["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"]}),tK=v({all:["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH"]}),tz=A(["SELECT [ALL | DISTINCT]"]),tJ=A(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),tq=A(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","[SET DATA] TYPE","[UNSET] COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),tQ=A(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),t0=A(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),t1=A(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),t2={tokenizerOptions:{reservedSelect:tz,reservedClauses:[...tJ,...tq],reservedSetOperations:tQ,reservedJoins:t0,reservedPhrases:t1,reservedKeywords:tK,reservedFunctionNames:tX,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||",":","=>"]},formatOptions:{alwaysDenseOperators:[":","::"],onelineClauses:tq}},t4=e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),t6=/\s+/uy,t3=e=>RegExp(`(?:${e})`,"uy"),t8=e=>e.split("").map(e=>/ /gu.test(e)?"\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),t5=e=>e+"(?:-"+e+")*",t7=({prefixes:e,requirePrefix:t})=>`(?:${e.map(t8).join("|")}${t?"":"|"})`,t9=e=>RegExp(`(?:${e.map(t4).join("|")}).*?(?=\r |\r| |$)`,"uy"),ne=(e,t=[])=>{let n="open"===e?0:1,r=["()",...t].map(e=>e[n]);return t3(r.map(t4).join("|"))},nt=e=>t3(`${C(e).map(t4).join("|")}`),nn=({rest:e,dashes:t})=>e||t?`(?![${e||""}${t?"-":""}])`:"",nr=(e,t={})=>{if(0===e.length)return/^\b$/u;let n=nn(t),r=C(e).map(t4).join("|").replace(/ /gu,"\\s+");return RegExp(`(?:${r})${n}\\b`,"iuy")},no=(e,t)=>{if(!e.length)return;let n=e.map(t4).join("|");return t3(`(?:${n})(?:${t})`)},ni={"``":"(?:`[^`]*`)+","[]":String.raw`(?:\[[^\]]*\])(?:\][^\]]*\])*`,'""-qq':String.raw`(?:"[^"]*")+`,'""-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")`,'""-qq-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")+`,'""-raw':String.raw`(?:"[^"]*")`,"''-qq":String.raw`(?:'[^']*')+`,"''-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')`,"''-qq-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')+`,"''-raw":String.raw`(?:'[^']*')`,$$:String.raw`(?\$\w*\$)[\s\S]*?\k`,"'''..'''":String.raw`'''[^\\]*?(?:\\.[^\\]*?)*?'''`,'""".."""':String.raw`"""[^\\]*?(?:\\.[^\\]*?)*?"""`,"{}":String.raw`(?:\{[^\}]*\})`,"q''":(()=>{let e={"<":">","[":"]","(":")","{":"}"},t=Object.entries(e).map(([e,t])=>"{left}(?:(?!{right}').)*?{right}".replace(/{left}/g,t4(e)).replace(/{right}/g,t4(t))),n=t4(Object.keys(e).join("")),r=String.raw`(?[^\s${n}])(?:(?!\k').)*?\k`,o=`[Qq]'(?:${r}|${t.join("|")})'`;return o})()},na=e=>"string"==typeof e?ni[e]:"regex"in e?e.regex:t7(e)+ni[e.quote],ns=e=>t3(e.map(e=>"regex"in e?e.regex:na(e)).join("|")),nl=e=>e.map(na).join("|"),nE=e=>t3(nl(e)),nc=(e={})=>t3(nu(e)),nu=({first:e,rest:t,dashes:n,allowFirstCharNumber:r}={})=>{let o="\\p{Alphabetic}\\p{Mark}_",i="\\p{Decimal_Number}",a=t4(e??""),s=t4(t??""),l=r?`[${o}${i}${a}][${o}${i}${s}]*`:`[${o}${a}][${o}${i}${s}]*`;return n?t5(l):l};function nT(e,t){let n=e.slice(0,t).split(/\n/);return{line:n.length,col:n[n.length-1].length+1}}class nd{input="";index=0;constructor(e){this.rules=e}tokenize(e){let t;this.input=e,this.index=0;let n=[];for(;this.index0;)if(t=this.matchSection(nR,e))n+=t,r++;else if(t=this.matchSection(nA,e))n+=t,r--;else{if(!(t=this.matchSection(nf,e)))return null;n+=t}return[n]}matchSection(e,t){e.lastIndex=this.lastIndex;let n=e.exec(t);return n&&(this.lastIndex+=n[0].length),n?n[0]:null}}class nO{constructor(e){this.cfg=e,this.rulesBeforeParams=this.buildRulesBeforeParams(e),this.rulesAfterParams=this.buildRulesAfterParams(e)}tokenize(e,t){let n=[...this.rulesBeforeParams,...this.buildParamRules(this.cfg,t),...this.rulesAfterParams],r=new nd(n).tokenize(e);return this.cfg.postProcess?this.cfg.postProcess(r):r}buildRulesBeforeParams(e){return this.validRules([{type:r.BLOCK_COMMENT,regex:e.nestedBlockComments?new nS:/(\/\*[^]*?\*\/)/uy},{type:r.LINE_COMMENT,regex:t9(e.lineCommentTypes??["--"])},{type:r.QUOTED_IDENTIFIER,regex:nE(e.identTypes)},{type:r.NUMBER,regex:/(?:0x[0-9a-fA-F]+|0b[01]+|(?:-\s*)?[0-9]+(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+(?:\.[0-9]+)?)?)(?!\w)/uy},{type:r.RESERVED_PHRASE,regex:nr(e.reservedPhrases??[],e.identChars),text:np},{type:r.CASE,regex:/CASE\b/iuy,text:np},{type:r.END,regex:/END\b/iuy,text:np},{type:r.BETWEEN,regex:/BETWEEN\b/iuy,text:np},{type:r.LIMIT,regex:e.reservedClauses.includes("LIMIT")?/LIMIT\b/iuy:void 0,text:np},{type:r.RESERVED_CLAUSE,regex:nr(e.reservedClauses,e.identChars),text:np},{type:r.RESERVED_SELECT,regex:nr(e.reservedSelect,e.identChars),text:np},{type:r.RESERVED_SET_OPERATION,regex:nr(e.reservedSetOperations,e.identChars),text:np},{type:r.WHEN,regex:/WHEN\b/iuy,text:np},{type:r.ELSE,regex:/ELSE\b/iuy,text:np},{type:r.THEN,regex:/THEN\b/iuy,text:np},{type:r.RESERVED_JOIN,regex:nr(e.reservedJoins,e.identChars),text:np},{type:r.AND,regex:/AND\b/iuy,text:np},{type:r.OR,regex:/OR\b/iuy,text:np},{type:r.XOR,regex:e.supportsXor?/XOR\b/iuy:void 0,text:np},{type:r.RESERVED_FUNCTION_NAME,regex:nr(e.reservedFunctionNames,e.identChars),text:np},{type:r.RESERVED_KEYWORD,regex:nr(e.reservedKeywords,e.identChars),text:np}])}buildRulesAfterParams(e){return this.validRules([{type:r.VARIABLE,regex:e.variableTypes?ns(e.variableTypes):void 0},{type:r.STRING,regex:nE(e.stringTypes)},{type:r.IDENTIFIER,regex:nc(e.identChars)},{type:r.DELIMITER,regex:/[;]/uy},{type:r.COMMA,regex:/[,]/y},{type:r.OPEN_PAREN,regex:ne("open",e.extraParens)},{type:r.CLOSE_PAREN,regex:ne("close",e.extraParens)},{type:r.OPERATOR,regex:nt(["+","-","/",">","<","=","<>","<=",">=","!=",...e.operators??[]])},{type:r.ASTERISK,regex:/[*]/uy},{type:r.DOT,regex:/[.]/uy}])}buildParamRules(e,t){var n,o,i,a,s;let l={named:(null==t?void 0:t.named)||(null===(n=e.paramTypes)||void 0===n?void 0:n.named)||[],quoted:(null==t?void 0:t.quoted)||(null===(o=e.paramTypes)||void 0===o?void 0:o.quoted)||[],numbered:(null==t?void 0:t.numbered)||(null===(i=e.paramTypes)||void 0===i?void 0:i.numbered)||[],positional:"boolean"==typeof(null==t?void 0:t.positional)?t.positional:null===(a=e.paramTypes)||void 0===a?void 0:a.positional,custom:(null==t?void 0:t.custom)||(null===(s=e.paramTypes)||void 0===s?void 0:s.custom)||[]};return this.validRules([{type:r.NAMED_PARAMETER,regex:no(l.named,nu(e.paramChars||e.identChars)),key:e=>e.slice(1)},{type:r.QUOTED_PARAMETER,regex:no(l.quoted,nl(e.identTypes)),key:e=>(({tokenKey:e,quoteChar:t})=>e.replace(RegExp(t4("\\"+t),"gu"),t))({tokenKey:e.slice(2,-1),quoteChar:e.slice(-1)})},{type:r.NUMBERED_PARAMETER,regex:no(l.numbered,"[0-9]+"),key:e=>e.slice(1)},{type:r.POSITIONAL_PARAMETER,regex:l.positional?/[?]/y:void 0},...l.custom.map(e=>({type:r.CUSTOM_PARAMETER,regex:t3(e.regex),key:e.key??(e=>e)}))])}validRules(e){return e.filter(e=>!!e.regex)}}let np=e=>g(e.toUpperCase()),nN=new Map,nI=e=>{let t=nN.get(e);return t||(t=nh(e),nN.set(e,t)),t},nh=e=>({tokenizer:new nO(e.tokenizerOptions),formatOptions:n_(e.formatOptions)}),n_=e=>({alwaysDenseOperators:e.alwaysDenseOperators||[],onelineClauses:Object.fromEntries(e.onelineClauses.map(e=>[e,!0]))});function nm(e){return"tabularLeft"===e.indentStyle||"tabularRight"===e.indentStyle?" ".repeat(10):e.useTabs?" ":" ".repeat(e.tabWidth)}function nC(e){return"tabularLeft"===e.indentStyle||"tabularRight"===e.indentStyle}class nL{constructor(e){this.params=e,this.index=0}get({key:e,text:t}){return this.params?e?this.params[e]:this.params[this.index++]:t}getPositionalParameterIndex(){return this.index}setPositionalParameterIndex(e){this.index=e}}var ng=n(69654);let nv=(e,t,n)=>{if(R(e.type)){let o=nM(n,t);if(o&&"."===o.text)return{...e,type:r.IDENTIFIER,text:e.raw}}return e},nP=(e,t,n)=>{if(e.type===r.RESERVED_FUNCTION_NAME){let o=nb(n,t);if(!o||!nU(o))return{...e,type:r.RESERVED_KEYWORD}}return e},ny=(e,t,n)=>{if(e.type===r.IDENTIFIER){let o=nb(n,t);if(o&&nw(o))return{...e,type:r.ARRAY_IDENTIFIER}}return e},nD=(e,t,n)=>{if(e.type===r.RESERVED_KEYWORD){let o=nb(n,t);if(o&&nw(o))return{...e,type:r.ARRAY_KEYWORD}}return e},nM=(e,t)=>nb(e,t,-1),nb=(e,t,n=1)=>{let r=1;for(;e[t+r*n]&&nx(e[t+r*n]);)r++;return e[t+r*n]},nU=e=>e.type===r.OPEN_PAREN&&"("===e.text,nw=e=>e.type===r.OPEN_PAREN&&"["===e.text,nx=e=>e.type===r.BLOCK_COMMENT||e.type===r.LINE_COMMENT;class nG{index=0;tokens=[];input="";constructor(e){this.tokenize=e}reset(e,t){this.input=e,this.index=0,this.tokens=this.tokenize(e)}next(){return this.tokens[this.index++]}save(){}formatError(e){let{line:t,col:n}=nT(this.input,e.start);return`Parse error at token: ${e.text} at line ${t} column ${n}`}has(e){return e in r}}function nF(e){return e[0]}(s=o||(o={})).statement="statement",s.clause="clause",s.set_operation="set_operation",s.function_call="function_call",s.array_subscript="array_subscript",s.property_access="property_access",s.parenthesis="parenthesis",s.between_predicate="between_predicate",s.case_expression="case_expression",s.case_when="case_when",s.case_else="case_else",s.limit_clause="limit_clause",s.all_columns_asterisk="all_columns_asterisk",s.literal="literal",s.identifier="identifier",s.keyword="keyword",s.parameter="parameter",s.operator="operator",s.comma="comma",s.line_comment="line_comment",s.block_comment="block_comment";let nH=new nG(e=>[]),nB=e=>({type:o.keyword,tokenType:e.type,text:e.text,raw:e.raw}),nY=(e,{leading:t,trailing:n})=>(null!=t&&t.length&&(e={...e,leadingComments:t}),null!=n&&n.length&&(e={...e,trailingComments:n}),e),nk=(e,{leading:t,trailing:n})=>{if(null!=t&&t.length){let[n,...r]=e;e=[nY(n,{leading:t}),...r]}if(null!=n&&n.length){let t=e.slice(0,-1),r=e[e.length-1];e=[...t,nY(r,{trailing:n})]}return e},nV={Lexer:nH,ParserRules:[{name:"main$ebnf$1",symbols:[]},{name:"main$ebnf$1",symbols:["main$ebnf$1","statement"],postprocess:e=>e[0].concat([e[1]])},{name:"main",symbols:["main$ebnf$1"],postprocess:([e])=>{let t=e[e.length-1];return t&&!t.hasSemicolon?t.children.length>0?e:e.slice(0,-1):e}},{name:"statement$subexpression$1",symbols:[nH.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[nH.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([e,[t]])=>({type:o.statement,children:e,hasSemicolon:t.type===r.DELIMITER})},{name:"expressions_or_clauses$ebnf$1",symbols:[]},{name:"expressions_or_clauses$ebnf$1",symbols:["expressions_or_clauses$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses$ebnf$2",symbols:[]},{name:"expressions_or_clauses$ebnf$2",symbols:["expressions_or_clauses$ebnf$2","clause"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses",symbols:["expressions_or_clauses$ebnf$1","expressions_or_clauses$ebnf$2"],postprocess:([e,t])=>[...e,...t]},{name:"clause$subexpression$1",symbols:["limit_clause"]},{name:"clause$subexpression$1",symbols:["select_clause"]},{name:"clause$subexpression$1",symbols:["other_clause"]},{name:"clause$subexpression$1",symbols:["set_operation"]},{name:"clause",symbols:["clause$subexpression$1"],postprocess:([[e]])=>e},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["free_form_sql"]},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"limit_clause$ebnf$1$subexpression$1",symbols:[nH.has("COMMA")?{type:"COMMA"}:COMMA,"limit_clause$ebnf$1$subexpression$1$ebnf$1"]},{name:"limit_clause$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1"],postprocess:nF},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[nH.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([e,t,n,r])=>{if(!r)return{type:o.limit_clause,limitKw:nY(nB(e),{trailing:t}),count:n};{let[i,a]=r;return{type:o.limit_clause,limitKw:nY(nB(e),{trailing:t}),offset:n,count:a}}}},{name:"select_clause$subexpression$1$ebnf$1",symbols:[]},{name:"select_clause$subexpression$1$ebnf$1",symbols:["select_clause$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["all_columns_asterisk","select_clause$subexpression$1$ebnf$1"]},{name:"select_clause$subexpression$1$ebnf$2",symbols:[]},{name:"select_clause$subexpression$1$ebnf$2",symbols:["select_clause$subexpression$1$ebnf$2","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["asteriskless_free_form_sql","select_clause$subexpression$1$ebnf$2"]},{name:"select_clause",symbols:[nH.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([e,[t,n]])=>({type:o.clause,nameKw:nB(e),children:[t,...n]})},{name:"select_clause",symbols:[nH.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([e])=>({type:o.clause,nameKw:nB(e),children:[]})},{name:"all_columns_asterisk",symbols:[nH.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:o.all_columns_asterisk})},{name:"other_clause$ebnf$1",symbols:[]},{name:"other_clause$ebnf$1",symbols:["other_clause$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"other_clause",symbols:[nH.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([e,t])=>({type:o.clause,nameKw:nB(e),children:t})},{name:"set_operation$ebnf$1",symbols:[]},{name:"set_operation$ebnf$1",symbols:["set_operation$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"set_operation",symbols:[nH.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([e,t])=>({type:o.set_operation,nameKw:nB(e),children:t})},{name:"expression_chain_$ebnf$1",symbols:["expression_with_comments_"]},{name:"expression_chain_$ebnf$1",symbols:["expression_chain_$ebnf$1","expression_with_comments_"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain_",symbols:["expression_chain_$ebnf$1"],postprocess:nF},{name:"expression_chain$ebnf$1",symbols:[]},{name:"expression_chain$ebnf$1",symbols:["expression_chain$ebnf$1","_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain",symbols:["expression","expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"andless_expression_chain$ebnf$1",symbols:[]},{name:"andless_expression_chain$ebnf$1",symbols:["andless_expression_chain$ebnf$1","_andless_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"andless_expression_chain",symbols:["andless_expression","andless_expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([e,t])=>nY(e,{trailing:t})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([e,t])=>nY(t,{leading:e})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([e,t])=>nY(t,{leading:e})},{name:"free_form_sql$subexpression$1",symbols:["asteriskless_free_form_sql"]},{name:"free_form_sql$subexpression$1",symbols:["asterisk"]},{name:"free_form_sql",symbols:["free_form_sql$subexpression$1"],postprocess:([[e]])=>e},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["logic_operator"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comma"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comment"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["other_keyword"]},{name:"asteriskless_free_form_sql",symbols:["asteriskless_free_form_sql$subexpression$1"],postprocess:([[e]])=>e},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:([[e]])=>e},{name:"andless_expression$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"andless_expression$subexpression$1",symbols:["asterisk"]},{name:"andless_expression",symbols:["andless_expression$subexpression$1"],postprocess:([[e]])=>e},{name:"asteriskless_andless_expression$subexpression$1",symbols:["array_subscript"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["function_call"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["property_access"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["parenthesis"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["curly_braces"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["square_brackets"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["operator"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["identifier"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["parameter"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["literal"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["keyword"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:([[e]])=>e},{name:"array_subscript",symbols:[nH.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([e,t,n])=>({type:o.array_subscript,array:nY({type:o.identifier,text:e.text},{trailing:t}),parenthesis:n})},{name:"array_subscript",symbols:[nH.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([e,t,n])=>({type:o.array_subscript,array:nY(nB(e),{trailing:t}),parenthesis:n})},{name:"function_call",symbols:[nH.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([e,t,n])=>({type:o.function_call,nameKw:nY(nB(e),{trailing:t}),parenthesis:n})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"(",closeParen:")"})},{name:"curly_braces$ebnf$1",symbols:[]},{name:"curly_braces$ebnf$1",symbols:["curly_braces$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"curly_braces",symbols:[{literal:"{"},"curly_braces$ebnf$1",{literal:"}"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"{",closeParen:"}"})},{name:"square_brackets$ebnf$1",symbols:[]},{name:"square_brackets$ebnf$1",symbols:["square_brackets$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"square_brackets",symbols:[{literal:"["},"square_brackets$ebnf$1",{literal:"]"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"[",closeParen:"]"})},{name:"property_access$subexpression$1",symbols:["identifier"]},{name:"property_access$subexpression$1",symbols:["array_subscript"]},{name:"property_access$subexpression$1",symbols:["all_columns_asterisk"]},{name:"property_access",symbols:["expression","_",nH.has("DOT")?{type:"DOT"}:DOT,"_","property_access$subexpression$1"],postprocess:([e,t,n,r,[i]])=>({type:o.property_access,object:nY(e,{trailing:t}),property:nY(i,{leading:r})})},{name:"between_predicate",symbols:[nH.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",nH.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([e,t,n,r,i,a,s])=>({type:o.between_predicate,betweenKw:nB(e),expr1:nk(n,{leading:t,trailing:r}),andKw:nB(i),expr2:[nY(s,{leading:a})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:nF},{name:"case_expression$ebnf$1",symbols:[],postprocess:()=>null},{name:"case_expression$ebnf$2",symbols:[]},{name:"case_expression$ebnf$2",symbols:["case_expression$ebnf$2","case_clause"],postprocess:e=>e[0].concat([e[1]])},{name:"case_expression",symbols:[nH.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",nH.has("END")?{type:"END"}:END],postprocess:([e,t,n,r,i])=>({type:o.case_expression,caseKw:nY(nB(e),{trailing:t}),endKw:nB(i),expr:n||[],clauses:r})},{name:"case_clause",symbols:[nH.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",nH.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([e,t,n,r,i,a])=>({type:o.case_when,whenKw:nY(nB(e),{trailing:t}),thenKw:nY(nB(r),{trailing:i}),condition:n,result:a})},{name:"case_clause",symbols:[nH.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([e,t,n])=>({type:o.case_else,elseKw:nY(nB(e),{trailing:t}),result:n})},{name:"comma$subexpression$1",symbols:[nH.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[e]])=>({type:o.comma})},{name:"asterisk$subexpression$1",symbols:[nH.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[e]])=>({type:o.operator,text:e.text})},{name:"operator$subexpression$1",symbols:[nH.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[e]])=>({type:o.operator,text:e.text})},{name:"identifier$subexpression$1",symbols:[nH.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[nH.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[nH.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[e]])=>({type:o.identifier,text:e.text})},{name:"parameter$subexpression$1",symbols:[nH.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nH.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nH.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nH.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nH.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[e]])=>({type:o.parameter,key:e.key,text:e.text})},{name:"literal$subexpression$1",symbols:[nH.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[nH.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[e]])=>({type:o.literal,text:e.text})},{name:"keyword$subexpression$1",symbols:[nH.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[nH.has("RESERVED_PHRASE")?{type:"RESERVED_PHRASE"}:RESERVED_PHRASE]},{name:"keyword$subexpression$1",symbols:[nH.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[e]])=>nB(e)},{name:"logic_operator$subexpression$1",symbols:[nH.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[nH.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[nH.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[e]])=>nB(e)},{name:"other_keyword$subexpression$1",symbols:[nH.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[nH.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[nH.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[nH.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[e]])=>nB(e)},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","comment"],postprocess:e=>e[0].concat([e[1]])},{name:"_",symbols:["_$ebnf$1"],postprocess:([e])=>e},{name:"comment",symbols:[nH.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([e])=>({type:o.line_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[nH.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([e])=>({type:o.block_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})}],ParserStart:"main"},{Parser:n$,Grammar:nW}=ng,nZ=/^\s+/u;(l=i||(i={}))[l.SPACE=0]="SPACE",l[l.NO_SPACE=1]="NO_SPACE",l[l.NO_NEWLINE=2]="NO_NEWLINE",l[l.NEWLINE=3]="NEWLINE",l[l.MANDATORY_NEWLINE=4]="MANDATORY_NEWLINE",l[l.INDENT=5]="INDENT",l[l.SINGLE_INDENT=6]="SINGLE_INDENT";class nj{items=[];constructor(e){this.indentation=e}add(...e){for(let t of e)switch(t){case i.SPACE:this.items.push(i.SPACE);break;case i.NO_SPACE:this.trimHorizontalWhitespace();break;case i.NO_NEWLINE:this.trimWhitespace();break;case i.NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(i.NEWLINE);break;case i.MANDATORY_NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(i.MANDATORY_NEWLINE);break;case i.INDENT:this.addIndentation();break;case i.SINGLE_INDENT:this.items.push(i.SINGLE_INDENT);break;default:this.items.push(t)}}trimHorizontalWhitespace(){for(;nX(m(this.items));)this.items.pop()}trimWhitespace(){for(;nK(m(this.items));)this.items.pop()}addNewline(e){if(this.items.length>0)switch(m(this.items)){case i.NEWLINE:this.items.pop(),this.items.push(e);break;case i.MANDATORY_NEWLINE:break;default:this.items.push(e)}}addIndentation(){for(let e=0;ethis.itemToString(e)).join("")}getLayoutItems(){return this.items}itemToString(e){switch(e){case i.SPACE:return" ";case i.NEWLINE:case i.MANDATORY_NEWLINE:return"\n";case i.SINGLE_INDENT:return this.indentation.getSingleIndent();default:return e}}}let nX=e=>e===i.SPACE||e===i.SINGLE_INDENT,nK=e=>e===i.SPACE||e===i.SINGLE_INDENT||e===i.NEWLINE,nz="top-level";class nJ{indentTypes=[];constructor(e){this.indent=e}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(nz)}increaseBlockLevel(){this.indentTypes.push("block-level")}decreaseTopLevel(){this.indentTypes.length>0&&m(this.indentTypes)===nz&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0;){let e=this.indentTypes.pop();if(e!==nz)break}}}class nq extends nj{length=0;trailingSpace=!1;constructor(e){super(new nJ("")),this.expressionWidth=e}add(...e){if(e.forEach(e=>this.addToLength(e)),this.length>this.expressionWidth)throw new nQ;super.add(...e)}addToLength(e){if("string"==typeof e)this.length+=e.length,this.trailingSpace=!1;else if(e===i.MANDATORY_NEWLINE||e===i.NEWLINE)throw new nQ;else e===i.INDENT||e===i.SINGLE_INDENT||e===i.SPACE?this.trailingSpace||(this.length++,this.trailingSpace=!0):(e===i.NO_NEWLINE||e===i.NO_SPACE)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}class nQ extends Error{}class n0{inline=!1;nodes=[];index=-1;constructor({cfg:e,dialectCfg:t,params:n,layout:r,inline:o=!1}){this.cfg=e,this.dialectCfg=t,this.inline=o,this.params=n,this.layout=r}format(e){for(this.nodes=e,this.index=0;this.index{this.layout.add(this.showKw(e.nameKw))}),this.formatNode(e.parenthesis)}formatArraySubscript(e){this.withComments(e.array,()=>{this.layout.add(e.array.type===o.keyword?this.showKw(e.array):e.array.text)}),this.formatNode(e.parenthesis)}formatPropertyAccess(e){this.formatNode(e.object),this.layout.add(i.NO_SPACE,"."),this.formatNode(e.property)}formatParenthesis(e){let t=this.formatInlineExpression(e.children);t?(this.layout.add(e.openParen),this.layout.add(...t.getLayoutItems()),this.layout.add(i.NO_SPACE,e.closeParen,i.SPACE)):(this.layout.add(e.openParen,i.NEWLINE),nC(this.cfg)?(this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(i.NEWLINE,i.INDENT,e.closeParen,i.SPACE))}formatBetweenPredicate(e){this.layout.add(this.showKw(e.betweenKw),i.SPACE),this.layout=this.formatSubExpression(e.expr1),this.layout.add(i.NO_SPACE,i.SPACE,this.showNonTabularKw(e.andKw),i.SPACE),this.layout=this.formatSubExpression(e.expr2),this.layout.add(i.SPACE)}formatCaseExpression(e){this.formatNode(e.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(e.expr),this.layout=this.formatSubExpression(e.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.endKw)}formatCaseWhen(e){this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.whenKw),this.layout=this.formatSubExpression(e.condition),this.formatNode(e.thenKw),this.layout=this.formatSubExpression(e.result)}formatCaseElse(e){this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.elseKw),this.layout=this.formatSubExpression(e.result)}formatClause(e){this.isOnelineClause(e)?this.formatClauseInOnelineStyle(e):nC(this.cfg)?this.formatClauseInTabularStyle(e):this.formatClauseInIndentedStyle(e)}isOnelineClause(e){return this.dialectCfg.onelineClauses[e.nameKw.text]}formatClauseInIndentedStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.NEWLINE),this.layout.indentation.increaseTopLevel(),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.SPACE),this.layout=this.formatSubExpression(e.children)}formatClauseInTabularStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.SPACE),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.NEWLINE),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children)}formatLimitClause(e){this.withComments(e.limitKw,()=>{this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.limitKw))}),this.layout.indentation.increaseTopLevel(),nC(this.cfg)?this.layout.add(i.SPACE):this.layout.add(i.NEWLINE,i.INDENT),e.offset&&(this.layout=this.formatSubExpression(e.offset),this.layout.add(i.NO_SPACE,",",i.SPACE)),this.layout=this.formatSubExpression(e.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(e){this.layout.add("*",i.SPACE)}formatLiteral(e){this.layout.add(e.text,i.SPACE)}formatIdentifier(e){this.layout.add(e.text,i.SPACE)}formatParameter(e){this.layout.add(this.params.get(e),i.SPACE)}formatOperator({text:e}){this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(e)?this.layout.add(i.NO_SPACE,e):":"===e?this.layout.add(i.NO_SPACE,e,i.SPACE):this.layout.add(e,i.SPACE)}formatComma(e){this.inline?this.layout.add(i.NO_SPACE,",",i.SPACE):this.layout.add(i.NO_SPACE,",",i.NEWLINE,i.INDENT)}withComments(e,t){this.formatComments(e.leadingComments),t(),this.formatComments(e.trailingComments)}formatComments(e){e&&e.forEach(e=>{e.type===o.line_comment?this.formatLineComment(e):this.formatBlockComment(e)})}formatLineComment(e){P(e.precedingWhitespace||"")?this.layout.add(i.NEWLINE,i.INDENT,e.text,i.MANDATORY_NEWLINE,i.INDENT):this.layout.getLayoutItems().length>0?this.layout.add(i.NO_NEWLINE,i.SPACE,e.text,i.MANDATORY_NEWLINE,i.INDENT):this.layout.add(e.text,i.MANDATORY_NEWLINE,i.INDENT)}formatBlockComment(e){this.isMultilineBlockComment(e)?(this.splitBlockComment(e.text).forEach(e=>{this.layout.add(i.NEWLINE,i.INDENT,e)}),this.layout.add(i.NEWLINE,i.INDENT)):this.layout.add(e.text,i.SPACE)}isMultilineBlockComment(e){return P(e.text)||P(e.precedingWhitespace||"")}isDocComment(e){let t=e.split(/\n/);return/^\/\*\*?$/.test(t[0])&&t.slice(1,t.length-1).every(e=>/^\s*\*/.test(e))&&/^\s*\*\/$/.test(m(t))}splitBlockComment(e){return this.isDocComment(e)?e.split(/\n/).map(e=>/^\s*\*/.test(e)?" "+e.replace(/^\s*/,""):e):e.split(/\n/).map(e=>e.replace(/^\s*/,""))}formatSubExpression(e){return new n0({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(e)}formatInlineExpression(e){let t=this.params.getPositionalParameterIndex();try{return new n0({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new nq(this.cfg.expressionWidth),inline:!0}).format(e)}catch(e){if(e instanceof nQ){this.params.setPositionalParameterIndex(t);return}throw e}}formatKeywordNode(e){switch(e.tokenType){case r.RESERVED_JOIN:return this.formatJoin(e);case r.AND:case r.OR:case r.XOR:return this.formatLogicalOperator(e);default:return this.formatKeyword(e)}}formatJoin(e){nC(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE)}formatKeyword(e){this.layout.add(this.showKw(e),i.SPACE)}formatLogicalOperator(e){"before"===this.cfg.logicalOperatorNewline?nC(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE):this.layout.add(this.showKw(e),i.NEWLINE,i.INDENT)}showKw(e){var t;return f(t=e.tokenType)||t===r.RESERVED_CLAUSE||t===r.RESERVED_SELECT||t===r.RESERVED_SET_OPERATION||t===r.RESERVED_JOIN||t===r.LIMIT?function(e,t){if("standard"===t)return e;let n=[];return e.length>=10&&e.includes(" ")&&([e,...n]=e.split(" ")),(e="tabularLeft"===t?e.padEnd(9," "):e.padStart(9," "))+["",...n].join(" ")}(this.showNonTabularKw(e),this.cfg.indentStyle):this.showNonTabularKw(e)}showNonTabularKw(e){switch(this.cfg.keywordCase){case"preserve":return g(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}}class n1{constructor(e,t){this.dialect=e,this.cfg=t,this.params=new nL(this.cfg.params)}format(e){let t=this.parse(e),n=this.formatAst(t),r=this.postFormat(n);return r.trimEnd()}parse(e){return(function(e){let t={},n=new nG(n=>[...e.tokenize(n,t).map(nv).map(nP).map(ny).map(nD),c(n.length)]),r=new n$(nW.fromCompiled(nV),{lexer:n});return{parse:(e,n)=>{t=n;let{results:o}=r.feed(e);if(1===o.length)return o[0];if(0===o.length)throw Error("Parse error: Invalid SQL");throw Error(`Parse error: Ambiguous grammar ${JSON.stringify(o,void 0,2)}`)}}})(this.dialect.tokenizer).parse(e,this.cfg.paramTypes||{})}formatAst(e){return e.map(e=>this.formatStatement(e)).join("\n".repeat(this.cfg.linesBetweenQueries+1))}formatStatement(e){let t=new n0({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new nj(new nJ(nm(this.cfg)))}).format(e.children);return e.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?t.add(i.NEWLINE,";"):t.add(i.NO_NEWLINE,";")),t.toString()}postFormat(e){if(this.cfg.tabulateAlias&&(e=function(e){let t=e.split("\n"),n=[];for(let e=0;e({line:e,matches:e.match(/(^.*?\S) (AS )?(\S+,?$)/i)})).map(({line:e,matches:t})=>t?{precedingText:t[1],as:t[2],alias:t[3]}:{precedingText:e}),i=L(o.map(({precedingText:e})=>e.replace(/\s*,\s*$/,"")));n=[...n,...r=o.map(({precedingText:e,as:t,alias:n})=>e+(n?" ".repeat(i-e.length+1)+(t??"")+n:""))]}n.push(t[e])}return n.join("\n")}(e)),"before"===this.cfg.commaPosition||"tabular"===this.cfg.commaPosition){var t,n,r;t=e,n=this.cfg.commaPosition,r=nm(this.cfg),e=(function(e){let t=[];for(let n=0;n{if(1===e.length)return e;if("tabular"===n)return function(e){let t=L(e.map(e=>e.replace(/\s*--.*/,"")))-1;return e.map((n,r)=>r===e.length-1?n:function(e,t){let[,n,r]=e.match(/^(.*?),(\s*--.*)?$/)||[],o=" ".repeat(t-n.length);return`${n}${o},${r??""}`}(n,t))}(e);if("before"===n)return e.map(e=>e.replace(/,(\s*(--.*)?$)/,"$1")).map((e,t)=>{if(0===t)return e;let[n]=e.match(nZ)||[""];return n.replace(RegExp(r+"$"),"")+r.replace(/ {2}$/,", ")+e.trimStart()});throw Error(`Unexpected commaPosition: ${n}`)}).join("\n")}return e}}class n2 extends Error{}let n4={bigquery:"bigquery",db2:"db2",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},n6=Object.keys(n4),n3={tabWidth:2,useTabs:!1,keywordCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",tabulateAlias:!1,commaPosition:"after",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},n8=(e,t={})=>{if("string"==typeof t.language&&!n6.includes(t.language))throw new n2(`Unsupported SQL dialect: ${t.language}`);let n=n4[t.language||"sql"];return n5(e,{...t,dialect:E[n]})},n5=(e,{dialect:t,...n})=>{if("string"!=typeof e)throw Error("Invalid query argument. Expected string, instead got "+typeof e);let r=function(e){if("multilineLists"in e)throw new n2("multilineLists config is no more supported.");if("newlineBeforeOpenParen"in e)throw new n2("newlineBeforeOpenParen config is no more supported.");if("newlineBeforeCloseParen"in e)throw new n2("newlineBeforeCloseParen config is no more supported.");if("aliasAs"in e)throw new n2("aliasAs config is no more supported.");if(e.expressionWidth<=0)throw new n2(`expressionWidth config must be positive number. Received ${e.expressionWidth} instead.`);if("before"===e.commaPosition&&e.useTabs)throw new n2("commaPosition: before does not work when tabs are used for indentation.");return e.params&&!function(e){let t=e instanceof Array?e:Object.values(e);return t.every(e=>"string"==typeof e)}(e.params)&&console.warn('WARNING: All "params" option values should be strings.'),e}({...n3,...n});return new n1(nI(t),r).format(e)};var n7=n(19284),n9=n(25519);function re(){var e;let t=null!==(e=localStorage.getItem(n9.rU))&&void 0!==e?e:"";try{let e=JSON.parse(t);return e}catch(e){return null}}function rt(){try{var e;let t=JSON.parse(null!==(e=localStorage.getItem(n9.C9))&&void 0!==e?e:"").user_id;return t}catch(e){return}}var rn=n(83454);let rr="__db_gpt_im_key",ro="__db_gpt_static_flow_nodes_key";function ri(e,t){if(!e)return"";try{return n8(e,{language:t})}catch(t){return e}}let ra=e=>{try{if(!e.startsWith("dbgpt-fs://"))return e;let t=new URL(e);if("dbgpt-fs:"!==t.protocol)return e;let n=t.pathname.split("/").filter(Boolean);if(n.length<2)return e;let r=n[0],o=n[1];return"".concat(rn.env.API_BASE_URL||"","/api/v2/serve/file/files/").concat(r,"/").concat(o).concat(t.search)}catch(t){return console.error("Error transforming file URL:",t),e}},rs=e=>{if(!e||"undefined"===e||"null"===e)return[];try{let t="string"==typeof e?JSON.parse(e):e;if(t&&!Array.isArray(t)&&"object"==typeof t){if(t.file_name||t.file_path){let e=t.file_name||"",n=t.file_path||t.url||"",r=/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(e),o=/\.(mp3|wav|ogg|aac|flac|m4a)$/i.test(e),i=/\.(mp4|webm|mov|avi|wmv|flv|mkv)$/i.test(e);t=r?[{type:"image_url",image_url:{url:n,fileName:e}}]:o?[{type:"audio_url",audio_url:{url:n,file_name:e}}]:i?[{type:"video_url",video_url:{url:n,file_name:e}}]:[{type:"file_url",file_url:{url:n,file_name:e}}]}else t=[t]}else if(!Array.isArray(t))return[];return t}catch(e){return console.error("Parse resourceValue error:",e),[]}}},90833:function(){},80864:function(){},77663:function(e){!function(){var t={229:function(e){var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],E=!1,c=-1;function u(){E&&r&&(E=!1,r.length?l=r.concat(l):c=-1,l.length&&T())}function T(){if(!E){var e=s(u);E=!0;for(var t=l.length;t;){for(r=l,l=[];++c1)for(var n=1;n1?t-1:0),r=1;r=i)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}}):e}function x(e,t){return!!(null==e||"array"===t&&Array.isArray(e)&&!e.length)||("string"===t||"url"===t||"hex"===t||"email"===t||"date"===t||"pattern"===t)&&"string"==typeof e&&!e}function G(e,t,n){var r=0,o=e.length;!function i(a){if(a&&a.length){n(a);return}var s=r;r+=1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},W={integer:function(e){return W.number(e)&&parseInt(e,10)===e},float:function(e){return W.number(e)&&!W.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return new RegExp(e),!0}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(0,C.Z)(e)&&!W.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match($.email)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(V())},hex:function(e){return"string"==typeof e&&!!e.match($.hex)}},Z={required:k,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(w(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t){k(e,t,n,r,o);return}var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?W[i](t)||r.push(w(o.messages.types[i],e.fullField,e.type)):i&&(0,C.Z)(t)!==e.type&&r.push(w(o.messages.types[i],e.fullField,e.type))},range:function(e,t,n,r,o){var i="number"==typeof e.len,a="number"==typeof e.min,s="number"==typeof e.max,l=t,E=null,c="number"==typeof t,u="string"==typeof t,T=Array.isArray(t);if(c?E="number":u?E="string":T&&(E="array"),!E)return!1;T&&(l=t.length),u&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?l!==e.len&&r.push(w(o.messages[E].len,e.fullField,e.len)):a&&!s&&le.max?r.push(w(o.messages[E].max,e.fullField,e.max)):a&&s&&(le.max)&&r.push(w(o.messages[E].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e[Y]=Array.isArray(e[Y])?e[Y]:[],-1===e[Y].indexOf(t)&&r.push(w(o.messages[Y],e.fullField,e[Y].join(", ")))},pattern:function(e,t,n,r,o){!e.pattern||(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(w(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||r.push(w(o.messages.pattern.mismatch,e.fullField,t,e.pattern)))}},j=function(e,t,n,r,o){var i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t,i)&&!e.required)return n();Z.required(e,t,r,a,o,i),x(t,i)||Z.type(e,t,r,a,o)}n(a)},X={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t,"string")&&!e.required)return n();Z.required(e,t,r,i,o,"string"),x(t,"string")||(Z.type(e,t,r,i,o),Z.range(e,t,r,i,o),Z.pattern(e,t,r,i,o),!0===e.whitespace&&Z.whitespace(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&Z.type(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&(Z.type(e,t,r,i,o),Z.range(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&Z.type(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),x(t)||Z.type(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&(Z.type(e,t,r,i,o),Z.range(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&(Z.type(e,t,r,i,o),Z.range(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();Z.required(e,t,r,i,o,"array"),null!=t&&(Z.type(e,t,r,i,o),Z.range(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&Z.type(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o),void 0!==t&&Z.enum(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t,"string")&&!e.required)return n();Z.required(e,t,r,i,o),x(t,"string")||Z.pattern(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t,"date")&&!e.required)return n();Z.required(e,t,r,a,o),!x(t,"date")&&(i=t instanceof Date?t:new Date(t),Z.type(e,i,r,a,o),i&&Z.range(e,i.getTime(),r,a,o))}n(a)},url:j,hex:j,email:j,required:function(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":(0,C.Z)(t);Z.required(e,t,r,i,o,a),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(x(t)&&!e.required)return n();Z.required(e,t,r,i,o)}n(i)}},K=function(){function e(t){(0,u.Z)(this,e),(0,A.Z)(this,"rules",null),(0,A.Z)(this,"_messages",g),this.define(t)}return(0,T.Z)(e,[{key:"define",value:function(e){var t=this;if(!e)throw Error("Cannot configure a schema with no rules");if("object"!==(0,C.Z)(e)||Array.isArray(e))throw Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})}},{key:"messages",value:function(e){return e&&(this._messages=B(L(),e)),this._messages}},{key:"validate",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=t,a=r,s=o;if("function"==typeof a&&(s=a,a={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(null,i),Promise.resolve(i);if(a.messages){var l=this.messages();l===g&&(l=L()),B(l,a.messages),a.messages=l}else a.messages=this.messages();var u={};(a.keys||Object.keys(this.rules)).forEach(function(e){var r=n.rules[e],o=i[e];r.forEach(function(r){var a=r;"function"==typeof a.transform&&(i===t&&(i=(0,E.Z)({},i)),null!=(o=i[e]=a.transform(o))&&(a.type=a.type||(Array.isArray(o)?"array":(0,C.Z)(o)))),(a="function"==typeof a?{validator:a}:(0,E.Z)({},a)).validator=n.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=n.getType(a),u[e]=u[e]||[],u[e].push({rule:a,value:o,source:i,field:e}))})});var T={};return function(e,t,n,r,o){if(t.first){var i=new Promise(function(t,i){var a;G((a=[],Object.keys(e).forEach(function(t){a.push.apply(a,(0,c.Z)(e[t]||[]))}),a),n,function(e){return r(e),e.length?i(new F(e,U(e))):t(o)})});return i.catch(function(e){return e}),i}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,E=0,u=[],T=new Promise(function(t,i){var T=function(e){if(u.push.apply(u,e),++E===l)return r(u),u.length?i(new F(u,U(u))):t(o)};s.length||(r(u),t(o)),s.forEach(function(t){var r=e[t];-1!==a.indexOf(t)?G(r,n,T):function(e,t,n){var r=[],o=0,i=e.length;function a(e){r.push.apply(r,(0,c.Z)(e||[])),++o===i&&n(r)}e.forEach(function(e){t(e,a)})}(r,n,T)})});return T.catch(function(e){return e}),T}(u,a,function(t,n){var r,o,s,l=t.rule,u=("object"===l.type||"array"===l.type)&&("object"===(0,C.Z)(l.fields)||"object"===(0,C.Z)(l.defaultField));function d(e,t){return(0,E.Z)((0,E.Z)({},t),{},{fullField:"".concat(l.fullField,".").concat(e),fullFields:l.fullFields?[].concat((0,c.Z)(l.fullFields),[e]):[e]})}function R(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=Array.isArray(r)?r:[r];!a.suppressWarning&&o.length&&e.warning("async-validator:",o),o.length&&void 0!==l.message&&(o=[].concat(l.message));var s=o.map(H(l,i));if(a.first&&s.length)return T[l.field]=1,n(s);if(u){if(l.required&&!t.value)return void 0!==l.message?s=[].concat(l.message).map(H(l,i)):a.error&&(s=[a.error(l,w(a.messages.required,l.field))]),n(s);var R={};l.defaultField&&Object.keys(t.value).map(function(e){R[e]=l.defaultField});var f={};Object.keys(R=(0,E.Z)((0,E.Z)({},R),t.rule.fields)).forEach(function(e){var t=R[e],n=Array.isArray(t)?t:[t];f[e]=n.map(d.bind(null,e))});var A=new e(f);A.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),A.validate(t.value,t.rule.options||a,function(e){var t=[];s&&s.length&&t.push.apply(t,(0,c.Z)(s)),e&&e.length&&t.push.apply(t,(0,c.Z)(e)),n(t.length?t:null)})}else n(s)}if(u=u&&(l.required||!l.required&&t.value),l.field=t.field,l.asyncValidator)r=l.asyncValidator(l,t.value,R,t.source,a);else if(l.validator){try{r=l.validator(l,t.value,R,t.source,a)}catch(e){null===(o=(s=console).error)||void 0===o||o.call(s,e),a.suppressValidatorError||setTimeout(function(){throw e},0),R(e.message)}!0===r?R():!1===r?R("function"==typeof l.message?l.message(l.fullField||l.field):l.message||"".concat(l.fullField||l.field," fails")):r instanceof Array?R(r):r instanceof Error&&R(r.message)}r&&r.then&&r.then(function(){return R()},function(e){return R(e)})},function(e){!function(e){for(var t=[],n={},r=0;r2&&void 0!==arguments[2]&&arguments[2];return e&&e.some(function(e){return el(t,e,n)})}function el(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!e&&!!t&&(!!n||e.length===t.length)&&t.every(function(t,n){return e[n]===t})}function eE(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,C.Z)(t.target)&&e in t.target?t.target[e]:t}function ec(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat((0,c.Z)(e.slice(0,n)),[o],(0,c.Z)(e.slice(n,t)),(0,c.Z)(e.slice(t+1,r))):i<0?[].concat((0,c.Z)(e.slice(0,t)),(0,c.Z)(e.slice(t+1,n+1)),[o],(0,c.Z)(e.slice(n+1,r))):e}var eu=["name"],eT=[];function ed(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var eR=function(e){(0,R.Z)(n,e);var t=(0,f.Z)(n);function n(e){var r;return(0,u.Z)(this,n),r=t.call(this,e),(0,A.Z)((0,d.Z)(r),"state",{resetCount:0}),(0,A.Z)((0,d.Z)(r),"cancelRegisterFunc",null),(0,A.Z)((0,d.Z)(r),"mounted",!1),(0,A.Z)((0,d.Z)(r),"touched",!1),(0,A.Z)((0,d.Z)(r),"dirty",!1),(0,A.Z)((0,d.Z)(r),"validatePromise",void 0),(0,A.Z)((0,d.Z)(r),"prevValidating",void 0),(0,A.Z)((0,d.Z)(r),"errors",eT),(0,A.Z)((0,d.Z)(r),"warnings",eT),(0,A.Z)((0,d.Z)(r),"cancelRegister",function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,ei(o)),r.cancelRegisterFunc=null}),(0,A.Z)((0,d.Z)(r),"getNamePath",function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName,o=void 0===n?[]:n;return void 0!==t?[].concat((0,c.Z)(o),(0,c.Z)(t)):[]}),(0,A.Z)((0,d.Z)(r),"getRules",function(){var e=r.props,t=e.rules,n=e.fieldContext;return(void 0===t?[]:t).map(function(e){return"function"==typeof e?e(n):e})}),(0,A.Z)((0,d.Z)(r),"refresh",function(){r.mounted&&r.setState(function(e){return{resetCount:e.resetCount+1}})}),(0,A.Z)((0,d.Z)(r),"metaCache",null),(0,A.Z)((0,d.Z)(r),"triggerMetaEvent",function(e){var t=r.props.onMetaChange;if(t){var n=(0,E.Z)((0,E.Z)({},r.getMeta()),{},{destroy:e});(0,O.Z)(r.metaCache,n)||t(n),r.metaCache=n}else r.metaCache=null}),(0,A.Z)((0,d.Z)(r),"onStoreChange",function(e,t,n){var o=r.props,i=o.shouldUpdate,a=o.dependencies,s=void 0===a?[]:a,l=o.onReset,E=n.store,c=r.getNamePath(),u=r.getValue(e),T=r.getValue(E),d=t&&es(t,c);switch("valueUpdate"!==n.type||"external"!==n.source||(0,O.Z)(u,T)||(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=eT,r.warnings=eT,r.triggerMetaEvent()),n.type){case"reset":if(!t||d){r.touched=!1,r.dirty=!1,r.validatePromise=void 0,r.errors=eT,r.warnings=eT,r.triggerMetaEvent(),null==l||l(),r.refresh();return}break;case"remove":if(i&&ed(i,e,E,u,T,n)){r.reRender();return}break;case"setField":var R=n.data;if(d){"touched"in R&&(r.touched=R.touched),"validating"in R&&!("originRCField"in R)&&(r.validatePromise=R.validating?Promise.resolve([]):null),"errors"in R&&(r.errors=R.errors||eT),"warnings"in R&&(r.warnings=R.warnings||eT),r.dirty=!0,r.triggerMetaEvent(),r.reRender();return}if("value"in R&&es(t,c,!0)||i&&!c.length&&ed(i,e,E,u,T,n)){r.reRender();return}break;case"dependenciesUpdate":if(s.map(ei).some(function(e){return es(n.relatedFields,e)})){r.reRender();return}break;default:if(d||(!s.length||c.length||i)&&ed(i,e,E,u,T,n)){r.reRender();return}}!0===i&&r.reRender()}),(0,A.Z)((0,d.Z)(r),"validateRules",function(e){var t=r.getNamePath(),n=r.getValue(),o=e||{},i=o.triggerName,a=o.validateOnly,u=Promise.resolve().then((0,l.Z)((0,s.Z)().mark(function o(){var a,T,d,R,f,A,S;return(0,s.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r.mounted){o.next=2;break}return o.abrupt("return",[]);case 2:if(d=void 0!==(T=(a=r.props).validateFirst)&&T,R=a.messageVariables,f=a.validateDebounce,A=r.getRules(),i&&(A=A.filter(function(e){return e}).filter(function(e){var t=e.validateTrigger;return!t||m(t).includes(i)})),!(f&&i)){o.next=10;break}return o.next=8,new Promise(function(e){setTimeout(e,f)});case 8:if(!(r.validatePromise!==u)){o.next=10;break}return o.abrupt("return",[]);case 10:return(S=function(e,t,n,r,o,i){var a,c,u=e.join("."),T=n.map(function(e,t){var n=e.validator,r=(0,E.Z)((0,E.Z)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,i=n(e,t,function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:eT;if(r.validatePromise===u){r.validatePromise=null;var t,n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,function(e){var t=e.rule.warningOnly,r=e.errors,i=void 0===r?eT:r;t?o.push.apply(o,(0,c.Z)(i)):n.push.apply(n,(0,c.Z)(i))}),r.errors=n,r.warnings=o,r.triggerMetaEvent(),r.reRender()}}),o.abrupt("return",S);case 13:case"end":return o.stop()}},o)})));return void 0!==a&&a||(r.validatePromise=u,r.dirty=!0,r.errors=eT,r.warnings=eT,r.triggerMetaEvent(),r.reRender()),u}),(0,A.Z)((0,d.Z)(r),"isFieldValidating",function(){return!!r.validatePromise}),(0,A.Z)((0,d.Z)(r),"isFieldTouched",function(){return r.touched}),(0,A.Z)((0,d.Z)(r),"isFieldDirty",function(){return!!r.dirty||void 0!==r.props.initialValue||void 0!==(0,r.props.fieldContext.getInternalHooks(N).getInitialValue)(r.getNamePath())}),(0,A.Z)((0,d.Z)(r),"getErrors",function(){return r.errors}),(0,A.Z)((0,d.Z)(r),"getWarnings",function(){return r.warnings}),(0,A.Z)((0,d.Z)(r),"isListField",function(){return r.props.isListField}),(0,A.Z)((0,d.Z)(r),"isList",function(){return r.props.isList}),(0,A.Z)((0,d.Z)(r),"isPreserve",function(){return r.props.preserve}),(0,A.Z)((0,d.Z)(r),"getMeta",function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath(),validated:null===r.validatePromise}}),(0,A.Z)((0,d.Z)(r),"getOnlyChild",function(e){if("function"==typeof e){var t=r.getMeta();return(0,E.Z)((0,E.Z)({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=(0,S.Z)(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}}),(0,A.Z)((0,d.Z)(r),"getValue",function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return(0,eo.Z)(e||t(!0),n)}),(0,A.Z)((0,d.Z)(r),"getControlled",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.name,o=t.trigger,i=t.validateTrigger,a=t.getValueFromEvent,s=t.normalize,l=t.valuePropName,c=t.getValueProps,u=t.fieldContext,T=void 0!==i?i:u.validateTrigger,d=r.getNamePath(),R=u.getInternalHooks,f=u.getFieldsValue,S=R(N).dispatch,O=r.getValue(),p=c||function(e){return(0,A.Z)({},l,e)},I=e[o],h=void 0!==n?p(O):{},_=(0,E.Z)((0,E.Z)({},e),h);return _[o]=function(){r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var e,t=arguments.length,n=Array(t),o=0;o=0&&t<=n.length?(T.keys=[].concat((0,c.Z)(T.keys.slice(0,t)),[T.id],(0,c.Z)(T.keys.slice(t))),o([].concat((0,c.Z)(n.slice(0,t)),[e],(0,c.Z)(n.slice(t))))):(T.keys=[].concat((0,c.Z)(T.keys),[T.id]),o([].concat((0,c.Z)(n),[e]))),T.id+=1},remove:function(e){var t=a(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(T.keys=T.keys.filter(function(e,t){return!n.has(t)}),o(t.filter(function(e,t){return!n.has(t)})))},move:function(e,t){if(e!==t){var n=a();e<0||e>=n.length||t<0||t>=n.length||(T.keys=ec(T.keys,e,t),o(ec(n,e,t)))}}},t)})))},eS=n(97685),eO="__@field_split__";function ep(e){return e.map(function(e){return"".concat((0,C.Z)(e),":").concat(e)}).join(eO)}var eN=function(){function e(){(0,u.Z)(this,e),(0,A.Z)(this,"kvs",new Map)}return(0,T.Z)(e,[{key:"set",value:function(e,t){this.kvs.set(ep(e),t)}},{key:"get",value:function(e){return this.kvs.get(ep(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(ep(e))}},{key:"map",value:function(e){return(0,c.Z)(this.kvs.entries()).map(function(t){var n=(0,eS.Z)(t,2),r=n[0],o=n[1];return e({key:r.split(eO).map(function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,eS.Z)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o}),value:o})})}},{key:"toJSON",value:function(){var e={};return this.map(function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null}),e}}]),e}(),eI=["name"],eh=(0,T.Z)(function e(t){var n=this;(0,u.Z)(this,e),(0,A.Z)(this,"formHooked",!1),(0,A.Z)(this,"forceRootUpdate",void 0),(0,A.Z)(this,"subscribable",!0),(0,A.Z)(this,"store",{}),(0,A.Z)(this,"fieldEntities",[]),(0,A.Z)(this,"initialValues",{}),(0,A.Z)(this,"callbacks",{}),(0,A.Z)(this,"validateMessages",null),(0,A.Z)(this,"preserve",null),(0,A.Z)(this,"lastValidatePromise",null),(0,A.Z)(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),(0,A.Z)(this,"getInternalHooks",function(e){return e===N?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,p.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),(0,A.Z)(this,"useSubscribe",function(e){n.subscribable=e}),(0,A.Z)(this,"prevWithoutPreserves",null),(0,A.Z)(this,"setInitialValues",function(e,t){if(n.initialValues=e||{},t){var r,o=(0,q.T)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map(function(t){var n=t.key;o=(0,q.Z)(o,n,(0,eo.Z)(e,n))}),n.prevWithoutPreserves=null,n.updateStore(o)}}),(0,A.Z)(this,"destroyForm",function(e){if(e)n.updateStore({});else{var t=new eN;n.getFieldEntities(!0).forEach(function(e){n.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)}),n.prevWithoutPreserves=t}}),(0,A.Z)(this,"getInitialValue",function(e){var t=(0,eo.Z)(n.initialValues,e);return e.length?(0,q.T)(t):t}),(0,A.Z)(this,"setCallbacks",function(e){n.callbacks=e}),(0,A.Z)(this,"setValidateMessages",function(e){n.validateMessages=e}),(0,A.Z)(this,"setPreserve",function(e){n.preserve=e}),(0,A.Z)(this,"watchList",[]),(0,A.Z)(this,"registerWatch",function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter(function(t){return t!==e})}}),(0,A.Z)(this,"notifyWatch",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach(function(n){n(t,r,e)})}}),(0,A.Z)(this,"timeoutId",null),(0,A.Z)(this,"warningUnhooked",function(){}),(0,A.Z)(this,"updateStore",function(e){n.store=e}),(0,A.Z)(this,"getFieldEntities",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter(function(e){return e.getNamePath().length}):n.fieldEntities}),(0,A.Z)(this,"getFieldsMap",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new eN;return n.getFieldEntities(e).forEach(function(e){var n=e.getNamePath();t.set(n,e)}),t}),(0,A.Z)(this,"getFieldEntitiesForNamePathList",function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map(function(e){var n=ei(e);return t.get(n)||{INVALIDATE_NAME_PATH:ei(e)}})}),(0,A.Z)(this,"getFieldsValue",function(e,t){if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===(0,C.Z)(e)&&(i=e.strict,o=e.filter),!0===r&&!o)return n.store;var r,o,i,a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return a.forEach(function(e){var t,n,a,l="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(i){if(null!==(a=e.isList)&&void 0!==a&&a.call(e))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;o?o("getMeta"in e?e.getMeta():null)&&s.push(l):s.push(l)}),ea(n.store,s.map(ei))}),(0,A.Z)(this,"getFieldValue",function(e){n.warningUnhooked();var t=ei(e);return(0,eo.Z)(n.store,t)}),(0,A.Z)(this,"getFieldsError",function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map(function(t,n){return!t||"INVALIDATE_NAME_PATH"in t?{name:ei(e[n]),errors:[],warnings:[]}:{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}})}),(0,A.Z)(this,"getFieldError",function(e){n.warningUnhooked();var t=ei(e);return n.getFieldsError([t])[0].errors}),(0,A.Z)(this,"getFieldWarning",function(e){n.warningUnhooked();var t=ei(e);return n.getFieldsError([t])[0].warnings}),(0,A.Z)(this,"isFieldsTouched",function(){n.warningUnhooked();for(var e,t=arguments.length,r=Array(t),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},r=new eN,o=n.getFieldEntities(!0);o.forEach(function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}}),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach(function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,(0,c.Z)((0,c.Z)(o).map(function(e){return e.entity})))})):e=o,function(e){e.forEach(function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))(0,p.ZP)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=r.get(o);if(i&&i.size>1)(0,p.ZP)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var a=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==a||n.updateStore((0,q.Z)(n.store,o,(0,c.Z)(i)[0].value))}}}})}(e)}),(0,A.Z)(this,"resetFields",function(e){n.warningUnhooked();var t=n.store;if(!e){n.updateStore((0,q.T)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),n.notifyWatch();return}var r=e.map(ei);r.forEach(function(e){var t=n.getInitialValue(e);n.updateStore((0,q.Z)(n.store,e,t))}),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)}),(0,A.Z)(this,"setFields",function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach(function(e){var o=e.name,i=(0,a.Z)(e,eI),s=ei(o);r.push(s),"value"in i&&n.updateStore((0,q.Z)(n.store,s,i.value)),n.notifyObservers(t,[s],{type:"setField",data:e})}),n.notifyWatch(r)}),(0,A.Z)(this,"getFields",function(){return n.getFieldEntities(!0).map(function(e){var t=e.getNamePath(),r=e.getMeta(),o=(0,E.Z)((0,E.Z)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o})}),(0,A.Z)(this,"initEntityValue",function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,eo.Z)(n.store,r)&&n.updateStore((0,q.Z)(n.store,r,t))}}),(0,A.Z)(this,"isMergedPreserve",function(e){var t=void 0!==e?e:n.preserve;return null==t||t}),(0,A.Z)(this,"registerField",function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(t){return t!==e}),!n.isMergedPreserve(o)&&(!r||i.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every(function(e){return!el(e.getNamePath(),t)})){var s=n.store;n.updateStore((0,q.Z)(s,t,a,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}}),(0,A.Z)(this,"dispatch",function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}}),(0,A.Z)(this,"notifyObservers",function(e,t,r){if(n.subscribable){var o=(0,E.Z)((0,E.Z)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(n){(0,n.onStoreChange)(e,t,o)})}else n.forceRootUpdate()}),(0,A.Z)(this,"triggerDependenciesUpdate",function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,c.Z)(r))}),r}),(0,A.Z)(this,"updateValue",function(e,t){var r=ei(e),o=n.store;n.updateStore((0,q.Z)(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var i=n.triggerDependenciesUpdate(o,r),a=n.callbacks.onValuesChange;a&&a(ea(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,c.Z)(i)))}),(0,A.Z)(this,"setFieldsValue",function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,q.T)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),(0,A.Z)(this,"setFieldValue",function(e,t){n.setFields([{name:e,value:t}])}),(0,A.Z)(this,"getDependencyChildrenFields",function(e){var t=new Set,r=[],o=new eN;return n.getFieldEntities().forEach(function(e){(e.props.dependencies||[]).forEach(function(t){var n=ei(t);o.update(n,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t})})}),function e(n){(o.get(n)||new Set).forEach(function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}})}(e),r}),(0,A.Z)(this,"triggerOnFieldsChange",function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new eN;t.forEach(function(e){var t=e.name,n=e.errors;i.set(t,n)}),o.forEach(function(e){e.errors=i.get(e.name)||e.errors})}var a=o.filter(function(t){return es(e,t.name)});a.length&&r(a,o)}}),(0,A.Z)(this,"validateFields",function(e,t){n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(a=e,s=t):s=e;var r,o,i,a,s,l=!!a,u=l?a.map(ei):[],T=[],d=String(Date.now()),R=new Set,f=s||{},A=f.recursive,S=f.dirty;n.getFieldEntities(!0).forEach(function(e){if(l||u.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!S||e.isFieldDirty())){var t=e.getNamePath();if(R.add(t.join(d)),!l||es(u,t,A)){var r=e.validateRules((0,E.Z)({validateMessages:(0,E.Z)((0,E.Z)({},J),n.validateMessages)},s));T.push(r.then(function(){return{name:t,errors:[],warnings:[]}}).catch(function(e){var n,r=[],o=[];return(null===(n=e.forEach)||void 0===n||n.call(e,function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,(0,c.Z)(n)):r.push.apply(r,(0,c.Z)(n))}),r.length)?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}}))}}});var O=(r=!1,o=T.length,i=[],T.length?new Promise(function(e,t){T.forEach(function(n,a){n.catch(function(e){return r=!0,e}).then(function(n){o-=1,i[a]=n,o>0||(r&&t(i),e(i))})})}):Promise.resolve([]));n.lastValidatePromise=O,O.catch(function(e){return e}).then(function(e){var t=e.map(function(e){return e.name});n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)});var p=O.then(function(){return n.lastValidatePromise===O?Promise.resolve(n.getFieldsValue(u)):Promise.reject([])}).catch(function(e){var t=e.filter(function(e){return e&&e.errors.length});return Promise.reject({values:n.getFieldsValue(u),errorFields:t,outOfDate:n.lastValidatePromise!==O})});p.catch(function(e){return e});var N=u.filter(function(e){return R.has(e.join(d))});return n.triggerOnFieldsChange(N),p}),(0,A.Z)(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}}).catch(function(e){var t=n.callbacks.onFinishFailed;t&&t(e)})}),this.forceRootUpdate=t}),e_=function(e){var t=o.useRef(),n=o.useState({}),r=(0,eS.Z)(n,2)[1];if(!t.current){if(e)t.current=e;else{var i=new eh(function(){r({})});t.current=i.getForm()}}return[t.current]},em=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),eC=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,i=e.children,a=o.useContext(em),s=o.useRef({});return o.createElement(em.Provider,{value:(0,E.Z)((0,E.Z)({},a),{},{validateMessages:(0,E.Z)((0,E.Z)({},a.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:s.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=(0,E.Z)((0,E.Z)({},s.current),{},(0,A.Z)({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=(0,E.Z)({},s.current);delete t[e],s.current=t,a.unregisterForm(e)}})},i)},eL=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];function eg(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var ev=function(){},eP=function(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:2;t();var i=(0,q.Z)(function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)});e.current=i},t]},ee=[U,w,x,"end"],et=[U,G];function en(e){return e===x||"end"===e}var er=function(e,t,n){var r=(0,g.Z)(b),o=(0,c.Z)(r,2),i=o[0],a=o[1],s=Q(),l=(0,c.Z)(s,2),E=l[0],u=l[1],T=t?et:ee;return J(function(){if(i!==b&&"end"!==i){var e=T.indexOf(i),t=T[e+1],r=n(i);!1===r?a(t,!0):t&&E(function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)})}},[e,i]),A.useEffect(function(){return function(){u()}},[]),[function(){a(U,!0)},i]},eo=(a=Z,"object"===(0,u.Z)(Z)&&(a=Z.transitionSupport),(s=A.forwardRef(function(e,t){var n=e.visible,r=void 0===n||n,o=e.removeOnLeave,i=void 0===o||o,s=e.forceRender,u=e.children,T=e.motionName,S=e.leavedClassName,O=e.eventProps,N=A.useContext(p).motion,I=!!(e.motionName&&a&&!1!==N),h=(0,A.useRef)(),_=(0,A.useRef)(),m=function(e,t,n,r){var o,i,a,s=r.motionEnter,u=void 0===s||s,T=r.motionAppear,d=void 0===T||T,R=r.motionLeave,f=void 0===R||R,S=r.motionDeadline,O=r.motionLeaveImmediately,p=r.onAppearPrepare,N=r.onEnterPrepare,I=r.onLeavePrepare,h=r.onAppearStart,_=r.onEnterStart,m=r.onLeaveStart,C=r.onAppearActive,b=r.onEnterActive,F=r.onLeaveActive,H=r.onAppearEnd,B=r.onEnterEnd,Y=r.onLeaveEnd,k=r.onVisibleChanged,V=(0,g.Z)(),$=(0,c.Z)(V,2),W=$[0],Z=$[1],j=(o=A.useReducer(function(e){return e+1},0),i=(0,c.Z)(o,2)[1],a=A.useRef(P),[(0,v.Z)(function(){return a.current}),(0,v.Z)(function(e){a.current="function"==typeof e?e(a.current):e,i()})]),X=(0,c.Z)(j,2),K=X[0],q=X[1],Q=(0,g.Z)(null),ee=(0,c.Z)(Q,2),et=ee[0],eo=ee[1],ei=K(),ea=(0,A.useRef)(!1),es=(0,A.useRef)(null),el=(0,A.useRef)(!1);function eE(){q(P),eo(null,!0)}var ec=(0,L.zX)(function(e){var t,r=K();if(r!==P){var o=n();if(!e||e.deadline||e.target===o){var i=el.current;r===y&&i?t=null==H?void 0:H(o,e):r===D&&i?t=null==B?void 0:B(o,e):r===M&&i&&(t=null==Y?void 0:Y(o,e)),i&&!1!==t&&eE()}}}),eu=z(ec),eT=(0,c.Z)(eu,1)[0],ed=function(e){switch(e){case y:return(0,l.Z)((0,l.Z)((0,l.Z)({},U,p),w,h),x,C);case D:return(0,l.Z)((0,l.Z)((0,l.Z)({},U,N),w,_),x,b);case M:return(0,l.Z)((0,l.Z)((0,l.Z)({},U,I),w,m),x,F);default:return{}}},eR=A.useMemo(function(){return ed(ei)},[ei]),ef=er(ei,!e,function(e){if(e===U){var t,r=eR[U];return!!r&&r(n())}return eO in eR&&eo((null===(t=eR[eO])||void 0===t?void 0:t.call(eR,n(),null))||null),eO===x&&ei!==P&&(eT(n()),S>0&&(clearTimeout(es.current),es.current=setTimeout(function(){ec({deadline:!0})},S))),eO===G&&eE(),!0}),eA=(0,c.Z)(ef,2),eS=eA[0],eO=eA[1],ep=en(eO);el.current=ep,J(function(){Z(t);var n,r=ea.current;ea.current=!0,!r&&t&&d&&(n=y),r&&t&&u&&(n=D),(r&&!t&&f||!r&&O&&!t&&f)&&(n=M);var o=ed(n);n&&(e||o[U])?(q(n),eS()):q(P)},[t]),(0,A.useEffect)(function(){(ei!==y||d)&&(ei!==D||u)&&(ei!==M||f)||q(P)},[d,u,f]),(0,A.useEffect)(function(){return function(){ea.current=!1,clearTimeout(es.current)}},[]);var eN=A.useRef(!1);(0,A.useEffect)(function(){W&&(eN.current=!0),void 0!==W&&ei===P&&((eN.current||W)&&(null==k||k(W)),eN.current=!0)},[W,ei]);var eI=et;return eR[U]&&eO===w&&(eI=(0,E.Z)({transition:"none"},eI)),[ei,eO,eI,null!=W?W:t]}(I,r,function(){try{return h.current instanceof HTMLElement?h.current:(0,R.ZP)(_.current)}catch(e){return null}},e),b=(0,c.Z)(m,4),F=b[0],H=b[1],B=b[2],Y=b[3],k=A.useRef(Y);Y&&(k.current=!0);var V=A.useCallback(function(e){h.current=e,(0,f.mH)(t,e)},[t]),$=(0,E.Z)((0,E.Z)({},O),{},{visible:r});if(u){if(F===P)W=Y?u((0,E.Z)({},$),V):!i&&k.current&&S?u((0,E.Z)((0,E.Z)({},$),{},{className:S}),V):!s&&(i||S)?null:u((0,E.Z)((0,E.Z)({},$),{},{style:{display:"none"}}),V);else{H===U?Z="prepare":en(H)?Z="active":H===w&&(Z="start");var W,Z,j=K(T,"".concat(F,"-").concat(Z));W=u((0,E.Z)((0,E.Z)({},$),{},{className:d()(K(T,F),(0,l.Z)((0,l.Z)({},j,j&&Z),T,"string"==typeof T)),style:B}),V)}}else W=null;return A.isValidElement(W)&&(0,f.Yr)(W)&&!W.ref&&(W=A.cloneElement(W,{ref:V})),A.createElement(C,{ref:_},W)})).displayName="CSSMotion",s),ei=n(87462),ea=n(97326),es="keep",el="remove",eE="removed";function ec(e){var t;return t=e&&"object"===(0,u.Z)(e)&&"key"in e?e:{key:e},(0,E.Z)((0,E.Z)({},t),{},{key:String(t.key)})}function eu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(ec)}var eT=["component","children","onVisibleChanged","onAllRemoved"],ed=["status"],eR=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"],ef=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eo,n=function(e){(0,_.Z)(r,e);var n=(0,m.Z)(r);function r(){var e;(0,I.Z)(this,r);for(var t=arguments.length,o=Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=eu(e),a=eu(t);i.forEach(function(e){for(var t=!1,i=r;i1}).forEach(function(e){(n=n.filter(function(t){var n=t.key,r=t.status;return n!==e||r!==el})).forEach(function(t){t.key===e&&(t.status=es)})}),n})(r,eu(n)).filter(function(e){var t=r.find(function(t){var n=t.key;return e.key===n});return!t||t.status!==eE||e.status!==el})}}}]),r}(A.Component);return(0,l.Z)(n,"defaultProps",{component:"div"}),n}(Z),eA=eo},42999:function(e,t,n){"use strict";n.d(t,{qX:function(){return S},JB:function(){return p},lm:function(){return g}});var r=n(74902),o=n(97685),i=n(45987),a=n(67294),s=n(1413),l=n(73935),E=n(87462),c=n(4942),u=n(93967),T=n.n(u),d=n(29372),R=n(71002),f=n(15105),A=n(64217),S=a.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,s=e.duration,l=void 0===s?4.5:s,u=e.showProgress,d=e.pauseOnHover,S=void 0===d||d,O=e.eventKey,p=e.content,N=e.closable,I=e.closeIcon,h=void 0===I?"x":I,_=e.props,m=e.onClick,C=e.onNoticeClose,L=e.times,g=e.hovering,v=a.useState(!1),P=(0,o.Z)(v,2),y=P[0],D=P[1],M=a.useState(0),b=(0,o.Z)(M,2),U=b[0],w=b[1],x=a.useState(0),G=(0,o.Z)(x,2),F=G[0],H=G[1],B=g||y,Y=l>0&&u,k=function(){C(O)};a.useEffect(function(){if(!B&&l>0){var e=Date.now()-F,t=setTimeout(function(){k()},1e3*l-F);return function(){S&&clearTimeout(t),H(Date.now()-e)}}},[l,B,L]),a.useEffect(function(){if(!B&&Y&&(S||0===F)){var e,t=performance.now();return function n(){cancelAnimationFrame(e),e=requestAnimationFrame(function(e){var r=Math.min((e+F-t)/(1e3*l),1);w(100*r),r<1&&n()})}(),function(){S&&cancelAnimationFrame(e)}}},[l,F,B,Y,L]);var V=a.useMemo(function(){return"object"===(0,R.Z)(N)&&null!==N?N:N?{closeIcon:h}:{}},[N,h]),$=(0,A.Z)(V,!0),W=100-(!U||U<0?0:U>100?100:U),Z="".concat(n,"-notice");return a.createElement("div",(0,E.Z)({},_,{ref:t,className:T()(Z,i,(0,c.Z)({},"".concat(Z,"-closable"),N)),style:r,onMouseEnter:function(e){var t;D(!0),null==_||null===(t=_.onMouseEnter)||void 0===t||t.call(_,e)},onMouseLeave:function(e){var t;D(!1),null==_||null===(t=_.onMouseLeave)||void 0===t||t.call(_,e)},onClick:m}),a.createElement("div",{className:"".concat(Z,"-content")},p),N&&a.createElement("a",(0,E.Z)({tabIndex:0,className:"".concat(Z,"-close"),onKeyDown:function(e){("Enter"===e.key||"Enter"===e.code||e.keyCode===f.Z.ENTER)&&k()},"aria-label":"Close"},$,{onClick:function(e){e.preventDefault(),e.stopPropagation(),k()}}),V.closeIcon),Y&&a.createElement("progress",{className:"".concat(Z,"-progress"),max:"100",value:W},W+"%"))}),O=a.createContext({}),p=function(e){var t=e.children,n=e.classNames;return a.createElement(O.Provider,{value:{classNames:n}},t)},N=function(e){var t,n,r,o={offset:8,threshold:3,gap:16};return e&&"object"===(0,R.Z)(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16),[!!e,o]},I=["className","style","classNames","styles"],h=function(e){var t=e.configList,n=e.placement,l=e.prefixCls,u=e.className,R=e.style,f=e.motion,A=e.onAllNoticeRemoved,p=e.onNoticeClose,h=e.stack,_=(0,a.useContext)(O).classNames,m=(0,a.useRef)({}),C=(0,a.useState)(null),L=(0,o.Z)(C,2),g=L[0],v=L[1],P=(0,a.useState)([]),y=(0,o.Z)(P,2),D=y[0],M=y[1],b=t.map(function(e){return{config:e,key:String(e.key)}}),U=N(h),w=(0,o.Z)(U,2),x=w[0],G=w[1],F=G.offset,H=G.threshold,B=G.gap,Y=x&&(D.length>0||b.length<=H),k="function"==typeof f?f(n):f;return(0,a.useEffect)(function(){x&&D.length>1&&M(function(e){return e.filter(function(e){return b.some(function(t){return e===t.key})})})},[D,b,x]),(0,a.useEffect)(function(){var e,t;x&&m.current[null===(e=b[b.length-1])||void 0===e?void 0:e.key]&&v(m.current[null===(t=b[b.length-1])||void 0===t?void 0:t.key])},[b,x]),a.createElement(d.V4,(0,E.Z)({key:n,className:T()(l,"".concat(l,"-").concat(n),null==_?void 0:_.list,u,(0,c.Z)((0,c.Z)({},"".concat(l,"-stack"),!!x),"".concat(l,"-stack-expanded"),Y)),style:R,keys:b,motionAppear:!0},k,{onAllRemoved:function(){A(n)}}),function(e,t){var o=e.config,c=e.className,u=e.style,d=e.index,R=o.key,f=o.times,A=String(R),O=o.className,N=o.style,h=o.classNames,C=o.styles,L=(0,i.Z)(o,I),v=b.findIndex(function(e){return e.key===A}),P={};if(x){var y=b.length-1-(v>-1?v:d-1),U="top"===n||"bottom"===n?"-50%":"0";if(y>0){P.height=Y?null===(w=m.current[A])||void 0===w?void 0:w.offsetHeight:null==g?void 0:g.offsetHeight;for(var w,G,H,k,V=0,$=0;$-1?m.current[A]=e:delete m.current[A]},prefixCls:l,classNames:h,styles:C,className:T()(O,null==_?void 0:_.notice),style:N,times:f,key:R,eventKey:R,onNoticeClose:p,hovering:x&&D.length>0})))})},_=a.forwardRef(function(e,t){var n=e.prefixCls,i=void 0===n?"rc-notification":n,E=e.container,c=e.motion,u=e.maxCount,T=e.className,d=e.style,R=e.onAllRemoved,f=e.stack,A=e.renderNotifications,S=a.useState([]),O=(0,o.Z)(S,2),p=O[0],N=O[1],I=function(e){var t,n=p.find(function(t){return t.key===e});null==n||null===(t=n.onClose)||void 0===t||t.call(n),N(function(t){return t.filter(function(t){return t.key!==e})})};a.useImperativeHandle(t,function(){return{open:function(e){N(function(t){var n,o=(0,r.Z)(t),i=o.findIndex(function(t){return t.key===e.key}),a=(0,s.Z)({},e);return i>=0?(a.times=((null===(n=t[i])||void 0===n?void 0:n.times)||0)+1,o[i]=a):(a.times=0,o.push(a)),u>0&&o.length>u&&(o=o.slice(-u)),o})},close:function(e){I(e)},destroy:function(){N([])}}});var _=a.useState({}),m=(0,o.Z)(_,2),C=m[0],L=m[1];a.useEffect(function(){var e={};p.forEach(function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))}),Object.keys(C).forEach(function(t){e[t]=e[t]||[]}),L(e)},[p]);var g=function(e){L(function(t){var n=(0,s.Z)({},t);return(n[e]||[]).length||delete n[e],n})},v=a.useRef(!1);if(a.useEffect(function(){Object.keys(C).length>0?v.current=!0:v.current&&(null==R||R(),v.current=!1)},[C]),!E)return null;var P=Object.keys(C);return(0,l.createPortal)(a.createElement(a.Fragment,null,P.map(function(e){var t=C[e],n=a.createElement(h,{key:e,configList:t,placement:e,prefixCls:i,className:null==T?void 0:T(e),style:null==d?void 0:d(e),motion:c,onNoticeClose:I,onAllNoticeRemoved:g,stack:f});return A?A(n,{prefixCls:i,key:e}):n})),E)}),m=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],C=function(){return document.body},L=0;function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?C:t,s=e.motion,l=e.prefixCls,E=e.maxCount,c=e.className,u=e.style,T=e.onAllRemoved,d=e.stack,R=e.renderNotifications,f=(0,i.Z)(e,m),A=a.useState(),S=(0,o.Z)(A,2),O=S[0],p=S[1],N=a.useRef(),I=a.createElement(_,{container:O,ref:N,prefixCls:l,motion:s,maxCount:E,className:c,style:u,onAllRemoved:T,stack:d,renderNotifications:R}),h=a.useState([]),g=(0,o.Z)(h,2),v=g[0],P=g[1],y=a.useMemo(function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=Array(t),r=0;r0},e.prototype.connect_=function(){T&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){T&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;f.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),O=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),v="undefined"!=typeof WeakMap?new WeakMap:new u,P=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=S.getInstance(),r=new g(t,n,this);v.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){P.prototype[e]=function(){var t;return(t=v.get(this))[e].apply(t,arguments)}});var y=void 0!==d.ResizeObserver?d.ResizeObserver:P,D=new Map,M=new y(function(e){e.forEach(function(e){var t,n=e.target;null===(t=D.get(n))||void 0===t||t.forEach(function(e){return e(n)})})}),b=n(15671),U=n(43144),w=n(60136),x=n(29388),G=function(e){(0,w.Z)(n,e);var t=(0,x.Z)(n);function n(){return(0,b.Z)(this,n),t.apply(this,arguments)}return(0,U.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component),F=o.forwardRef(function(e,t){var n=e.children,r=e.disabled,i=o.useRef(null),u=o.useRef(null),T=o.useContext(c),d="function"==typeof n,R=d?n(i):n,f=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),A=!d&&o.isValidElement(R)&&(0,E.Yr)(R),S=A?R.ref:null,O=(0,E.x1)(S,i),p=function(){var e;return(0,l.ZP)(i.current)||(i.current&&"object"===(0,s.Z)(i.current)?(0,l.ZP)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,l.ZP)(u.current)};o.useImperativeHandle(t,function(){return p()});var N=o.useRef(e);N.current=e;var I=o.useCallback(function(e){var t=N.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,s=o.height,l=e.offsetWidth,E=e.offsetHeight,c=Math.floor(i),u=Math.floor(s);if(f.current.width!==c||f.current.height!==u||f.current.offsetWidth!==l||f.current.offsetHeight!==E){var d={width:c,height:u,offsetWidth:l,offsetHeight:E};f.current=d;var R=l===Math.round(i)?i:l,A=E===Math.round(s)?s:E,S=(0,a.Z)((0,a.Z)({},d),{},{offsetWidth:R,offsetHeight:A});null==T||T(S,e,r),n&&Promise.resolve().then(function(){n(S,e)})}},[]);return o.useEffect(function(){var e=p();return e&&!r&&(D.has(e)||(D.set(e,new Set),M.observe(e)),D.get(e).add(I)),function(){D.has(e)&&(D.get(e).delete(I),D.get(e).size||(M.unobserve(e),D.delete(e)))}},[i.current,r]),o.createElement(G,{ref:u},A?o.cloneElement(R,{ref:O}):R)}),H=o.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:(0,i.Z)(n)).map(function(n,i){var a=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(i);return o.createElement(F,(0,r.Z)({},e,{key:a,ref:0===i?t:void 0}),n)})});H.Collection=function(e){var t=e.children,n=e.onBatchResize,r=o.useRef(0),i=o.useRef([]),a=o.useContext(c),s=o.useCallback(function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){s===r.current&&(null==n||n(i.current),i.current=[])}),null==a||a(e,t,o)},[n,a]);return o.createElement(c.Provider,{value:s},t)};var B=H},92419:function(e,t,n){"use strict";n.d(t,{G:function(){return a},Z:function(){return A}});var r=n(93967),o=n.n(r),i=n(67294);function a(e){var t=e.children,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle,s=e.className,l=e.style;return i.createElement("div",{className:o()("".concat(n,"-content"),s),style:l},i.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"==typeof t?t():t))}var s=n(87462),l=n(1413),E=n(45987),c=n(40228),u={shiftX:64,adjustY:1},T={adjustX:1,shiftY:!0},d=[0,0],R={left:{points:["cr","cl"],overflow:T,offset:[-4,0],targetOffset:d},right:{points:["cl","cr"],overflow:T,offset:[4,0],targetOffset:d},top:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:d},bottom:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:d},topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:d},leftTop:{points:["tr","tl"],overflow:T,offset:[-4,0],targetOffset:d},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:d},rightTop:{points:["tl","tr"],overflow:T,offset:[4,0],targetOffset:d},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:d},rightBottom:{points:["bl","br"],overflow:T,offset:[4,0],targetOffset:d},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:d},leftBottom:{points:["br","bl"],overflow:T,offset:[-4,0],targetOffset:d}},f=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],A=(0,i.forwardRef)(function(e,t){var n=e.overlayClassName,r=e.trigger,o=e.mouseEnterDelay,u=e.mouseLeaveDelay,T=e.overlayStyle,d=e.prefixCls,A=void 0===d?"rc-tooltip":d,S=e.children,O=e.onVisibleChange,p=e.afterVisibleChange,N=e.transitionName,I=e.animation,h=e.motion,_=e.placement,m=e.align,C=e.destroyTooltipOnHide,L=e.defaultVisible,g=e.getTooltipContainer,v=e.overlayInnerStyle,P=(e.arrowContent,e.overlay),y=e.id,D=e.showArrow,M=(0,E.Z)(e,f),b=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,function(){return b.current});var U=(0,l.Z)({},M);return"visible"in e&&(U.popupVisible=e.visible),i.createElement(c.Z,(0,s.Z)({popupClassName:n,prefixCls:A,popup:function(){return i.createElement(a,{key:"content",prefixCls:A,id:y,overlayInnerStyle:v},P)},action:void 0===r?["hover"]:r,builtinPlacements:R,popupPlacement:void 0===_?"right":_,ref:b,popupAlign:void 0===m?{}:m,getPopupContainer:g,onPopupVisibleChange:O,afterPopupVisibleChange:p,popupTransitionName:N,popupAnimation:I,popupMotion:h,defaultPopupVisible:L,autoDestroy:void 0!==C&&C,mouseLeaveDelay:void 0===u?.1:u,popupStyle:T,mouseEnterDelay:void 0===o?0:o,arrow:void 0===D||D},U),S)})},50344:function(e,t,n){"use strict";n.d(t,{Z:function(){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[];return r.Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?i=i.concat(e(t)):(0,o.isFragment)(t)&&t.props?i=i.concat(e(t.props.children,n)):i.push(t))}),i}}});var r=n(67294),o=n(59864)},98924:function(e,t,n){"use strict";function r(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}n.d(t,{Z:function(){return r}})},94999:function(e,t,n){"use strict";function r(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,{Z:function(){return r}})},44958:function(e,t,n){"use strict";n.d(t,{hq:function(){return f},jL:function(){return R}});var r=n(1413),o=n(98924),i=n(94999),a="data-rc-order",s="data-rc-priority",l=new Map;function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):"rc-util-key"}function c(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function u(e){return Array.from((l.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,o.Z)())return null;var n=t.csp,r=t.prepend,i=t.priority,l=void 0===i?0:i,E="queue"===r?"prependQueue":r?"prepend":"append",T="prependQueue"===E,d=document.createElement("style");d.setAttribute(a,E),T&&l&&d.setAttribute(s,"".concat(l)),null!=n&&n.nonce&&(d.nonce=null==n?void 0:n.nonce),d.innerHTML=e;var R=c(t),f=R.firstChild;if(r){if(T){var A=(t.styles||u(R)).filter(function(e){return!!["prepend","prependQueue"].includes(e.getAttribute(a))&&l>=Number(e.getAttribute(s)||0)});if(A.length)return R.insertBefore(d,A[A.length-1].nextSibling),d}R.insertBefore(d,f)}else R.appendChild(d);return d}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c(t);return(t.styles||u(n)).find(function(n){return n.getAttribute(E(t))===e})}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(e,t);n&&c(t).removeChild(n)}function f(e,t){var n,o,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},R=c(s),f=u(R),A=(0,r.Z)((0,r.Z)({},s),{},{styles:f});!function(e,t){var n=l.get(e);if(!n||!(0,i.Z)(document,n)){var r=T("",t),o=r.parentNode;l.set(e,o),e.removeChild(r)}}(R,A);var S=d(t,A);if(S)return null!==(n=A.csp)&&void 0!==n&&n.nonce&&S.nonce!==(null===(o=A.csp)||void 0===o?void 0:o.nonce)&&(S.nonce=null===(a=A.csp)||void 0===a?void 0:a.nonce),S.innerHTML!==e&&(S.innerHTML=e),S;var O=T(e,A);return O.setAttribute(E(A),t),O}},34203:function(e,t,n){"use strict";n.d(t,{Sh:function(){return a},ZP:function(){return l},bn:function(){return s}});var r=n(71002),o=n(67294),i=n(73935);function a(e){return e instanceof HTMLElement||e instanceof SVGElement}function s(e){return e&&"object"===(0,r.Z)(e)&&a(e.nativeElement)?e.nativeElement:a(e)?e:null}function l(e){var t;return s(e)||(e instanceof o.Component?null===(t=i.findDOMNode)||void 0===t?void 0:t.call(i,e):null)}},5110:function(e,t){"use strict";t.Z=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}},27571:function(e,t,n){"use strict";function r(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function o(e){return r(e) instanceof ShadowRoot?r(e):null}n.d(t,{A:function(){return o}})},15105:function(e,t){"use strict";var n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE||e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY||e>=n.A&&e<=n.Z||-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},38135:function(e,t,n){"use strict";n.d(t,{s:function(){return A},v:function(){return O}});var r,o,i=n(74165),a=n(15861),s=n(71002),l=n(1413),E=n(73935),c=(0,l.Z)({},r||(r=n.t(E,2))),u=c.version,T=c.render,d=c.unmountComponentAtNode;try{Number((u||"").split(".")[0])>=18&&(o=c.createRoot)}catch(e){}function R(e){var t=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,s.Z)(t)&&(t.usingClientEntryPoint=e)}var f="__rc_react_root__";function A(e,t){if(o){var n;R(!0),n=t[f]||o(t),R(!1),n.render(e),t[f]=n;return}T(e,t)}function S(){return(S=(0,a.Z)((0,i.Z)().mark(function e(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then(function(){var e;null===(e=t[f])||void 0===e||e.unmount(),delete t[f]}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function O(e){return p.apply(this,arguments)}function p(){return(p=(0,a.Z)((0,i.Z)().mark(function e(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(void 0!==o)){e.next=2;break}return e.abrupt("return",function(e){return S.apply(this,arguments)}(t));case 2:d(t);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}},74204:function(e,t,n){"use strict";n.d(t,{Z:function(){return a},o:function(){return s}});var r,o=n(44958);function i(e){var t,n,r="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),i=document.createElement("div");i.id=r;var a=i.style;if(a.position="absolute",a.left="0",a.top="0",a.width="100px",a.height="100px",a.overflow="scroll",e){var s=getComputedStyle(e);a.scrollbarColor=s.scrollbarColor,a.scrollbarWidth=s.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),E=parseInt(l.width,10),c=parseInt(l.height,10);try{var u=E?"width: ".concat(l.width,";"):"",T=c?"height: ".concat(l.height,";"):"";(0,o.hq)("\n#".concat(r,"::-webkit-scrollbar {\n").concat(u,"\n").concat(T,"\n}"),r)}catch(e){console.error(e),t=E,n=c}}document.body.appendChild(i);var d=e&&t&&!isNaN(t)?t:i.offsetWidth-i.clientWidth,R=e&&n&&!isNaN(n)?n:i.offsetHeight-i.clientHeight;return document.body.removeChild(i),(0,o.jL)(r),{width:d,height:R}}function a(e){return"undefined"==typeof document?0:((e||void 0===r)&&(r=i()),r.width)}function s(e){return"undefined"!=typeof document&&e&&e instanceof Element?i(e):{width:0,height:0}}},66680:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294);function o(e){var t=r.useRef();return t.current=e,r.useCallback(function(){for(var e,n=arguments.length,r=Array(n),o=0;o2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,o.ZP)(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&s>1)return!1;i.add(t);var E=s+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var c=0;c